gcc/ChangeLog:
[official-gcc.git] / gcc / ChangeLog
blob9af07fc3a2fb07ceb9fa3f4f72c224d2439ac1e4
1 2018-08-16  Martin Sebor  <msebor@redhat.com>
3         PR tree-optimization/86853
4         * gimple-ssa-sprintf.c (struct format_result): Rename member.
5         (struct fmtresult): Add member and initialize it in ctors.
6         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
7         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
8         (format_directive): Set POSUNDER4K when MAYFAIL is set.
9         (parse_directive): Handle %C same as %c.
10         (sprintf_dom_walker::compute_format_length): Adjust.
11         (is_call_safe): Adjust.
13 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
16         for determining how to count the elements.
17         * builtins.h (c_strlen): Adjust prototype.
18         * expr.c (string_constant): Add new parameter mem_size.
19         Set *mem_size appropriately.
20         * expr.h (string_constant): Adjust protoype.
21         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
22         * gimple-fold.h (get_range_strlen): Adjust prototype.
23         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
24         (format_string): Call get_string_length with eltsize.
26 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
28         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
29         to emit the span, rather than setting it as the prefix.
31 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
33         * diagnostic-show-locus.c (layout::start_annotation_line): Add
34         "margin_char" parameter, defaulting to space.  Use it in place
35         of pp_space for the initial part of the margin.
36         (layout::print_leading_fixits): Use '+' when filling the margin
37         of line-insertion fix-it hints.
39 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
41         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
42         Delete.
44 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
46         * config/rs6000/altivec.md: Don't set length attribute to the default
47         value.
48         * config/rs6000/darwin.md: Ditto.
49         * config/rs6000/dfp.md: Ditto.
50         * config/rs6000/htm.md: Ditto.
51         * config/rs6000/rs6000.md: Ditto.
52         * config/rs6000/sync.md: Ditto.
53         * config/rs6000/vsx.md: Ditto.
55 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
57         * config/rs6000/altivec.md: Don't set length attribute to the default
58         value, for branch instructions.
59         * config/rs6000/darwin.md: Ditto.
60         * config/rs6000/rs6000.md: Ditto.
62 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
64         * config/rs6000/rs6000.md (length): Always define as const_int 4.
65         (unnamed conditional branch define_insn): Set length to 4 or 8
66         depending on offset.
67         (<bd>_<mode>): Similar, for alternative 0.
68         (<bd>tf_<mode>): Ditto.
70 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
72         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
74 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
76         * doc/rtl.texi: Replace old RTX class names with new names.
79 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
81         * expmed.h (canonicalize_comparison): New declaration.
82         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
83         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
84         * optabs.c (prepare_cmp_insn): Likewise.
85         * rtl.h (unsigned_condition_p): New function which checks if a
86         comparison operator is unsigned.
88 2018-08-16  Nathan Sidwell  <nathan@acm.org>
90         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
91         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
93 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
95         PR target/84711
96         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
97         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
98         (mov<mov>): ..this and enable unconditionally.
100 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
102         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
104 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
106         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
107         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
108         "Common" with "Target".
110 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
112         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
113         * doc/invoke.texi (mmitigate-rop): Remove.
114         * config/i386/i386.c: Do not include "regrename.h".
115         (ix86_rop_should_change_byte_p, reg_encoded_number)
116         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
117         Remove.
118         (ix86_reorg): Remove call to ix86_mitigate_rop.
119         * config/i386/i386.md (attr "modrm_class"): Remove.
120         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
121         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
122         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
124 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
126         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
127         allow folding of mergeh() and mergel() for the float and double types.
128         (fold_mergehl_helper): Rework to handle building a permute tree
129         for float vectors.
131 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
133         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
134         for TARGET_SSE.
136 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
138         * common.opt (fdiagnostics-show-labels): New option.
139         * diagnostic-show-locus.c (class layout_range): Add field
140         "m_label".
141         (class layout): Add field "m_show_labels_p".
142         (layout_range::layout_range): Add param "label" and use it to
143         initialize m_label.
144         (make_range): Pass in NULL for new "label" param of layout_range's
145         ctor.
146         (layout::layout): Initialize m_show_labels_p.
147         (layout::maybe_add_location_range): Pass in loc_range->m_label
148         when constructing layout_range instances.
149         (struct line_label): New struct.
150         (layout::print_any_labels): New member function.
151         (layout::print_line): Call it if label-printing is enabled.
152         (selftest::test_one_liner_labels): New test.
153         (selftest::test_diagnostic_show_locus_one_liner): Call it.
154         * diagnostic.c (diagnostic_initialize): Initialize
155         context->show_labels_p.
156         * diagnostic.h (struct diagnostic_context): Add field
157         "show_labels_p".
158         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
159         -fno-diagnostics-show-labels.
160         * dwarf2out.c (gen_producer_string): Add
161         OPT_fdiagnostics_show_labels to the ignored options.
162         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
163         param.
164         (gcc_rich_location::maybe_add_expr): Likewise.
165         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
166         label" param, defaulting to NULL.
167         (gcc_rich_location::add_expr): Add "label" param.
168         (gcc_rich_location::maybe_add_expr): Likewise.
169         (class text_range_label): New class.
170         (class range_label_for_type_mismatch): New class.
171         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
172         of format_warning_va.
173         (fmtwarn_n): Likewise for new params of format_warning_n_va.
174         * lto-wrapper.c (merge_and_complain): Add
175         OPT_fdiagnostics_show_labels to the "pick one setting" options.
176         (append_compiler_options): Likewise to the dropped options.
177         (append_diag_options): Likewise to the passed-on options.
178         * opts.c (common_handle_option): Handle the new option.
179         * selftest-diagnostic.c
180         (test_diagnostic_context::test_diagnostic_context): Enable
181         show_labels_p.
182         * substring-locations.c: Include "gcc-rich-location.h".
183         (format_warning_n_va): Add "fmt_label" and "param_label" params
184         and use them as appropriate.
185         (format_warning_va): Add "fmt_label" and "param_label" params,
186         passing them on to format_warning_n_va.
187         (format_warning_at_substring): Likewise.
188         (format_warning_at_substring_n): Likewise.
189         * substring-locations.h (format_warning_va): Add "fmt_label" and
190         "param_label" params.
191         (format_warning_n_va): Likewise.
192         (format_warning_at_substring): Likewise.
193         (format_warning_at_substring_n): Likewise.
194         * toplev.c (general_init): Initialize global_dc->show_labels_p.
196 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
198         PR testsuite/86519
199         * builtins.c (expand_builtin_memcmp): Do not expand the call
200         when overflow is detected.
202 2018-08-15  Martin Sebor  <msebor@redhat.com>
204         PR tree-optimization/71625
205         * config/aarch64/aarch64-builtins.c
206         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
208 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
210         * config/s390/s390.c (s390_reorg): Remove loop.
212 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
214         * config/darwin.c
215          (darwin_function_switched_text_sections): Delete.
216         * gcc/config/darwin.h
217          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
219 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
221         PR target/81685
222         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
223         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
224         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
226 2018-08-15  Martin Liska  <mliska@suse.cz>
228         PR tree-optimization/86925
229         * predict.c (expr_expected_value_1): When taking
230         later predictor, assign also probability.
231         Use fold_build2_initializer_loc in order to fold
232         the expression in -frounding-math.
234 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
236         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
237         patterns.
238         (expand_vec_perm_1): Try the new method.
240 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
242         PR target/86547
243         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
244         Check whether lra_live_max_point is 0 before dividing.
246 2018-08-14  Martin Sebor  <msebor@redhat.com>
248         PR tree-optimization/86650
249         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
250         (vrp_prop::check_mem_ref): Same.
252 2018-08-13  Liu Hao <lh_mouse@126.com>
254         * pretty-print.c (eat_esc_sequence): Swap the foreground and
255         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
256         and clear it thereafter, as it only works for DBCS.
258 2018-08-13  Liu Hao <lh_mouse@126.com>
260         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
261         handle returned by _get_osf_handle().
263 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
265         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
266         for folding vec_perm.
268 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
270         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
271         Add support for gimple-folding of vec_pack() and vec_unpack()
272         intrinsics.
274 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
276         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
277         vec_xst variants to the list.
278         (rs6000_gimple_fold_builtin): Add support for folding unaligned
279         vector loads and stores.
281 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
283         * config.gcc (rs6000-ibm-aix4.x): Delete.
284         (rs6000-ibm-aix5.1): Delete.
285         (rs6000-ibm-aix5.2): Delete.
286         (rs6000-ibm-aix5.3): Delete.
287         * config/rs6000/aix43.h: Delete.
288         * config/rs6000/aix51.h: Delete.
289         * config/rs6000/aix52.h: Delete.
290         * config/rs6000/t-aix43: Delete.
292 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
294         * config/s390/s390.c (s390_decompose_constant_pool_ref):
295         New function.
296         (s390_decompose_address): Factor out constant pool ref
297         decomposition.
299 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
301         * config/nds32/nds32-predicates.c
302         (nds32_can_use_bclr_p): Change return type as bool.
303         (nds32_can_use_bset_p): Ditto.
304         (nds32_can_use_btgl_p): Ditto.
305         (nds32_can_use_bitci_p): Ditto.
306         * config/nds32/nds32-protos.h
307         (nds32_can_use_bclr_p): Change declaration.
308         (nds32_can_use_bset_p): Ditto.
309         (nds32_can_use_btgl_p): Ditto.
310         (nds32_can_use_bitci_p): Ditto.
312 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
314         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
315         Support -msched-prolog-epilog option.
316         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
318 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
320         * common/config/nds32/nds32-common.c
321         (nds32_option_optimization_table): Enalbe -malways-align.
323 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
325         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
326         extra_headers.
327         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
328         OPT_misr_secure_ case.
329         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
330         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
331         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
332         secure attribute.
333         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
334         (nds32_isr_info): New field security_level.
335         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
336         * config/nds32/nds32.md (return_internal): Consider critical attribute.
337         * config/nds32/nds32.opt (misr-secure): New option.
338         * config/nds32/nds32_init.inc: New file.
339         * config/nds32/nds32_isr.h: New file.
341 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
343         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
344         Update comment for atomic instructions.
345         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
346         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
347         Remove.
348         (atomic_loaddi): Revise fence expansion to only emit fence prior to
349         load for __ATOMIC_SEQ_CST model.
350         (atomic_loaddi_1): Remove float register target.
351         (atomic_storedi): Handle CONST_INT values.
352         (atomic_storedi_1): Remove float register source.  Add special case
353         for zero value.
354         (memory_barrier): New expander and insn.
356 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
358         PR tree-optimization/86835
359         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
360         new_stmt after def_gsi, make sure to insert new_square_stmt after
361         that stmt, not 2 stmts before it.
363 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
365         PR target/82418
366         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
367         instead of SWI48.
369 2018-08-10  Martin Liska  <mliska@suse.cz>
371         PR target/83610
372         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
373         function type.
374         * builtins.c (expand_builtin_expect_with_probability):
375         New function.
376         (expand_builtin_expect_with_probability): New function.
377         (build_builtin_expect_predicate): Add new argumnet probability
378         for BUILT_IN_EXPECT_WITH_PROBABILITY.
379         (fold_builtin_expect):
380         (fold_builtin_2):
381         (fold_builtin_3):
382         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
383         * builtins.h (fold_builtin_expect): Set new argument.
384         * doc/extend.texi: Document __builtin_expect_with_probability.
385         * doc/invoke.texi: Likewise.
386         * gimple-fold.c (gimple_fold_call): Pass new argument.
387         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
388         also BUILT_IN_EXPECT_WITH_PROBABILITY.
389         * predict.c (get_predictor_value): New function.
390         (expr_expected_value): Add new argument probability. Assume
391         that predictor and probability are always non-null.
392         (expr_expected_value_1): Likewise.  For __builtin_expect and
393         __builtin_expect_with_probability set probability.  Handle
394         combination in binary expressions.
395         (tree_predict_by_opcode): Simplify code by simply calling
396         get_predictor_value.
397         (pass_strip_predict_hints::execute): Add handling of
398         BUILT_IN_EXPECT_WITH_PROBABILITY.
399         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
400         new predictor.
401         * tree.h (DECL_BUILT_IN_P): New function.
403 2018-08-10  Martin Liska  <mliska@suse.cz>
405         PR tree-optimization/85799
406         * passes.def: Add argument for pass_strip_predict_hints.
407         * predict.c (class pass_strip_predict_hints): Add new argument
408         early_p.
409         (strip_predictor_early): New function.
410         (pass_strip_predict_hints::execute): Call the function to
411         strip predictors.
412         (strip_predict_hints): New function.
413         * predict.def: Fix comment.
415 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
417         * Makefile.in: Clarify which tm.texi to copy over to assert the
418         right to grant a GFDL license for all.
420 2018-08-09  Jeff Law  <law@redhat.com>
422         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
423         unused variable.
425 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
427         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
428         prototype.
430 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
432         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
433         reductions for variable-length vectors.
435 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
437         PR other/84889
438         * common.opt (fdiagnostics-show-line-numbers): New option.
439         * diagnostic-show-locus.c (class layout): Add fields
440         "m_show_line_numbers_p" and "m_linenum_width";
441         (num_digits): New function.
442         (test_num_digits): New function.
443         (layout::layout): Initialize new fields.  Update m_x_offset
444         logic to handle any left margin.
445         (layout::print_source_line): Print line number when requested.
446         (layout::start_annotation_line): New member function.
447         (layout::print_annotation_line): Call it.
448         (layout::print_leading_fixits): Likewise.
449         (layout::print_trailing_fixits): Likewise.  Update calls to
450         move_to_column for new parameter.
451         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
452         it to potentially call start_annotation_line.
453         (layout::show_ruler): Call start_annotation_line.
454         (selftest::test_line_numbers_multiline_range): New selftest.
455         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
456         and selftest::test_line_numbers_multiline_range.
457         * diagnostic.c (diagnostic_initialize): Initialize
458         show_line_numbers_p.
459         * diagnostic.h (struct diagnostic_context): Add field
460         "show_line_numbers_p".
461         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
462         -fno-diagnostics-show-line-numbers.
463         * dwarf2out.c (gen_producer_string): Add
464         OPT_fdiagnostics_show_line_numbers to the ignored options.
465         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
466         one setting" options.
467         (append_compiler_options): Likewise to the dropped options.
468         (append_diag_options): Likewise to the passed-on options.
469         * opts.c (common_handle_option): Handle the new option.
470         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
472 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
474         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
475         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
476         third argument of type "const signed char" to descriptions of
477         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
478         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
479         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
480         __builtin_bcdsub_ov functions.
482 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
484         PR tree-optimization/86858
485         * tree-vect-loop.c (vect_is_simple_reduction): Restore
486         flow_bb_inside_loop_p calls.
488 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
490         PR tree-optimization/86871
491         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
492         instead of gimple_assign_lhs.
494 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
496         PR target/86887
497         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
498         register constraint to operand 0.
499         (add<mode>3_carryinC): Likewise.
500         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
502 2018-08-09  Martin Liska  <mliska@suse.cz>
504         PR c/86895
505         * common.opt: Remove extra line.
507 2018-08-09  Martin Liska  <mliska@suse.cz>
509         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
510         at the end of a line, make first letter capital and end up
511         a sentence with a dot.
512         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
513         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
514         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
515         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
516         (PARAM_MAX_ISL_OPERATIONS): Likewise.
517         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
518         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
519         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
520         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
521         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
522         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
523         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
524         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
525         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
526         (PARAM_TREE_REASSOC_WIDTH): Likewise.
527         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
528         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
529         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
531 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
533         PR target/84332
534         * config/s390/s390.c (s390_option_override_internal): Reduce the
535         stack-clash-protection-probe-interval param if it would be too big
536         for z900.
538 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
540         PR target/46179
541         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
542         * config/m68k/m68k.c (handle_move_double): Don't call
543         m68k_final_prescan_insn.
544         (m68k_adjust_decorated_operand): Renamed from
545         m68k_final_prescan_insn, remove first and third operand and
546         simplify.
547         (print_operand): Call it.
548         (print_operand_address): Call it.
550 2018-08-08  Nathan Sidwell  <nathan@acm.org>
552         * diagnostic.c (diagnostic_report_current_module): Use
553         linemap_included_from & linemap_included_from_linemap.
555 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
557         * config/aarch64/aarch64-cores.def: Add phecda core.
558         * config/aarch64/aarch64-tune.md: Regenerate.
559         * doc/invoke.texi: Add phecda core.
561 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
563         PR target/85295
564         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
565         definitions.
566         * config/s390/s390.md ("movti"): Add more alternatives for
567         constant to GPR copies.
569 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
571         * config/s390/s390.c: Fix whitespace damage throughout the file.
572         * config/s390/s390.h: Likewise.
573         * config/s390/tpf.h: Likewise.
575 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
577         * config/s390/s390.c (s390_loadrelative_operand_p):
578         Remove TARGET_CPU_ZARCH usages.
579         (s390_rtx_costs): Likewise.
580         (s390_legitimate_constant_p): Likewise.
581         (s390_cannot_force_const_mem): Likewise.
582         (legitimate_reload_constant_p): Likewise.
583         (s390_preferred_reload_class): Likewise.
584         (legitimize_pic_address): Likewise.
585         (legitimize_tls_address): Likewise.
586         (s390_split_branches): Removed.
587         (s390_add_execute): Removed.
588         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
589         (s390_mainpool_start): Likewise.
590         (s390_mainpool_finish): Likewise.
591         (s390_mainpool_cancel): Removed.
592         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
593         (s390_chunkify_cancel): Likewise.
594         (s390_return_addr_rtx): Likewise.
595         (s390_register_info): Remove split_branches_pending_p uages.
596         (s390_optimize_register_info): Likewise.
597         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
598         split_branches_pending_p usages.
599         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
600         (s390_load_got): Likewise.
601         (s390_expand_split_stack_prologue): Likewise.
602         (output_asm_nops): Likewise.
603         (s390_function_profiler): Likewise.
604         (s390_emit_call): Likewise.
605         (s390_conditional_register_usage): Likewise.
606         (s390_optimize_prologue): Likewise.
607         (s390_reorg): Remove TARGET_CPU_ZARCH and
608         split_branches_pending_p usages.
609         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
610         usages.
611         (s390_output_indirect_thunk_function): Likewise.
612         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
613         (TARGET_CPU_ZARCH_P): Removed.
614         (struct machine_function): Remove split_branches_pending_p.
615         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
617 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
619         * common/config/s390/s390-common.c (processor_flags_table):
620         Remove flags.
621         * config.gcc: Remove with_arch/with_tune support.
622         * config/s390/2064.md: Remove cpu attribute comparisons.
623         * config/s390/driver-native.c (s390_host_detect_local_cpu):
624         Remove MTN.
625         * config/s390/linux.h (ASM_SPEC):
626         Remove -march support.
627         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
628         Use a table to get an arch level.
629         * config/s390/s390-opts.h (enum processor_type):
630         Remove enum values.
631         * config/s390/s390.c
632         (processor_table): Remove entries, add arch_level values.
633         (s390_issue_rate): Remove cases.
634         (s390_option_override): Adjust
635         s390_option_override_internal() call.
636         (s390_option_override_internal): Remove deprecation warning.
637         (s390_valid_target_attribute_tree): Adjust
638         s390_option_override_internal() call.
639         * config/s390/s390.h (struct s390_processor):
640         Share with s390-c.c, add arch_level field.
641         * config/s390/s390.md:
642         Remove occurrences in cpu attribute.
643         * config/s390/s390.opt: Remove -march/-mtune support.
644         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
645         * doc/invoke.texi: Remove deprecation warning.
647 2018-08-08  Luis Machado  <luis.machado@linaro.org>
649         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
650         global.
651         (qdf24xx_tunings): Set vector cost structure to
652         qdf24xx_vector_cost.
654         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
655         <register_sextend>: Set to 3.
657 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
659         PR target/86838
660         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
661         * config/aarch64/aarch64-simd.md
662         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
663         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
664         (aarch64_frecpx<mode>): ...this new pattern.
665         * config/aarch64/aarch64-simd-builtins.def: Remove comment
666         about aarch64_frecp<FRECP:frecp_suffix><mode>.
668 2018-08-07  Martin Liska  <mliska@suse.cz>
670         PR middle-end/83023
671         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
672         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
673         * predict.def (PRED_MALLOC_NONNULL): New predictor.
674         * doc/extend.texi: Document that malloc attribute adds
675         hit to compiler.
677 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
679         PR target/86785
680         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
681         Define to speculation_safe_value_not_needed.
683 2018-08-06  Jeff Law  <law@redhat.com>
685         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
686         the vr_values instance to cprop_into_stmt.
687         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
688         (cprop_operand): Also query EVRP to determine if OP is a constant.
690 2018-08-06  Nathan Sidwell  <nathan@acm.org>
692         * diagnostic.c (diagnostic_report_current_module): Reroll
693         included-at loop.  Translate text.
695 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
697         * function-tests.c (selftest::test_expansion_to_rtl): Call
698         free_after_compilation.
700 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
702         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
704 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
706         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
707         loops with memory block operations from getting unrolled.
709 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
711         PR target/86807
712         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
713         Define to speculation_safe_value_not_needed.
715 2018-08-06  Jeff Law  <law@redhat.com>
717         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
718         assert.
720 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
722         PR target/86662
723         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
724         with all enabled __intN types.
726         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
728 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
730         * alias.c (record_set): Check for clobber high.
731         * cfgexpand.c (expand_gimple_stmt): Likewise.
732         * combine-stack-adj.c (single_set_for_csa): Likewise.
733         * combine.c (find_single_use_1): Likewise.
734         (set_nonzero_bits_and_sign_copies): Likewise.
735         (get_combine_src_dest): Likewise.
736         (is_parallel_of_n_reg_sets): Likewise.
737         (try_combine): Likewise.
738         (record_dead_and_set_regs_1): Likewise.
739         (reg_dead_at_p_1): Likewise.
740         (reg_dead_at_p): Likewise.
741         * dce.c (deletable_insn_p): Likewise.
742         (mark_nonreg_stores_1): Likewise.
743         (mark_nonreg_stores_2): Likewise.
744         * df-scan.c (df_find_hard_reg_defs): Likewise.
745         (df_uses_record): Likewise.
746         (df_get_call_refs): Likewise.
747         * dwarf2out.c (mem_loc_descriptor): Likewise.
748         * haifa-sched.c (haifa_classify_rtx): Likewise.
749         * ira-build.c (create_insn_allocnos): Likewise.
750         * ira-costs.c (scan_one_insn): Likewise.
751         * ira.c (equiv_init_movable_p): Likewise.
752         (rtx_moveable_p): Likewise.
753         (interesting_dest_for_shprep): Likewise.
754         * jump.c (mark_jump_label_1): Likewise.
755         * postreload-gcse.c (record_opr_changes): Likewise.
756         * postreload.c (reload_cse_simplify): Likewise.
757         (struct reg_use): Add source expr.
758         (reload_combine): Check for clobber high.
759         (reload_combine_note_use): Likewise.
760         (reload_cse_move2add): Likewise.
761         (move2add_note_store): Likewise.
762         * print-rtl.c (print_pattern): Likewise.
763         * recog.c (decode_asm_operands): Likewise.
764         (store_data_bypass_p): Likewise.
765         (if_test_bypass_p): Likewise.
766         * regcprop.c (kill_clobbered_value): Likewise.
767         (kill_set_value): Likewise.
768         * reginfo.c (reg_scan_mark_refs): Likewise.
769         * reload1.c (maybe_fix_stack_asms): Likewise.
770         (eliminate_regs_1): Likewise.
771         (elimination_effects): Likewise.
772         (mark_not_eliminable): Likewise.
773         (scan_paradoxical_subregs): Likewise.
774         (forget_old_reloads_1): Likewise.
775         * reorg.c (find_end_label): Likewise.
776         (try_merge_delay_insns): Likewise.
777         (redundant_insn): Likewise.
778         (own_thread_p): Likewise.
779         (fill_simple_delay_slots): Likewise.
780         (fill_slots_from_thread): Likewise.
781         (dbr_schedule): Likewise.
782         * resource.c (update_live_status): Likewise.
783         (mark_referenced_resources): Likewise.
784         (mark_set_resources): Likewise.
785         * rtl.c (copy_rtx): Likewise.
786         * rtlanal.c (reg_referenced_p): Likewise.
787         (single_set_2): Likewise.
788         (noop_move_p): Likewise.
789         (note_stores): Likewise.
790         * sched-deps.c (sched_analyze_reg): Likewise.
791         (sched_analyze_insn): Likewise.
793 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
795         * cse.c (invalidate_reg): New function extracted from...
796         (invalidate): ...here.
797         (canonicalize_insn): Check for clobber high.
798         (invalidate_from_clobbers): invalidate clobber highs.
799         (invalidate_from_sets_and_clobbers): Likewise.
800         (count_reg_usage): Check for clobber high.
801         (insn_live_p): Likewise.
802         * cselib.c (cselib_expand_value_rtx_1):Likewise.
803         (cselib_invalidate_regno): Check for clobber in setter.
804         (cselib_invalidate_rtx): Pass through setter.
805         (cselib_invalidate_rtx_note_stores):
806         (cselib_process_insn): Check for clobber high.
807         * cselib.h (cselib_invalidate_rtx): Add operand.
809 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
811         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
812         (mark_not_eliminable): Likewise.
813         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
814         * lra-lives.c (process_bb_lives): Check for clobber high.
815         * lra.c (new_insn_reg): Remember clobber highs.
816         (collect_non_operand_hard_regs): Check for clobber high.
817         (lra_set_insn_recog_data): Likewise.
818         (add_regs_to_insn_regno_info): Likewise.
819         (lra_update_insn_regno_info): Likewise.
821 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
823         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
824         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
826 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
828         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
829         (copy_insn_1): Likewise.
830         (gen_hard_reg_clobber_high): New gen function.
831         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
832         * genemit.c (gen_exp): Likewise.
833         (gen_emit_seq): Pass through info.
834         (gen_insn): Check for CLOBBER_HIGH.
835         (gen_expand): Pass through info.
836         (gen_split): Likewise.
837         (output_add_clobbers): Likewise.
838         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
839         (remove_clobbers): Likewise.
840         * rtl.h (gen_hard_reg_clobber_high): New declaration.
842 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
844         * doc/rtl.texi (clobber_high): Add.
845         (parallel): Add in clobber high
846         * rtl.c (rtl_check_failed_code3): Add function.
847         * rtl.def (CLOBBER_HIGH): Add expression.
848         * rtl.h (RTL_CHECKC3): Add macro.
849         (rtl_check_failed_code3): Add declaration.
850         (XC3EXP): Add macro.
852 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
854         PR target/86386
855         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
856         cfun->machine->max_used_stack_alignment if needed.
858 2018-08-04  Martin Sebor  <msebor@redhat.com>
860         PR tree-optimization/86571
861         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
862         NaN output to 4.
864 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
866         PR target/86799
867         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
868         Define.
870 2018-08-03  Jeff Law  <law@redhat.com>
872         PR target/86795
873         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
874         Define to speculation_safe_value_not_needed.
876 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
878         * doc/gcov.texi (-x): Remove duplicate "to".
879         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
880         (-Wif-not-aligned): Remove duplicate "is".
881         (-flto): Remove duplicate "the".
882         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
883         duplicate "v5.00.b".
884         (MSP430 Options): Remove duplicate "and" from the description
885         of "-mgprel-sec=regexp".
886         (x86 Options): Remove duplicate copies of "vmldLog102" and
887         vmlsLog104 from description of "-mveclibabi=type".
889 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
891         * internal-fn.h (first_commutative_argument): Declare.
892         * internal-fn.c (first_commutative_argument): New function.
893         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
894         restrictions for pattern statements.  Use first_commutative_argument
895         to look for commutative operands in calls to internal functions.
897 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
899         * Makefile.in (wide-int-range.o): New.
900         * tree-vrp.c: Move all the wide_int_* functions to...
901         * wide-int-range.cc: ...here.
902         * tree-vrp.h: Move all the wide_int_* prototypes to...
903         * wide-int-range.h: ...here.
905 2018-08-03  Tom de Vries  <tdevries@suse.de>
907         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
908         UI_NONE.
909         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
910         * except.c (output_function_exception_table): Do early exit if
911         targetm_common.except_unwind_info (&global_options) == UI_NONE.
913 2018-08-03  Martin Liska  <mliska@suse.cz>
915         * predict.c (dump_prediction): Change to 2 digits
916         in fraction part.
918 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
920         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
921         neon_dup_q to...
922         (falkor_am_1_gtov_gtov): ... a new insn reservation.
924 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
926         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
927         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
928         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
929         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
930         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
932 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
934         * diagnostic-show-locus.c (diagnostic_show_locus): Use
935         pp_take_prefix when saving the existing prefix.
936         * diagnostic.c (diagnostic_append_note): Likewise.
937         * langhooks.c (lhd_print_error_function): Likewise.
938         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
939         param's type.  Free the existing prefix.
940         (pp_take_prefix): New function.
941         (pretty_printer::pretty_printer): Drop the prefix parameter.
942         Rename the length parameter to match the comment.
943         (pretty_printer::~pretty_printer): Free the prefix.
944         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
945         parameter.
946         (struct pretty_printer): Drop the "const" from "prefix" field's
947         type and clarify memory management.
948         (pp_set_prefix): Drop the "const" from the 2nd param.
949         (pp_take_prefix): New decl.
951 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
953         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
954         for word_mode_ok here instead of passing as argument.
955         (expand_block_compare): Change select_block_compare_mode() call.
956         (expand_strncmp_gpr_sequence): New function.
957         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
959 2018-08-02  Jeff Law  <law@redhat.com>
961         PR target/86790
962         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
963         Define to speculation_safe_value_not_needed.
965         PR target/86784
966         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
967         Define to speculation_safe_value_not_needed.
969 2018-08-02  Tom de Vries  <tdevries@suse.de>
971         PR target/86660
972         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
973         function.  Return UI_TARGET unconditionally.
974         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
975         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
977 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
979         * genemit.c (print_overload_test): Fix typo.
981 2018-08-02  Richard Biener  <rguenther@suse.de>
983         PR tree-optimization/86816
984         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
985         which checks for value availability before querying it.
986         (gvn_uses_equal): Use it.
987         (same_succ_hash): Likewise.
988         (gimple_equal_p): Likewise.
990 2018-08-02  Nick Clifton  <nickc@redhat.com>
992         PR target/86813
993         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
994         Define to speculation_safe_value_not_needed.
996         PR target/86810
997         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
998         Define to speculation_safe_value_not_needed.
1000         PR target/86810
1001         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1002         Define to speculation_safe_value_not_needed.
1004         PR target/86803
1005         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1006         Define to speculation_safe_value_not_needed.
1008         PR target/86797
1009         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1010         Define to speculation_safe_value_not_needed.
1012         PR target/86791
1013         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1014         Define to speculation_safe_value_not_needed.
1016         PR target/86789
1017         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1018         Define to speculation_safe_value_not_needed.
1020         PR target/86787
1021         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1022         Define to speculation_safe_value_not_needed.
1024         PR target/86782
1025         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1026         speculation_safe_value_not_needed.
1028         PR target/86781
1029         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1030         to speculation_safe_value_not_needed.
1032 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1034         * doc/md.texi: Expand the documentation of instruction names
1035         to mention port-local uses.  Document '@' in pattern names.
1036         * read-md.h (overloaded_instance, overloaded_name): New structs.
1037         (mapping): Declare.
1038         (md_reader::handle_overloaded_name): New member function.
1039         (md_reader::get_overloads): Likewise.
1040         (md_reader::m_first_overload): New member variable.
1041         (md_reader::m_next_overload_ptr): Likewise.
1042         (md_reader::m_overloads_htab): Likewise.
1043         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1044         m_next_overload_ptr and m_overloads_htab.
1045         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1046         (get_mode_token, get_code_token, get_int_token): New functions.
1047         (map_attr_string): Add an optional argument that passes back
1048         the associated iterator.
1049         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1050         (md_reader::handle_overloaded_name, add_overload_instance): New
1051         functions.
1052         (apply_iterators): Handle '@' names.  Report an error if '@'
1053         is used without iterators.
1054         (initialize_iterators): Initialize the new iterator_group fields.
1055         * genopinit.c (handle_overloaded_code_for)
1056         (handle_overloaded_gen): New functions.
1057         (main): Use them to print declarations of maybe_code_for_* and
1058         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1059         * genemit.c (print_overload_arguments, print_overload_test)
1060         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1061         (main): Use it to print definitions of maybe_code_for_* and
1062         maybe_gen_* functions.
1063         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1064         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1065         instead of explicit mode checks.
1066         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1067         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1068         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1069         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1070         (aarch64_expand_compare_and_swap): Likewise
1071         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1072         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1073         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1074         (aarch64_constant_pool_reload_icode): Delete.
1075         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1076         instead of aarch64_constant_pool_reload_icode.  Use
1077         code_for_aarch64_reload_mov instead of explicit mode checks.
1078         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1079         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1080         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1081         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1082         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1083         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1084         (aarch64_atomic_load_op_code): Delete.
1085         (aarch64_emit_atomic_load_op): Likewise.
1086         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1087         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1088         instead of aarch64_emit_atomic_load_op.
1089         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1090         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1091         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1092         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1093         character before the pattern name.
1094         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1095         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1096         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1097         (aarch64_frecps<mode>): Likewise.
1098         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1099         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1100         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1101         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1102         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1104 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1106         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1107         Allow HFmode constants if TARGET_FP_F16INST.
1109 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1111         PR target/86014
1112         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1113         No longer check last store for clobber of address register.
1115 2018-08-02  Martin Liska  <mliska@suse.cz>
1117         PR gcov-profile/86817
1118         * gcov.c (process_all_functions): New function.
1119         (main): Call it.
1120         (process_file): Move functions processing to
1121         process_all_functions.
1123 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1125         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1126         "const" to the "gimple *" and "rtx_insn *" parameters.
1127         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1128         Likewise.
1129         (dump_location_t::dump_location_t): Likewise.
1131 2018-08-01  Martin Sebor  <msebor@redhat.com>
1133         PR tree-optimization/86650
1134         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1135         rather than a "gcall *".  Directly pass the data of interest
1136         to percent_K_format, rather than building a temporary CALL_EXPR
1137         to hold it.
1138         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1139         (gimple_fold_builtin_strncat): Adjust.
1140         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1141         gcall* argument with gimple*.
1142         * gimple-ssa-warn-restrict.c (check_call): Same.
1143         (wrestrict_dom_walker::before_dom_children): Same.
1144         (builtin_access::builtin_access): Same.
1145         (check_bounds_or_overlap): Same
1146         (maybe_diag_overlap): Same.
1147         (maybe_diag_offset_bounds): Same.
1148         * tree-diagnostic.c (default_tree_printer): Move usage of
1149         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1150         to this callsite.
1151         * tree-pretty-print.c (percent_K_format): Add argument.
1152         * tree-pretty-print.h: Add argument.
1153         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1154         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1155         (maybe_diag_stxncpy_trunc): Same.
1156         (handle_builtin_stxncpy): Same.
1157         (handle_builtin_strcat): Same.
1159 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1161         * match.pd: Optimise pointer range checks.
1163 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1165         PR tree-optimization/86758
1166         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1167         to remove pattern statements.
1169 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1171         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1172         result of dfs_enumerate_from when constructing stmt_vec_infos,
1173         instead of additionally calling get_loop_body.
1175 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1177         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1178         parameter.
1179         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1180         When creating an iv, assert that the step is not known to be zero.
1181         (vect_setup_realignment): Update call accordingly.
1182         * tree-vect-stmts.c (vectorizable_store): Likewise.
1183         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1185 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1187         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1188         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1189         (vectorizable_reduction): Likewise.
1190         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1191         (vect_detect_hybrid_slp_stmts): Likewise.
1192         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1194 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1196         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1197         (wide_int_set_zero_nonzero_bits): ...this.
1198         (zero_nonzero_bits_from_vr): Rename to...
1199         (vrp_set_zero_nonzero_bits): ...this.
1200         (extract_range_from_multiplicative_op_1): Abstract wide int
1201         code...
1202         (wide_int_range_multiplicative_op): ...here.
1203         (extract_range_from_binary_expr_1): Extract wide int binary
1204         operations into their own functions.
1205         (wide_int_range_lshift): New.
1206         (wide_int_range_can_optimize_bit_op): New.
1207         (wide_int_range_shift_undefined_p): New.
1208         (wide_int_range_bit_xor): New.
1209         (wide_int_range_bit_ior): New.
1210         (wide_int_range_bit_and): New.
1211         (wide_int_range_trunc_mod): New.
1212         (extract_range_into_wide_ints): New.
1213         (vrp_shift_undefined_p): New.
1214         (extract_range_from_multiplicative_op): New.
1215         (vrp_can_optimize_bit_op): New.
1216         * tree-vrp.h (value_range::dump): New.
1217         (wide_int_range_multiplicative_op): New.
1218         (wide_int_range_lshift):New.
1219         (wide_int_range_shift_undefined_p): New.
1220         (wide_int_range_bit_xor): New.
1221         (wide_int_range_bit_ior): New.
1222         (wide_int_range_bit_and): New.
1223         (wide_int_range_trunc_mod): New.
1224         (zero_nonzero_bits_from_bounds): Rename to...
1225         (wide_int_set_zero_nonzero_bits): ...this.
1226         (zero_nonzero_bits_from_vr): Rename to...
1227         (vrp_set_zero_nonzero_bits): ...this.
1228         (range_easy_mask_min_max): Rename to...
1229         (wide_int_range_can_optimize_bit_op): this.
1230         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1231         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1233 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1235         * tree-vectorizer.h (vect_orig_stmt): New function.
1236         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1237         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1238         (vect_create_epilog_for_reduction): Likewise.
1239         (vectorizable_live_operation): Likewise.
1240         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1241         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1242         * tree-vect-stmts.c (vectorizable_call): Likewise.
1243         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1245 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1247         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1248         argument.
1249         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1250         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1251         (vect_transform_loop): Likewise.
1252         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1254 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1256         * tree-vectorizer.h (vect_schedule_slp): Return void.
1257         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1258         (vect_schedule_slp): Likewise.
1260 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1262         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1263         argument.
1264         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1265         instances before the main loop, if any exist.
1267 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1269         PR tree-optimization/86749
1270         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1271         If the lhs is used in a COND_EXPR, check that it is being used
1272         as the "then" or "else" value.
1274 2018-08-01  Tom de Vries  <tdevries@suse.de>
1276         PR target/86800
1277         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1278         speculation_safe_value_not_needed.
1280 2018-08-01  Richard Biener  <rguenther@suse.de>
1282         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1283         as base and offset.
1285 2018-08-01  Martin Liska  <mliska@suse.cz>
1287         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1288         format how successful transformation is dumped.
1289         (gimple_mod_pow2_value_transform): Likewise.
1290         (gimple_mod_subtract_transform): Likewise.
1291         (gimple_stringops_transform): Likewise.
1293 2018-08-01  Martin Liska  <mliska@suse.cz>
1295         PR value-prof/35543
1296         * value-prof.c (interesting_stringop_to_profile_p):
1297         Simplify the code and add BUILT_IN_MEMMOVE.
1298         (gimple_stringops_transform): Likewise.
1300 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1302         * config/aarch64/aarch64-simd.md
1303         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1304         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1305         use GPI iterator instead of SI mode.
1307 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1309         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1310         rs6000_speculation_barrier.
1311         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1312         new barrier pattern name.
1314 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1316         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1317         (speculation_barrier): New insn.
1319 2018-08-01  Richard Biener  <rguenther@suse.de>
1321         PR bootstrap/86724
1322         * graphite.h: Include isl/id.h and isl/space.h to allow build
1323         with ISL 0.20.
1325 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1327         PR target/86651
1328         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1329         mode for COFF targets.
1330         * defaults.h (TARGET_COFF): Define.
1331         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1332         TARGET_COFF): Define.
1333         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1334         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1335         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1337 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1339         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1340         * gimple-streamer-out.c (output_bb): Save it.
1341         * lto-streamer-in.c (input_struct_function_base): Restore
1342         instance discriminator if available.  Create map on demand.
1343         * lto-streamer-out.c (output_struct_function_base): Save it if
1344         available.
1345         * final.c (decl_to_instance_map): Document LTO strategy.
1347 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1348             Olivier Hainque  <hainque@adacore.com>
1350         * debug.h (decl_to_instance_map_t): New type.
1351         (decl_to_instance_map): Declare.
1352         (maybe_create_decl_to_instance_map): New inline function.
1353         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1354         to track basic block discriminators.
1355         (final_start_function_1): Initialize them.
1356         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1357         bb_discriminator.
1358         (decl_to_instance_map): New variable.
1359         (map_decl_to_instance, maybe_set_discriminator): New functions.
1360         (notice_source_line): Set discriminator.
1362 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1364         * targhooks.c (default_have_speculation_safe_value): Add
1365         ATTRIBUTE_UNUSED.
1367 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1369         * dump-context.h: Include "pretty-print.h".
1370         (dump_context::refresh_dumps_are_enabled): New decl.
1371         (dump_context::emit_item): New decl.
1372         (class dump_context): Add fields "m_test_pp" and
1373         "m_test_pp_flags".
1374         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1375         (temp_dump_context::get_dumped_text): New decl.
1376         (class temp_dump_context): Add field "m_pp".
1377         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1378         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1379         m_test_pp.
1380         (set_dump_file): Update for above change.
1381         (set_alt_dump_file): Likewise.
1382         (dump_loc): New overload, taking a pretty_printer *.
1383         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1384         to any test pretty-printer.
1385         (make_item_for_dump_gimple_stmt): New function, adapted from
1386         optinfo::add_gimple_stmt.
1387         (dump_context::dump_gimple_stmt): Call it, and use the result,
1388         eliminating the direct usage of dump_file and alt_dump_file in
1389         favor of indirectly using them via emit_item.
1390         (make_item_for_dump_gimple_expr): New function, adapted from
1391         optinfo::add_gimple_expr.
1392         (dump_context::dump_gimple_expr): Call it, and use the result,
1393         eliminating the direct usage of dump_file and alt_dump_file in
1394         favor of indirectly using them via emit_item.
1395         (make_item_for_dump_generic_expr): New function, adapted from
1396         optinfo::add_tree.
1397         (dump_context::dump_generic_expr): Call it, and use the result,
1398         eliminating the direct usage of dump_file and alt_dump_file in
1399         favor of indirectly using them via emit_item.
1400         (make_item_for_dump_printf_va): New function, adapted from
1401         optinfo::add_printf_va.
1402         (make_item_for_dump_printf): New function.
1403         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1404         and use the result, eliminating the direct usage of dump_file and
1405         alt_dump_file in favor of indirectly using them via emit_item.
1406         (make_item_for_dump_dec): New function.
1407         (dump_context::dump_dec): Call it, and use the result,
1408         eliminating the direct usage of dump_file and alt_dump_file in
1409         favor of indirectly using them via emit_item.
1410         (make_item_for_dump_symtab_node): New function, adapted from
1411         optinfo::add_symtab_node.
1412         (dump_context::dump_symtab_node): Call it, and use the result,
1413         eliminating the direct usage of dump_file and alt_dump_file in
1414         favor of indirectly using them via emit_item.
1415         (dump_context::begin_scope): Reimplement, avoiding direct usage
1416         of dump_file and alt_dump_file in favor of indirectly using them
1417         via emit_item.
1418         (dump_context::emit_item): New member function.
1419         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1420         Set up test pretty-printer on the underlying context.  Call
1421         refresh_dumps_are_enabled.
1422         (temp_dump_context::~temp_dump_context): Call
1423         refresh_dumps_are_enabled.
1424         (temp_dump_context::get_dumped_text): New member function.
1425         (selftest::verify_dumped_text): New function.
1426         (ASSERT_DUMPED_TEXT_EQ): New macro.
1427         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1428         and then without optinfo enabled.  Add uses of
1429         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1430         * dumpfile.h: Update comment for the dump_* API.
1431         * optinfo-emit-json.cc
1432         (selftest::test_building_json_from_dump_calls): Update for new
1433         param for temp_dump_context ctor.
1434         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1435         and "m_owned" field.
1436         (optinfo_item::~optinfo_item): Likewise.
1437         (optinfo::add_item): New member function.
1438         (optinfo::emit): Update comment.
1439         (optinfo::add_string): Delete.
1440         (optinfo::add_printf): Delete.
1441         (optinfo::add_printf_va): Delete.
1442         (optinfo::add_gimple_stmt): Delete.
1443         (optinfo::add_gimple_expr): Delete.
1444         (optinfo::add_tree): Delete.
1445         (optinfo::add_symtab_node): Delete.
1446         (optinfo::add_dec): Delete.
1447         * optinfo.h (class dump_context): New forward decl.
1448         (optinfo::add_item): New decl.
1449         (optinfo::add_string): Delete.
1450         (optinfo::add_printf): Delete.
1451         (optinfo::add_printf_va): Delete.
1452         (optinfo::add_gimple_stmt): Delete.
1453         (optinfo::add_gimple_expr): Delete.
1454         (optinfo::add_tree): Delete.
1455         (optinfo::add_symtab_node): Delete.
1456         (optinfo::add_dec): Delete.
1457         (optinfo::add_poly_int): Delete.
1458         (optinfo_item::optinfo_item): Remove "owned" param.
1459         (class optinfo_item): Remove field "m_owned".
1461 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1463         PR middle-end/86705
1464         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1465         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1466         requested variable alignment.
1467         (expand_one_ssa_partition): Likewise.
1468         (expand_one_var): Likewise.
1470 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1472         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1473         to speculation_safe_value_not_needed.
1475 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1477         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1478         * targhooks.c (speculation_safe_value_not_needed): New function.
1479         * target.def (have_speculation_safe_value): Update documentation.
1480         * doc/tm.texi: Regenerated.
1482 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1484         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1485         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1486         expand.
1487         (despeculate_copy<ALLI:mode>_insn): New insn.
1488         (despeculate_copyti_insn): New insn.
1489         (despeculate_simple<ALLI:mode>): New insn
1490         (despeculate_simpleti): New insn.
1491         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1492         function.
1493         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1494         aarch64_speculation_safe_value.
1495         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1497 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1499         * config/aarch64/aarch64-speculation.cc: New file.
1500         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1501         before pass_reorder_blocks.
1502         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1503         prototype.
1504         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1505         X14 and X15 when tracking speculation.
1506         * config/aarch64/aarch64.md (register name constants): Add
1507         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1508         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1509         (speculation_barrier): New insn attribute.
1510         (cmp<mode>): Allow SP in comparisons.
1511         (speculation_tracker): New insn.
1512         (speculation_barrier): Add speculation_barrier attribute.
1513         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1514         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1515         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1517 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1519         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1520         aarch64_track_speculation is true.
1521         (tb<optab><mode>1): Likewise.
1522         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1523         generate CB[N]Z when tracking speculation.
1524         (aarch64_split_compare_and_swap): Likewise.
1525         (aarch64_split_atomic_op): Likewise.
1527 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1529         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1531 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1533         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1534         (speculation_barrier): New insn.
1536 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1538         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1539         * config/arm/arm.md (speculation_barrier): New expand.
1540         (speculation_barrier_insn): New pattern.
1542 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1544         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1545         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1546         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1547         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1548         list.
1549         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1550         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1551         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1552         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1553         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1554         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1555         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1556         * builtins.c (expand_speculation_safe_value): New function.
1557         (expand_builtin): Call it.
1558         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1559         * doc/extend.texi: Document __builtin_speculation_safe_value.
1560         * doc/md.texi: Document "speculation_barrier" pattern.
1561         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1562         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1563         * doc/tm.texi: Regenerated.
1564         * target.def (have_speculation_safe_value, speculation_safe_value): New
1565         hooks.
1566         * targhooks.c (default_have_speculation_safe_value): New function.
1567         (default_speculation_safe_value): New function.
1568         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1569         (default_speculation_safe_value): Add prototype.
1571 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1573         * dump-context.h (dump_context::dump_loc): New decl.
1574         * dumpfile.c (dump_context::dump_loc): New member function.
1575         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1576         and dump_gimple_stmt.
1577         (dump_context::dump_gimple_expr_loc): Likewise, using
1578         dump_gimple_expr.
1579         (dump_context::dump_generic_expr_loc): Likewise, using
1580         dump_generic_expr.
1581         (dump_context::dump_printf_loc_va): Likewise, using
1582         dump_printf_va.
1583         (dump_context::begin_scope): Explicitly using the global function
1584         "dump_loc", rather than the member function.
1586 2018-07-31  Martin Sebor  <msebor@redhat.com>
1588         PR tree-optimization/86741
1589         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1591 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1593         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1594         depend on whether prefetch instructions will be emitted or not.
1595         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1596         will be emitted or not.
1597         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1598         (TARGET_SETMEM_PFD): New macros.
1600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1602         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1603         (NULL_STMT_VEC_INFO): Delete.
1604         (stmt_vec_info::operator*): Likewise.
1605         (stmt_vec_info::operator gimple *): Likewise.
1606         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1607         of NULL_STMT_VEC_INFO.
1608         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1609         (vect_reassociating_reduction_p): Likewise.
1610         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1611         (vectorizable_store): Likewise.
1612         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1613         (vec_info::free_stmt_vec_infos): Likewise.
1615 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1617         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1618         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1620 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1622         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1623         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1624         (vec_info::free_stmt_vec_info): New private member functions.
1625         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1626         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1627         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1628         set_stmt_vec_info_vec and free_stmt_vec_infos.
1629         * tree-vect-loop.c (_loop_vec_info): Remove call to
1630         set_stmt_vec_info_vec.
1631         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1632         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1633         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1634         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1635         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1636         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1637         with the clearing in the xcalloc.
1638         (stmt_vec_info_vec): Delete.
1639         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1640         (vectorize_loops): Likewise.
1641         (vec_info::~vec_info): Remove argument from call to
1642         free_stmt_vec_infos.
1643         (vec_info::add_stmt): Remove vinfo argument from call to
1644         new_stmt_vec_info.
1646 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1648         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1649         rather than a gimple stmt.
1650         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1651         information for pattern statements when passed the original
1652         statement; instead wait to be passed the pattern statement itself.
1653         Don't call set_vinfo_for_stmt here.
1654         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1655         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1656         stmt_vec_infos here.
1657         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1658         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1659         stmt_vec_infos entry.
1661 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1663         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1664         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1665         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1666         * tree-vect-stmts.c (vectorizable_call): Likewise.
1667         (vectorizable_simd_clone_call): Likewise.
1669 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1671         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1672         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1673         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1674         * tree-vect-loop.c (vect_transform_loop): Likewise.
1675         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1676         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1678 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1680         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1681         (vect_dr_stmt): Delete.
1682         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1683         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1684         of DR_VECT_AUX.
1685         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1686         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1687         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1688         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1689         (vect_analyze_data_refs): Likewise.
1690         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1691         argument.
1692         (vect_find_same_alignment_drs): Likewise.
1693         (vect_slp_analyze_node_dependences): Update calls accordingly.
1694         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1695         instead of DR_VECT_AUX.
1696         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1697         of a vector data references.  Use vec_info::lookup_dr instead of
1698         DR_VECT_AUX.
1699         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1700         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1701         instead of DR_VECT_AUX.
1703 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1705         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1706         dr_vec_info.
1707         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1708         accordingly.
1709         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1710         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1711         (vect_gen_prolog_loop_niters): Likewise.
1713 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1715         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1716         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1717         (vect_known_alignment_in_bytes, vect_dr_behavior)
1718         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1719         instead of data_references.  Update calls to other routines for
1720         which the same change has been made.
1721         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1722         dr_vec_infos instead of stmt_vec_infos.
1723         (vect_analyze_data_ref_dependence): Update call accordingly.
1724         (vect_slp_analyze_data_ref_dependence)
1725         (vect_record_base_alignments): Use DR_VECT_AUX.
1726         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1727         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1728         (vector_alignment_reachable_p, vect_get_data_access_cost)
1729         (vect_peeling_supportable, vect_analyze_group_access_1)
1730         (vect_analyze_group_access, vect_analyze_data_ref_access)
1731         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1732         (vect_compile_time_alias, vect_small_gap_p)
1733         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1734         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1735         instead of data_references.  Update calls to other routines for
1736         which the same change has been made.
1737         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1738         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1739         (vect_slp_analyze_and_verify_node_alignment)
1740         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1741         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1742         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1743         above changes.
1744         (_vect_peel_info::dr): Replace with...
1745         (_vect_peel_info::dr_info): ...this new field.
1746         (vect_peeling_hash_get_most_frequent)
1747         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1748         (vect_peeling_hash_get_lowest_cost):
1749         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1750         routines for which the same change has been made.
1751         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1752         data_reference.
1753         * tree-vect-loop-manip.c (get_misalign_in_elems)
1754         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1755         above changes.
1756         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1757         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1758         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1759         (get_group_load_store_type, get_negative_load_store_type)
1760         (vect_get_data_ptr_increment, vectorizable_store)
1761         (vectorizable_load): Likewise.
1762         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1763         Update calls to other routines for which the same change has been made.
1765 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1767         * tree-vectorizer.h (vec_info::move_dr): New member function.
1768         (dataref_aux): Rename to...
1769         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1770         (_stmt_vec_info::dr_aux): Update accordingly.
1771         (_stmt_vec_info::data_ref_info): Delete.
1772         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1773         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1774         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1775         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1776         of data_ref.
1777         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1778         (STMT_VINFO_DR_INFO): New macro.
1779         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1780         (set_dr_misalignment): Update after rename of dataref_aux.
1781         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1782         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1783         initialization of STMT_VINFO_DATA_REF.
1784         * tree-vectorizer.c (vec_info::move_dr): New function.
1785         * tree-vect-patterns.c (vect_recog_bool_pattern)
1786         (vect_recog_mask_conversion_pattern)
1787         (vect_recog_gather_scatter_pattern): Use it.
1788         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1789         the "dr" and "stmt" fields of dr_vec_info instead of
1790         STMT_VINFO_DATA_REF.
1792 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1794         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1795         (is_pattern_stmt_p): Use it.
1796         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1797         on pattern statements.
1799 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1801         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1802         original stmt as a stmt_vec_info rather than a gimple stmt.
1803         (vect_pattern_recog_1): Take the statement directly as a
1804         stmt_vec_info, rather than via a gimple_stmt_iterator.
1805         Update call to vect_mark_pattern_stmts.
1806         (vect_pattern_recog): Update calls accordingly.
1808 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1810         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1811         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1812         a vect_def_type for the first argument.
1813         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1814         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1815         operand if it isn't defined by a vectorized statement.
1816         (vect_build_gather_load_calls): Remove the mask_dt argument and
1817         update calls to vect_get_vec_def_for_stmt_copy.
1818         (vectorizable_bswap): Likewise the dt argument.
1819         (vectorizable_call): Update calls to vectorizable_bswap and
1820         vect_get_vec_def_for_stmt_copy.
1821         (vectorizable_simd_clone_call, vectorizable_assignment)
1822         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1823         (vectorizable_comparison): Update calls to
1824         vect_get_vec_def_for_stmt_copy.
1825         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1826         vect_is_simple_use.
1827         (vect_get_loop_based_defs): Remove dt argument and update call
1828         to vect_get_vec_def_for_stmt_copy.
1829         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1830         and vect_get_vec_def_for_stmt_copy.
1831         (vectorizable_load): Update calls to vect_build_gather_load_calls
1832         and vect_get_vec_def_for_stmt_copy.
1833         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1834         (vectorizable_reduction, vectorizable_live_operation): Update calls
1835         to vect_get_vec_def_for_stmt_copy.
1837 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1839         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1840         and gimple stmt arguments with a stmt_vec_info.
1841         (vect_record_base_alignments): Update calls accordingly.
1842         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1843         and gimple stmt arguments with a stmt_vec_info.
1844         (vect_build_slp_tree_1): Remove vinfo argument and update call
1845         to vect_record_max_nunits.
1846         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1847         and vect_record_max_nunits.
1849 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1851         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1852         file and take a stmt_vec_info instead of a gimple stmt.
1853         (supportable_widening_operation, vect_finish_replace_stmt)
1854         (vect_finish_stmt_generation, vect_get_store_rhs)
1855         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1856         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1857         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1858         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1859         (vect_create_data_ref_ptr, bump_vector_ptr)
1860         (vect_permute_store_chain, vect_setup_realignment)
1861         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1862         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1863         (vectorizable_reduction, vectorizable_induction)
1864         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1865         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1866         than gimple stmts as arguments.
1867         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1868         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1869         (can_group_stmts_p, vect_check_gather_scatter)
1870         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1871         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1872         (vect_permute_load_chain, vect_shift_permute_load_chain)
1873         (vect_transform_grouped_load)
1874         (vect_record_grouped_load_vectors): Likewise.
1875         * tree-vect-loop.c (vect_fixup_reduc_chain)
1876         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1877         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1878         (vectorizable_reduction, vectorizable_induction)
1879         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1880         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1881         (vect_get_load_store_mask): Likewise.
1882         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1883         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1884         * tree-vect-stmts.c (vect_mark_relevant)
1885         (is_simple_and_all_uses_invariant)
1886         (exist_non_indexing_operands_for_use_p, process_use)
1887         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1888         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1889         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1890         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1891         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1892         (get_negative_load_store_type, get_load_store_type)
1893         (vect_check_load_store_mask, vect_check_store_rhs)
1894         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1895         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1896         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1897         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1898         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1899         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1900         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1901         (supportable_widening_operation): Likewise.
1903 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1905         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1906         a stmt_vec_info instead of a gcall.
1907         (vect_check_gather_scatter): Update call accordingly.
1908         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1909         of a gphi.
1910         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1911         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1912         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1913         instead of a gimple stmt.
1914         (vect_transform_loop): Update calls accordingly.
1915         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1916         stmt_vec_infos instead of gimple stmts.
1917         (vect_analyze_slp_instance): Update use accordingly.
1918         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1919         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1920         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1921         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1922         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1923         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1924         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1925         down to subroutines.
1927 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1929         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1930         of the worklist from a vector of gimple stmts to a vector of
1931         stmt_vec_infos.
1932         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1933         (vect_mark_stmts_to_be_vectorized): Likewise
1935 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1937         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1938         statement before passing it to vect_analyze_stmt.
1939         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1940         the chain of phi vector definitions.  Track the exit phi via its
1941         stmt_vec_info.
1942         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1943         STMT_VINFO_REDUC_DEF.
1944         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1945         stmt_vec_infos to handle the statement chains.
1946         (vect_get_slp_defs): Record the first statement in the node
1947         using a stmt_vec_info.
1948         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1949         statements here and pass their stmt_vec_info down to subroutines.
1950         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1951         down to vect_finish_stmt_generation.
1952         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1953         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1954         stmt_vec_infos to subroutines.
1955         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1956         chains.
1958 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1960         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1961         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1962         (vect_permute_store_chain, vect_setup_realignment)
1963         (vect_permute_load_chain, vect_shift_permute_load_chain)
1964         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1965         stmts internally, and when passing values to other vectorizer routines.
1966         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1967         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1968         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1969         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1970         (vectorizable_reduction, vectorizable_induction)
1971         (vectorizable_live_operation, vect_transform_loop_stmt)
1972         (vect_transform_loop): Likewise.
1973         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1974         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1975         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1976         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1977         (vect_slp_analyze_node_operations_1): Likewise.
1978         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1979         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1980         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1981         (vect_finish_stmt_generation_1, get_group_load_store_type)
1982         (get_load_store_type, vect_build_gather_load_calls)
1983         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1984         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1985         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1986         (vectorizable_store, vectorizable_load, vectorizable_condition)
1987         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1988         (supportable_widening_operation): Likewise.
1989         (vect_get_vector_types_for_stmt): Likewise.
1990         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1992 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1994         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1995         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1996         (vect_permute_store_chain, vect_permute_load_chain)
1997         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1998         repeated stmt_vec_info lookups.
1999         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2000         (vect_update_ivs_after_vectorizer): Likewise.
2001         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2002         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2003         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2004         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2005         (vect_bb_slp_scalar_cost): Likewise.
2006         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2008 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2010         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2011         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2012         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2013         to get gassigns and gcalls, rather than operating on generc gimple
2014         stmts.
2015         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2016         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2017         (vectorizable_load, vect_analyze_stmt): Likewise.
2018         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2020 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2022         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2023         return stmt_vec_infos rather than gimple stmts.  Do not accept
2024         null arguments.
2025         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2026         of a gimple stmt.
2027         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2028         Update use of get_later_stmt.
2029         (vect_get_constant_vectors): Update call accordingly.
2030         (vect_schedule_slp_instance): Likewise
2031         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2032         (vect_slp_analyze_instance_dependence): Likewise.
2033         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2035 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2037         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2038         (stmt_info_for_cost::stmt_info): ...this new field.
2039         (add_stmt_costs): Update accordingly.
2040         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2041         (vect_get_known_peeling_cost): Likewise.
2042         (vect_estimate_min_profitable_iters): Likewise.
2043         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2045 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2047         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2048         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2049         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2050         accordingly.
2051         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2053 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2055         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2056         a gimple stmt to a stmt_vec_info.
2057         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2059 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2061         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2062         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2063         (_loop_vec_info::reduction_chains): Likewise.
2064         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2065         accordingly.
2066         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2068 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2070         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2071         a gimple stmt to a stmt_vec_info.
2072         (_stmt_vec_info::next_element): Likewise.
2073         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2074         (vect_slp_analyze_and_verify_node_alignment)
2075         (vect_analyze_group_access_1, vect_analyze_group_access)
2076         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2077         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2078         (vect_supportable_dr_alignment): Update accordingly.
2079         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2080         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2081         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2082         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2083         * tree-vect-slp.c (vect_build_slp_tree_1)
2084         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2085         (vect_split_slp_store_group, vect_analyze_slp_instance)
2086         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2087         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2088         (get_group_load_store_type, get_load_store_type)
2089         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2090         (vect_transform_stmt, vect_remove_stores): Likewise.
2092 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2094         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2095         than a gimple stmt.
2096         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2097         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2098         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2099         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2100         (vector_alignment_reachable_p, vect_get_data_access_cost)
2101         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2102         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2103         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2104         (vect_analyze_group_access_1, vect_analyze_group_access)
2105         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2106         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2107         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2108         result of vect_dr_stmt and use the stmt_vec_info instead of
2109         the associated gimple stmt.
2110         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2111         (vect_gen_prolog_loop_niters): Likewise.
2112         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2114 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2116         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2117         to a vec<stmt_vec_info>.
2118         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2119         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2120         vec<stmt_vec_info>.
2121         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2122         to a vec<stmt_vec_info>.
2123         (bst_traits::value_type, bst_traits::value_type): Likewise.
2124         (bst_traits::hash): Update accordingly.
2125         (vect_get_and_check_slp_defs): Change the stmts parameter from
2126         a vec<gimple *> to a vec<stmt_vec_info>.
2127         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2128         (vect_build_slp_tree): Likewise.
2129         (vect_build_slp_tree_2): Likewise.  Update uses of
2130         SLP_TREE_SCALAR_STMTS.
2131         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2132         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2133         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2134         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2135         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2136         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2137         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2138         (vect_get_constant_vectors, vect_get_slp_defs)
2139         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2140         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2141         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2142         instead of gimple stmts.
2143         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2144         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2145         (vect_slp_analyze_instance_dependence): Update uses of
2146         SLP_TREE_SCALAR_STMTS.
2147         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2148         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2149         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2150         (get_initial_defs_for_reduction): Likewise.
2151         (vect_create_epilog_for_reduction): Likewise.
2152         (vectorize_fold_left_reduction): Likewise.
2153         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2154         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2155         (can_vectorize_live_stmts): Likewise.
2157 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2159         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2160         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2161         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2162         than gimple stmts.
2163         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2164         of a gimple stmt.
2165         (gather_scalar_reductions): Update after above interface changes.
2166         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2167         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2168         than gimple stmts.
2169         (vect_force_simple_reduction): Likewise.
2170         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2171         LOOP_VINFO_REDUCTIONS.
2172         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2176         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2177         a gimple stmt to a stmt_vec_info.
2178         * tree-vect-loop.c (vect_active_double_reduction_p)
2179         (vect_force_simple_reduction, vectorizable_reduction): Update
2180         accordingly.
2182 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2184         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2185         vec<gimple *> to a vec<stmt_vec_info>.
2186         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2187         the reduction_phis argument from a vec<gimple *> to a
2188         vec<stmt_vec_info>.
2189         (vectorizable_reduction): Likewise the phis local variable that
2190         is passed to vect_create_epilog_for_reduction.  Update for new type
2191         of SLP_TREE_VEC_STMTS.
2192         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2193         (vectorizable_live_operation): Likewise.
2194         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2195         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2197 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2199         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2200         a gimple stmt to a stmt_vec_info.
2201         (vectorizable_condition, vectorizable_live_operation)
2202         (vectorizable_reduction, vectorizable_induction): Pass back the
2203         vectorized statement as a stmt_vec_info.
2204         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2205         use of STMT_VINFO_VEC_STMT.
2206         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2207         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2208         as stmt_vec_infos rather than gimple stmts.
2209         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2210         to a stmt_vec_info.
2211         (vectorizable_live_operation): Likewise.
2212         (vectorizable_reduction, vectorizable_induction): Likewise,
2213         updating use of STMT_VINFO_VEC_STMT.
2214         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2215         of STMT_VINFO_VEC_STMT.
2216         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2217         (vectorizable_simd_clone_call, vectorizable_conversion)
2218         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2219         (vectorizable_store, vectorizable_load, vectorizable_condition)
2220         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2221         from a gimple stmt to a stmt_vec_info.
2222         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2223         pointer to a stmt_vec_info to the vectorizable_* routines.
2225 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2227         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2228         a gimple stmt to a stmt_vec_info.
2229         (is_pattern_stmt_p): Update accordingly.
2230         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2231         (vect_record_grouped_load_vectors): Likewise.
2232         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2233         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2234         (vect_model_reduction_cost): Likewise.
2235         (vect_create_epilog_for_reduction): Likewise.
2236         (vectorizable_reduction, vectorizable_induction): Likewise.
2237         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2238         Return the stmt_vec_info for the pattern statement.
2239         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2240         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2241         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2242         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2243         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2244         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2245         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2246         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2248 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2250         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2251         (vect_finish_stmt_generation): Likewise.
2252         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2253         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2254         (vect_build_gather_load_calls): Use the return value of the above
2255         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2256         scopes for the input gimple stmt and wider scopes for the associated
2257         stmt_vec_info.  Use vec_info::lookup_def when setting these
2258         stmt_vec_infos from an SSA_NAME definition.
2259         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2260         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2261         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2262         (vectorizable_store, vectorizable_load, vectorizable_condition)
2263         (vectorizable_comparison): Likewise.
2264         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2265         (vectorizable_reduction): Likewise.
2267 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2269         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2270         stmt_vec_info * parameter before the optional gimple **.
2271         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2272         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2273         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2274         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2275         (vectorizable_live_operation): Likewise.
2276         * tree-vect-patterns.c (type_conversion_p): Likewise.
2277         (vect_look_through_possible_promotion): Likewise.
2278         (vect_recog_rotate_pattern): Likewise.
2279         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2281 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2283         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2284         a typedef to a wrapper class.
2285         (NULL_STMT_VEC_INFO): New macro.
2286         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2287         (stmt_vec_info::operator*): New function.
2288         (stmt_vec_info::operator gimple *): Likewise.
2289         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2290         (add_stmt_costs): Likewise.
2291         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2292         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2293         (vect_get_known_peeling_cost): Likewise.
2294         (vect_estimate_min_profitable_iters): Likewise.
2295         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2296         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2297         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2298         (vectorizable_store, free_stmt_vec_infos): Likewise.
2299         (new_stmt_vec_info): Change return type of xcalloc to
2300         _stmt_vec_info *.
2302 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2304         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2305         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2306         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2307         a single_imm_use-based sequence.
2308         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2310 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2312         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2313         * tree-vectorizer.c (vec_info::lookup_def): New function.
2314         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2315         (vect_widened_op_tree): Likewise.
2316         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2317         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2318         (vectorizable_reduction): Likewise.
2319         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2320         of a gimple *.
2321         (vect_is_slp_reduction): Update calls accordingly.  Use
2322         vec_info::lookup_def.
2323         (vect_is_simple_reduction): Likewise
2324         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2326 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2328         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2329         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2330         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2331         of vinfo_for_stmt.
2332         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2333         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2334         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2335         (vect_is_slp_reduction, vectorizable_induction)
2336         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2337         * tree-vect-patterns.c (vect_init_pattern_stmt):
2338         (vect_determine_min_output_precision_1, vect_determine_precisions)
2339         (vect_pattern_recog): Likewise.
2340         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2341         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2342         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2343         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2344         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2345         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2346         info field from a loop to a loop_vec_info.
2348 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2350         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2351         (vec_info::add_stmt): Declare.
2352         * tree-vectorizer.c (vec_info::add_stmt): New function.
2353         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2354         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2355         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2356         (vectorizable_induction): Likewise.
2357         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2358         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2359         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2360         (vectorizable_load): Likewise.
2361         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2362         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2363         (vect_recog_gather_scatter_pattern): Likewise.
2364         (append_pattern_def_seq): Likewise.  Remove a check that is
2365         performed by add_stmt itself.
2367 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2369         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2370         which make_ssa_name was called with new_stmt before new_stmt
2371         had been created.
2373 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2375         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2376         split out from...
2377         (vect_is_slp_reduction): ...here...
2378         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2379         that are already known to be false.
2381 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2383         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2384         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2385         STMT_VINFO_NUM_SLP_USES when it's true.
2386         (vect_free_slp_instance): Add a final_p parameter and pass it to
2387         vect_free_slp_tree.
2388         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2389         (vect_analyze_slp_instance): Likewise.
2390         (vect_slp_analyze_operations): Likewise.
2391         (vect_slp_analyze_bb_1): Likewise.
2392         * tree-vectorizer.c (vec_info): Likewise.
2393         * tree-vect-loop.c (vect_transform_loop): Likewise.
2395 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2397         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2398         function is not called for second and subsequent members of
2399         a reduction group.
2401 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2403         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2404         cases for nested loops from here to ...
2405         (vect_create_epilog_for_reduction): ...here.  Only call
2406         vect_is_simple_use for inner-loop reductions.
2408 2018-07-31  Martin Liska  <mliska@suse.cz>
2410         PR gcov-profile/85338
2411         PR gcov-profile/85350
2412         PR gcov-profile/85372
2413         * profile.c (struct location_triplet): New.
2414         (struct location_triplet_hash): Likewise.
2415         (output_location): Do not output a BB that
2416         is already recorded for a line.
2417         (branch_prob): Use streamed_locations.
2419 2018-07-31  Martin Liska  <mliska@suse.cz>
2421         PR gcov-profile/85370
2422         * coverage.c (coverage_begin_function): Do not mark target
2423         clones as artificial functions.
2425 2018-07-31  Martin Liska  <mliska@suse.cz>
2427         PR gcov-profile/83813
2428         PR gcov-profile/84758
2429         PR gcov-profile/85217
2430         PR gcov-profile/85332
2431         * profile.c (branch_prob): Do not record GOTO expressions
2432         for GIMPLE statements which locations are already streamed.
2434 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2436         * gcc.c (handle_spec_function): Accept a soft_matched_part
2437         argument, as do_spec_1.  Pass it down to ...
2438         (eval_spec_function): Accept a soft_matched_part argument,
2439         and pass it down to ...
2440         (do_spec_2): Accept a soft_matched_part argument, and pass
2441         it down to do_spec_1.
2442         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2443         (handle_braces): Update call to handle_spec_function.
2444         (driver::set_up_specs): Update calls to do_spec_2.
2445         (compare_debug_dump_opt_spec_function): Likewise.
2446         (compare_debug_self_opt_spec_function): Likewise.
2448 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2450         * common.opt (nolibc): New option.
2451         * doc/invoke.texi (Link Options): Document it.
2452         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2453         * config/alpha/linux.h: Likewise.
2454         * config/arc/elf.h: Likewise.
2455         * config/arm/uclinux-elf.h: Likewise.
2456         * config/arm/unknown-elf.h: Likewise.
2457         * config/avr/avrlibc.h: Likewise.
2458         * config/bfin/bfin.h: Likewise.
2459         * config/bfin/linux.h: Likewise.
2460         * config/bfin/uclinux.h: Likewise.
2461         * config/darwin.h: Likewise.
2462         * config/darwin10.h: Likewise.
2463         * config/darwin12.h: Likewise.
2464         * config/gnu-user.h: Likewise.
2465         * config/lm32/uclinux-elf.h: Likewise.
2466         * config/pa/pa-hpux11.h: Likewise.
2467         * config/pa/pa64-hpux.h: Likewise.
2468         * config/sparc/sparc.h: Likewise.
2470 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2472         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2473         undefined variables.
2475 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2477         PR target/86640
2478         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2479         instead of GEN_INT.
2481 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2483         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2484         terminated string literal.
2486 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2488         PR rtl-optimization/85160
2489         * combine.c (is_just_move): New function.
2490         (try_combine): Allow combining two instructions into two if neither of
2491         the original instructions was a move.
2493 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2495         PR target/86673
2496         * doc/extend.texi (Global Register Variables): Discourage use of type
2497         qualifiers.
2498         (Local Register Variables): Likewise.
2500 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2502         PR tree-optimization/86506
2503         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2505 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2507         PR target/86547
2508         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2509         hard_regno, make sure no insn between `from` and `to` clobbers it.
2511 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2512             Tom de Vries  <tdevries@suse.de>
2514         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2515         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2516         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2517         PTX_DEFAULT_RUNTIME_DIM.
2518         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2520 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2522         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2523         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2524         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2526 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2528         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2529         used.
2530         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2531         predicate to reflect toc fusion has been deleted.
2532         (toc_fusion_mem_raw): Delete, no longer used.
2533         (toc_fusion_mem_wrapped): Likewise.
2534         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2535         fusion mask bit.
2536         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2537         Delete, no longer used.
2538         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2539         meant to be used for toc fusion.
2540         (rs6000_debug_print_mode): Delete toc fusion debugging.
2541         (rs6000_debug_reg_global): Likewise.
2542         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2543         fusion and secondary reload support that were never used.
2544         (rs6000_option_override_internal): Delete TOC fusion, that was only
2545         partially defined, and it did not work unless you also used the
2546         -mcmodel= switch.
2547         (rs6000_legitimate_address_p): Delete TOC fusion support.
2548         (rs6000_opt_masks): Likewise.
2549         (fusion_wrap_memory_address): Delete function, no longer used.
2550         (fusion_split_address); Delete TOC fusion support.
2551         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2552         longer used with toc fusion being deleted.
2553         (TARGET_TOC_FUSION_FP): Likewise.
2554         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2555         UNSPEC.
2556         (toc fusion spliter): Delete TOC fusion support.
2557         (toc_fusionload_<mode>): Likewise.
2558         (toc_fusionload_di): Likewise.
2559         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2560         longer needs to be named.  Rename predicate to delete TOC fusion.
2561         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2562         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2563         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2564         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2565         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2567 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2569         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2570         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2571         __int128 in built-in function prototypes.
2572         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2573         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2575 2018-07-27  Martin Sebor  <msebor@redhat.com>
2577         PR tree-optimization/86696
2578         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2579         types, including enums.
2580         (handle_char_store): Be prepared for the above function to fail.
2582 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2584         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2585         when optimization level is lower than 2 or optimize for size.
2587 2018-07-26  Martin Sebor  <msebor@redhat.com>
2589         PR tree-optimization/86043
2590         PR tree-optimization/86042
2591         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2592         (get_string_cst_length): Rename...
2593         (get_min_string_length): ...to this.  Add argument.
2594         (handle_char_store): Extend to handle multi-character stores by
2595         MEM_REF.
2596         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2597         * tree.h (initializer_zerop): Add argument.
2599 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2601         PR middle-end/86660
2602         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2603         declare target to variables if they have always,{to,from,tofrom} map
2604         kinds.
2606 2018-07-26  Martin Liska  <mliska@suse.cz>
2608         PR lto/86548
2609         * lto-wrapper.c: Add linker_output as prefix
2610         for ltrans_output_file.
2612 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2614         PR rtl-optimization/85805
2615         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2616         value for hard registers if that was written in the same mode.
2618 2018-07-26  Martin Liska  <mliska@suse.cz>
2620         PR gcov-profile/86536
2621         * gcov.c (format_gcov): Use printf format %.*f directly
2622         and do not handle special values.
2624 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2626         * common/config/arc/arc-common.c (arc_option_optimization_table):
2627         Update default optimizations for size.
2629 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2631         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2632         * config/arc/constraints.md (CfZ): New constraint.
2633         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2634         (subsf3_fpu): Likewise.
2635         (cmpsf_fpu): Likewise.
2636         (cmpsf_fpu_uneq): Likewise.
2638 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2640         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2641         accesses as well.
2642         (arc_is_uncached_mem_p): uncached applies to both the variable and
2643         the pointer.
2645 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2647         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2648         register names.
2650 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2652         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2653         field "m_scopes" from vec to auto_vec.
2655 2018-07-25  Martin Liska  <mliska@suse.cz>
2657         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2658         return type.
2660 2018-07-25  Richard Biener  <rguenther@suse.de>
2662         PR debug/86654
2663         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2664         special wrt context_die late.
2665         (gen_subprogram_die): Re-use DIEs in local scope.
2667 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2669         PR tree-optimization/86644
2670         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2672 2018-07-25  Martin Liska  <mliska@suse.cz>
2674         PR middle-end/86645
2675         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2676         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2678 2018-07-25  Martin Liska  <mliska@suse.cz>
2680         PR sanitizer/79635
2681         * params.def: Explain ASan abbreviation and provide
2682         a documentation link.
2684 2018-07-24  Martin Sebor  <msebor@redhat.com>
2686         PR tree-optimization/86622
2687         PR tree-optimization/86532
2688         * builtins.h (string_length): Declare.
2689         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2690         (check_access): Be prepared for non-constant length ranges.
2691         (string_length): Make extern.
2692         * expr.c (string_constant): Only handle the minor non-constant
2693         array index.  Use string_constant to compute the length of
2694         a generic string constant.
2696 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2698         PR tree-optimization/86618
2699         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2700         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2702 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2704         PR tree-optimization/86636
2705         * json.cc (json::object::set): Fix comment.  Add assertions.
2706         (json::array::append): Move here from json.h.  Add comment and an
2707         assertion.
2708         (json::string::string): Likewise.
2709         * json.h (json::array::append): Move to json.cc.
2710         (json::string::string): Likewise.
2711         * optinfo-emit-json.cc
2712         (optrecord_json_writer::impl_location_to_json): Assert that we
2713         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2714         wrapper around it.  Expand the location once, rather than three
2715         times.
2716         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2717         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2718         wrappers.
2719         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2720         places.  Fix some overlong lines.
2722 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2724         * config/aarch64/aarch64-simd.md
2725         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2726         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2727         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2728         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2729         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2730         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2731         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2732         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2733         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2735 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2737         PR middle-end/86627
2738         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2739         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2740         and abs_d == d, do the power of two handling if profitable.
2742 2018-07-24  Richard Biener  <rguenther@suse.de>
2744         * match.pd: Add BIT_FIELD_REF canonicalizations.
2746 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2748         PR c/86617
2749         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2751 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2753         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2754         terminated STRING_CST object.
2756 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2758         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2760 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2762         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2763         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2764         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2765         the elements into a register.
2766         (rs6000_split_v4si_init_di_reg): Delete.
2767         (rs6000_split_v4si_init): Delete.
2768         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2769         (vsx_init_v4si): Rewrite as a define_expand.
2771 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2773         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2774         zero_extend argument from memory): New.
2776 2018-07-22  Martin Sebor  <msebor@redhat.com>
2778         PR bootstrap/86621
2779         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2780         diagnosing calls with unknown arguments unless -Walloca-larger-than
2781         is restricted to less than PTRDIFF_MAX bytes.
2783 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2785         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2787 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2789         * pretty-print.c (text_info::set_location): Remove redundant
2790         "line_table" parameter from call to rich_location::set_range.
2792 2018-07-20  Martin Sebor  <msebor@redhat.com>
2794         PR middle-end/82063
2795         * builtins.c (expand_builtin_alloca): Adjust.
2796         * calls.c (alloc_max_size): Simplify.
2797         * cgraphunit.c (cgraph_node::expand): Adjust.
2798         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2799         variables.
2800         (frame_larger_than_size): Same.
2801         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2802         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2803         Initialize.
2804         * doc/invoke.texi (GCC Command Options): Document option arguments.
2805         Explain byte-size arguments and suffixes.
2806         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2807         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2808         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2809         * doc/options.texi (UInteger): Expand.
2810         (Host_Wide_Int, ByteSize): Document new properties.
2811         * final.c (final_start_function_1): Include sizes in an error message.
2812         * function.c (frame_offset_overflow): Same.
2813         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2814         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2815         Diagnose unbounded alloca calls only for limits of less than
2816         PTRDIFF_MAX.
2817         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2818         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2819         for alloca(0).
2820         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2821         only for limits of less than PTRDIFF_MAX.
2822         * langhooks-def.h (lhd_handle_option): Change function argument
2823         to HOST_WIDE_INT.
2824         * langhooks.c (lhd_handle_option): Same.
2825         * langhooks.h (handle_option): Same.
2826         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2827         ByteSize flags.
2828         (var_type, var_type_struct): Same.
2829         (var_set): Handle ByteSize flag.
2830         * optc-gen.awk: Add comments to output to ease debugging.  Make
2831         use of HOST_WIDE_INT where appropriate.
2832         * opts-gen-save.awk:  Use %lx to format unsigned long.
2833         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2834         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2835         arguments.  Parse bytes-size suffixes.
2836         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2837         (enum_value_to_arg): Same.
2838         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2839         (handle_option): Adjust.
2840         (generate_option): Change function argument to HOST_WIDE_INT.
2841         (cmdline_handle_error): Adjust.
2842         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2843         (set_option): Change function argument to HOST_WIDE_INT.
2844         (option_enabled): Handle cl_host_wide_int.
2845         (get_option_state): Handle CLVC_SIZE.
2846         (control_warning_option): Same.
2847         * opts.c (common_handle_option): Change function argument to
2848         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2849         OPT_Wvla_larger_than_.
2850         * opts.h (enum cl_var_type): Add an enumerator.
2851         * stor-layout.c (layout_decl): Print a more meaningful warning.
2852         * toplev.c (output_stack_usage): Adjust.
2854 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2856         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2857         call to inline_expand_builtin_string_cmp.
2858         (expand_builtin_strcmp): Likewise.
2859         (expand_builtin_strncmp): Likewise.
2860         (inline_string_cmp): Delete the last parameter, change char_type_node
2861         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2862         two operands.
2863         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2864         the inlining expansion on target where the type of the call has same or
2865         narrower precision than unsigned char.
2867 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2869         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2870         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2871         * common.opt (fsave-optimization-record): New option.
2872         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2873         * doc/invoke.texi (-fsave-optimization-record): New option.
2874         * dumpfile.c: Include "optinfo-emit-json.h".
2875         (struct kv_pair): Move to coretypes.h.
2876         (optgroup_options): Make non-static.
2877         (dump_context::end_scope): Call
2878         optimization_records_maybe_pop_dump_scope.
2879         * dumpfile.h (optgroup_options): New decl.
2880         * json.cc: New file.
2881         * json.h: New file.
2882         * optinfo-emit-json.cc: New file.
2883         * optinfo-emit-json.h: New file.
2884         * optinfo.cc: Include "optinfo-emit-json.h".
2885         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2886         (optinfo_enabled_p): Check optimization_records_enabled_p.
2887         (optinfo_wants_inlining_info_p): Likewise.
2888         * optinfo.h: Update comment.
2889         * profile-count.c (profile_quality_as_string): New function.
2890         * profile-count.h (profile_quality_as_string): New decl.
2891         (profile_count::quality): New accessor.
2892         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2893         and optinfo_emit_json_cc_tests.
2894         * selftest.h (selftest::json_cc_tests): New decl.
2895         (selftest::optinfo_emit_json_cc_tests): New decl.
2896         * toplev.c: Include "optinfo-emit-json.h".
2897         (compile_file): Call optimization_records_finish.
2898         (do_compile): Call optimization_records_start.
2899         * tree-ssa-live.c: Include optinfo.h.
2900         (remove_unused_scope_block_p): Retain inlining information if
2901         optinfo_wants_inlining_info_p returns true.
2903 2018-07-20  Richard Biener  <rguenther@suse.de>
2905         PR debug/86585
2906         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2907         to cover -flto-partition=none.
2909 2018-07-20  Martin Liska  <mliska@suse.cz>
2911         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2912         (get_decl_source_range): Remove unused function.
2914 2018-07-20  Richard Biener  <rguenther@suse.de>
2916         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2917         (struct vn_phi_s): Likewise.
2918         (struct vn_reference_s): Likewise.
2919         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2920         for searching the slot of an entry known to be in the hash itself.
2921         (vn_phi_hasher::equal): Likewise.
2922         (vn_reference_hasher::equal): Likewise.
2923         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2924         globals.
2925         (optimistic_info, current_info): Remove, keeping only valid_info.
2926         (vn_reference_lookup_1): Remove fallback lookup.
2927         (vn_reference_lookup_2): Likewise.
2928         (vn_nary_op_lookup_1): Likewise.
2929         (vn_phi_lookup): Likewise.
2930         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2931         hash element.
2932         (vn_reference_insert): Adjust, chain the inserted hash element
2933         at last_inserted_ref.
2934         (vn_reference_insert_pieces): Likewise.
2935         (visit_reference_op_call): Likewise.
2936         (vn_nary_op_insert_into): Chain the inserted hash element at
2937         last_inserted_nary.
2938         (vn_nary_op_insert_pieces): Adjust.
2939         (vn_nary_op_insert): Likewise.
2940         (vn_nary_op_insert_stmt): Likewise.
2941         (vn_phi_insert): Adjust, chain the inserted hash element at
2942         last_inserted_phi.
2943         (process_scc): Remove clearing and copying the optimistic
2944         table.  Instead remove elements inserted during an optimistic
2945         iteration from the single table we maintain.
2946         (init_scc_vn): Adjust.
2947         (free_scc_vn): Likewise.
2948         (sccvn_dom_walker::record_cond): Likewise.
2949         (sccvn_dom_walker::after_dom_children): Likewise.
2951 2018-07-19  Martin Sebor  <msebor@redhat.com>
2953         PR tree-optimization/84047
2954         PR tree-optimization/83776
2955         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2956         (check_array_bounds): Call it.
2958 2018-07-19  Martin Sebor  <msebor@redhat.com>
2960         * align.h (align_flags): Use member initialization.
2962 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2964         * Makefile.in (OBJS): Add optinfo.o.
2965         * coretypes.h (class symtab_node): New forward decl.
2966         (struct cgraph_node): New forward decl.
2967         (class varpool_node): New forward decl.
2968         * dump-context.h: New file.
2969         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2970         "tree-pass.h".
2971         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2972         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2973         (set_alt_dump_file): Likewise.
2974         (dump_context::~dump_context): New dtor.
2975         (dump_gimple_stmt): Move implementation to...
2976         (dump_context::dump_gimple_stmt): ...this new member function.
2977         Add the stmt to any pending optinfo, creating one if need be.
2978         (dump_gimple_stmt_loc): Move implementation to...
2979         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2980         Start a new optinfo and add the stmt to it.
2981         (dump_gimple_expr): Move implementation to...
2982         (dump_context::dump_gimple_expr): ...this new member function.
2983         Add the stmt to any pending optinfo, creating one if need be.
2984         (dump_gimple_expr_loc): Move implementation to...
2985         (dump_context::dump_gimple_expr_loc): ...this new member function.
2986         Start a new optinfo and add the stmt to it.
2987         (dump_generic_expr): Move implementation to...
2988         (dump_context::dump_generic_expr): ...this new member function.
2989         Add the tree to any pending optinfo, creating one if need be.
2990         (dump_generic_expr_loc): Move implementation to...
2991         (dump_context::dump_generic_expr_loc): ...this new member
2992         function.  Add the tree to any pending optinfo, creating one if
2993         need be.
2994         (dump_printf): Move implementation to...
2995         (dump_context::dump_printf_va): ...this new member function.  Add
2996         the text to any pending optinfo, creating one if need be.
2997         (dump_printf_loc): Move implementation to...
2998         (dump_context::dump_printf_loc_va): ...this new member function.
2999         Start a new optinfo and add the stmt to it.
3000         (dump_dec): Move implementation to...
3001         (dump_context::dump_dec): ...this new member function.  Add the
3002         value to any pending optinfo, creating one if need be.
3003         (dump_context::dump_symtab_node): New member function.
3004         (dump_context::get_scope_depth): New member function.
3005         (dump_context::begin_scope): New member function.
3006         (dump_context::end_scope): New member function.
3007         (dump_context::ensure_pending_optinfo): New member function.
3008         (dump_context::begin_next_optinfo): New member function.
3009         (dump_context::end_any_optinfo): New member function.
3010         (dump_context::s_current): New global.
3011         (dump_context::s_default): New global.
3012         (dump_scope_depth): Delete global.
3013         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3014         (dump_symtab_node): New function.
3015         (get_dump_scope_depth): Reimplement in terms of dump_context.
3016         (dump_begin_scope): Likewise.
3017         (dump_end_scope): Likewise.
3018         (selftest::temp_dump_context::temp_dump_context): New ctor.
3019         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3020         (selftest::verify_item): New function.
3021         (ASSERT_IS_TEXT): New macro.
3022         (ASSERT_IS_TREE): New macro.
3023         (ASSERT_IS_GIMPLE): New macro.
3024         (selftest::test_capture_of_dump_calls): New test.
3025         (selftest::dumpfile_c_tests): Call it.
3026         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3027         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3028         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3029         descriptive comment.
3030         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3031         (dump_node, dump_bb): Move these unrelated decls.
3032         (class dump_manager): Add leading comment.
3033         * optinfo.cc: New file.
3034         * optinfo.h: New file.
3036 2018-07-19  Michael Collison  <michael.collison@arm.com>
3037             Richard Henderson <rth@redhat.com>
3039         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3040         (subti): Handle op1 zero.
3041         (subvti4, usub4ti4): New.
3042         (*sub<GPI>3_compare1_imm): New.
3043         (sub<GPI>3_carryinCV): New.
3044         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3045         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3047 2018-07-19  Michael Collison  <michael.collison@arm.com>
3048             Richard Henderson <rth@redhat.com>
3050         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3051         (addti3): Create simpler code if low part is already known to be 0.
3052         (addvti4, uaddvti4): New.
3053         (*add<GPI>3_compareC_cconly_imm): New.
3054         (*add<GPI>3_compareC_cconly): New.
3055         (*add<GPI>3_compareC_imm): New.
3056         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3057         handle constants within this pattern..
3058         (*add<GPI>3_compareV_cconly_imm): New.
3059         (*add<GPI>3_compareV_cconly): New.
3060         (*add<GPI>3_compareV_imm): New.
3061         (add<GPI>3_compareV): New.
3062         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3063         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3064         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3065         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3066         with 'comparison' operator.
3067         (*add<GPI>3_compareV_cconly_imm): Ditto.
3068         (*add<GPI>3_compareV_cconly): Ditto.
3069         (*add<GPI>3_compareV_imm): Ditto.
3070         (add<GPI>3_compareV): Ditto.
3071         (add<mode>3_carryinC): Ditto.
3072         (*add<mode>3_carryinC_zero): Ditto.
3073         (*add<mode>3_carryinC): Ditto.
3074         (add<mode>3_carryinV): Ditto.
3075         (*add<mode>3_carryinV_zero): Ditto.
3076         (*add<mode>3_carryinV): Ditto.
3078 2018-07-19  Michael Collison  <michael.collison@arm.com>
3079             Richard Henderson <rth@redhat.com>
3081         * config/aarch64/aarch64-modes.def (CC_V): New.
3082         * config/aarch64/aarch64-protos.h
3083         (aarch64_addti_scratch_regs): Declare
3084         (aarch64_subvti_scratch_regs): Declare.
3085         (aarch64_expand_subvti): Declare.
3086         (aarch64_gen_unlikely_cbranch): Declare
3087         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3088         for signed overflow using CC_Vmode.
3089         (aarch64_get_condition_code_1): Handle CC_Vmode.
3090         (aarch64_gen_unlikely_cbranch): New function.
3091         (aarch64_addti_scratch_regs): New function.
3092         (aarch64_subvti_scratch_regs): New function.
3093         (aarch64_expand_subvti): New function.
3095 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3097         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3098         extension.
3099         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3100         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3101         extension.
3103 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3105         PR target/83009
3106         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3107         address check not strict.
3109 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3111         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3112         Umq with Umn.
3113         (store_pair_lanes<mode>): Likewise.
3114         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3115         enum value 'ADDR_QUERY_LDP_STP_N'.
3116         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3117         (aarch64_print_address_internal): Add declaration.
3118         (aarch64_print_ldpstp_address): Remove.
3119         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3120         (aarch64_print_operand): Change printing of 'y'.
3121         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3122         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3123         'true' rather than '1'.
3124         * config/aarch64/constraints.md (Uml): Likewise.
3125         (Uml): Rename to Umn.
3126         (Umq): Remove.
3128 2018-07-19  Richard Biener  <rguenther@suse.de>
3130         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3131         a trailing array.
3132         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3133         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3134         (vn_reference_hasher): Likewise.
3135         (struct vn_tables_s): Remove obstack and alloc-pool members.
3136         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3137         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3138         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3139         (vn_reference_insert_pieces): Likewise.
3140         (alloc_vn_nary_op_noinit): Adjust.
3141         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3142         (vn_phi_eq): Adjust.
3143         (shared_lookup_phiargs): Remove.
3144         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3145         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3146         (visit_reference_op_call): Likewise.
3147         (copy_nary, copy_phi, copy_reference): Remove.
3148         (process_scc): Rewind the obstack when iterating.  Do not
3149         copy the elements to valid_info but just move them from one
3150         hashtable to the other.
3151         (allocate_vn_table): Adjust.
3152         (free_vn_table): Likewise.
3153         (init_scc_vn): Likewise.
3154         (free_scc_vn): Likewise.
3156 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3158         PR target/86560
3159         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3160         indirect_return as function type attribute.
3161         (ix86_attribute_table): Change indirect_return to function
3162         type attribute.
3163         * doc/extend.texi: Update indirect_return attribute.
3165 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3167         * wide-int.h (widest2_int): New.
3168         * gimple-fold.c (arith_overflowed_p): Use it.
3169         * tree.h (widest2_int_cst): New.
3170         * tree-vrp.c (wide_int_binop_overflow): Rename from
3171         vrp_int_const_binop.
3172         Rewrite to work on trees.
3173         (extract_range_from_multiplicative_op_1): Abstract code to...
3174         (wide_int_range_min_max): ...here.
3175         (wide_int_range_cross_product): ...and here.
3176         (extract_range_from_binary_expr_1): Abstract overflow code to...
3177         (wide_int_range_mult_wrapping): ...here.
3178         * tree-vrp.h (wide_int_range_cross_product): New.
3179         (wide_int_range_mult_wrapping): New.
3181 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3182             Julia Koval  <julia.koval@intel.com>
3184         * config/i386/x86-tune-costs.h (skylake_memcpy,
3185         skylake_memset): Replace rep_prefix with unrolling for size 512.
3187 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3189         PR middle-end/86544
3190         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3191         comparision with EQ_EXPR in last stmt.
3193 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3195         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3196         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3197         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3198         previously known as "PowerPC AltiVec Built-in Functions".  Move
3199         some material to new subsubsections "PowerPC AltiVec Built-in
3200         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3201         ISA 2.07".
3202         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3203         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3204         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3205         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3207 2018-07-18  Richard Biener  <rguenther@suse.de>
3209         PR tree-optimization/86557
3210         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3211         EXACT_DIV_EXPR.
3213 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3215         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3217 2018-07-17  Jeff Law  <law@redhat.com>
3219         * config/arm/arm.c (get_label_padding): Update for recent
3220         changes to label_to_alignment.
3222         PR tree-optimization/86010
3223         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3225         * config/mips/mips.c (vr4130_align_insns): Update for recent
3226         changes to label_to_alignment.
3228         * config/frv/frv.c (frv_label_align): Update for recent changes
3229         to label_to_alignment.
3231         * config/nios2/nios2.c (nios2_label_align): Update for recent
3232         changes which dropped ALIGN_LABELS_LOG.
3234 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3236         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3237         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3239 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3241         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3242         deprecated align_labels_log.
3244 2018-07-17  Richard Biener  <rguenther@suse.de>
3246         PR lto/86456
3247         * dwarf2out.c (init_sections_and_labels): Always generate
3248         a debug_line_str_section for early LTO debug.
3249         (dwarf2out_finish): Reset debug_line_str_hash output early.
3250         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3251         with fat LTO part.
3252         (dwarf2out_early_finish): Output debug_line_str.
3254 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3256         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3257         index register on z196 or later.
3259 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3261         * config/s390/s390.c (s390_default_align): Set default function
3262         alignment to 16.
3263         (s390_override_options_after_change): Call s390_default align.
3264         (s390_option_override_internal): Call s390_default_align.
3265         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3267 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3269         PR middle-end/86542
3270         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3271         to _looptemp_ clauses, other than the first two.
3273 2018-07-17  Martin Liska  <mliska@suse.cz>
3275         * opts.c: Do not enable OPT_falign_* for -Os.
3277 2018-07-17  Martin Liska  <mliska@suse.cz>
3279         * align.h (MAX_CODE_ALIGN): New.
3280         (MAX_CODE_ALIGN_VALUE): New.
3281         * common/config/i386/i386-common.c (ix86_handle_option):
3282         (MAX_CODE_ALIGN): Moved to align.h.
3283         * final.c (MAX_CODE_ALIGN): Likewise.
3284         * opts.c (parse_and_check_align_values):
3285         (MAX_CODE_ALIGN): Likewise.
3286         (MAX_CODE_ALIGN_VALUE): Likewise.
3288 2018-07-17  Martin Liska  <mliska@suse.cz>
3290         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3291         in order to fulfil coding style.
3292         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3293         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3294         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3295         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3296         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3297         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3298         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3299         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3300         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3302 2018-07-17  Martin Liska  <mliska@suse.cz>
3304         * align.h: New file.
3305         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3306         directly.
3307         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3308         align_flags of label_to_alignment.
3309         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3310         align_flags class.
3311         * config/m68k/m68k.c: Do not use removed align_labels_value and
3312         align_loops_value.
3313         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3314         (LOOP_ALIGN): Likewise.
3315         (LABEL_ALIGN): Likewise.
3316         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3317         Remove not used macro.
3318         (rs6000_loop_align): Change return type to align_flags.
3319         (rs6000_loop_align_max_skip): Remove.
3320         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3321         Change return type to align_flags.
3322         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3323         Remove not used macro.
3324         (rs6000_loop_align):  Change return type to align_flags.
3325         (rs6000_loop_align_max_skip): Remove.
3326         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3327         * config/rx/rx-protos.h (rx_align_for_label): Make it
3328         static function.
3329         * config/rx/rx.c (rx_align_for_label): Change return type
3330         to align_flags.
3331         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3332         macro definitions.
3333         into align_flags class.
3334         (LABEL_ALIGN): Likewise.
3335         (LOOP_ALIGN): Likewise.
3336         * config/s390/s390.c (s390_label_align): Use align_flags
3337         class member.
3338         (s390_asm_output_function_label): Likewise.
3339         * config/sh/sh.c (sh_override_options_after_change):
3340         Use align_flags class directly without macros.
3341         (find_barrier): Likewise.
3342         (barrier_align): Likewise.
3343         (sh_loop_align): Likewise.
3344         * config/spu/spu.c (spu_option_override):
3345         Use align_flags_tuple::get_value instead of removed macros.
3346         (spu_sched_init): Likewise.
3347         * config/spu/spu.h (GTY): Likewise.
3348         * config/visium/visium.c (visium_option_override):
3349         Set "8" as default secondary alignment.
3350         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3351         in order to guarantee secondary alignment of 8.
3352         * coretypes.h: Include align.h header file.
3353         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3354         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3355         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3356         * doc/tm.texi.in: Likewise.
3357         * final.c (struct label_alignment): Remove not used structure.
3358         (LABEL_ALIGN): Change type to align_flags.
3359         (LOOP_ALIGN): Likewise.
3360         (JUMP_ALIGN): Likewise.
3361         (default_loop_align_max_skip): Remove.
3362         (default_label_align_max_skip): Likewise.
3363         (default_jump_align_max_skip): Likewise.
3364         (default_label_align_after_barrier_max_skip):
3365         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3366         (LABEL_TO_MAX_SKIP): Remove.
3367         (label_to_alignment): Return align_flags type instead of integer.
3368         (label_to_max_skip): Remove.
3369         (align_fuzz): Use align_flags type.
3370         (compute_alignments): Use align_flags type and use align_flags::max
3371         to combine multiple alignments.
3372         (grow_label_align): Grow vec instead of C array.
3373         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3374         (shorten_branches):  Use align_flags type and use align_flags::max
3375         to combine multiple alignments.
3376         (final_scan_insn_1): Remove usage of secondary alignment that comes
3377         from label alignment, but instead use proper secondary alignment
3378         which is computed in grow_label_align.
3379         * flags.h (struct align_flags_tuple): Move to align.h.
3380         (struct align_flags): Likewise.
3381         (state_align_loops): Rename to align_loops.
3382         (state_align_jumps): Rename to align_jumps.
3383         (state_align_labels): Rename to align_labels.
3384         (state_align_functions): Rename to align_functions.
3385         (align_loops_log): Remove.
3386         (align_jumps_log): Remove.
3387         (align_labels_log): Remove.
3388         (align_functions_log): Remove.
3389         (align_loops_max_skip): Remove.
3390         (align_jumps_max_skip): Remove.
3391         (align_labels_max_skip): Remove.
3392         (align_functions_max_skip): Remove.
3393         (align_loops_value): Remove.
3394         (align_jumps_value): Remove.
3395         (align_labels_value): Remove.
3396         (align_functions_value): Remove.
3397         * output.h (label_to_alignment): Change return type to align_flags.
3398         (label_to_max_skip): Remove.
3399         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3400         jump_align_max_skip macros.
3401         * targhooks.h (default_loop_align_max_skip): Remove.
3402         (default_label_align_max_skip): Likewise.
3403         (default_jump_align_max_skip): Likewise.
3404         (default_label_align_after_barrier_max_skip): Remove.
3405         * toplev.c (read_log_maxskip): Use ::normalize function.
3406         (parse_N_M): Remove not used argument and also call ::normalize.
3407         (parse_alignment_opts): Do not pass unused arguments.
3408         * varasm.c (assemble_start_function): Use directly align_functions
3409         instead of removed macros.
3410         * system.h: Do not poison removed macros.
3412 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3414         PR middle-end/86539
3415         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3416         and cond temporaries don't have reference type if iterator has
3417         pointer type.  For init use &for_pre_body instead of pre_p if
3418         for_pre_body is non-empty.
3420 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3422         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3423         double-double modes to SFmode directly directly.
3424         (trunc<mode>sf2_fprs): Delete.
3426 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3428         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3429         for conversions between IFmode and the decimal floating point modes.
3430         (init_float128_ieee): Use the correct names for conversions between
3431         KFmode and the decimal floating point modes.
3433 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3435         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3436         for the conversions between TDmode and IFmode.
3437         (init_float128_ieee): Use more correct names for the conversions
3438         between TDmode and KFmode.
3440 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3442         PR tree-optimization/86526
3443         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3444         (inline_expand_builtin_string_cmp): Likewise.
3445         (inline_string_cmp): Likewise.  Use c_readstr instead of
3446         builtin_memcpy_read_str.  Add unit_mode temporary.
3448 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3450         PR middle-end/86528
3451         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3452         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3454 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3456         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3457         Alphabetize prototypes of built-in functions, separating out
3458         built-in functions that are listed in this section but should be
3459         described elsewhere.
3461 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3463         PR target/86511
3464         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3465         conditional move when trapping comparison was split to a
3466         non-trapping one (and vice versa).
3468 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3470         * config/s390/s390.c (s390_function_profiler): Generate nops
3471         instead of profiler call sequences.
3472         * config/s390/s390.opt: Add the new option.
3474 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3476         * config/s390/s390.c (s390_function_profiler): Generate
3477         __mcount_loc section.
3478         * config/s390/s390.opt: Add the new option.
3480 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3482         * common.opt: Add the new warning.
3483         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3484         %r0,__fentry__" when -mfentry is specified.
3485         (s390_option_override_internal): Disallow -mfentry for 31-bit
3486         CPUs.
3487         * config/s390/s390.opt: Add the new option.
3489 2018-07-16  Richard Biener  <rguenther@suse.de>
3491         PR lto/86523
3492         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3493         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3495 2018-07-16  Martin Liska  <mliska@suse.cz>
3497         PR ipa/86529
3498         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3499         to ::get_create.
3501 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3503         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3505 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3507         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3508         for ARCHS4x.
3509         * config/arc/arc-cpus.def (hs4x): New cpu.
3510         (hs4xd): Likewise.
3511         * config/arc/arc-tables.opt: Regenerate.
3512         * config/arc/arc.c (arc_sched_issue_rate): New function.
3513         (TARGET_SCHED_ISSUE_RATE): Define.
3514         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3515         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3516         fpu_cvt.
3517         (attr tune): Add ARCHS4x tune values.
3518         (attr tune_dspmpy): Define.
3519         (*tst): Correct instruction type.
3520         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3521         * config/arc/arcHS4x.md: New file.
3522         * config/arc/fpu.md: Update instruction type attributes.
3523         * config/arc/t-multilib: Regenerate.
3525 2018-07-16  Tom de Vries  <tdevries@suse.de>
3527         PR debug/86455
3528         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3530 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3532         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3533         early clobber.
3535 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3537         PR tree-optimization/86514
3538         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3539         conversion to a boolean type from a type with greater precision.
3541 2018-07-16  Tom de Vries  <tdevries@suse.de>
3543         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3544         dump_flags request TDF_SLIM.
3546 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3548         * fold-const.c (int_const_binop_1): Abstract...
3549         (wide_int_binop): ...wide int code here.
3550         (poly_int_binop): ...poly int code here.
3551         Abstract the rest of int_const_binop_1 into int_const_binop.
3552         * fold-const.h (wide_int_binop): New.
3553         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3554         Remove useless PLUS/MINUS_EXPR case.
3555         (zero_nonzero_bits_from_vr): Move wide int code...
3556         (zero_nonzero_bits_from_bounds): ...here.
3557         (extract_range_from_binary_expr_1): Move mask optimization code...
3558         (range_easy_mask_min_max): ...here.
3559         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3560         (range_easy_mask_min_max): New.
3562 2018-07-15  Jeff Law  <law@redhat.com>
3564         PR target/85993
3565         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3566         block.
3568 2018-07-14  Jim Wilson  <jimw@sifive.com>
3570         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3572 2018-07-14  Paul Koning  <ni1d@arrl.net>
3574         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3576 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3578         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3579         copying section.
3581 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3582             Steve Munroe  <munroesj52@gmail.com>
3584         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3585         (_mm_andnot_si128): Likewise.
3586         (_mm_or_si128): Likewise.
3587         (_mm_xor_si128): Likewise.
3589 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3591         PR middle-end/78809
3592         * builtins.c (expand_builtin_memcmp): Inline the calls first
3593         when result_eq is false.
3594         (expand_builtin_strcmp): Inline the calls first.
3595         (expand_builtin_strncmp): Likewise.
3596         (inline_string_cmp): New routine. Expand a string compare
3597         call by using a sequence of char comparison.
3598         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3599         a call to str(n)cmp/memcmp.
3600         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3601         New option.
3602         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3604 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3606         * config/arm/driver-arm.c: Include arm-native.h.
3607         (host_detect_local_cpu): Use auto-generated data tables.
3608         (vendors, arm_cpu_table): Delete.  Move part information to ...
3609         * config/arm/arm-cpus.in: ... here.
3610         * config/arm/parsecpu.awk (gen_native): New function.
3611         (vendor, part): New CPU fields.
3612         (END): Add support for building the native CPU detection tables.
3613         * config/arm/t-arm (arm-native.h): Add build rule.
3614         (driver-arm.o): Add dependency on arm-native.h.
3616 2018-07-13  Richard Biener  <rguenther@suse.de>
3618         PR middle-end/85974
3619         * match.pd (addr1 - addr2): Allow either of the operand to
3620         have a conversion.
3622 2018-07-13  Tom de Vries  <tdevries@suse.de>
3624         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3625         in remap_ssa_name.
3627 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3629         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3630         arrays instead of numbered variables.
3632 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3634         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3635         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3637 2018-07-13  Richard Biener  <rguenther@suse.de>
3639         PR debug/86452
3640         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3641         instead of get_context_die.
3643 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3644             Richard Biener  <rguenther@suse.de>
3646         PR middle-end/86489
3647         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3648         that the loop latch destination where phi is defined.
3650 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3652         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3653         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3654         (riscv_set_current_function): Extract getting interrupt type to new
3655         function.
3656         (riscv_get_interrupt_type): New function.
3657         (riscv_merge_decl_attributes): New function, checking interrupt type is
3658         same.
3659         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3661 2018-07-12  Paul Koning  <ni1d@arrl.net>
3663         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3664         directive.
3666 2018-07-12  Paul Koning  <ni1d@arrl.net>
3668         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3669         zero reference, add doloop_end instead.
3670         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3671         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3672         detail for doloop_end.
3674 2018-07-12  Martin Sebor  <msebor@redhat.com>
3676         PR c/86453
3677         * attribs.c (decl_attributes): Reject conflicting attributes before
3678         calling attribute handlers.
3680 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3682         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3683          parameter.
3684         (gcc::dump_manager::get_dump_file_name): likewise.
3685         (dump_begin): Likewise.
3686         * dumpfile.h (dump_begin): Update prototype.
3687         (gcc::dump_manager::get_dump_file_name,
3688         gcc::dump_manager::get_dump_file_name): Update prototype.
3690 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3692         * internal-fn.h (vectorizable_internal_fn_p): New function.
3693         * tree-vect-slp.c (compatible_calls_p): Likewise.
3694         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3695         to internal functions.
3696         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3698 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3700         * fold-const.h (inverse_conditions_p): Declare.
3701         * fold-const.c (inverse_conditions_p): New function.
3702         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3703         that test the inverse condition of a conditional internal function.
3704         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3705         * internal-fn.c (internal_fn_mask_index): Handle conditional
3706         internal functions.
3707         (vectorized_internal_fn_supported_p): New function.
3708         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3709         (any_pred_load_store): Replace with...
3710         (need_to_predicate): ...this new variable.
3711         (redundant_ssa_names): New variable.
3712         (ifcvt_can_use_mask_load_store): Move initial checks to...
3713         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3714         for which a conditional internal function exists.
3715         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3716         instead of ifcvt_can_use_mask_load_store.  Update after variable
3717         name change.
3718         (predicate_load_or_store): New function, split out from
3719         predicate_mem_writes.
3720         (check_redundant_cond_expr): New function.
3721         (value_available_p): Likewise.
3722         (predicate_rhs_code): Likewise.
3723         (predicate_mem_writes): Rename to...
3724         (predicate_statements): ...this.  Use predicate_load_or_store
3725         and predicate_rhs_code.
3726         (combine_blocks, tree_if_conversion): Update after above name changes.
3727         (ifcvt_local_dce): Handle redundant_ssa_names.
3728         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3729         general conditional functions.
3730         * tree-vect-stmts.c (vectorizable_call): Likewise.
3732 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3733             Alan Hayward  <alan.hayward@arm.com>
3734             David Sherwood  <david.sherwood@arm.com>
3736         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3737         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3738         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3739         plus and minus and convert them into IFN_COND_FMA-based sequences.
3740         (convert_mult_to_fma): Handle conditional plus and minus.
3742 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3744         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3745         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3746         (cond_fnms_optab): New optabs.
3747         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3748         internal functions.
3749         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3750         * internal-fn.h (get_conditional_internal_fn): Declare.
3751         (get_unconditional_internal_fn): Likewise.
3752         * internal-fn.c (cond_ternary_direct): New macro.
3753         (expand_cond_ternary_optab_fn): Likewise.
3754         (direct_cond_ternary_optab_supported_p): Likewise.
3755         (FOR_EACH_COND_FN_PAIR): Likewise.
3756         (get_conditional_internal_fn): New function.
3757         (get_unconditional_internal_fn): Likewise.
3758         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3759         (gimple_match_op::gimple_match_op): Add a new overload for 5
3760         operands.
3761         (gimple_match_op::set_op): Likewise.
3762         (gimple_resimplify5): Declare.
3763         * genmatch.c (decision_tree::gen): Generate simplifications for
3764         5 operands.
3765         * gimple-match-head.c (gimple_simplify): Define an overload for
3766         5 operands.  Handle calls with 5 arguments in the top-level overload.
3767         (convert_conditional_op): Handle conversions from unconditional
3768         internal functions to conditional ones.
3769         (gimple_resimplify5): New function.
3770         (build_call_internal): Pass a fifth operand.
3771         (maybe_push_res_to_seq): Likewise.
3772         (try_conditional_simplification): Try converting conditional
3773         internal functions to unconditional internal functions.
3774         Handle 3-operand unconditional forms.
3775         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3776         Define ternary equivalents of the current rules for binary conditional
3777         internal functions.
3778         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3779         ternary operations.
3780         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3781         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3782         (optab): Handle them.
3783         (SVE_COND_FP_TERNARY): New int iterator.
3784         (sve_fmla_op, sve_fmad_op): New int attributes.
3785         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3786         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3787         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3789 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3791         * target.def (preferred_else_value): New target hook.
3792         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3793         * doc/tm.texi: Regenerate.
3794         * targhooks.h (default_preferred_else_value): Declare.
3795         * targhooks.c (default_preferred_else_value): New function.
3796         * internal-fn.h (conditional_internal_fn_code): Declare.
3797         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3798         (get_conditional_internal_fn): Use it.
3799         (conditional_internal_fn_code): New function.
3800         * gimple-match.h (gimple_match_cond): New struct.
3801         (gimple_match_op): Add a cond member function.
3802         (gimple_match_op::gimple_match_op): Update all forms to take a
3803         gimple_match_cond.
3804         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3805         for the suboperation, but don't specify a particular else_value.
3806         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3807         (visit_nary_op, visit_reference_op_load): Pass
3808         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3809         * gimple-match-head.c: Include tree-eh.h
3810         (convert_conditional_op): New function.
3811         (maybe_resimplify_conditional_op): Likewise.
3812         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3813         (gimple_resimplify2): Likewise.
3814         (gimple_resimplify3): Likewise.
3815         (gimple_resimplify4): Likewise.
3816         (maybe_push_res_to_seq): Return null for conditional operations.
3817         (try_conditional_simplification): New function.
3818         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3819         constructor.
3820         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3821         IFN_COND_* call.
3822         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3823         function.
3824         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3826 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3828         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3829         DECL_FCONTEXT
3830         (hash_tree): Do not hash DECL_FCONTEXT
3831         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3832         Do not stream DECL_FCONTEXT.
3833         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3834         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3836 2018-07-12  Richard Biener  <rguenther@suse.de>
3838         PR debug/86462
3839         * dwarf2out.c (gen_block_die): Only output blocks when they have
3840         at least one !DECL_IGNORED_P variable.
3842 2018-07-12  Richard Biener  <rguenther@suse.de>
3844         PR target/84829
3845         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3846         Remove -mieee-fp handling.
3848 2018-07-12  Richard Biener  <rguenther@suse.de>
3850         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3851         left-over from last patch.
3853 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3855         PR tree-optimization/86492
3856         * gimple-ssa-store-merging.c
3857         (imm_store_chain_info::coalesce_immediate_stores): Call
3858         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3860 2018-07-12  Richard Biener  <rguenther@suse.de>
3862         PR middle-end/86479
3863         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3864         move possibly trapping operations into the conditional.
3866 2018-07-12  Richard Biener  <rguenther@suse.de>
3868         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3869         (vn_lookup_simplify_result): Remove recursion limit applied
3870         here.
3871         (vn_nary_build_or_lookup_1): Adjust.
3872         (try_to_simplify): Likewise.
3873         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3874         here.
3875         (gimple_resimplify2): Likewise.
3876         (gimple_resimplify3): Likewise.
3877         (gimple_resimplify4): Likewise.
3879 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3881         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3882         Use __mmask64 type instead of __mmask8 for __M argument.
3883         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3884         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3885         __U argument.
3886         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3887         __mmask16 for __M argument.
3888         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3889         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3890         to __mmask16 instead of __mmask8.
3891         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3892         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3893         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3894         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3895         instead of __mmask16 for __U argument.
3896         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3897         __mmask16 instead of __mmask8 for __U argument.
3898         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3899         __U argument.
3900         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3901         __mmask16.
3902         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3903         argument.
3904         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3905         __U argument.
3906         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3907         __mmask16.
3908         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3909         of __mmask16.
3910         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3911         __U argument.
3912         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3913         __U argument.
3914         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3915         __U argument.
3916         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3917         __U argument.
3918         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3919         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3920         return type as well as __M argument type and all casts from __mmask8
3921         to __mmask32.
3922         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3923         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3924         return type as well as __M argument type and all casts from __mmask8
3925         to __mmask16.
3926         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3927         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3928         return type as well as __M argument type and all casts from __mmask8
3929         to __mmask32.
3930         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3931         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3932         return type as well as __M argument type and all casts from __mmask8
3933         to __mmask16.
3934         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3935         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3936         __mmask16.
3938 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3940         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3941         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3942         for __U argument.
3944 2018-07-11  Paul Koning  <ni1d@arrl.net>
3946         * doc/md.texi (define_subst): Document how multiple occurrences of
3947         the same argument in the replacement pattern are handled.
3949 2018-07-11  Paul Koning  <ni1d@arrl.net>
3951         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3952         alphabetical order.
3953         (Common Type Attributes): Add "mode" attribute.
3955 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3957         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3958         stream DECL_ORIGINAL_TYPE.
3959         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3960         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3961         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3962         Do not walk original type.
3963         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3964         external decls.
3965         (write_ts_decl_non_common_tree_pointers): Do not stream
3966         DECL_ORIGINAL_TYPE
3967         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3968         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3970 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3972         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3973         thread twice from the same starting edge.
3975 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3977         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3978         * gimple.c (gimple_call_nonnull_result_p): ...here...
3979         (gimple_call_nonnull_arg): ...and here.
3980         * gimple.h (gimple_call_nonnull_result_p): New.
3981         (gimple_call_nonnull_arg): New.
3983 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3985         * config/arm/arm-cpus.in: Move information from fpu field of each
3986         cpu definition to the isa field.
3987         * config/arm/parsecpu.awk (fpu): Delete match rule.
3988         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3990 2018-07-11  Richard Biener  <rguenther@suse.de>
3992         PR debug/86457
3993         * dwarf2out.c (init_sections_and_labels): Use
3994         output_asm_line_debug_info consistently.
3995         (dwarf2out_early_finish): Likewise.
3996         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3997         type units.
3999 2018-07-11  Richard Biener  <rguenther@suse.de>
4001         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4002         Rework father_bb setting in a way to avoid propagating constants
4003         multiple times on a loop body.
4005 2018-07-10  Mark Wielaard  <mark@klomp.org>
4007         PR debug/86459
4008         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4010 2018-07-10  Richard Biener  <rguenther@suse.de>
4012         * hash-map.h (hash_map::iterator::operator*): Return
4013         references to key and value.
4015 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4017         PR c++/86443
4018         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4019         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4020         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4021         (gimplify_omp_for): For composite loops, move outer
4022         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4023         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4024         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4025         TREE_LIST for both the original class iterator and the "last" helper
4026         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4027         loop, remember has_decl_expr from outer composite loops for the
4028         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4030 2018-07-09  Martin Sebor  <msebor@redhat.com>
4032         PR middle-end/77357
4033         PR middle-end/86428
4034         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4035         accessing implicitly initialized array elements.
4036         * expr.c (string_constant): Handle string initializers of
4037         character arrays within aggregates.
4038         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4039         Store element offset.  As a special case, handle zero size.
4040         (fold_nonarray_ctor_reference): Same.
4041         (fold_ctor_reference): Add argument.  Store subobject offset.
4042         * gimple-fold.h (fold_ctor_reference): Add argument.
4044 2018-07-09  Paul Koning  <ni1d@arrl.net>
4046         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4047         (pdp11_insn_cost): New function.
4048         (pdp11_md_asm_adjust): New function.
4049         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4050         (pdp11_rtx_costs): Update to match machine better.
4051         (output_addr_const_pdp11): Correct format mismatch warnings.
4052         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4053         * config/pdp11/pdp11.md: General change to add base_cost and/or
4054         length attributes for use by new pdp11_insn_cost function.
4055         (MIN_BRANCH): Correct definition.
4056         (MIN_SOB): Ditto.
4057         (doloop_end): Use standard pattern name for looping pattern.
4058         (doloop_end_nocc): New.
4059         (movsf): Add another constraint alternative.
4060         (zero_extendqihi2): Add constraint alternatives for not in place
4061         extend.
4062         (zero_extendhisi2): Remove.
4063         (shift patterns): Add CC handling variants.
4064         (bswaphi2): New.
4065         (bswapsi2): New.
4066         (rothi3): New.
4067         (define_peephole2): New peephole to recognize mov that sets CC for
4068         subsequent test.
4070 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4072         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4073         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4074         wi::add.
4076 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4078         PR c/86420
4079         * real.c (real_nextafter): Return true if result is denormal.
4081 2018-07-09  Martin Liska  <mliska@suse.cz>
4083         * common.opt: Add back wrongly removed attribute.
4085 2018-07-09  Richard Biener  <rguenther@suse.de>
4087         PR debug/86413
4088         * dwarf2out.c (gen_block_die): For an early generated DIE
4089         always output high/low PC attributes.
4091 2018-07-09  Tom de Vries  <tdevries@suse.de>
4093         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4094         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4095         onto VAR_DECL with abstract origin.
4097 2018-07-07  Jim Wilson  <jimw@sifive.com>
4099         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4101 2018-07-07  Tom de Vries  <tdevries@suse.de>
4103         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4105 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4107         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4108         overflow_type.
4109         (combine_bound): Use wide-int overflow calculation instead of
4110         rolling our own.
4111         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4112         overflow_type.
4113         * fold-const.c (int_const_binop_2): Same.
4114         (extract_muldiv_1): Same.
4115         (fold_div_compare): Same.
4116         (fold_abs_const): Same.
4117         * match.pd: Same.
4118         * poly-int.h (add): Same.
4119         (sub): Same.
4120         (neg): Same.
4121         (mul): Same.
4122         * predict.c (predict_iv_comparison): Same.
4123         * profile-count.c (slow_safe_scale_64bit): Same.
4124         * simplify-rtx.c (simplify_const_binary_operation): Same.
4125         * tree-chrec.c (tree_fold_binomial): Same.
4126         * tree-data-ref.c (split_constant_offset_1): Same.
4127         * tree-if-conv.c (idx_within_array_bound): Same.
4128         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4129         * tree-ssa-phiopt.c (minmax_replacement): Same.
4130         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4131         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4132         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4133         * wide-int.cc (wi::add_large): Same.
4134         (wi::mul_internal): Same.
4135         (wi::sub_large): Same.
4136         (wi::divmod_internal): Same.
4137         * wide-int.h: Change overflow type to overflow_type for neg, add,
4138         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4139         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4140         mul_internal, divmod_internal.
4141         (overflow_type): New enum.
4142         (accumulate_overflow): New.
4144 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4146         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4147         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4149 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4151         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4152         argument is checked for zero before entering loop, avoid checking again.
4154 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4156         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4157         * gimplify.h (generic_expr_could_trap_p): Likwise.
4158         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4160 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4162         PR tree-optimization/86401
4163         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4164         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4165         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4166         * fold-const.h (fold_bit_and_mask): Declare.
4167         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4169 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4171         PR target/86324
4172         * target.def (translate_mode_attribute): New hook.
4173         * targhooks.h (default_translate_mode_attribute): Declare.
4174         * targhooks.c (default_translate_mode_attribute): New function.
4175         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4176         * doc/tm.texi: Regenerate.
4177         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4178         (rs6000_translate_mode_attribute): New function.
4180 2018-07-06  Paul Koning  <ni1d@arrl.net>
4182         * doc/md.texi (define_split): Document DONE and FAIL.
4183         (define_peephole2): Ditto.
4185 2018-07-05  Jeff Law  <law@redhat.com>
4187         PR tree-optimization/86010
4188         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4189         both the head and tail of mem* and str* calls.
4191 2018-07-05  Jim Wilson  <jimw@sifive.com>
4193         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4195 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4197         * config/aarch64/aarch64-simd.md: correct flags text for
4198         MIN_EXPR replacement.
4200 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4202         * configure: Regenerated.
4204 2018-07-05  Carl Love  <cel@us.ibm.com>
4206         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4207         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4208         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4209         VSX_BUILTIN_DOUBLEL_V4SF.
4211 2018-07-05  Martin Sebor  <msebor@redhat.com>
4213         PR c++/86400
4214         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4215         than its domain to compute its the upper bound of a char array.
4217 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4219         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4220         * doc/cpp.texi: Update comment.
4221         * doc/tm.texi: Rebuilt.
4222         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4223         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4224         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4225         headers affected by extern "C".
4226         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4227         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4228         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4229         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4230         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4231         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4232         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4233         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4234         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4235         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4236         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4237         config/sparc/sp64-elf.h, config/spu/spu.h,
4238         config/stormy16/stormy16.h, config/v850/v850.h,
4239         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4240         define NO_IMPLICIT_EXTERN_C.
4241         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4243 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4245         PR target/84711
4246         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4247         instead of GET_MODE_SIZE when comparing Units.
4249 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4251         PR target/84711
4252         * rtlanal.c (set_noop_p): Constrain on mode change,
4253         include hard-reg-set.h
4255 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4257         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4259 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4261         Revert
4262         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4264         PR sanitizer/84250
4265         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4266         libasan.
4267         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4269 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4271         PR sanitizer/84250
4272         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4273         libasan.
4274         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4276 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4278         PR middle-end/86380
4279         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4281 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4283         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4284         neg_*_op* variables.
4286 2018-07-04  Martin Liska  <mliska@suse.cz>
4288         * tree-switch-conversion.c: Define
4289         max_ratio_for_speed and max_ratio_for_size constants.
4291 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4292             Martin Liska  <mliska@suse.cz>
4294         PR middle-end/66240
4295         PR target/45996
4296         PR c/84100
4297         * common.opt: Rename align options with 'str_' prefix.
4298         * common/config/i386/i386-common.c (set_malign_value): New
4299         function.
4300         (ix86_handle_option): Use it to set -falign-* options/
4301         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4302         type from int to string.
4303         * config/aarch64/aarch64.c: Update default values from int
4304         to string.
4305         * config/alpha/alpha.c (alpha_override_options_after_change):
4306         Likewise.
4307         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4308         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4309         max skip conditionally.
4310         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4311         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4312         max skip conditionally.
4313         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4314         max skip conditionally.
4315         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4316         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4317         max skip conditionally.
4318         * config/i386/i386.c (struct ptt): Change type from int to
4319         string.
4320         (ix86_default_align): Set default values.
4321         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4322         max skip conditionally.
4323         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4324         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4325         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4326         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4327         max skip conditionally.
4328         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4329         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4330         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4331         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4332         max skip conditionally.
4333         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4334         * config/ia64/ia64.c (ia64_option_override): Set default values
4335         for alignment options.
4336         * config/m68k/m68k.c: Handle new str_align_* options.
4337         * config/mips/mips.c (mips_set_compression_mode): Change
4338         type of constants.
4339         (mips_option_override): Set default values for options.
4340         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4341         Likewise.
4342         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4343         Likewise.
4344         * config/rx/rx.c (rx_option_override): Likewise.
4345         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4346         (LABEL_ALIGN): Use align_labels_log.
4347         (LOOP_ALIGN): Use align_loops_align.
4348         * config/s390/s390.c (s390_asm_output_function_label): Use new
4349         macros.
4350         * config/sh/sh.c (sh_override_options_after_change):
4351         Change type of constants.
4352         * config/spu/spu.c (spu_sched_init): Likewise.
4353         * config/sparc/sparc.c (sparc_option_override): Set default
4354         values for options.
4355         * config/visium/visium.c (visium_option_override): Likewise.
4356         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4357         emit p2align format with last argument if it's not needed.
4358         * doc/invoke.texi: Document extended format of -falign-*.
4359         * final.c: Use align_labels alignment.
4360         * flags.h (struct target_flag_state): Change type to use
4361         align_flags.
4362         (struct align_flags_tuple): New.
4363         (struct align_flags): Likewise.
4364         (align_loops_log): Redefine macro to use new types.
4365         (align_loops_max_skip): Redefine macro to use new types.
4366         (align_jumps_log): Redefine macro to use new types.
4367         (align_jumps_max_skip): Redefine macro to use new types.
4368         (align_labels_log): Redefine macro to use new types.
4369         (align_labels_max_skip): Redefine macro to use new types.
4370         (align_functions_log): Redefine macro to use new types.
4371         (align_loops): Redefine macro to use new types.
4372         (align_jumps): Redefine macro to use new types.
4373         (align_labels): Redefine macro to use new types.
4374         (align_functions): Redefine macro to use new types.
4375         (align_functions_max_skip): Redefine macro to use new types.
4376         (align_loops_value): New macro.
4377         (align_jumps_value): New macro.
4378         (align_labels_value): New macro.
4379         (align_functions_value): New macro.
4380         * function.c (invoke_set_current_function_hook): Propagate
4381         alignment values from flags to global variables default in
4382         topleev.h.
4383         * ipa-icf.c (sem_function::equals_wpa): Use
4384         cl_optimization_option_eq instead of memcmp.
4385         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4386         of string types.
4387         (cl_optimization_stream_in): Likewise.
4388         * optc-save-gen.awk: Support strings in cl_optimization.
4389         * opth-gen.awk: Likewise.
4390         * opts.c (finish_options): Remove error checking of invalid
4391         value ranges.
4392         (MAX_CODE_ALIGN): Remove.
4393         (MAX_CODE_ALIGN_VALUE): Likewise.
4394         (parse_and_check_align_values): New function.
4395         (check_alignment_argument): Likewise.
4396         (common_handle_option): Use check_alignment_argument.
4397         * opts.h (parse_and_check_align_values): Declare.
4398         * toplev.c (init_alignments): Remove.
4399         (read_log_maxskip): New.
4400         (parse_N_M): Likewise.
4401         (parse_alignment_opts): Likewise.
4402         (backend_init_target): Remove usage of init_alignments.
4403         * toplev.h (parse_alignment_opts): Declare.
4404         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4405         argument.
4406         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4407         * tree.c (cl_option_hasher::equal): New.
4408         * varasm.c: Use new global macros.
4410 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4412         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4413         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4414         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4415         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4416         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4417         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4418         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4419         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4420         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4421         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4422         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4423         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4424         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4426 2018-07-04  Martin Liska  <mliska@suse.cz>
4427             Jonathan Wakely  <jwakely@redhat.com>
4429         * coverage.c: Use correct type.
4430         * doc/invoke.texi: Language correction.
4432 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4434         PR target/85620
4435         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4436         ENDBRANCH for non-tail call which may return via indirect branch.
4437         * doc/extend.texi: Document indirect_return attribute.
4439 2018-07-03  Martin Sebor  <msebor@redhat.com>
4441         PR tree-optimization/86274
4442         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4443         precondition.
4444         (format_floating): Correct handling of infinities and NaNs.
4446 2018-07-03  Martin Sebor  <msebor@redhat.com>
4448         * print-tree.c (print_real_cst): New function.
4449         (print_node_brief): Call it.
4450         (print_node): Ditto.
4452 2018-07-03  Jeff Law  <law@redhat.com>
4454         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4455         into a single pattern.
4457         * config/h8300/h8300.md (ors code_iterator): New.
4458         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4459         a single pattern and single splitter.
4460         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4461         (iorqi3_1, xorqi3_1): Likewise.
4462         (iorqi3, xorqi3 expanders): Similarly.
4464         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4465         (movmd_internal) into a single pattern using the P mode iterator.
4466         (movmd splitters): Similarly.
4467         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4468         (movsd splitters): Similarly.
4470         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4471         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4472         right table based on the size of the operand.
4473         * config/h8300/h8300.md (length_table): Corresponding changes. All
4474         references to "addb", "addw" and "addl" changed to "add".
4475         (btst patterns): Merge two variants into a single pattern.
4476         (tstqi, tsthi): Likewise.
4477         (addhi3_incdec, addsi3_incdec): Likewise.
4478         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4479         (mulhi3, mulsi3): Likewise.
4480         (udivhi3, udivsi3): Likewise.
4481         (divhi3, divsi3): Likewise.
4482         (andorqi3, andorhi3, andorsi3): Likewise.
4484 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4486         PR target/85694
4487         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4488         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4490 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4492         PR tree-optimization/85694
4493         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4494         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4495         UNSPEC_URHADD.
4496         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4497         (<u>avg<mode>3_ceil): New patterns.
4499 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4501         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4502         scan-tree-dump directive.
4503         * gcc.dg/vect/slp-perm-2.c: Likewise.
4504         * gcc.dg/vect/slp-perm-3.c: Likewise.
4505         * gcc.dg/vect/slp-perm-5.c: Likewise.
4506         * gcc.dg/vect/slp-perm-6.c: Likewise.
4507         * gcc.dg/vect/slp-perm-7.c: Likewise.
4508         * gcc.dg/vect/slp-perm-8.c: Likewise.
4510 2018-07-03  Marek Polacek  <polacek@redhat.com>
4512         PR middle-end/86202
4513         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4515 2018-07-03  Richard Biener  <rguenther@suse.de>
4517         PR ipa/86389
4518         * tree-ssa-structalias.c (find_func_clobbers): Properly
4519         handle indirect calls.
4521 2018-07-03  Jeff Law  <law@redhat.com>
4523         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4524         (shifts): New code iterator.
4525         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4526         expander.  Fix HImode handling on H8/SX.
4527         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4528         (subqi3, subhi3, subsi3 expanders): Likewise.
4529         (andqi3, andhi3, andsi3 expanders): Likewise.
4530         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4531         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4532         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4533         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4534         (zero_extendqihi2, zero_extendqisi2): Likewise.
4535         (extendqihi2, extendqisi2): Likewise.
4536         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4537         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4538         (rotlqi3_1, rotlhi3_1): Likewise.
4539         (logicalhi3_sn, logicalsi3_sn): Likewise.
4540         (logicalhi3, logicalsi3): Likewise.
4542 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4544         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4545         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4546         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4547         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4548         type to append_pattern_def_seq instead of creating a stmt_vec_info
4549         directly.
4550         (build_mask_conversion): Likewise.  Remove vinfo argument.
4551         (vect_add_conversion_to_patterm): Likewise, renaming to...
4552         (vect_add_conversion_to_pattern): ...this.
4553         (vect_recog_mask_conversion_pattern): Update call to
4554         build_mask_conversion.  Pass the vector type to
4555         append_pattern_def_seq here too.
4556         (vect_recog_gather_scatter_pattern): Update call to
4557         vect_add_conversion_to_pattern.
4559 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4561         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4562         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4563         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4564         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4565         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4566         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4567         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4568         append_pattern_def_seq instead of new_pattern_def_seq.
4569         (vect_recog_divmod_pattern): Do both of the above.
4570         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4571         is null.
4573 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4575         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4576         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4577         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4578         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4579         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4580         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4581         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4582         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4583         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4584         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4585         parameter with a single stmt_vec_info.
4586         (vect_recog_func_ptr): Likewise.
4587         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4588         (vect_try_gather_scatter_pattern): ...this.
4589         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4590         the stmt_vec_info of the statement to be matched.  Don't clear
4591         STMT_VINFO_RELATED_STMT.
4592         (vect_pattern_recog): Update call accordingly.
4594 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4596         PR tree-optimization/85694
4597         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4598         (uavgM3_ceil): Document new optabs.
4599         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4600         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4601         functions.
4602         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4603         (savg_ceil_optab): New optabs.
4604         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4605         (vect_vect_recog_func_ptrs): Add it.
4606         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4607         constant directly from the associated lhs.
4609 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4611         * tree-vect-patterns.c (vect_split_statement): New function.
4612         (vect_convert_input): Use it to try to split an existing cast.
4614 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4616         * poly-int.h (print_hex): New function.
4617         * dumpfile.h (dump_dec, dump_hex): Declare.
4618         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4619         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4620         min_input_precision, operation_precision and operation_sign.
4621         * tree-vect-patterns.c (vect_get_range_info): New function.
4622         (vect_same_loop_or_bb_p, vect_single_imm_use)
4623         (vect_operation_fits_smaller_type): Delete.
4624         (vect_look_through_possible_promotion): Add an optional
4625         single_use_p parameter.
4626         (vect_recog_over_widening_pattern): Rewrite to use new
4627         stmt_vec_info infomration.  Handle one operation at a time.
4628         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4629         (vect_truncatable_operation_p, vect_set_operation_type)
4630         (vect_set_min_input_precision): New functions.
4631         (vect_determine_min_output_precision_1): Likewise.
4632         (vect_determine_min_output_precision): Likewise.
4633         (vect_determine_precisions_from_range): Likewise.
4634         (vect_determine_precisions_from_users): Likewise.
4635         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4636         (vect_vect_recog_func_ptrs): Put over_widening first.
4637         Add cast_forwprop.
4638         (vect_pattern_recog): Call vect_determine_precisions.
4640 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4642         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4643         statements that have been replaced by further pattern statements.
4644         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4646 2018-07-03  Richard Biener  <rguenther@suse.de>
4648         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4649         always set *dt.  Dump vectype in vectype overload.
4650         * dumpfile.h (dump_gimple_expr): New function.
4651         (dump_gimple_expr_loc): Likewise.
4652         * dumpfile.c (dump_gimple_expr): New function.
4653         (dump_gimple_expr_loc): Likewise.
4655 2018-07-02  Jeff Law  <law@redhat.com>
4657         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4658         the H8/300, H8/300H and H8/S variants into a single pattern.
4659         (movhi_h8300, movqi_h8300hs): Similarly.
4660         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4661         (QHI mode iterator): New.
4663         * config/h8300/h8300.md: Remove trailing whitespace.
4665 2018-07-02  Jim Wilson  <jimw@sifive.com>
4667         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4668         instead of emit_insn for interrupt returns.
4669         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4670         (riscv_sret, riscv_uret): Likewise.
4672 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4674         * pretty-print.c (selftest::test_pp_format): Move save and restore
4675         of quotes to class auto_fix_quotes, and add an instance.
4676         * selftest.c: Include "intl.h".
4677         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4678         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4679         * selftest.h (selftest::auto_fix_quotes): New class.
4681 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4683         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4684         (aarch64_sve_prepare_conditional_op): Remove.
4685         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4686         Allow aarch64_simd_reg_or_zero as select operand; remove
4687         the aarch64_sve_prepare_conditional_op call.
4688         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4689         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4690         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4691         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4692         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4693         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4694         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4695         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4696         and a splitters to match all of the *_any patterns.
4697         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4699         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4700         (SVE_COND_FP_BINARY_REV): Remove.
4701         (sve_int_op_rev, sve_fp_op_rev): New.
4702         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4703         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4704         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4705         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4706         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4707         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4708         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4709         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4710         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4712         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4713         Remove match_dup 1 from the inner unspec.
4714         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4716         * config/aarch64/aarch64.md (movprfx): New attr.
4717         (length): Default movprfx to 8.
4718         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4719         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4720         (*<su>mul<SVE_I>3_highpart): Likewise.
4721         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4722         (*v<ASHIFT><SVE_I>3): Likewise.
4723         (*<su><MAXMIN><SVE_I>3): Likewise.
4724         (*<su><MAXMIN><SVE_F>3): Likewise.
4725         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4726         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4727         (*div<SVE_F>4): Likewise.
4729 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4731         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4732         in dump string.
4734 2018-07-02  Richard Biener  <rguenther@suse.de>
4736         PR tree-optimization/86363
4737         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4738         memset argument refers to a non-variable address.
4740 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4742         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4743         {PLUS,MINUS}_EXPR code to...
4744         (adjust_symbolic_bound): ...here,
4745         (combine_bound): ...here,
4746         (set_value_range_with_overflow): ...and here.
4748 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4750         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4751         code...
4752         (extract_range_from_abs_expr): ...here.
4754 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4756         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4757         -fno-omit-frame-pointer when not optimizing.
4759 2018-07-02  Martin Liska  <mliska@suse.cz>
4761         PR ipa/86279
4762         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4763         (propagate_nothrow): Likewise.
4765 2018-07-02  Martin Liska  <mliska@suse.cz>
4767         PR ipa/86323
4768         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4770 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4772         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4773         function in r262149, changing "loc" param from source_location to
4774         const dump_location_t &.
4775         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4776         declaration, as above.
4778 2018-07-01  Paul Koning  <ni1d@arrl.net>
4780         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4781         -munit-asm, -mgnu-asm, -mdec-asm.
4782         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4783         (pdp11_output_labelref): New.
4784         (pdp11_output_def): New.
4785         (pdp11_output_addr_vec_elt): New.
4786         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4787         %# and %@ format codes.
4788         (pdp11_option_override): New.
4789         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4790         (pdp11_output_ident): New.
4791         (pdp11_asm_named_section): New.
4792         (pdp11_asm_init_sections): New.
4793         (pdp11_file_start): New.
4794         (pdp11_file_end): New.
4795         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4796         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4797         %o, like %c but octal.
4798         (pdp11_option_override): New.
4799         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4800         -mdec-asm.
4801         (DATA_SECTION_ASM_OP): Ditto.
4802         (READONLY_DATA_SECTION_ASM_OP): New.
4803         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4804         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4805         (ASM_OUTPUT_LABELREF): Ditto.
4806         (ASM_OUTPUT_DEF): Ditto.
4807         (ASM_OUTPUT_EXTERNAL): New.
4808         (ASM_OUTPUT_SOURCE_FILENAME): New.
4809         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4810         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4811         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4812         %# and %@ format codes.
4813         * config/pdp11/pdp11.opt (mgnu-asm): New.
4814         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4815         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4816         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4818 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4820         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4821         dereferencing path[] beyond its length.
4822         (debug_path): New.
4823         (debug_all_paths): New.
4824         (rewire_first_differing_edge): New.
4825         (adjust_paths_after_duplication): New.
4826         (duplicate_thread_path): Call adjust_paths_after_duplication.
4827         Add new argument.
4828         (thread_through_all_blocks): Add new argument to
4829         duplicate_thread_path.
4831 2018-06-30  Jim Wilson  <jimw@sifive.com>
4833         * config/riscv/predicates.md (p2m1_shift_operand): New.
4834         (high_mask_shift_operand): New.
4835         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4836         pattern using p2m1_shift_operand.
4837         (lshsi3_zero_extend_3+2): New combiner pattern using
4838         high_mask_shift_operand.
4840 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4842         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4843         split out from...
4844         (vect_recog_rotate_pattern): ...here.
4845         (vect_convert_input): Try to insert casts of invariants in the
4846         preheader.
4847         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4848         preheader to be empty.
4850 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4852         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4853         vector type.  If given, install it in the new statement's
4854         STMT_VINFO_VECTYPE.
4855         (vect_element_precision): New function.
4856         (vect_unpromoted_value): New struct.
4857         (vect_unpromoted_value::vect_unpromoted_value): New function.
4858         (vect_unpromoted_value::set_op): Likewise.
4859         (vect_look_through_possible_promotion): Likewise.
4860         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4861         (vect_widened_op_tree, vect_convert_input): Likewise.
4862         (vect_convert_inputs, vect_convert_output): Likewise.
4863         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4864         to handle the optional cast of the multiplication result and
4865         vect_widened_op_tree to detect the widened multiplication itself.
4866         Do not require the input and output of promotion casts to have
4867         the same sign, but base the signedness of the operation on the
4868         input rather than the result.  If the pattern includes two
4869         promotions, check that those promotions have the same sign.
4870         Do not restrict the MULT_EXPR handling to a double-width result;
4871         handle quadruple-width results and wider.  Use vect_convert_inputs
4872         to convert the inputs to the common type.
4873         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4874         to handle the optional cast of the ABS result.  Also allow a sign
4875         change or a sign extension between the ABS and MINUS.
4876         Use vect_widened_op_tree to detect the widened subtraction and use
4877         vect_convert_inputs to convert the inputs to the common type.
4878         (vect_handle_widen_op_by_const): Delete.
4879         (vect_recog_widen_op_pattern): New function.
4880         (vect_recog_widen_mult_pattern): Use it.
4881         (vect_recog_widen_shift_pattern): Likewise.
4882         (vect_recog_widen_sum_pattern): Use
4883         vect_look_through_possible_promotion to handle the promoted
4884         PLUS_EXPR operand.
4886 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4888         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4889         the containing gimple_seq *.
4890         * gimple-iterator.h (gsi_for_stmt): Declare it.
4891         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4892         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4893         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4894         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4895         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4896         checks.
4897         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4898         split out from...
4899         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4900         statement being replaced is part of an existing pattern
4901         definition sequence, inserting the new pattern statements before
4902         the original one.
4903         (vect_pattern_recog_1): Don't return a bool.  If the statement
4904         is already part of a pattern, instead apply pattern matching
4905         to the pattern definition statements.  Don't clear the
4906         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4907         (vect_pattern_recog): Don't break after the first match;
4908         continue processing the pattern definition statements instead.
4909         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4911 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4913         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4914         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4915         (vect_recog_widen_sum_pattern): Use it.
4917 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4919         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4920         phi is not a pattern statement and has not been replaced by
4921         a pattern statement.
4922         * tree-vect-patterns.c (type_conversion_p): Don't check
4923         STMT_VINFO_IN_PATTERN_P.
4924         (vect_recog_vector_vector_shift_pattern): Likewise.
4925         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4926         the pattern statement rather than the original statement; check
4927         directly for a WIDEN_MULT_EXPR here.
4928         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4929         vect_is_simple_use to return the pattern statement rather
4930         than the original statement; use is_pattern_stmt_p to check
4931         for such a pattern statement.
4932         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4933         to return the pattern statement rather than the original statement;
4934         don't do the same transformation here.
4935         (vect_is_simple_use): If the defining statement has been replaced
4936         by a pattern statement, return the pattern statement instead.
4937         Remove the corresponding (local) transformation from the vectype
4938         overload.
4940 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4942         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4943         end and default to null.
4944         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4945         (vectorizable_reduction): Update calls accordingly, dropping the
4946         gimple ** argument if the passed-back statement isn't needed.
4947         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4948         (vect_recog_rotate_pattern): Likewise.
4949         (vect_recog_mask_conversion_pattern): Likewise.
4950         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4951         (vect_mask_constant_operand_p): Likewise.
4952         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4953         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4954         (get_group_load_store_type, get_load_store_type): Likewise.
4955         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4956         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4957         (vectorizable_conversion, vectorizable_assignment): Likewise.
4958         (vectorizable_shift, vectorizable_operation): Likewise.
4959         (vectorizable_store, vect_is_simple_cond): Likewise.
4960         (vectorizable_condition, vectorizable_comparison): Likewise.
4961         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4962         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4963         and move it to the end.  Cope with null def_stmt_outs.
4965 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4967         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4969 2018-06-29  Jeff Law  <law@redhat.com>
4971         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4972         displacements for TARGET_V850E2V3 and newer.
4973         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4974         * config/v850/v850.md (sign23byte_load): Remove.
4975         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4976         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4978 2018-06-29  Martin Liska  <mliska@suse.cz>
4980         PR lto/85759
4981         * coverage.c (coverage_init): Mangle full path name.
4982         * doc/invoke.texi: Document the change.
4983         * gcov-io.c (mangle_path): New.
4984         * gcov-io.h (mangle_path): Likewise.
4985         * gcov.c (mangle_name): Use mangle_path for path mangling.
4987 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4989         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4990         if starting source register is not even.
4992 2018-06-29  Martin Liska  <mliska@suse.cz>
4994         PR tree-optimization/86263
4995         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4996         Make edge redirection.
4998 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5000         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5001         (dump_scope_depth): New variable.
5002         (get_dump_scope_depth): New function.
5003         (dump_begin_scope): New function.
5004         (dump_end_scope): New function.
5005         * dumpfile.h (get_dump_scope_depth): New declaration.
5006         (dump_begin_scope): New declaration.
5007         (dump_end_scope): New declaration.
5008         (class auto_dump_scope): New class.
5009         (AUTO_DUMP_SCOPE): New macro.
5010         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5011         AUTO_DUMP_SCOPE.
5013 2018-06-29  Richard Biener  <rguenther@suse.de>
5015         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5016         compute_all_dependences succeeds.
5017         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5018         exceed --param loop-max-datarefs-for-datadeps.
5020 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5022         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5024 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5026         PR target/86348
5027         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5028         alternative 0 in preferred_for_speed attribute.
5030 2018-06-28  Paul Koning  <ni1d@arrl.net>
5032         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5033         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5034         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5035         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5036         for shift insn patterns.
5038 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5040         * cgraph.c (cgraph_node::get_body): Replace assignments to
5041         "dump_file" with calls to set_dump_file.
5042         * dumpfile.c (alt_dump_file): Make static, and group with...
5043         (alt_flags): ...this definition.
5044         (dumps_are_enabled): New variable.
5045         (refresh_dumps_are_enabled): New function.
5046         (set_dump_file): New function.
5047         (set_alt_dump_file): New function.
5048         (gcc::dump_manager::dump_start): Replace assignments to
5049         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5050         set_alt_dump_file.
5051         (gcc::dump_manager::dump_finish): Likewise.
5052         * dumpfile.h (alt_dump_file): Delete decl.
5053         (dumps_are_enabled): New variable decl.
5054         (set_dump_file): New function decl.
5055         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5056         global.
5057         * tree-nested.c (lower_nested_functions): Replace assignments to
5058         "dump_file" with calls to set_dump_file.
5060 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5062         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5063         goto_locus of each outgoing edge of each basic block.
5065 2018-06-28  Richard Biener  <rguenther@suse.de>
5067         * dwarf2out.c (decl_scope_table): Remove.
5068         (push_decl_scope): Likewise.
5069         (pop_decl_scope): Likewise.
5070         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5071         (gen_struct_or_union_type_die): Likewise.
5072         (gen_tagged_type_die): Likewise.
5073         (dwarf2out_init): Do not initialize decl_scope_table.
5074         (dwarf2out_c_finalize): Do not free it.
5076 2018-06-28  Richard Biener  <rguenther@suse.de>
5078         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5079         deciding whether to not re-use a DIE.
5081 2018-06-28  Richard Biener  <rguenther@suse.de>
5083         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5084         DW_AT_abstract_origin attribute.
5086 2018-06-28  Martin Liska  <mliska@suse.cz>
5088         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5089         Use newly introduced constants.
5090         * tree-switch-conversion.h (struct jump_table_cluster):
5091         Define max_ratio_for_size and max_ratio_for_speed.
5093 2018-06-28  Martin Liska  <mliska@suse.cz>
5095         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5096         Add new checking assert to catch invalid state.
5097         (jump_table_cluster::can_be_handled): Handle single case
5098         clusters.
5099         (jump_table_cluster::is_beneficial): Bail out for such case.
5100         (bit_test_cluster::find_bit_tests):
5101         Add new checking assert to catch invalid state.
5102         (bit_test_cluster::can_be_handled): Handle single case
5103         clusters.
5104         (bit_test_cluster::is_beneficial): Bail out for such case.
5105         (switch_decision_tree::analyze_switch_statement):
5106         Fix comment.
5108 2018-06-28  Martin Liska  <mliska@suse.cz>
5110         * common.opt: Introduce -completion option.
5111         * gcc.c (driver_handle_option): Handle it.
5112         (driver::main): Print completions if completion
5113         is set.
5114         * opt-suggestions.c (option_proposer::get_completions):
5115         New function.
5116         (option_proposer::suggest_completion): Likewise.
5117         (option_proposer::find_param_completions): Likewise.
5118         (verify_autocompletions): Likewise.
5119         (test_completion_valid_options): Likewise.
5120         (test_completion_valid_params): Likewise.
5121         (in_completion_p): Likewise.
5122         (empty_completion_p): Likewise.
5123         (test_completion_partial_match): Likewise.
5124         (test_completion_garbage): Likewise.
5125         (opt_proposer_c_tests): Likewise.
5126         * opt-suggestions.h: Declare new functions.
5127         * opts.c (common_handle_option): Handle OPT__completion_.
5128         * selftest-run-tests.c (selftest::run_tests): Add
5129         opt_proposer_c_tests.
5130         * selftest.c (assert_str_startswith): New.
5131         * selftest.h (assert_str_startswith): Likewise.
5132         (opt_proposer_c_tests): New.
5133         (ASSERT_STR_STARTSWITH): Likewise.
5135 2018-06-28  Martin Liska  <mliska@suse.cz>
5137         * Makefile.in: Add opt-suggestions.o.
5138         * gcc-main.c: Include opt-suggestions.h.
5139         * gcc.c (driver::driver): Likewise.
5140         (driver::~driver): Remove m_option_suggestions.
5141         (driver::build_option_suggestions): Moved to option_proposer.
5142         (driver::suggest_option): Likewise.
5143         (driver::handle_unrecognized_options): Use option_proposer.
5144         * gcc.h (class driver): Add new memver m_option_proposer.
5145         * opt-suggestions.c: New file.
5146         * opt-suggestions.h: New file.
5148 2018-06-28  Martin Liska  <mliska@suse.cz>
5150         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5151         (auto_string_vec::~auto_string_vec): Likewise.
5153 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5155         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5156         prevent_decl_creation_for_types fields up and add reset_location field.
5157         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5158         statement if id->reset_location is true.
5159         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5160         id->reset_location is true.
5161         (copy_phis_for_bb): Force input_location on the arguments if
5162         id->reset_location is true.
5163         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5164         is set on the function to be inlined.
5166 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5168         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5170 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5172         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5173         registers for Pmode.
5174         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5175         hard registers for the clobbered pseudo.
5177 2018-06-27  Paul Koning  <ni1d@arrl.net>
5179         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5180         mutually exclusive options.
5181         * config/pdp11/constraints.md (h): New constraint.
5182         (O): Update definition to match shift code generation.
5183         (D): New constraint.
5184         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5185         (CCFP): Remove.
5186         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5187         function.
5188         (output_jump): Change arguments.
5189         (pdp11_fixed_cc_regs): New function.
5190         (pdp11_cc_mode): Ditto.
5191         (pdp11_expand_shift): Ditto.
5192         (pdp11_assemble_shift): Ditto.
5193         (pdp11_small_shift): Ditto.
5194         (pdp11_branch_cost): Remove.
5195         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5196         from output.
5197         (pdp11_register_move_cost): Update for CC registers.
5198         (pdp11_rtx_costs): Add case for LSHIFTRT.
5199         (pdp11_output_jump): Add CCNZ mode conditional branches.
5200         (notice_update_cc_on_set): Remove.
5201         (pdp11_cc_mode): New function.
5202         (simple_memory_operand): Correct pre/post decrement case.
5203         (no_side_effect_operand): New function.
5204         (pdp11_regno_reg_class): Add CC_REGS class.
5205         (pdp11_fixed_cc_regs): New function.
5206         (pdp11_small_shift): New function.
5207         (pdp11_expand_shift): New function to expand shift insns.
5208         (pdp11_assemble_shift): New function to output shifts.
5209         (pdp11_branch_cost): Remove.
5210         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5211         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5212         (WCHAR_TYPE): Ditto.
5213         (PTRDIFF_TYPE): Ditto.
5214         (ADJUST_INSN_LENGTH): New macro.
5215         (FIXED_REGISTERS): Add CC registers.
5216         (CALL_USED_REGISTERS): Ditto.
5217         (reg_class): Ditto.
5218         (REG_CLASS_NAMES): Ditto.
5219         (REG_CLASS_CONTENTS): Ditto.
5220         (SELECT_CC_MODE): Use new function.
5221         (TARGET_FLAGS_REGNUM): New macro.
5222         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5223         (cc0_reg_rtx): Remove.
5224         (CC_STATUS_MDEP): Remove.
5225         (CC_STATUS_MDEFP_INIT): Remove.
5226         (CC_IN_FPU): Remove.
5227         (NOTICE_UPDATE_CC): Remove.
5228         (REGISTER_NAMES): Add CC registers.
5229         (BRANCH_COST): Change to constant 1.
5230         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5231         handling.
5232         * config/pdp11/pdp11.opt (mbcopy): Remove.
5233         (mbcopy-builtin): Remove.
5234         (mbranch-cheap): Remove.
5235         (mbranch-expensive): Remove.
5236         * config/pdp11/predicates.md (expand_shift_operand): Update to
5237         match shift code generation.
5238         (ccnz_operator): New predicate.
5239         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5240         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5241         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5242         exclusive options.
5243         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5244         description of O constraint.
5246 2018-06-27  Jeff Law  <law@redhat.com>
5247             Austin Law  <austinklaw@gmail.com>
5249         * config/v850/v850.md (addsi3_set_flags): New pattern.
5250         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5251         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5252         (zero_extendhisi2_v850_set_flags): Likewise.
5253         (zero_extendqisi2_v850_set_flags): Likewise.
5254         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5255         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5256         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5258         * config/v850/v850-protos.h (notice_update_cc): Remove.
5259         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5260         (v850_print_operand): Handle 'D' and "d".
5261         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5262         Add handling of arithmetic/logical operations compared against zero.
5263         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5264         Do not look at v850_compare_op, instead get mode from last argument.
5265         (v850_gen_compare): Remove
5266         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5267         after reload for prologue insns.
5268         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5269         patterns.
5270         (construct_save_jarl): Likewise.
5271         (TARGET_FLAGS_REGNUM): Define.
5272         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5273         (NOTICE_UPDATE_CC): Remove.
5274         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5275         than cc0.  Conditionalize on reload_completed.
5276         (cmpsi_insn, setfcc_insn): Likewise.
5277         (tst1 splitter): Turn into define_and_split which sets the flags
5278         after reload.
5279         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5280         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5281         (cstoresf4, cstoredf4): Clobber the flags.
5282         (cmpsi, cmpsf, cmpdf): Remove expanders.
5283         (setf_insn): Remove pattern.
5284         (addsi3): Turn into define_and_split which clobbers the flags after
5285         reload and a suitable pattern (addsi3_clobber_flags) for use after
5286         reload.
5287         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5288         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5289         (ashrsi3, ashrsi3_v850e2): Likewise.
5290         (bins): Clobber the flags.
5291         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5292         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5293         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5294         (call_value_internal_short, call_value_internal_long): Likewise.
5295         (callt_save_interrupt, callt_return_interrupt): Likewise.
5296         (save_interrupt, return_interrupt): Likewise.
5297         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5298         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5299         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5300         (All FP comparisons): Only allow after reload has completed.
5301         (trfsr): Likewise.
5302         (divh, divhu): Tweak output template.
5303         (branch_z_normal, branch_z_invert): Remove
5304         (branch_nz_normal, branch_nz_invert): Likewise.
5305         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5307         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5308         * config/v850/v850.c (notice_update_cc): Remove.
5309         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5310         (CC_NO_CARRY): Likewise.
5311         (NOTICE_UPDATE_CC): Define to nothing.
5312         * config/v850/v850.md: Remove block comment on cc0 handling
5313         Remove "cc" attribute from all patterns.  Remove cc_status handling
5314         from all patterns.  Minor formatting fixes.
5316 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5318         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5319         (cortex-a76.cortex-a55): Likewise.
5320         * config/aarch64/aarch64-tune.md: Regenerate.
5321         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5322         cortex-a76.cortex-a55.
5324 2018-06-27  Jeff Law  <law@redhat.com>
5326         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5327         (MULTILIB_DIRNAMES): Similarly.
5329 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5331         * gimple.h (gimple_return_retbnd): Delete.
5332         (gimple_return_set_retbnd): Likewise.
5333         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5334         gimple_return_set_retbnd.
5335         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5336         gimple_return_retbnd and adjust.
5337         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5338         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5339         Explicitly return NULL in a couple more cases.  Move assertion
5340         on debug statements and remove unreachable code.
5341         (reset_debug_binding): Do not test id->retbnd.
5342         (expand_call_inline): Do not set it.
5344 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5346         * configure.ac: Add --disable-gcov option.
5347         * configure: Regenerate.
5348         * Makefile.in: Honour @enable_gcov@.
5349         * doc/install.texi: Document --disable-gcov.
5351 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5353         * config/arm/arm-cpus.in (cortex-a76): New entry.
5354         (cortex-a76.cortex-a55): Likewise.
5355         * config/arm/arm-tables.opt: Regenerate.
5356         * config/arm/arm-tune.md: Likewise.
5357         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5358         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5359         cortex-a76.cortex-a55.
5361 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5363         PR target/85769
5364         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5366 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5368         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5369         comment.
5370         (EPILOGUE_USES): Likewise.
5372 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5374         * tree-inline.c (remap_location): New function extracted from...
5375         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5376         (copy_phis_for_bb): ...here.  Call remap_location.
5377         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5379 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5381         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5382         unaligned vsx for 16B memset.
5384 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5386         PR target/86285
5387         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5388         ieee128_float_type_node to long_double_type_node unless
5389         TARGET_LONG_DOUBLE_128 is set.
5391 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5393         * cfgloop.c (get_loop_location): Convert return type from
5394         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5395         by implicit construction from rtx_insn *, and using
5396         dump_user_location_t::from_function_decl for the fallback case.
5397         * cfgloop.h (get_loop_location): Convert return type from
5398         location_t to dump_user_location_t.
5399         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5400         dump_printf_loc to pass in a dump_location_t rather than a
5401         location_t, via the gimple stmt.
5402         * coverage.c (get_coverage_counts): Update calls to
5403         dump_printf_loc to pass in dump_location_t rather than a
5404         location_t.
5405         * doc/optinfo.texi (Dump types): Convert example of
5406         dump_printf_loc from taking "locus" to taking "insn".  Update
5407         description of the "_loc" calls to cover dump_location_t.
5408         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5409         "selftest.h".
5410         (dump_user_location_t::dump_user_location_t): New constructors,
5411         from gimple *stmt and rtx_insn *.
5412         (dump_user_location_t::from_function_decl): New function.
5413         (dump_loc): Make static.
5414         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5415         const dump_location_t &.
5416         (dump_generic_expr_loc): Delete.
5417         (dump_printf_loc): Convert param "loc" from location_t to
5418         const dump_location_t &.
5419         (selftest::test_impl_location): New function.
5420         (selftest::dumpfile_c_tests): New function.
5421         * dumpfile.h: Include "profile-count.h".
5422         (class dump_user_location_t): New class.
5423         (struct dump_impl_location_t): New struct.
5424         (class dump_location_t): New class.
5425         (dump_printf_loc): Convert 2nd param from source_location to
5426         const dump_location_t &.
5427         (dump_generic_expr_loc): Delete.
5428         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5429         const dump_location_t &.
5430         * gimple-fold.c (fold_gimple_assign): Update call to
5431         dump_printf_loc to pass in a dump_location_t rather than a
5432         location_t, via the gimple stmt.
5433         (gimple_fold_call): Likewise.
5434         * gimple-loop-interchange.cc
5435         (loop_cand::analyze_iloop_reduction_var): Update for change to
5436         check_reduction_path.
5437         (tree_loop_interchange::interchange): Update for change to
5438         find_loop_location.
5439         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5440         change in return-type of find_loop_location.
5441         (graphite_regenerate_ast_isl): Likewise.
5442         * graphite-optimize-isl.c (optimize_isl): Likewise.
5443         * graphite.c (graphite_transform_loops): Likewise.
5444         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5445         pass in a dump_location_t rather than a location_t, via the
5446         gimple stmt.
5447         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5448         * ipa.c (walk_polymorphic_call_targets): Likewise.
5449         * loop-unroll.c (report_unroll): Convert "locus" param from
5450         location_t to dump_location_t.
5451         (decide_unrolling): Update for change to get_loop_location's
5452         return type.
5453         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5454         location_t to dump_user_location_t.
5455         (grid_find_single_omp_among_assignments_1): Updates calls to
5456         dump_printf_loc to pass in a dump_location_t rather than a
5457         location_t, via the gimple stmt.
5458         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5459         location_t to dump_location_t.  Updates calls to dump_printf_loc
5460         to pass in a dump_location_t rather than a location_t, via the
5461         gimple stmt.
5462         (grid_inner_loop_gridifiable_p): Likewise.
5463         (grid_dist_follows_simple_pattern): Likewise.
5464         (grid_gfor_follows_tiling_pattern): Likewise.
5465         (grid_target_follows_gridifiable_pattern): Likewise.
5466         (grid_attempt_target_gridification): Convert initialization
5467         of local "grid" from memset to zero-initialization; FIXME: does
5468         this require C++11?  Update call to dump_printf_loc to pass in a
5469         optinfo_location rather than a location_t, via the gimple stmt.
5470         * profile.c (read_profile_edge_counts): Updates call to
5471         dump_printf_loc to pass in a dump_location_t rather than a
5472         location_t
5473         (compute_branch_probabilities): Likewise.
5474         * selftest-run-tests.c (selftest::run_tests): Call
5475         dumpfile_c_tests.
5476         * selftest.h (dumpfile_c_tests): New decl.
5477         * tree-loop-distribution.c (pass_loop_distribution::execute):
5478         Update for change in return type of find_loop_location.
5479         * tree-parloops.c (parallelize_loops): Likewise.
5480         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5481         "locus" from location_t to dump_user_location_t.
5482         (canonicalize_loop_induction_variables): Likewise.
5483         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5484         for change in return type of find_loop_location.
5485         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5486         to dump_printf_loc to pass in a dump_location_t rather than a
5487         location_t, via the stmt.
5488         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5489         Likewise.
5490         * tree-vect-loop-manip.c (find_loop_location): Convert return
5491         type from source_location to dump_user_location_t.
5492         (vect_do_peeling): Update for above change.
5493         (vect_loop_versioning): Update for change in type of
5494         vect_location.
5495         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5496         from location_t to dump_user_location_t.
5497         (vect_estimate_min_profitable_iters): Update for change in type
5498         of vect_location.
5499         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5500         location_t to dump_location_t.
5501         (vect_slp_bb): Update for change in type of vect_location.
5502         * tree-vectorizer.c (vect_location): Convert from source_location
5503         to dump_user_location_t.
5504         (try_vectorize_loop_1): Update for change in vect_location's type.
5505         (vectorize_loops): Likewise.
5506         (increase_alignment): Likewise.
5507         * tree-vectorizer.h (vect_location): Convert from source_location
5508         to dump_user_location_t.
5509         (find_loop_location): Convert return type from source_location to
5510         dump_user_location_t.
5511         (check_reduction_path): Convert 1st param from location_t to
5512         dump_user_location_t.
5513         * value-prof.c (check_counter): Update call to dump_printf_loc to
5514         pass in a dump_user_location_t rather than a location_t; update
5515         call to error_at for change in type of "locus".
5516         (check_ic_target): Update call to dump_printf_loc to
5517         pass in a dump_user_location_t rather than a location_t, via the
5518         call_stmt.
5520 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5522         * config/s390/s390.h (enum processor_flags): Do not use
5523         default tune parameter when -march was specified.
5525 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5527         PR target/86314
5528         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5529         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5530         operands.
5532 2018-06-26  Richard Biener  <rguenther@suse.de>
5534         PR tree-optimization/86287
5535         PR bootstrap/86316
5536         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5537         (vect_analyze_loop): Initialize n_stmts.
5539 2018-06-26  Richard Biener  <rguenther@suse.de>
5541         PR middle-end/86271
5542         * fold-const.c (fold_convertible_p): Pointer extension
5543         isn't valid.
5545 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5547         PR debug/86064
5548         * dwarf2out.c (loc_list_has_views): Adjust comments.
5549         (dw_loc_list): Split single cross-partition range with
5550         nonzero locview.
5552 2018-06-25  Jeff Law  <law@redhat.com>
5554         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5555         on -mbig-switch by default.
5557         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5558         test.
5559         (const_float_0_operand): Remove unused predicate.
5560         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5561         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5562         (recipsf2): New expander.  Original pattern now called
5563         (recipsf2_insn).
5564         (recipdf2, recipdf2_insn): Similarly.
5565         (rsqrtsf2, rsqrtsf2_insn): Similarly
5566         (rsqrtdf2, rsqrtdf2_insn): Similarly
5568 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5570         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5571         Simplify logic for FreeBSD (twice).
5573 2018-06-25  Martin Sebor  <msebor@redhat.com>
5575         PR tree-optimization/86204
5576         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5577         a strnlen result if it's less than the length of the string.
5579 2018-06-25  Martin Sebor  <msebor@redhat.com>
5581         PR tree-optimization/85700
5582         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5583         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5584         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5586 2018-06-25  Martin Sebor  <msebor@redhat.com>
5588         * doc/extend.texi (Zero-length arrays): Update and clarify.
5590 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5592         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5593         added IEEE/IBM long double multilib support on PowerPC little
5594         endian Linux systems.
5595         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5596         (MULTILIB_DEFAULTS): Likewise.
5597         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5598         Likewise.
5599         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5600         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5601         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5603 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5605         PR middle-end/86311
5606         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5607         (REORDER_45): Likewise.
5609 2018-06-25  Jeff Law  <law@redhat.com>
5611         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5612         dividend to 32 bits.  Adjust length.
5613         (udivmodhi4): Cleanup output template.  Fix length.
5615 2018-06-25  Carl Love  <cel@us.ibm.com>
5617         * config/rs6000/vsx.md: Change word selector to prefered location.
5619 2018-06-25  Richard Biener  <rguenther@suse.de>
5621         PR tree-optimization/86304
5622         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5623         epilogue-if-converted loops as well.
5625 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5627         * lto-section-out.c (lto_begin_section): Do not print section
5628         name for noaddr and unnumbered dumps.
5630 2018-06-25  Richard Biener  <rguenther@suse.de>
5632         * tree-vectorizer.h (struct vec_info_shared): New structure
5633         with parts split out from struct vec_info and loop_nest from
5634         struct _loop_vec_info.
5635         (struct vec_info): Adjust accordingly.
5636         (struct _loop_vec_info): Likewise.
5637         (LOOP_VINFO_LOOP_NEST): Adjust.
5638         (LOOP_VINFO_DATAREFS): Likewise.
5639         (LOOP_VINFO_DDRS): Likewise.
5640         (struct _bb_vec_info): Likewise.
5641         (BB_VINFO_DATAREFS): Likewise.
5642         (BB_VINFO_DDRS): Likewise.
5643         (struct _stmt_vec_info): Add dr_aux member.
5644         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5645         (DR_MISALIGNMENT_UNINITIALIZED): New.
5646         (set_dr_misalignment): Adjust.
5647         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5648         (vect_analyze_loop): Adjust prototype.
5649         (vect_analyze_loop_form): Likewise.
5650         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5651         Compute dependences lazily.
5652         (vect_record_base_alignments): Use shared datarefs/ddrs.
5653         (vect_verify_datarefs_alignment): Likewise.
5654         (vect_analyze_data_refs_alignment): Likewise.
5655         (vect_analyze_data_ref_accesses): Likewise.
5656         (vect_analyze_data_refs): Likewise.
5657         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5658         constructor parameter for shared part.
5659         (vect_analyze_loop_form): Pass in shared part and adjust.
5660         (vect_analyze_loop_2): Pass in storage for the number of
5661         stmts.  Move loop nest finding to the caller.  Compute
5662         datarefs lazily.
5663         (vect_analyze_loop): Pass in shared part.
5664         (vect_transform_loop): Verify shared datarefs are unchanged.
5665         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5666         constructor parameter for shared part.
5667         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5668         (vect_slp_bb): Verify shared datarefs are unchanged before
5669         transform.
5670         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5671         change.
5672         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5673         DR_MISALIGNMENT_UNINITIALIZED.
5674         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5675         parameter for shared part.
5676         (vec_info::~vec_info): Adjust.
5677         (vec_info_shared::vec_info_shared): New.
5678         (vec_info_shared::~vec_info_shared): Likewise.
5679         (vec_info_shared::save_datarefs): Likewise.
5680         (vec_info_shared::check_datarefs): Likewise.
5681         (try_vectorize_loop_1): Construct shared part live for analyses
5682         of a single loop for multiple vector sizes.
5683         * tree-parloops.c (gather_scalar_reductions): Adjust.
5685 2018-06-25  Richard Biener  <rguenther@suse.de>
5687         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5688         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5689         (vect_analyze_data_refs): Remove similar code from here and
5690         simplify accordingly.
5692 2018-06-25  Richard Biener  <rguenther@suse.de>
5694         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5695         for reverse storage order accesses rather than asserting
5696         they cannot happen here.
5698 2018-06-25  Tom de Vries  <tdevries@suse.de>
5700         PR debug/86257
5701         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5702         Use data16 instead of .byte for insn prefix.
5704 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5706         PR C++/86082
5707         * parser.c (make_char_string_pack): Pass this literal chars
5708         through cpp_interpret_string.
5709         (cp_parser_userdef_numeric_literal): Check the result of
5710         make_char_string_pack.
5712 2018-06-24  Maya Rashish  <coypu@sdf.org>
5714         * ginclude/stddef.h: Simplify conditions around avoiding
5715         re-definition of __size_t.
5717 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5719         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5720         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5722 2018-06-22  Maya Rashish  <coypu@sdf.org>
5724         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5725         made to OpenBSD and NetBSD through the years.
5727 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5729         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5730         behavior of vec_pack (vector double, vector double) to match
5731         behavior of vec_float2 (vector double, vector double).
5733 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5735         * gimplify.c (gimplify_function_tree): Prevent creation
5736         of a trampoline for the address of the current function
5737         passed to entry/exit instrumentation hooks.
5739 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5741         PR target/86222
5742         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5743         correctly.
5745 2018-06-22  Martin Liska  <mliska@suse.cz>
5747         PR tree-optimization/86263
5748         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5749         Bail out if is_enabled is false.
5750         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5751         New declaration.
5752         (jump_table_cluster::is_enabled): New function.
5754 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5756         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5757         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5758         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5759         (lto_input_ts_binfo_tree_pointers): Likewise.
5760         * tree-streamer-out.c (streamer_write_tree_bitfields,
5761         write_ts_binfo_tree_pointers): Likewise.
5762         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5764 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5766         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5768 2018-06-22  Martin Liska  <mliska@suse.cz>
5770         * symbol-summary.h (get): Make it pure and inline move
5771         functionality from ::get function.
5772         (get): Remove and inline into ::get and ::get_create.
5773         (get_create): Move code from ::get function.
5775 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5777         PR target/85994
5778         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5779         -x assembler-with-cpp.
5781 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5783         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5784         _FILE_OFFSET_BITS=64 for C++.
5786 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5788         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5789         conversion insn that shows up when pr85657-3.c is compiled using
5790         IEEE 128-bit long double.
5791         (neg<mode>2_internal): Use the correct mode to check whether the
5792         mode is IBM extended.
5793         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5794         multiply and divide external functions from being created more
5795         than once.
5797 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5799         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5800         functions.
5801         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5802         the edge can be forwarded.
5803         (cfg_layout_merge_blocks): Likewise.
5805 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5807         * except.c (finish_eh_generation): Commit edge insertions only after
5808         the EH edges have been redirected from post-landing to landing pads.
5810 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5812         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5813         create_tmp_var_for to create the FRAME decl.
5814         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5816 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5818         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5819         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5820         debug statement when resetting its value.
5821         (expand_call_inline): Copy the locus of the call onto the assignment
5822         of the return value, if any.  Use local variable in more cases.
5824 2018-06-21  Martin Liska  <mliska@suse.cz>
5826         * ipa-pure-const.c (propagate_nothrow): Use
5827         funct_state_summaries->get.
5828         (dump_malloc_lattice): Likewise.
5829         (propagate_malloc): Likewise.
5831 2018-06-21  Richard Biener  <rguenther@suse.de>
5833         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5834         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5835         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5836         comment.
5837         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5838         BLOCK_ABSTRACT_ORIGIN unconditionally.
5840 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5842         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5843         deleting it.
5844         * ipa-reference.c (ipa_reference_c_finalize): Delete
5845         ipa_ref_opt_sum_summaries and set it to NULL.
5847 2018-06-21  Tom de Vries  <tdevries@suse.de>
5849         PR tree-optimization/85859
5850         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5851         test with comment from bb_no_side_effects_p.
5853 2018-06-21  Richard Biener  <rguenther@suse.de>
5855         PR tree-optimization/86232
5856         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5857         max for constant niter.
5859 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5861         * config/aarch64/aarch64-simd.md
5862         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5864 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5866         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5867         Make opernads of the unspec commutative.
5869 2018-06-21  Richard Biener  <rguenther@suse.de>
5871         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5872         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5873         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5874         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5875         NULL DR_STEP.
5876         (vect_record_base_alignments): Do not record base alignment
5877         for gathers or scatters.
5878         (vect_compute_data_ref_alignment): Drop return value that is always
5879         true.  Bail out early for gathers or scatters.
5880         (vect_enhance_data_refs_alignment): Bail out early for gathers
5881         or scatters.
5882         (vect_find_same_alignment_drs): Likewise.
5883         (vect_analyze_data_refs_alignment): Remove dead code.
5884         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5885         (vect_analyze_data_refs): For possible gathers or scatters do
5886         not create an alternate DR, just check their possible validity
5887         and mark them.  Adjust DECL_NONALIASED handling to not rely
5888         on DR_BASE_ADDRESS.
5889         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5890         update inits of gathers or scatters.
5891         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5892         Also copy gather/scatter flag to pattern vinfo.
5894 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5896         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5897         behavior of vec_packsu (vector unsigned long long, vector unsigned
5898         long long) to match behavior of vec_packs with same signature.
5900 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5901             Thomas Schwinge <thomas@codesourcery.com>
5902             Cesar Philippidis  <cesar@codesourcery.com>
5904         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5905         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5906         (gimplify_adjust_omp_clauses): Likewise.
5907         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5908         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5909         (gimplify_omp_target_update): Update handling of acc update and
5910         enter/exit data.
5911         * omp-low.c (install_var_field): Remove unused parameter
5912         base_pointers_restrict.
5913         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5914         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5915         FINALIZE}
5916         (omp_target_base_pointers_restrict_p): Delete.
5917         (scan_omp_target): Update call to scan_sharing_clauses.
5918         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5919         FINALIZE}.
5920         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5921         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5922         (convert_local_omp_clauses): Likewise.
5923         * tree-pretty-print.c (dump_omp_clause): Likewise.
5924         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5925         FINALIZE}.
5926         (omp_clause_code_name): Likewise.
5928 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5930         PR debug/86194
5931         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5932         be narrowed.
5934         PR tree-optimization/86231
5935         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5936         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5938 2018-06-20  Tom de Vries  <tdevries@suse.de>
5940         PR tree-optimization/86097
5941         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5942         iv type if signedness of iv type is not the same as that of *nit.
5944 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5946         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5947         EDGE_EH edges, verify they are all EDGE_EH.
5949 2018-06-20  Maya Rashish  <coypu@sdf.org>
5951         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5953 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5955         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5956         * config/aarch64/aarch64.c (xgene1_tunings): Add
5957         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5958         (aarch64_mode_valid_for_sched_fusion_p):
5959         Allow 16-byte modes.
5960         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5961         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5962         128-bit modes.
5963         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5964         New pattern.
5965         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5966         * config/aarch64/iterators.md (VQ2): New mode iterator.
5968 2018-06-20  Martin Liska  <mliska@suse.cz>
5970         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5971         Change default ratio from 10 to 8.
5973 2018-06-20  Martin Liska  <mliska@suse.cz>
5975         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5976         New.
5977         (bit_test_cluster::find_bit_tests): Likewise.
5978         (switch_decision_tree::analyze_switch_statement): Find clusters.
5979         * tree-switch-conversion.h (struct jump_table_cluster): Document
5980         hierarchy.
5982 2018-06-20  Martin Liska  <mliska@suse.cz>
5984         * tree-switch-conversion.c (switch_conversion::collect):
5985         Record m_uniq property.
5986         (switch_conversion::expand): Bail out for special conditions.
5987         (group_cluster::~group_cluster): New.
5988         (group_cluster::group_cluster): Likewise.
5989         (group_cluster::dump): Likewise.
5990         (jump_table_cluster::emit): New.
5991         (switch_decision_tree::fix_phi_operands_for_edges): New.
5992         (struct case_node): Remove struct.
5993         (jump_table_cluster::can_be_handled): New.
5994         (case_values_threshold): Moved to header.
5995         (reset_out_edges_aux): Likewise.
5996         (jump_table_cluster::is_beneficial): New.
5997         (bit_test_cluster::can_be_handled): Likewise.
5998         (add_case_node): Remove.
5999         (bit_test_cluster::is_beneficial): New.
6000         (case_bit_test::cmp): New.
6001         (bit_test_cluster::emit): New.
6002         (expand_switch_as_decision_tree_p): Remove.
6003         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6004         (fix_phi_operands_for_edge): Likewise.
6005         (switch_decision_tree::analyze_switch_statement): New.
6006         (compute_cases_per_edge): Move ...
6007         (switch_decision_tree::compute_cases_per_edge): ... here.
6008         (try_switch_expansion): Likewise.
6009         (switch_decision_tree::try_switch_expansion): Likewise.
6010         (record_phi_operand_mapping): Likewise.
6011         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6012         (emit_case_decision_tree): Likewise.
6013         (switch_decision_tree::emit): Likewise.
6014         (balance_case_nodes): Likewise.
6015         (switch_decision_tree::balance_case_nodes): Likewise.
6016         (dump_case_nodes): Likewise.
6017         (switch_decision_tree::dump_case_nodes): Likewise.
6018         (emit_jump): Likewise.
6019         (switch_decision_tree::emit_jump): Likewise.
6020         (emit_cmp_and_jump_insns): Likewise.
6021         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6022         (emit_case_nodes): Likewise.
6023         (switch_decision_tree::emit_case_nodes): Likewise.
6024         (conditional_probability): Remove.
6025         * tree-switch-conversion.h (enum cluster_type): New.
6026         (PRINT_CASE): New.
6027         (struct cluster): Likewise.
6028         (cluster::cluster): Likewise.
6029         (struct simple_cluster): Likewise.
6030         (simple_cluster::simple_cluster): Likewise.
6031         (struct group_cluster): Likewise.
6032         (struct jump_table_cluster): Likewise.
6033         (struct bit_test_cluster): Likewise.
6034         (struct min_cluster_item): Likewise.
6035         (struct case_tree_node): Likewise.
6036         (case_tree_node::case_tree_node): Likewise.
6037         (jump_table_cluster::case_values_threshold): Likewise.
6038         (struct case_bit_test): Likewise.
6039         (struct switch_decision_tree): Likewise.
6040         (struct switch_conversion): Likewise.
6041         (switch_decision_tree::reset_out_edges_aux): Likewise.
6043 2018-06-20  Martin Liska  <mliska@suse.cz>
6045         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6046         (hoist_edge_and_branch_if_true): Likewise.
6047         (expand_switch_using_bit_tests_p): Likewise.
6048         (struct case_bit_test): Likewise.
6049         (case_bit_test_cmp): Likewise.
6050         (emit_case_bit_tests): Likewise.
6051         (switch_conversion::switch_conversion): New class.
6052         (struct switch_conv_info): Remove old struct.
6053         (collect_switch_conv_info): More to ...
6054         (switch_conversion::collect): ... this.
6055         (check_range): Likewise.
6056         (switch_conversion::check_range): Likewise.
6057         (check_all_empty_except_final): Likewise.
6058         (switch_conversion::check_all_empty_except_final): Likewise.
6059         (check_final_bb): Likewise.
6060         (switch_conversion::check_final_bb): Likewise.
6061         (create_temp_arrays): Likewise.
6062         (switch_conversion::create_temp_arrays): Likewise.
6063         (free_temp_arrays): Likewise.
6064         (gather_default_values): Likewise.
6065         (switch_conversion::gather_default_values): Likewise.
6066         (build_constructors): Likewise.
6067         (switch_conversion::build_constructors): Likewise.
6068         (constructor_contains_same_values_p): Likewise.
6069         (switch_conversion::contains_same_values_p): Likewise.
6070         (array_value_type): Likewise.
6071         (switch_conversion::array_value_type): Likewise.
6072         (build_one_array): Likewise.
6073         (switch_conversion::build_one_array): Likewise.
6074         (build_arrays): Likewise.
6075         (switch_conversion::build_arrays): Likewise.
6076         (gen_def_assigns): Likewise.
6077         (switch_conversion::gen_def_assigns): Likewise.
6078         (prune_bbs): Likewise.
6079         (switch_conversion::prune_bbs): Likewise.
6080         (fix_phi_nodes): Likewise.
6081         (switch_conversion::fix_phi_nodes): Likewise.
6082         (gen_inbound_check): Likewise.
6083         (switch_conversion::gen_inbound_check): Likewise.
6084         (process_switch): Use the newly created class.
6085         (switch_conversion::expand): New.
6086         (switch_conversion::~switch_conversion): New.
6087         * tree-switch-conversion.h: New file.
6089 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6091         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6092         tree-vect-patterns.c.
6093         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6094         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6095         (vect_recog_sad_pattern): Likewise.
6096         (vect_recog_widen_sum_pattern): Likewise.
6097         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6098         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6099         (vect_recog_rotate_pattern): Likewise.
6100         (vect_recog_mult_pattern): Likewise.
6101         (vect_recog_vector_vector_shift_pattern): Likewise.
6102         (vect_recog_divmod_pattern): Likewise.
6103         (vect_recog_mixed_size_cond_pattern): Likewise.
6104         (vect_recog_bool_pattern): Likewise.
6105         (vect_recog_mask_conversion_pattern): Likewise.
6106         (vect_try_gather_scatter_pattern): Likewise.
6107         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6108         (vect_recog_over_widening_pattern): Likewise.
6109         (vect_recog_gather_scatter_pattern): Likewise.
6110         (vect_recog_func_ptr): Move from tree-vectorizer.h
6111         (vect_vect_recog_func_ptrs): Move further down the file.
6112         (vect_recog_func): Likewise.  Remove the third argument.
6113         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6114         (vect_pattern_recog_1): Expect the pattern function to do any
6115         necessary target tests.  Also expect it to provide a vector type.
6116         Remove the type_in handling.
6118 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6120         * tree-vect-patterns.c (vect_pattern_detected): New function.
6121         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6122         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6123         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6124         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6125         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6126         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6127         (vect_recog_mask_conversion_pattern)
6128         (vect_try_gather_scatter_pattern): Likewise.
6130 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6132         * tree-vect-patterns.c (vect_get_internal_def): New function.
6133         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6134         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6135         (search_type_for_mask_1): Use it.
6137 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6139         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6140         redundant WIDEN_SUM_EXPR handling.
6141         (vect_recog_sad_pattern): Likewise.
6143 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6145         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6146         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6147         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6148         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6149         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6151 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6153         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6154         use the stmt_vec_info of the original bb statement for the
6155         new zero assignment, even if the call is part of a pattern.
6157 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6159         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6160         that the sequence is attached to the original statement rather
6161         than the pattern statement.
6162         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6163         PATTERN_DEF_SEQ from the original statement rather than
6164         the main pattern statement.
6165         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6166         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6167         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6169 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6171         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6172         definition statements before the early exit for statements that aren't
6173         live or relevant.
6174         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6175         split out from...
6176         (vect_transform_loop): ...here.  Process pattern definition
6177         statements without first checking whether the main pattern
6178         statement is live or relevant.
6180 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6182         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6183         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6185 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6187         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6188         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6189         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6190         (expand_block_compare): Change select_block_compare_mode call.
6191         (expand_strncmp_align_check): Use new functions, fix comment.
6192         (emit_final_str_compare_gpr): New function.
6193         (expand_strn_compare): Refactor and clean up code.
6194         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6196 2018-06-19  Tony Reix  <tony.reix@atos.com>
6197             Damien Bergamini  <damien.bergamini@atos.com>
6198             David Edelsohn  <dje.gcc@gmail.com>
6200         * collect2.c (static_obj): New variable.
6201         (static_libs): New variable.
6202         (is_in_list): Uncomment declaration.
6203         (main): Track AIX libraries linked statically.
6204         (is_in_list): Uncomment definition.
6205         (scan_prog_file): Don't add AIX shared libraries initializer
6206         to constructor list if linking statically.
6208 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6210         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6211         constant.
6212         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6214 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6216         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6217         blocks.
6219 2018-06-19  Martin Liska  <mliska@suse.cz>
6221         * config/i386/i386.c (ix86_can_inline_p): Do not use
6222         ipa_fn_summaries::get_create.
6223         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6224         get.
6225         (devirtualization_time_bonus): Likewise.
6226         (ipcp_propagate_stage): Likewise.
6227         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6228         (edge_set_predicate): Likewise.
6229         (evaluate_conditions_for_known_args): Likewise.
6230         (evaluate_properties_for_edge): Likewise.
6231         (ipa_call_summary::reset): Tranform to ...
6232         (ipa_call_summary::~ipa_call_summary): ... this.
6233         (ipa_fn_summary::reset): Transform to ...
6234         (ipa_fn_summary::~ipa_fn_summary): ... this.
6235         (ipa_fn_summary_t::remove): Rename to ...
6236         (ipa_fn_summary_t::remove_callees): ... this.
6237         (ipa_fn_summary_t::duplicate): Use placement new
6238         instead of memory copy.
6239         (ipa_call_summary_t::duplicate): Likewise.
6240         (ipa_call_summary_t::remove): Remove.
6241         (dump_ipa_call_summary): Change get_create to get.
6242         (ipa_dump_fn_summary): Dump only when summary exists.
6243         (analyze_function_body): Use symbol_summary::get instead
6244         of get_create.
6245         (compute_fn_summary): Likewise.
6246         (estimate_edge_devirt_benefit): Likewise.
6247         (estimate_edge_size_and_time): Likewise.
6248         (inline_update_callee_summaries): Likewise.
6249         (remap_edge_change_prob): Likewise.
6250         (remap_edge_summaries): Likewise.
6251         (ipa_merge_fn_summary_after_inlining): Likewise.
6252         (write_ipa_call_summary): Likewise.
6253         (ipa_fn_summary_write): Likewise.
6254         (ipa_free_fn_summary): Likewise.
6255         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6256         (struct ipa_call_summary): Likewise.
6257         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6258         of get_create.
6259         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6260         (estimate_size_after_inlining): Likewise.
6261         (estimate_growth): Likewise.
6262         (growth_likely_positive): Likewise.
6263         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6264         (inline_call): Likewise.
6265         * ipa-inline.c (caller_growth_limits): Likewise.
6266         (can_inline_edge_p): Likewise.
6267         (can_inline_edge_by_limits_p): Likewise.
6268         (compute_uninlined_call_time): Likewise.
6269         (compute_inlined_call_time): Likewise.
6270         (want_inline_small_function_p): Likewise.
6271         (edge_badness): Likewise.
6272         (update_caller_keys): Likewise.
6273         (update_callee_keys): Likewise.
6274         (inline_small_functions): Likewise.
6275         (inline_to_all_callers_1): Likewise.
6276         (dump_overall_stats): Likewise.
6277         (early_inline_small_functions): Likewise.
6278         (early_inliner): Likewise.
6279         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6280         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6281         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6282         * ipa-split.c (execute_split_functions): Likewise.
6283         * symbol-summary.h: Likewise.
6284         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6286 2018-06-19  Richard Biener  <rguenther@suse.de>
6288         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6289         (vectorize_loops): ... here.  Fix dbgcnt handling.
6290         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6292 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6294         PR target/86197
6295         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6296         ieee128 argument takes up only one (vector) register, not two (floating
6297         point) registers.
6299 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6301         * gimplify.c (gimplify_init_constructor): Really never clear for an
6302         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6304 2018-06-19  Richard Biener  <rguenther@suse.de>
6306         PR tree-optimization/86179
6307         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6308         after failed recognition.
6310 2018-06-18  Martin Sebor  <msebor@redhat.com>
6312         PR middle-end/85602
6313         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6314         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6315         Handle integer subtraction.
6316         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6317         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6319 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6321         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6322         param from rtx to rtx_insn *.
6323         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6324         param.
6325         (frv_ifcvt_modify_insn): Likwise.
6326         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6327         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6328         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6329         as_a <rtx_insn *> cast to local "unprotected_region" once
6330         it's been established that it's not NULL or pc_rtx.
6331         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6332         param "sethi" from rtx to rtx_insn *.
6333         (nds32_group_float_insns): Likewise for param "insn".
6334         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6335         param.
6336         (vax_output_int_subtract): Likewise.
6337         * config/vax/vax.c (vax_output_int_add): Likewise for param
6338         "insn".
6339         (vax_output_int_subtract): Likewise.
6340         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6341         (emit_pattern_after): Likewise for param "after".
6342         (emit_insn_after): Likewise.
6343         (emit_jump_insn_after): Likewise.
6344         (emit_call_insn_after): Likewise.
6345         (emit_debug_insn_after): Likewise.
6346         (emit_pattern_before): Likewise for param "before".
6347         (emit_insn_before): Likewise.
6348         (emit_jump_insn_before): Likewise.
6349         * final.c (get_insn_template): Likewise for param "insn", removing
6350         a cast.
6351         * output.h (get_insn_template): Likewise for 2nd param.
6352         * rtl.h (emit_insn_before): Likewise.
6353         (emit_jump_insn_before): Likewise.
6354         (emit_debug_insn_before_noloc): Likewise.
6355         (emit_insn_after): Likewise.
6356         (emit_jump_insn_after): Likewise.
6357         (emit_call_insn_after): Likewise.
6358         (emit_debug_insn_after): Likewise.
6359         (set_insn_deleted): Likewise for param.
6361 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6363         PR target/85358
6364         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6365         floating point modes, so that IFmode is numerically greater than
6366         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6367         to declare the ordering.  This prevents IFmode from being
6368         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6369         machine.  Include rs6000-modes.h to share the fractional values
6370         between genmodes* and the rest of the compiler.
6371         (IFmode): Likewise.
6372         (KFmode): Likewise.
6373         (TFmode): Likewise.
6374         * config/rs6000/rs6000-modes.h: New file.
6375         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6376         meaning of rs6000_long_double_size so that 126..128 selects an
6377         appropriate 128-bit floating point type.
6378         (rs6000_option_override_internal): Likewise.
6379         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6380         (TARGET_LONG_DOUBLE_128): Change the meaning of
6381         rs6000_long_double_size so that 126..128 selects an appropriate
6382         128-bit floating point type.
6383         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6384         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6385         source and destination to match the standard usage.
6386         (truncifkf2): Likewise.
6387         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6388         ISA 2.07 to use an explicit clobber, instead of passing in a
6389         temporary.
6390         (copysign<mode>3_soft): Likewise.
6392 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6394         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6395         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6396         (vect_slp_analyze_instance_dependence): Likewise.
6397         (vect_enhance_data_refs_alignment): Likewise.
6398         (vect_analyze_data_refs_alignment): Likewise.
6399         (vect_slp_analyze_and_verify_instance_alignment
6400         (vect_analyze_data_ref_accesses): Likewise.
6401         (vect_prune_runtime_alias_test_list): Likewise.
6402         (vect_analyze_data_refs): Likewise.
6403         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6404         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6405         (vect_analyze_scalar_cycles_1): Likewise.
6406         (vect_get_loop_niters): Likewise.
6407         (vect_analyze_loop_form_1): Likewise.
6408         (vect_update_vf_for_slp): Likewise.
6409         (vect_analyze_loop_operations): Likewise.
6410         (vect_analyze_loop): Likewise.
6411         (vectorizable_induction): Likewise.
6412         (vect_transform_loop): Likewise.
6413         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6414         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6415         (vect_make_slp_decision): Likewise.
6416         (vect_detect_hybrid_slp): Likewise.
6417         (vect_slp_analyze_operations): Likewise.
6418         (vect_slp_bb): Likewise.
6419         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6420         (vectorizable_bswap): Likewise.
6421         (vectorizable_call): Likewise.
6422         (vectorizable_simd_clone_call): Likewise.
6423         (vectorizable_conversion): Likewise.
6424         (vectorizable_assignment): Likewise.
6425         (vectorizable_shift): Likewise.
6426         (vectorizable_operation): Likewise.
6427         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6429 2018-06-18  Martin Sebor  <msebor@redhat.com>
6431         PR tree-optimization/81384
6432         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6433         * builtins.c (expand_builtin_strnlen): New function.
6434         (expand_builtin): Call it.
6435         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6436         * builtins.def (BUILT_IN_STRNLEN): New.
6437         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6438         Warn for bounds in excess of maximum object size.
6439         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6440         single-value ranges.  Handle strnlen.
6441         (handle_builtin_strlen): Handle strnlen.
6442         (strlen_check_and_optimize_stmt): Same.
6443         * doc/extend.texi (Other Builtins): Document strnlen.
6445 2018-06-18  Maya Rashish  <coypu@sdf.org>
6447         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6448         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6449         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6451         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6452         here to ...
6453         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6455 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6457         * tree.c (escaped_string::escape): Replace cast to char * by
6458         const_cast<char *> (unescaped).
6460 2018-06-18  Nick Clifton  <nickc@redhat.com>
6462         PR 84195
6463         * tree.c (escaped_string): New class.  Converts an unescaped
6464         string into its escaped equivalent.
6465         (warn_deprecated_use): Use the new class to convert the
6466         deprecation message, if present.
6467         (test_escaped_strings): New self test.
6468         (test_c_tests): Add test_escaped_strings.
6469         * doc/extend.texi (deprecated): Add a note that the
6470         deprecation message is affected by the -fmessage-length
6471         option, and that control characters will be escaped.
6472         (#pragma GCC error): Document this pragma.
6473         (#pragma GCC warning): Likewise.
6474         * doc/invoke.texi (-fmessage-length): Document this option's
6475         effect on the #warning and #error preprocessor directives and
6476         the deprecated attribute.
6478 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6480         * tree.c (decl_value_expr_lookup): Revert latest change.
6481         (decl_value_expr_insert): Likewise.
6483 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6485         * gimplify.c (nonlocal_vlas): Delete.
6486         (nonlocal_vla_vars): Likewise.
6487         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6488         referenced VLAs.
6489         (gimplify_body): Do not create and destroy nonlocal_vlas.
6490         * tree-nested.c: Include diagnostic.h.
6491         (use_pointer_in_frame): Tweak.
6492         (lookup_field_for_decl): Add assertion and declare the transformation.
6493         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6494         internal error when the reference is in a wrong context.  Do not
6495         create a debug decl by default.
6496         (note_nonlocal_block_vlas): Delete.
6497         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6498         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6499         create a debug decl by default.
6500         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6501         call is in a wrong context.
6502         (fixup_vla_decls): New function.
6503         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6504         debug variables were created.
6505         * tree.c (decl_value_expr_lookup): Add checking assertion.
6506         (decl_value_expr_insert): Likewise.
6508 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6510         PR middle-end/82479
6511         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6512         * tree-scalar-evolution.c (interpret_expr): Likewise.
6513         (expression_expensive_p): Likewise.
6514         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6515         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6516         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6517         (ssa_defined_by_minus_one_stmt_p): New.
6519 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6521         PR middle-end/64946
6522         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6523         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6524         * dojump.c (do_jump): Likewise.
6525         * expr.c (expand_expr_real_2): Check operand type's sign.
6526         * fold-const.c (const_unop): Handle ABSU_EXPR.
6527         (fold_abs_const): Likewise.
6528         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6529         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6530         (strip_sign_op_1): Likesise.
6531         * match.pd: Add new pattern to generate ABSU_EXPR.
6532         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6533         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6534         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6535         * tree-inline.c (estimate_operator_cost): Likewise.
6536         * tree-pretty-print.c (dump_generic_node): Likewise.
6537         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6538         * tree.def (ABSU_EXPR): New.
6540 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6542         PR middle-end/86095
6543         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6544         documented as preserved for backward compatibility only.
6545         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6547         PR rtl-optimization/86108
6548         * bb-reorder.c (create_forwarder_block): Renamed to ...
6549         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6550         jump from new landing pad to the second part.
6551         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6552         Adjust callers.
6554 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6556         PR middle-end/85878
6557         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6558         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6559         Only call store_expr for halves if the mode is the same.
6561         PR middle-end/86123
6562         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6563         Fix up comment formatting.
6565 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6567         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6568         (typed_splay_tree::closure,
6569         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6570         (typed_splay_tree::typed_splay_tree,
6571         typed_splay_tree::operator =): Declared private.
6572         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6573         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6574         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6575         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6576         typed_splay_tree::splay_tree_splay,
6577         typed_splay_tree::splay_tree_foreach_helper,
6578         typed_splay_tree::splay_tree_insert,
6579         typed_splay_tree::splay_tree_remove,
6580         typed_splay_tree::splay_tree_lookup,
6581         typed_splay_tree::splay_tree_predecessor,
6582         typed_splay_tree::splay_tree_successor,
6583         typed_splay_tree::splay_tree_min,
6584         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6585         (typed_splay_tree::root, typed_splay_tree::comp,
6586         typed_splay_tree::delete_key,
6587         typed_splay_tree::delete_value): New data members.
6588         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6589         typed_splay_tree::remove.
6591 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6593         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6594         -mginv and -mno-ginv to the assembler.
6595         * config/mips/mips.opt (-mcrc): New option.
6596         (-mginv): Likewise.
6597         * doc/invoke.text (-mcrc): Document.
6598         (-mginv): Likewise.
6600 2018-06-15  Nick Clifton  <nickc@redhat.com>
6602         PR 84195
6603         * tree.c (escaped_string): New class.  Converts an unescaped
6604         string into its escaped equivalent.
6605         (warn_deprecated_use): Use the new class to convert the
6606         deprecation message, if present.
6607         (test_escaped_strings): New self test.
6608         (test_c_tests): Add test_escaped_strings.
6609         * doc/extend.texi (deprecated): Add a note that the
6610         deprecation message is affected by the -fmessage-length
6611         option, and that control characters will be escaped.
6612         (#pragma GCC error): Document this pragma.
6613         (#pragma GCC warning): Likewise.
6614         * doc/invoke.texi (-fmessage-length): Document this option's
6615         effect on the #warning and #error preprocessor directives and
6616         the deprecated attribute.
6618 2018-06-15  Richard Biener  <rguenther@suse.de>
6620         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6621         here, also noting vector size used.
6622         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6623         size used in MSG_OPTIMIZED_LOCATIONS dump.
6624         (pass_slp_vectorize::execute): Adjust.
6626 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6628         PR target/85968
6629         * config/arc/arc.c (arc_return_address_register): Fix
6630         if-condition.
6632 2018-06-15  Richard Biener  <rguenther@suse.de>
6634         PR middle-end/86159
6635         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6636         leave useless conversion stripping to force_gimple_operand_gsi.
6637         (gimplify_build2): Likewise.
6638         (gimplify_build1): Likewise.
6640 2018-06-15  Richard Biener  <rguenther@suse.de>
6642         PR middle-end/86076
6643         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6644         before adjusting their block.
6646 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6648         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6649         multilibs for *-*-rtems*.
6650         * config/riscv/t-rtems: New file.
6652 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6654         PR middle-end/86122
6655         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6656         unsigned_type_for returns NULL.
6658         PR target/85945
6659         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6660         subregs of multi-word pseudos unless the float mode has word size.
6662 2018-06-14  Richard Biener  <rguenther@suse.de>
6664         PR middle-end/86139
6665         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6666         duplicate and harmful type_hash_canon.
6667         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6669 2018-06-14  Richard Biener  <rguenther@suse.de>
6671         PR ipa/86124
6672         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6673         NULL cgraph_node.
6675 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6677         * config/rtems.h (STDINT_LONG32): Define.
6679 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6680             Prachi Godbole  <prachi.godbole@imgtec.com>
6682         * config/mips/mips-cpus.def: Define P6600.
6683         * config/mips/mips-tables.opt: Regenerate.
6684         * config/mips/mips.c (mips_ucbranch_type): New enum.
6685         (mips_rtx_cost_data): Add support for P6600.
6686         (mips_issue_rate): Likewise.
6687         (mips_multipass_dfa_lookahead): Likewise.
6688         (mips_avoid_hazard): Likewise.
6689         (mips_reorg_process_insns): Likewise.
6690         (mips_classify_branch_p6600): New function.
6691         * config/mips/mips.h (TUNE_P6600): New define.
6692         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6693         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6694         * config/mips/mips.md: Include p6600.md.
6695         (processor): Add p6600.
6696         * config/mips/p6600.md: New file.
6697         * doc/invoke.texi: Add p6600 to supported architectures.
6699 2018-06-13  Martin Sebor  <msebor@redhat.com>
6701         PR tree-optimization/86114
6702         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6703         of integer types.
6704         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6706 2018-06-13  Richard Biener  <rguenther@suse.de>
6708         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6709         Properly set vector type of the intermediate stmt.
6710         * tree-vect-stmts.c (vectorizable_operation): The destination
6711         var always has vectype_out type.
6713 2018-06-13  Jeff Law  <law@redhat.com>
6715         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6716         integer 0 for argument to print_rtl_with_bb.
6717         (rl78_reorg): Likewise.
6719 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6721         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6722         from rtx to rtx_insn *.
6723         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6724         "label".
6725         (add_sched_insns_for_speculation): Likewise for local "target",
6726         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6727         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6728         from rtx_insn ** to rtx_code_label **.
6729         (reorg_emit_nops): Likewise.
6730         (c6x_reorg): Likewise for local "call_labels".
6731         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6732         rtx to rtx_insn *.
6733         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6734         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6735         the loops over LABEL_REFS.
6736         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6737         braf_label.
6738         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6739         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6740         (split_branches): Strengthen local "olabel" from rtx to
6741         rtx_insn *, adding a safe_as_a cast.
6742         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6743         to "rtx_insn *".
6744         (add_insn_after): Likewise for first two params.
6745         (add_insn_before): Likewise.
6746         (remove_insn): Likewise for param.
6747         (emit_pattern_before_noloc): Likewise for second and third params.
6748         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6749         (emit_call_insn_before_noloc): Likewise.
6750         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6751         to "rtx_insn *".
6752         (emit_barrier_before): Likewise.
6753         (emit_label_before): Strengthen "label" param from "rtx" to
6754         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6755         "rtx_insn *".
6756         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6757         "rtx_insn *".
6758         (emit_pattern_after_noloc): Likewise.
6759         (emit_insn_after_noloc): Likewise.
6760         (emit_jump_insn_after_noloc): Likewise.
6761         (emit_call_insn_after_noloc): Likewise.
6762         (emit_debug_insn_after_noloc): Likewise.
6763         (emit_barrier_after): Likewise.
6764         (emit_label_after): Likewise for both params.
6765         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6766         "loc" param from "int" to "location_t".
6767         (emit_insn_after_setloc): Likewise.
6768         (emit_jump_insn_after_setloc): Likewise.
6769         (emit_call_insn_after_setloc): Likewise.
6770         (emit_debug_insn_after_setloc): Likewise.
6771         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6772         "loc" param from "int" to "location_t".
6773         (emit_pattern_before): Convert NULL_RTX to NULL.
6774         (emit_insn_before_setloc): Convert "loc" param from "int" to
6775         "location_t".
6776         (emit_jump_insn_before_setloc): Likewise.
6777         (emit_call_insn_before_setloc): Likewise.
6778         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6779         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6780         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6781         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6782         Convert 3rd param from "int" to "location_t".
6783         (emit_barrier_before, emit_barrier_after, next_real_insn):
6784         Strengthen param from rtx to rtx_insn *.
6785         (emit_label_before): Strengthen 1st param from "rtx" to
6786         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6787         "rtx_insn *".
6788         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6789         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6790         Strengthen 2nd param from "rtx" to "rtx_insn *".
6791         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6792         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6793         Likewise. Convert 3rd param from "int" to "location_t".
6794         (emit_label_after): Strengthen 1st param from "rtx" to
6795         "rtx_code_label *".
6796         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6797         "rtx_insn *".
6798         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6799         from "rtx" to "rtx_insn *".
6801 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6803         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6804         bodies streamed in with -Q.
6805         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6806         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6807         * gimple-streamer-out.c: Include gimple-pretty-print.h
6808         (output_bb): Dump stmts streamed.
6809         * lto-section-out.c: Include print-tree.h
6810         (lto_begin_section): Dump sections created.
6811         (lto_output_decl_index): Dump decl encoded.
6812         * lto-streamer-out.c: Include print-tree.h
6813         (create_output_block): Dump output block created.
6814         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6815         (output_function): Dump function output.
6816         (output_constructor): Dump constructor streamed.
6817         (write_global_stream): Output indexes encoded.
6818         (produce_asm_for_decls): Dump streams encoded.
6819         * lto-streamer.c (streamer_dump_file): New global var.
6820         * lto-streamer.h (streamer_dump_file): Declare.
6821         * passes.c (ipa_write_summaries): Initialize streamer dump.
6822         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6823         in.
6825 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6827         PR target/86048
6828         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6829         offsets for register save directives.  Emit a second batch of save
6830         directives, if need be, when the function accesses prior frames.
6832 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6834         * config/arc/fpu.md (fmasf4): Force operand to register.
6835         (fnmasf4): Likewise.
6837 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6839         * config/arc/arc-protos.h (arc_pad_return): Remove.
6840         * config/arc/arc.c (machine_function): Remove force_short_suffix
6841         and size_reason.
6842         (arc_print_operand): Adjust printing of '&'.
6843         (arc_verify_short): Remove conditional printing of short suffix.
6844         (arc_final_prescan_insn): Remove reference to size_reason.
6845         (pad_return): New function.
6846         (arc_reorg): Call pad_return.
6847         (arc_pad_return): Remove.
6848         (arc_init_machine_status): Remove reference to force_short_suffix.
6849         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6850         (attr length): When attribute iscompact is true force to 2
6851         regardless; in the case of maybe check if we want to force the
6852         instruction to have 4 bytes length.
6853         (nopv): Change it to generate 4 byte long nop as well.
6854         (blockage): New pattern.
6855         (simple_return): Remove call to arc_pad_return.
6856         (p_return_i): Likewise.
6858 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6860         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6862 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6864         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6865         ARC cores.
6867 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6869         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6870         for ARC700 and ARCv2.
6872 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6874         PR target/86076
6875         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6876         operands[2] instead of operands[1].
6879 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6881         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6882         case, check whether the outer register overlaps an unallocatable
6883         register, not just whether it fits the required class.
6885 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6887         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6888         are poly_ints.
6889         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6890         (memrefs_conflict_p): Likewise.
6891         (init_alias_analysis): Likewise.
6892         * cfgexpand.c (expand_debug_expr): Likewise.
6893         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6894         * cse.c (fold_rtx): Likewise.
6895         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6896         * expr.c (emit_block_move_hints): Likewise.
6897         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6898         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6899         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6900         (emit_group_store): Likewise.
6901         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6902         to read the PRE/POST_MODIFY increment.
6903         * calls.c (store_one_arg): Use strip_offset.
6904         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6905         poly_int_rtx_p.
6906         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6907         by a VEC_SELECT.
6908         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6909         (simplify_binary_operation_1): Extend CONST_INT handling to
6910         poly_int_rtx_p.
6911         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6912         than a HOST_WIDE_INT.
6913         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6914         poly_int64.
6915         (adjust_mems, add_stores): Update accodingly.
6916         (vt_canonicalize_addr): Track polynomial offsets.
6917         (emit_note_insn_var_location): Likewise.
6918         (vt_add_function_parameter): Likewise.
6919         (vt_initialize): Likewise.
6921 2018-06-12  Jeff Law  <law@redhat.com>
6923         * config.gcc (alpha*-*-freebsd*): Remove.
6924         * config/alpha/freebsd.h: Remove.
6926 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6928         PR other/69968
6929         * spellcheck-tree.c (levenshtein_distance): Rename to...
6930         (get_edit_distance): ...this, and update for underlying renaming.
6931         * spellcheck-tree.h (levenshtein_distance): Rename to...
6932         (get_edit_distance): ...this.
6933         * spellcheck.c (levenshtein_distance): Rename to...
6934         (get_edit_distance): ...this.  Convert from Levenshtein distance
6935         to Damerau-Levenshtein distance by supporting transpositions of
6936         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6937         "v_one_ago".
6938         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6939         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6940         update for underlying renaming.
6941         (selftest::levenshtein_distance_unit_test): Rename to...
6942         (selftest::test_get_edit_distance_unit): ...this, and update for
6943         underlying renaming.
6944         (selftest::test_find_closest_string): Add example from PR 69968
6945         where transposition helps
6946         (selftest::test_metric_conditions): Update for renaming.
6947         (selftest::test_metric_conditions): Likewise.
6948         (selftest::spellcheck_c_tests): Likewise.
6949         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6950         (get_edit_distance): ...this.
6951         (best_match::consider): Update for renaming.
6953 2018-06-12  Martin Sebor  <msebor@redhat.com>
6955         PR tree-optimization/85259
6956         * builtins.c (compute_objsize): Handle constant offsets.
6957         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6958         true iff a warning has been issued.
6959         * gimple.h (gimple_nonartificial_location): New function.
6960         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6961         gimple_nonartificial_location and handle -Wno-system-headers.
6962         (handle_builtin_stxncpy): Same.
6964 2018-06-12  Martin Sebor  <msebor@redhat.com>
6966         PR c/85931
6967         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6969 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6971         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6972         BUILTIN_VEC_XST entries for pointer to double and long long.
6974 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6976         PR target/85990
6977         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6978         Update comments.
6979         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6980         Likewise.
6982 2018-06-12  Martin Liska  <mliska@suse.cz>
6984         * doc/options.texi: Document IntegerRange.
6986 2018-06-12  Martin Liska  <mliska@suse.cz>
6988         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6989         * opt-functions.awk: Handle Deprecated flag.
6990         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6991         and report error.
6992         (read_cmdline_option): Report warning for a deprecated option.
6993         * opts.h (struct cl_option): Add new field cl_deprecated.
6994         (CL_ERR_DEPRECATED): New.
6996 2018-06-12  Martin Liska  <mliska@suse.cz>
6998         * doc/options.texi: Document Deprecated option flag.
7000 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7002         * config/arc/arc-arch.h (arc_extras): New enum.
7003         (arc_cpu_t):Add field extra.
7004         (arc_cpu_types): Consider the extras.
7005         * config/arc/arc-cpus.def: Add extras info.
7006         * config/arc/arc-opts.h (processor_type): Consider extra field.
7007         * config/arc/arc.c (arc_override_options): Handle extra field.
7009 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7011         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7012         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7013         field.
7014         * config/arc/arc.c (arc_init): Update pic warning.
7015         (irq_range): Update irq range parsing warnings.
7016         (arc_override_options): Update various warning messages.
7017         (arc_handle_aux_attribute): Likewise.
7019 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7021         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7023 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7025         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7026         compiler messages directives.
7028 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7030         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7031         * config/mips/mips-tables.opt: Regenerate.
7032         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7033         mips64r6.
7034         * doc/invoke.texi: Document -march=i6500.
7036 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7038         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7039         (i6400_gpmul): Add cpu_unit.
7040         (i6400_gpdiv): Likewise.
7041         (i6400_msa_add_d): Update reservations.
7042         (i6400_msa_int_add) Likewise.
7043         (i6400_msa_short_logic3) Likewise.
7044         (i6400_msa_short_logic2) Likewise.
7045         (i6400_msa_short_logic) Likewise.
7046         (i6400_msa_move) Likewise.
7047         (i6400_msa_cmp) Likewise.
7048         (i6400_msa_short_float2) Likewise.
7049         (i6400_msa_div_d) Likewise.
7050         (i6400_msa_long_logic1) Likewise.
7051         (i6400_msa_long_logic2) Likewise.
7052         (i6400_msa_mult) Likewise.
7053         (i6400_msa_long_float2) Likewise.
7054         (i6400_msa_long_float4) Likewise.
7055         (i6400_msa_long_float5) Likewise.
7056         (i6400_msa_long_float8) Likewise.
7057         (i6400_fpu_fadd): Include frint type.
7058         (i6400_fpu_store): New define_insn_reservation.
7059         (i6400_fpu_load): Likewise.
7060         (i6400_fpu_move): Likewise.
7061         (i6400_fpu_fcmp): Likewise.
7062         (i6400_fpu_fmadd): Likewise.
7063         (i6400_int_mult): Include imul3nc type and update reservation.
7064         (i6400_int_div): Include idiv3 type and update reservation.
7065         (i6400_int_load): Update to check type not move_type.
7066         (i6400_int_store): Likewise.
7067         (i6400_int_prefetch): Set zero latency.
7069 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7071         * gcc.c: Document new %@{...} sequence.
7072         (LINK_COMMAND_SPEC): Use it for the -L switches.
7073         (cpp_unique_options): Use it for the -I switches.
7074         (at_file_argbuf): New global variable.
7075         (in_at_file): Likewise.
7076         (alloc_args): Create at_file_argbuf.
7077         (clear_args): Truncate at_file_argbuf.
7078         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7079         (open_at_file): New function.
7080         (close_at_file): Likewise.
7081         (create_at_file): Delete.
7082         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7083         <'o'>: Likewise.
7084         <'@'>: New case.
7085         (validate_switches_from_spec): Deal with %@{...} sequence.
7086         (validate_switches): Likewise.
7087         (driver::finalize): Call clear_args.
7089 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7091         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7093 2018-06-11  Martin Sebor  <msebor@redhat.com>
7095         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7096         (Wno-class-memaccess): Add @opindex.
7097         (Wno-templates, Wno-multiple-inheritance): Same.
7098         (Wno-virtual-inheritance, Wno-namespaces): Same.
7099         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7100         (Wno-format-overflow, Wno-format-truncation): Same.
7101         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7102         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7103         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7104         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7105         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7106         (Wno-misspelled-isr): Same.
7108 2018-06-11  Martin Sebor  <msebor@redhat.com>
7110         * PR tree-optimization/86083
7111         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7113 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7115         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7117 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7119         PR target/85755
7120         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7121         on the correct operand.
7122         (*movdi_internal64): Ditto.
7124 2018-06-11  Martin Liska  <mliska@suse.cz>
7126         PR tree-optimization/86089
7127         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7129 2018-06-11  Julia Koval  <julia.koval@intel.com>
7131         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7132         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7133         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7135 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7137         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7138         for Ada with strict dwarf2.
7140 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7142         PR target/85755
7143         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7144         addresses.
7146 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7148         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7150 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7152         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7153         TARGET_ELF.
7155 2018-06-08  Martin Liska  <mliska@suse.cz>
7157         * tree-cfg.h (debug_function): Fix argument type to match
7158         implementation.
7160 2018-06-08  Martin Liska  <mliska@suse.cz>
7162         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7163         Remove usage of MPX-related (and removed) fields.
7164         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7166 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7168         * cfg.c (debug): Use TDF_NONE rather than 0.
7169         * cfghooks.c (debug): Likewise.
7170         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7171         (struct dump_option_value_info): Convert to...
7172         (struct kv_pair): ...this template type.
7173         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7174         rather than 0.
7175         (optinfo_verbosity_options): Likewise.
7176         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7177         OPTGROUP_NONE.
7178         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7179         than int for "optgroup_flags" param.
7180         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7181         "dump_kind" param.
7182         (dump_dec): Likewise.
7183         (dump_finish): Use TDF_NONE rather than 0.
7184         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7185         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7186         than 0.  Update for change to option_ptr.
7187         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7188         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7189         0.  Update for changes to optinfo_verbosity_options and
7190         optgroup_options.
7191         (opt_info_switch_p): Convert optgroup_flags from int to
7192         optgroup_flags_t.
7193         (dump_basic_block): Use dump_flags_t rather than int
7194         for "dump_kind" param.
7195         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7196         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7197         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7198         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7199         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7200         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7201         TDF_NONE): Convert from macros to...
7202         (enum dump_flag): ...this new enum.
7203         (dump_flags_t): Update to use enum.
7204         (operator|, operator&, operator~, operator|=, operator&=):
7205         Implement for dump_flags_t.
7206         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7207         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7208         Convert from macros to...
7209         (enum optgroup_flag): ...this new enum.
7210         (optgroup_flags_t): New typedef.
7211         (operator|, operator|=): Implement for optgroup_flags_t.
7212         (struct dump_file_info): Convert field "alt_flags" to
7213         dump_flags_t.  Convert field "optgroup_flags" to
7214         optgroup_flags_t.
7215         (dump_basic_block): Use dump_flags_t rather than int for param.
7216         (dump_generic_expr_loc): Likewise.
7217         (dump_dec): Likewise.
7218         (dump_register): Convert param "optgroup_flags" to
7219         optgroup_flags_t.
7220         (opt_info_enable_passes): Likewise.
7221         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7222         than 0.
7223         * gimple-pretty-print.c (debug): Likewise.
7224         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7225         (merged_store_group::apply_stores): Likewise.
7226         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7227         * gimple.c (verify_gimple_pp): Likewise.
7228         * graphite-poly.c (print_pbb_body): Likewise.
7229         * passes.c (pass_manager::register_one_dump_file): Convert
7230         local "optgroup_flags" to optgroup_flags_t.
7231         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7232         (debug): Likewise.
7233         (debug_body): Likewise.
7234         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7235         to optgroup_flags_t.
7236         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7237         than 0.
7238         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7239         (convert_mult_to_fma): Likewise.
7240         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7241         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7242         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7243         "dump_kind" to dump_flags_t.
7245 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7247         * config/rs6000/rs6000.c (min, max): Delete.
7249 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7251         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7252         -mabi=spe and -mabi=no-spe.
7254 2018-06-08  Martin Liska  <mliska@suse.cz>
7256         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7257         where we expect an existing summary.
7259 2018-06-08  Martin Liska  <mliska@suse.cz>
7261         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7262         * ipa-inline.h (estimate_edge_growth): Likewise.
7264 2018-06-08  Martin Liska  <mliska@suse.cz>
7266         * cgraph.c (function_version_hasher::hash): Use
7267         cgraph_node::get_uid ().
7268         (function_version_hasher::equal):
7269         * cgraph.h (cgraph_node::get_uid): New method.
7270         * ipa-inline.c (update_caller_keys): Use
7271         cgraph_node::get_uid ().
7272         (update_callee_keys): Likewise.
7273         * ipa-utils.c (searchc): Likewise.
7274         (ipa_reduced_postorder): Likewise.
7275         * lto-cgraph.c (input_node): Likewise.
7276         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7277         * symbol-summary.h (symtab_insertion): Likewise.
7278         (symtab_removal): Likewise.
7279         (symtab_duplication): Likewise.
7280         * tree-pretty-print.c (dump_function_header): Likewise.
7281         * tree-sra.c (convert_callers_for_node): Likewise.
7283 2018-06-08  Martin Liska  <mliska@suse.cz>
7285         * cgraph.c (symbol_table::create_edge): Always assign a new
7286         unique number.
7287         (symbol_table::free_edge): Do not recycle numbers.
7288         * cgraph.h (cgraph_edge::get): New method.
7289         * symbol-summary.h (symtab_removal): Use it.
7290         (symtab_duplication): Likewise.
7291         (call_summary::hashable_uid): Remove.
7293 2018-06-08  Martin Liska  <mliska@suse.cz>
7295         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7296         (initialize_growth_caches): Remove.
7297         (free_growth_caches): Likewise.
7298         (do_estimate_edge_time): Use edge_growth_cache.
7299         (do_estimate_edge_size): Likewise.
7300         (do_estimate_edge_hints): Likewise.
7301         * ipa-inline.c (reset_edge_caches): Likewise.
7302         (recursive_inlining): Likewise.
7303         (inline_small_functions): Likewise.
7304         * ipa-inline.h (initialize_growth_caches): Remove.
7305         (estimate_edge_size): Likewise.
7306         (estimate_edge_time): Likewise.
7307         (estimate_edge_hints): Likewise.
7308         (reset_edge_growth_cache): Likewise.
7309         * symbol-summary.h (call_summary::remove): New method.
7311 2018-06-08  Martin Liska  <mliska@suse.cz>
7313         * ipa-cp.c (class edge_clone_summary): New summary.
7314         (grow_edge_clone_vectors): Remove.
7315         (ipcp_edge_duplication_hook): Remove.
7316         (class edge_clone_summary_t): New call_summary class.
7317         (ipcp_edge_removal_hook): Remove.
7318         (edge_clone_summary_t::duplicate): New function.
7319         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7320         (create_specialized_node): Likewise.
7321         (ipcp_driver): Initialize edge_clone_summaries and do not
7322         register hooks.
7324 2018-06-08  Martin Liska  <mliska@suse.cz>
7326         * symbol-summary.h (get): New function.
7327         (call_summary::m_initialize_when_cloning): New class member.
7329 2018-06-08  Martin Liska  <mliska@suse.cz>
7331         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7332         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7333         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7334         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7335         (remove_cgraph_node_from_order): Use the removed_nodes set.
7336         (do_per_function_toporder): Likwise.
7337         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7338         instead of summary_uid.
7339         (symtab_removal): Likewise.
7340         (symtab_duplication): Likewise.
7342 2018-06-08  Martin Liska  <mliska@suse.cz>
7344         * ipa-cp.c (ipcp_store_bits_results): Use
7345         ipcp_transformation_sum.
7346         (ipcp_store_vr_results): Likewise.
7347         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7348         to ...
7349         (ipcp_transformation_initialize): ... this.
7350         (ipa_set_node_agg_value_chain):
7351         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7352         (write_ipcp_transformation_info): Likewise.
7353         (read_ipcp_transformation_info): Likewise.
7354         (ipcp_update_bits): Likewise.
7355         (ipcp_update_vr): Likewise.
7356         (ipcp_transform_function): Likewise.
7357         * ipa-prop.h: Rename ipcp_transformation_summary to
7358         ipcp_transformation.
7359         (class ipcp_transformation_t): New function summary.
7360         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7361         (ipa_get_agg_replacements_for_node): Likewise.
7363 2018-06-08  Martin Liska  <mliska@suse.cz>
7365         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7366         of struct.
7367         (class funct_state_summary_t): New function_summary class.
7368         (has_function_state): Remove.
7369         (get_function_state): Likewise.
7370         (set_function_state): Likewise.
7371         (add_new_function): Likewise.
7372         (funct_state_summary_t::insert): New function.
7373         (duplicate_node_data): Remove.
7374         (remove_node_data): Remove.
7375         (funct_state_summary_t::duplicate): New function.
7376         (register_hooks): Create new funct_state_summaries.
7377         (pure_const_generate_summary): Use it.
7378         (pure_const_write_summary): Likewise.
7379         (pure_const_read_summary): Likewise.
7380         (propagate_pure_const): Likewise.
7381         (propagate_nothrow): Likewise.
7382         (dump_malloc_lattice): Likewise.
7383         (propagate_malloc): Likewise.
7384         (execute): Do not register hooks, just remove summary
7385         instead.
7386         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7387         constructor.
7389 2018-06-08  Martin Liska  <mliska@suse.cz>
7391         * ipa-reference.c (remove_node_data): Remove.
7392         (duplicate_node_data): Likewise.
7393         (class ipa_ref_var_info_summary_t): New class.
7394         (class ipa_ref_opt_summary_t): Likewise.
7395         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7396         (get_reference_optimization_summary): Use
7397         ipa_ref_opt_sum_summaries.
7398         (set_reference_vars_info): Remove.
7399         (set_reference_optimization_summary): Likewise.
7400         (ipa_init): Create summaries.
7401         (init_function_info): Use function summary.
7402         (ipa_ref_opt_summary_t::duplicate): New function.
7403         (ipa_ref_opt_summary_t::remove): New function.
7404         (get_read_write_all_from_node): Fix GNU coding style.
7405         (propagate): Use function summary.
7406         (write_node_summary_p): Fix GNU coding style.
7407         (stream_out_bitmap): Likewise.
7408         (ipa_reference_read_optimization_summary): Use function summary.
7409         (ipa_reference_c_finalize): Do not release hooks.
7411 2018-06-08  Martin Liska  <mliska@suse.cz>
7413         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7414         (analyze_function_body): Extract multiple calls of get_create.
7415         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7416         * ipa-inline.c (recursive_inlining): Use ::get method.
7417         * ipa-inline.h (estimate_edge_growth): Likewise.
7419 2018-06-08  Martin Liska  <mliska@suse.cz>
7421         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7422         HSA_INVALID.
7423         (hsa_function_summary::hsa_function_summary): Use the new enum
7424         value.
7425         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7426         * hsa-gen.c (hsa_get_host_function): Likewise.
7427         (get_brig_function_name): Likewise.
7428         * ipa-hsa.c (process_hsa_functions): Likewise.
7429         (ipa_hsa_write_summary): Likewise.
7430         * symbol-summary.h (symtab_duplication): Use ::get function/
7431         (get): New function.
7433 2018-06-08  Martin Liska  <mliska@suse.cz>
7435         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7436         of get.
7437         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7438         (hsa_register_kernel): Likewise.
7439         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7440         * hsa-gen.c (hsa_get_host_function): Likewise.
7441         (get_brig_function_name): Likewise.
7442         (generate_hsa): Likewise.
7443         (pass_gen_hsail::execute): Likewise.
7444         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7445         (devirtualization_time_bonus): Likewise.
7446         (ipcp_propagate_stage): Likewise.
7447         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7448         (edge_set_predicate): Likewise.
7449         (evaluate_conditions_for_known_args): Likewise.
7450         (evaluate_properties_for_edge): Likewise.
7451         (ipa_fn_summary::reset): Likewise.
7452         (ipa_fn_summary_t::duplicate): Likewise.
7453         (dump_ipa_call_summary): Likewise.
7454         (ipa_dump_fn_summary): Likewise.
7455         (analyze_function_body): Likewise.
7456         (compute_fn_summary): Likewise.
7457         (estimate_edge_devirt_benefit): Likewise.
7458         (estimate_edge_size_and_time): Likewise.
7459         (estimate_calls_size_and_time): Likewise.
7460         (estimate_node_size_and_time): Likewise.
7461         (inline_update_callee_summaries): Likewise.
7462         (remap_edge_change_prob): Likewise.
7463         (remap_edge_summaries): Likewise.
7464         (ipa_merge_fn_summary_after_inlining): Likewise.
7465         (ipa_update_overall_fn_summary): Likewise.
7466         (read_ipa_call_summary): Likewise.
7467         (inline_read_section): Likewise.
7468         (write_ipa_call_summary): Likewise.
7469         (ipa_fn_summary_write): Likewise.
7470         (ipa_free_fn_summary): Likewise.
7471         * ipa-hsa.c (process_hsa_functions): Likewise.
7472         (ipa_hsa_write_summary): Likewise.
7473         (ipa_hsa_read_section): Likewise.
7474         * ipa-icf.c (sem_function::merge): Likewise.
7475         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7476         (do_estimate_edge_time): Likewise.
7477         (estimate_size_after_inlining): Likewise.
7478         (estimate_growth): Likewise.
7479         (growth_likely_positive): Likewise.
7480         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7481         (inline_call): Likewise.
7482         * ipa-inline.c (caller_growth_limits): Likewise.
7483         (can_inline_edge_p): Likewise.
7484         (can_inline_edge_by_limits_p): Likewise.
7485         (compute_uninlined_call_time): Likewise.
7486         (compute_inlined_call_time): Likewise.
7487         (want_inline_small_function_p): Likewise.
7488         (edge_badness): Likewise.
7489         (update_caller_keys): Likewise.
7490         (update_callee_keys): Likewise.
7491         (recursive_inlining): Likewise.
7492         (inline_small_functions): Likewise.
7493         (inline_to_all_callers_1): Likewise.
7494         (dump_overall_stats): Likewise.
7495         (early_inline_small_functions): Likewise.
7496         (early_inliner): Likewise.
7497         * ipa-inline.h (estimate_edge_growth): Likewise.
7498         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7499         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7500         * ipa-prop.h (IPA_NODE_REF): Likewise.
7501         (IPA_EDGE_REF): Likewise.
7502         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7503         (propagate_malloc): Likewise.
7504         * ipa-split.c (execute_split_functions): Likewise.
7505         * symbol-summary.h: Rename get to get_create.
7506         (get): Likewise.
7507         (get_create): Likewise.
7508         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7510 2018-06-08  Martin Liska  <mliska@suse.cz>
7512         * symbol-summary.h (release): Move definition out of class
7513         declaration.
7514         (symtab_removal): Likewise.
7515         (symtab_duplication): Likewise.
7517 2018-06-08  Martin Liska  <mliska@suse.cz>
7519         * symbol-summary.h (function_summary): Move constructor
7520         implementation out of class declaration.
7521         (release): Likewise.
7522         (symtab_insertion): Likewise.
7523         (symtab_removal): Likewise.
7524         (symtab_duplication): Likewise.
7525         (get): Likewise.
7527 2018-06-08  Martin Liska  <mliska@suse.cz>
7529         * Makefile.in: Remove support for MPX (macros, related functions,
7530         fields in cgraph_node, ...).
7531         * builtin-types.def (BT_BND): Likewise.
7532         (BT_FN_BND_CONST_PTR): Likewise.
7533         (BT_FN_CONST_PTR_BND): Likewise.
7534         (BT_FN_VOID_PTR_BND): Likewise.
7535         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7536         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7537         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7538         (expand_builtin_mempcpy_with_bounds): Likewise.
7539         (expand_builtin_memset_with_bounds): Likewise.
7540         (expand_builtin_memset_args): Likewise.
7541         (std_expand_builtin_va_start): Likewise.
7542         (expand_builtin): Likewise.
7543         (expand_builtin_with_bounds): Likewise.
7544         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7545         (DEF_LIB_BUILTIN_CHKP): Likewise.
7546         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7547         (DEF_CHKP_BUILTIN): Likewise.
7548         (BUILT_IN_MEMCPY): Likewise.
7549         (BUILT_IN_MEMMOVE): Likewise.
7550         (BUILT_IN_MEMPCPY): Likewise.
7551         (BUILT_IN_MEMSET): Likewise.
7552         (BUILT_IN_STPCPY): Likewise.
7553         (BUILT_IN_STRCAT): Likewise.
7554         (BUILT_IN_STRCHR): Likewise.
7555         (BUILT_IN_STRCPY): Likewise.
7556         (BUILT_IN_STRLEN): Likewise.
7557         (BUILT_IN_MEMCPY_CHK): Likewise.
7558         (BUILT_IN_MEMMOVE_CHK): Likewise.
7559         (BUILT_IN_MEMPCPY_CHK): Likewise.
7560         (BUILT_IN_MEMSET_CHK): Likewise.
7561         (BUILT_IN_STPCPY_CHK): Likewise.
7562         (BUILT_IN_STRCAT_CHK): Likewise.
7563         (BUILT_IN_STRCPY_CHK): Likewise.
7564         * calls.c (store_bounds): Likewise.
7565         (emit_call_1): Likewise.
7566         (special_function_p): Likewise.
7567         (maybe_warn_nonstring_arg): Likewise.
7568         (initialize_argument_information): Likewise.
7569         (finalize_must_preallocate): Likewise.
7570         (compute_argument_addresses): Likewise.
7571         (expand_call): Likewise.
7572         * cfgexpand.c (expand_call_stmt): Likewise.
7573         (expand_return): Likewise.
7574         (expand_gimple_stmt_1): Likewise.
7575         (pass_expand::execute): Likewise.
7576         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7577         (cgraph_node::remove): Likewise.
7578         (cgraph_node::dump): Likewise.
7579         (cgraph_node::verify_node): Likewise.
7580         * cgraph.h (chkp_function_instrumented_p): Likewise.
7581         (symtab_node::get_alias_target): Likewise.
7582         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7583         (cgraph_local_p): Likewise.
7584         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7585         (cgraph_edge::rebuild_references): Likewise.
7586         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7587         (walk_polymorphic_call_targets): Likewise.
7588         (cgraph_node::expand_thunk): Likewise.
7589         (symbol_table::output_weakrefs): Likewise.
7590         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7591         (ix86_handle_option): Likewise.
7592         * config/i386/constraints.md: Likewise.
7593         * config/i386/i386-builtin-types.def (BND): Likewise.
7594         (VOID): Likewise.
7595         (PVOID): Likewise.
7596         (ULONG): Likewise.
7597         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7598         (BDESC_FIRST): Likewise.
7599         (BDESC): Likewise.
7600         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7601         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7602         * config/i386/i386.c (enum reg_class): Likewise.
7603         (ix86_target_string): Likewise.
7604         (ix86_option_override_internal): Likewise.
7605         (ix86_conditional_register_usage): Likewise.
7606         (ix86_valid_target_attribute_inner_p): Likewise.
7607         (ix86_set_indirect_branch_type): Likewise.
7608         (ix86_set_current_function): Likewise.
7609         (ix86_function_arg_regno_p): Likewise.
7610         (init_cumulative_args): Likewise.
7611         (ix86_function_arg_advance): Likewise.
7612         (ix86_function_arg): Likewise.
7613         (ix86_pass_by_reference): Likewise.
7614         (ix86_function_value_regno_p): Likewise.
7615         (ix86_function_value_1): Likewise.
7616         (ix86_function_value_bounds): Likewise.
7617         (ix86_return_in_memory): Likewise.
7618         (ix86_setup_incoming_vararg_bounds): Likewise.
7619         (ix86_va_start): Likewise.
7620         (indirect_thunk_need_prefix): Likewise.
7621         (print_reg): Likewise.
7622         (ix86_print_operand): Likewise.
7623         (ix86_expand_call): Likewise.
7624         (ix86_output_function_return): Likewise.
7625         (reg_encoded_number): Likewise.
7626         (BDESC_VERIFYS): Likewise.
7627         (ix86_init_mpx_builtins): Likewise.
7628         (ix86_init_builtins): Likewise.
7629         (ix86_emit_cmove): Likewise.
7630         (ix86_emit_move_max): Likewise.
7631         (ix86_expand_builtin): Likewise.
7632         (ix86_builtin_mpx_function): Likewise.
7633         (ix86_get_arg_address_for_bt): Likewise.
7634         (ix86_load_bounds): Likewise.
7635         (ix86_store_bounds): Likewise.
7636         (ix86_load_returned_bounds): Likewise.
7637         (ix86_store_returned_bounds): Likewise.
7638         (ix86_class_likely_spilled_p): Likewise.
7639         (ix86_hard_regno_mode_ok): Likewise.
7640         (x86_order_regs_for_local_alloc): Likewise.
7641         (ix86_mitigate_rop): Likewise.
7642         (ix86_bnd_prefixed_insn_p): Likewise.
7643         (ix86_mpx_bound_mode): Likewise.
7644         (ix86_make_bounds_constant): Likewise.
7645         (ix86_initialize_bounds): Likewise.
7646         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7647         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7648         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7649         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7650         (TARGET_CHKP_BOUND_MODE): Likewise.
7651         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7652         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7653         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7654         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7655         * config/i386/i386.h (TARGET_MPX): Likewise.
7656         (TARGET_MPX_P): Likewise.
7657         (VALID_BND_REG_MODE): Likewise.
7658         (FIRST_BND_REG): Likewise.
7659         (LAST_BND_REG): Likewise.
7660         (enum reg_class): Likewise.
7661         (BND_REG_P): Likewise.
7662         (BND_REGNO_P): Likewise.
7663         (BNDmode): Likewise.
7664         (ADJUST_INSN_LENGTH): Likewise.
7665         * config/i386/i386.md: Likewise.
7666         * config/i386/i386.opt: Likewise.
7667         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7668         (defined): Likewise.
7669         (LINK_MPX): Likewise.
7670         (MPX_SPEC): Likewise.
7671         (LIBMPX_SPEC): Likewise.
7672         (LIBMPXWRAPPERS_SPEC): Likewise.
7673         (CHKP_SPEC): Likewise.
7674         * config/i386/predicates.md: Likewise.
7675         * dbxout.c (dbxout_type): Likewise.
7676         * doc/extend.texi: Likewise.
7677         * doc/invoke.texi: Likewise.
7678         * doc/md.texi: Likewise.
7679         * doc/tm.texi: Likewise.
7680         * doc/tm.texi.in: Likewise.
7681         * dwarf2out.c (is_base_type): Likewise.
7682         (gen_formal_types_die): Likewise.
7683         (gen_subprogram_die): Likewise.
7684         (gen_type_die_with_usage): Likewise.
7685         (gen_decl_die): Likewise.
7686         (dwarf2out_late_global_decl): Likewise.
7687         * expr.c (expand_assignment): Likewise.
7688         (emit_storent_insn): Likewise.
7689         (store_expr_with_bounds): Likewise.
7690         (store_expr): Likewise.
7691         (expand_expr_real_1): Likewise.
7692         * expr.h (store_expr_with_bounds): Likewise.
7693         * function.c (use_register_for_decl): Likewise.
7694         (struct bounds_parm_data): Likewise.
7695         (assign_parms_augmented_arg_list): Likewise.
7696         (assign_parm_find_entry_rtl): Likewise.
7697         (assign_parm_is_stack_parm): Likewise.
7698         (assign_parm_load_bounds): Likewise.
7699         (assign_bounds): Likewise.
7700         (assign_parms): Likewise.
7701         (expand_function_start): Likewise.
7702         * gcc.c (CHKP_SPEC): Likewise.
7703         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7704         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7705         (wrestrict_dom_walker::check_call): Likewise.
7706         * gimple.c (gimple_build_call_from_tree): Likewise.
7707         * gimple.h (enum gf_mask): Likewise.
7708         (gimple_call_with_bounds_p): Likewise.
7709         (gimple_call_set_with_bounds): Likewise.
7710         * gimplify.c (gimplify_init_constructor): Likewise.
7711         * ipa-cp.c (initialize_node_lattices): Likewise.
7712         (propagate_constants_across_call): Likewise.
7713         (find_more_scalar_values_for_callers_subset): Likewise.
7714         * ipa-hsa.c (process_hsa_functions): Likewise.
7715         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7716         * ipa-icf.c (sem_function::merge): Likewise.
7717         * ipa-inline.c (early_inliner): Likewise.
7718         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7719         (warn_function_cold): Likewise.
7720         (propagate_pure_const): Likewise.
7721         * ipa-ref.h (enum GTY): Likewise.
7722         * ipa-split.c (find_retbnd): Likewise.
7723         (consider_split): Likewise.
7724         (split_function): Likewise.
7725         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7726         * ipa.c (walk_polymorphic_call_targets): Likewise.
7727         (symbol_table::remove_unreachable_nodes): Likewise.
7728         (process_references): Likewise.
7729         (cgraph_build_static_cdtor_1): Likewise.
7730         * lto-cgraph.c (lto_output_node): Likewise.
7731         (output_refs): Likewise.
7732         (compute_ltrans_boundary): Likewise.
7733         (input_overwrite_node): Likewise.
7734         (input_node): Likewise.
7735         (input_cgraph_1): Likewise.
7736         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7737         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7738         (class pass_chkp_instrumentation_passes): Likewise.
7739         (make_pass_chkp_instrumentation_passes): Likewise.
7740         * passes.def: Likewise.
7741         * rtl.h (struct GTY): Likewise.
7742         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7743         * stor-layout.c (layout_type): Likewise.
7744         * symtab.c: Likewise.
7745         * target.def: Likewise.
7746         * targhooks.c (default_chkp_bound_type): Likewise.
7747         (default_chkp_bound_mode): Likewise.
7748         (default_builtin_chkp_function): Likewise.
7749         (default_chkp_function_value_bounds): Likewise.
7750         (default_chkp_make_bounds_constant): Likewise.
7751         (default_chkp_initialize_bounds): Likewise.
7752         * targhooks.h (default_chkp_bound_type): Likewise.
7753         (default_chkp_bound_mode): Likewise.
7754         (default_builtin_chkp_function): Likewise.
7755         (default_chkp_function_value_bounds): Likewise.
7756         (default_chkp_make_bounds_constant): Likewise.
7757         (default_chkp_initialize_bounds): Likewise.
7758         * toplev.c (compile_file): Likewise.
7759         (process_options): Likewise.
7760         * tree-core.h (DEF_BUILTIN): Likewise.
7761         (DEF_BUILTIN_CHKP): Likewise.
7762         * tree-inline.c (declare_return_variable): Likewise.
7763         (remap_gimple_stmt): Likewise.
7764         (copy_bb): Likewise.
7765         (initialize_inlined_parameters): Likewise.
7766         (expand_call_inline): Likewise.
7767         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7768         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7769         (make_pass_ipa_chkp_produce_thunks): Likewise.
7770         (make_pass_chkp): Likewise.
7771         (make_pass_chkp_opt): Likewise.
7772         (make_pass_chkp_instrumentation_passes): Likewise.
7773         * tree-pretty-print.c (dump_generic_node): Likewise.
7774         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7775         * tree-ssa-dce.c (propagate_necessity): Likewise.
7776         (eliminate_unnecessary_stmts): Likewise.
7777         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7778         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7779         * tree-ssa-sccvn.h: Likewise.
7780         * tree-ssa-strlen.c (get_string_length): Likewise.
7781         (valid_builtin_call): Likewise.
7782         (adjust_last_stmt): Likewise.
7783         (handle_builtin_strchr): Likewise.
7784         (handle_builtin_strcpy): Likewise.
7785         (handle_builtin_stxncpy): Likewise.
7786         (handle_builtin_memcpy): Likewise.
7787         (handle_builtin_strcat): Likewise.
7788         (strlen_check_and_optimize_stmt): Likewise.
7789         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7790         * tree-streamer-in.c: Likewise.
7791         * tree-streamer.c (record_common_node): Likewise.
7792         * tree.c (tree_code_size): Likewise.
7793         (wide_int_to_tree_1): Likewise.
7794         (type_contains_placeholder_1): Likewise.
7795         (build_common_tree_nodes): Likewise.
7796         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7797         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7798         (POINTER_BOUNDS_P): Likewise.
7799         (BOUNDED_TYPE_P): Likewise.
7800         (BOUNDED_P): Likewise.
7801         (CALL_WITH_BOUNDS_P): Likewise.
7802         (pointer_bounds_type_node): Likewise.
7803         * value-prof.c (gimple_ic): Likewise.
7804         * var-tracking.c (vt_add_function_parameters): Likewise.
7805         * varasm.c (make_decl_rtl): Likewise.
7806         (assemble_start_function): Likewise.
7807         (output_constant): Likewise.
7808         (maybe_assemble_visibility): Likewise.
7809         * varpool.c (ctor_for_folding): Likewise.
7810         * chkp-builtins.def: Remove.
7811         * ipa-chkp.c: Remove.
7812         * ipa-chkp.h: Remove.
7813         * rtl-chkp.c: Remove.
7814         * rtl-chkp.h: Remove.
7815         * tree-chkp-opt.c: Remove.
7816         * tree-chkp.c: Remove.
7817         * tree-chkp.h: Remove.
7819 2018-06-07  Carl Love  <cel@us.ibm.com>
7821         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7822         vextract_fp_from_shortl): Add BE support.
7824 2018-06-07  Paul Koning  <ni1d@arrl.net>
7826         * compare-elim.c (try_merge_compare): Don't merge compare if
7827         address contains a side effect.
7828         (try_eliminate_compare): Likewise.
7830 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7832         * config.gcc: Support "tremont".
7833         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7834         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7835         PROCESSOR_TREMONT.
7836         * config/i386/i386.c (m_TREMONT): Define.
7837         (processor_target_table): Add "tremont".
7838         (PTA_TREMONT): Define.
7839         (ix86_lea_outperforms): Add TARGET_TREMONT.
7840         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7841         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7842         and M_INTEL_GOLDMONT_PLUS.
7843         (fold_builtin_cpu): Add "tremont".
7844         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7845         (ix86_option_override_internal): Add "tremont".
7846         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7847         (processor_type): Add PROCESSOR_TREMONT.
7848         * config/i386/x86-tune.def: Add m_TREMONT.
7849         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7851 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7853         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7854         symbol defined for msp430i* devices to be lower case.
7856 2018-06-07  Richard Biener  <rguenther@suse.de>
7858         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7859         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7860         Properly wrap signed arithmetic if overflow wraps.
7862 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7864         PR tree-optimization/69615
7865         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7866         of a cast from a same precision integral SSA_NAME in a bb dominated
7867         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7868         cast to utype if rhs2 has already a compatible type.
7870 2018-06-07  Richard Biener  <rguenther@suse.de>
7872         PR tree-optimization/85935
7873         * graphite-scop-detection.c (find_params_in_bb): Analyze
7874         condition operands with respect to the correct loop.  Assert
7875         the analysis doesn't fail.
7877 2018-06-04  Carl Love  <cel@us.ibm.com>
7879         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7880         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7881         as it is slightly cheaper.
7882         (first_match_or_eos_index_<mode>):
7883         Calculate index using natural element order.
7884         (first_match_index_<mode>):
7885         Calculate index using natural element order.
7886         (first_match_or_eos_index_<mode>):
7887         Calculate index using natural order.
7888         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7889         for BE and LE modes.
7890         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7891         P9V_BUILTIN_VCLZLSBB_V16QI.
7892         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7893         specific.
7895 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7897         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7898         indentation and line wrap for many prototypes.  Add missing
7899         @smallexample directives around block of prototypes for vec_xl and
7900         vec_xst.
7902 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7904         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7905         track if we pass or return IEEE 128-bit floating point.
7906         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7907         C++ mangling that is compatible with GCC 8.1.
7908         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7909         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7910         floating point types.
7911         (rs6000_function_arg_advance_1): Likewise.
7912         (rs6000_mangle_type): Optionally generate mangled names that match
7913         what GCC 8.1 generated for IEEE 128-bit floating point types.
7914         (rs6000_globalize_decl_name): If we have an external function that
7915         passes or returns IEEE 128-bit types, generate a weak reference
7916         from the mangled name used in GCC 8.1 to the current mangled
7917         name.
7918         (rs6000_init_builtins): Make __ibm128 use the long double type if
7919         long double is IBM extended double.  Make __float128 use the long
7920         double type if long double is IEEE 128-bit.
7922         PR target/85657
7923         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7924         macro for __ibm128 built-in functions.
7925         (PACK_IF): Add __ibm128 pack/unpack functions.
7926         (UNPACK_IF): Likewise.
7927         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7928         enable long double built-in functions if long double is IEEE
7929         128-bit floating point.
7930         (rs6000_invalid_builtin): Update long double built-in function
7931         error message.
7932         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7933         functions, adjust the built-in function to use the long double
7934         built-in function if __ibm128 and long double are the same type.
7935         * doc/extend.texi (PowerPC builtins): Update documention for
7936         __builtin_{,un}pack_longdouble.  Add documentation for
7937         __builtin_{,un}pack_ibm128.
7939 2018-06-06  Jim Wilson  <jimw@sifive.com>
7941         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7942         (struct machine_function): New field interrupt_mode.
7943         (riscv_handle_type_attribute): New function.  Add forward declaration.
7944         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7945         (riscv_expand_epilogue): Check interrupt_mode field.
7946         (riscv_set_current_function): Check interrupt attribute args and
7947         set interrupt_mode field.
7948         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7949         (riscv_sret, riscv_uret): New.
7950         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7951         new arguments to interrupt attribute.
7953 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7955         PR target/63177
7956         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7957         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7959 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7961         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7962         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7963         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7964         several redundant entries.
7966 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7968         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7969         type from "rtx" to "rtx_insn *".
7970         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7971         for local "call_insn", removing cast.
7972         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7974 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7976         PR tree-optimization/86066
7977         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7978         for BIT_INSERT_EXPR stores.
7980 2018-06-06  Richard Biener  <rguenther@suse.de>
7982         PR tree-optimization/86062
7983         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7984         component refs ontop
7985         of to be offsetted base.
7987 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7989         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7990         to be static and remove check on interrupt attribute name.
7992 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7994         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7995         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7997 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7999         PR target/79924
8000         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8001         second argument.
8002         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8003         Remove second argument, change how error is called.
8004         (aarch64_layout_arg): Remove second argument from
8005         aarch64_err_no_fpadvsimd call.
8006         (aarch64_init_cumulative_args): Ditto.
8007         (aarch64_gimplify_va_arg_expr): Ditto.
8008         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8010 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8012         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8013         (*simple_return_indirect_internal<mode>): Rename from
8014         simple_return_indirect_internal.  Use W mode iterator.
8015         (rstorssp): New expander.
8016         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8017         (clrssbsy): New expander.
8018         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8020 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8022         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8023         __typeof__.
8024         (cmse_check_pointed_object): Likewise.
8026 2018-06-05  Martin Liska  <mliska@suse.cz>
8028         PR gcov-profile/47618
8029         * doc/invoke.texi: Document how -fprofile-dir format
8030         is extended.
8032 2018-06-05  Richard Biener  <rguenther@suse.de>
8034         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8035         removal pretend DOM info isn't available so we do not update
8036         it and only remove edges, not dominated blocks.  Actually free
8037         DOM info in case we removed something.  Remove unreachable blocks.
8038         (mfb_keep_latches): Work with either DOM info or marked backedges.
8039         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8040         first.  Mark backedges if DOM info isn't available.
8041         (Re-)compute DOM info after cleanup_control_flow_pre.
8043 2018-06-05  Richard Biener  <rguenther@suse.de>
8045         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8046         (locus_discrim_hasher::hash): Adjust.
8047         (locus_discrim_hasher::equal): Likewise.
8048         (next_discriminator_for_locus): Work on line directly.
8049         (same_line_p): Pass in expanded locus1 as well.
8050         (assign_discriminators): Avoid redundant location expansions.
8052 2018-06-05  Richard Biener  <rguenther@suse.de>
8054         PR tree-optimization/86046
8055         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8056         if required after clearing TREE_ADDRESSABLE.
8058 2018-06-05  Richard Biener  <rguenther@suse.de>
8060         PR tree-optimization/86047
8061         * tree-ssa-loop.c (for_each_index): Glob handling of all
8062         decls and constants and really handle all of them.
8064 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8066         PR target/81497
8067         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8068         qualifier_void_pointer and qualifier_const_void_pointer.
8069         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8070         (arm_init_builtins): Handle the above.
8071         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8072         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8073         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8074         void intrinsics.
8076 2018-06-05  Martin Liska  <mliska@suse.cz>
8078         * auto-profile.c (read_autofdo_file): Do not use
8079         gcov_ctr_summary struct.
8080         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8081         * coverage.c (struct counts_entry): Likewise.
8082         (read_counts_file): Read just single summary entry.
8083         (get_coverage_counts): Use gcov_summary struct.
8084         * coverage.h (get_coverage_counts): Likewise.
8085         * gcov-dump.c (dump_working_sets): Likewise.
8086         (tag_summary): Dump just single summary.
8087         * gcov-io.c (gcov_write_summary): Write just histogram
8088         summary.
8089         (gcov_read_summary): Read just single summary.
8090         (compute_working_sets): Use gcov_summary struct.
8091         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8092         of GCOV_COUNTERS_SUMMABLE.
8093         (GCOV_COUNTERS_SUMMABLE): Remove.
8094         (GCOV_FIRST_VALUE_COUNTER): Replace with
8095         GCOV_COUNTER_V_INTERVAL.
8096         (struct gcov_ctr_summary): Remove.
8097         (struct gcov_summary): Directly use fields of former
8098         gcov_ctr_summary.
8099         (compute_working_sets): Use gcov_summary struct.
8100         * gcov.c (read_count_file): Do not use ctrs fields.
8101         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8102         struct.
8103         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8104         struct.
8105         * profile.c: Likewise.
8106         * profile.h: Likewise.
8108 2018-06-05  Martin Liska  <mliska@suse.cz>
8110         PR gcov-profile/84846
8111         * gcov.c (output_lines): Print working directory only
8112         in intermediate format.
8114 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8116         * config/s390/s390-builtin-types.def: Add void function type.
8117         * config/s390/s390-builtins.def: Use the function type for the
8118         tbeginc builtin.
8120 2018-06-04  Jim Wilson  <jimw@sifive.com>
8122         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8123         to int.
8124         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8125         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8126         handle EH_RETURN_DATA_REGNO registers properly.
8127         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8128         (riscv_expand_epilogue): Update comment.  Change argument name and
8129         type.  Update code to use new name and type.  Pass new args to
8130         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8131         EXCEPTION_RETURN.
8132         * config/riscv/riscv.md (NORMAL_RETURN): New.
8133         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8134         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8135         (eh_return): Call gen_eh_return_internal and emit barrier.
8136         (eh_return_internal): Call riscv_expand_epilogue.
8138 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8140         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8141         bit_insertion field and declare can_be_merged_into method.
8142         (merged_store_group::can_be_merged_into): New method.
8143         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8144         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8145         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8147 2018-06-04  Richard Biener  <rguenther@suse.de>
8149         PR tree-optimization/85955
8150         * builtins.c (fold_builtin_sincos): Convert pointers to
8151         destination to appropriate type before dereferencing.
8153 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8155         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8157 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8159         * expr.c (expand_expr_real_1): Force the operand into memory if
8160         its TYPE_MODE is BLKmode and if there is no integer mode for
8161         the number of bits being extracted.
8163 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8165         PR target/85832
8166         PR target/86036
8167         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8168         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8170 2018-06-04  Richard Biener  <rguenther@suse.de>
8172         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8173         (cleanup_tree_cfg_noloop): ... single caller.  Do
8174         start_recording_case_labels later.
8176 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8178         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8179         to _IMMINTRIN_H_INCLUDED.
8180         * config/i386/pconfigintrin.h: Ditto.
8181         * config/i386/waitpkgintrin.h: Ditto.
8182         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8183         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8184         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8185         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8186         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8187         waitpkgintrin.h and cldemoteintrin.h.
8189 2018-06-04  Richard Biener  <rguenther@suse.de>
8191         PR tree-optimization/86038
8192         * tracer.c (find_best_successor): Check probability for
8193         being initialized, bail out if not.
8195 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8197         PR target/86003
8198         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8199         of bits to ignore when comparing architectures.
8201 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8203         PR tree-optimization/69615
8204         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8205         maximum or minimum of the type, try to merge it also as if
8206         range1 is + [-, x - 1] or + [x + 1, -].
8208         PR c++/86025
8209         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8211 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8213         PR tree-optimization/86034
8214         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8215         the unsigned bitfield type in a bit insertion sequence if it does not
8216         have a larger precision than the bitfield size.
8217         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8219 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8221         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8223 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8225         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8226         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8227         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8228         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8230 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8232         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8233         Disable -fdelete-null-pointer-checks for ELF toolchain.
8235 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8236             Kito Cheng  <kito.cheng@gmail.com>
8238         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8239         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8240         (nds32*-*-*): Add glibc and uclibc conditions.
8241         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8242         (TARGET_EXCEPT_UNWIND_INFO): Define.
8243         * config/nds32/elf.h: New file.
8244         * config/nds32/linux.h: New file.
8245         * config/nds32/nds32-elf.opt: New file.
8246         * config/nds32/nds32-linux.opt: New file.
8247         * config/nds32/nds32-fp-as-gp.c
8248         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8249         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8250         TARGET_LINUX_ABI.
8251         (nds32_asm_file_end): Ditto.
8252         (nds32_print_operand): Ditto.
8253         (nds32_insert_attributes): Ditto.
8254         (nds32_init_libfuncs): New function.
8255         (TARGET_HAVE_TLS): Define.
8256         (TARGET_INIT_LIBFUNCS): Define.
8257         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8258         spec content.
8259         (TARGET_ELF): Apply different mcmodel setting.
8260         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8261         been migrated into elf.h and linux.h files.
8262         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8263         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8264         (mcmodel): The content has been migrated into nds32-elf.opt and
8265         nds32-linux.opt files.
8266         * config/nds32/t-elf: New file.
8267         * config/nds32/t-linux: New file.
8269 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8270             Shiva Chen  <shiva0217@gmail.com>
8272         * config/nds32/constants.md (unspec_volatile_element): Add
8273         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8274         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8275         optimization.
8276         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8277         (make_pass_nds32_fp_as_gp): Declare.
8278         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8279         optmization pass.
8280         (nds32_asm_function_end_prologue): Remove unused asm output.
8281         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8282         (nds32_asm_file_start): Output necessary fp_as_gp information.
8283         (nds32_option_override): Adjust register usage.
8284         (nds32_expand_prologue): Consider fp_as_gp situation.
8285         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8286         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8287         (epilogue): Ditto.
8288         (return): Ditto.
8289         (simple_return): Ditto.
8290         (omit_fp_begin): Output special directive for fp_as_gp.
8291         (omit_fp_end): Output special directive for fp_as_gp.
8292         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8293         mforbid-fp-as-gp): New options.
8295 2018-06-01  Mark Wielaard  <mark@klomp.org>
8297         * dwarf2out.c (dwarf2out_finish): Remove generation of
8298         DW_AT_loclists_base.
8300 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8302         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8303         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8304         (struct merged_store_group): Add bit_insertion field.
8305         (dump_char_array): Use standard hexadecimal format.
8306         (merged_store_group::merged_store_group): Set bit_insertion to false.
8307         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8308         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8309         also print the mask in the dump file.
8310         (pass_store_merging::gate): Minor tweak.
8311         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8312         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8313         stores with INTEGER_CST stores.
8314         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8315         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8316         and use it throughout.  Generate bit insertion sequences if need be.
8317         (pass_store_merging::process_store): Remove redundant condition.
8318         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8320 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8322         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8323         the 128-bit floating point types.  Fix function comment.
8325 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8327         * config/aarch64/aarch64-simd.md
8328         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8329         mnemonics.
8330         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8331         mnemonics.
8333 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8335         PR tree-optimization/85989
8336         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8337         variable.
8338         (backprop::intersect_uses): Check it when deciding whether this
8339         is a backedge reference.
8340         (backprop::process_block): Add each phi to m_visited_phis
8341         after visiting it, then clear it at the end.
8343 2018-06-01  Richard Biener  <rguenther@suse.de>
8345         * tree-vectorizer.h (vect_dr_stmt): New function.
8346         (vect_get_load_cost): Adjust.
8347         (vect_get_store_cost): Likewise.
8348         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8349         Use vect_dr_stmt instead of DR_SMTT.
8350         (vect_record_base_alignments): Likewise.
8351         (vect_calculate_target_alignment): Likewise.
8352         (vect_compute_data_ref_alignment): Likewise and make static.
8353         (vect_update_misalignment_for_peel): Likewise.
8354         (vect_verify_datarefs_alignment): Likewise.
8355         (vector_alignment_reachable_p): Likewise.
8356         (vect_get_data_access_cost): Likewise.  Pass down
8357         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8358         (vect_get_peeling_costs_all_drs): Likewise.
8359         (vect_peeling_hash_get_lowest_cost): Likewise.
8360         (vect_enhance_data_refs_alignment): Likewise.
8361         (vect_find_same_alignment_drs): Likewise.
8362         (vect_analyze_data_refs_alignment): Likewise.
8363         (vect_analyze_group_access_1): Likewise.
8364         (vect_analyze_group_access): Likewise.
8365         (vect_analyze_data_ref_access): Likewise.
8366         (vect_analyze_data_ref_accesses): Likewise.
8367         (vect_vfa_segment_size): Likewise.
8368         (vect_small_gap_p): Likewise.
8369         (vectorizable_with_step_bound_p): Likewise.
8370         (vect_prune_runtime_alias_test_list): Likewise.
8371         (vect_analyze_data_refs): Likewise.
8372         (vect_supportable_dr_alignment): Likewise.
8373         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8374         (vect_gen_prolog_loop_niters): Likewise.
8375         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8376         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8377         modify DR_STMT.
8378         (vect_recog_mask_conversion_pattern): Likewise.
8379         (vect_try_gather_scatter_pattern): Likewise.
8380         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8381         to vect_get_store_cost.
8382         (vect_get_store_cost): Get stmt_info instead of DR.
8383         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8384         (vect_get_load_cost): Get stmt_info instead of DR.
8386 2018-06-01  Richard Biener  <rguenther@suse.de>
8388         PR middle-end/86017
8389         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8390         vars wrapped in MEM_REFs.
8392 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8394         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8395         Fix subreg tests so that we only return a choice between
8396         GENERAL_REGS and FP_REGS if the original classes included both.
8398 2018-06-01  Richard Biener  <rguenther@suse.de>
8400         PR ipa/85960
8401         * tree-ssa-structalias.c (get_function_part_constraint):
8402         Handle NULL fi->decl.
8403         (find_func_aliases_for_call): Properly handle indirect
8404         fi from direct call.
8405         (find_func_clobbers): Likewise.
8406         (ipa_pta_execute): Likewise.
8407         (create_variable_info_for): For functions that are ifunc_resolver
8408         resolve to a varinfo that contains the result of the resolver call.
8409         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8410         aliases.
8412 2018-05-31  Michael Collison  <michael.collison@arm.com>
8414         * config/aarch64/aarch64.md:
8415         (*fix_to_zero_extenddfdi2): New pattern.
8416         * gcc.target/aarch64/fix_extend1.c: New testcase.
8418 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8420         PR middle-end/78809
8421         PR middle-end/83026
8422         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8423         and BUILT_IN_STRNCMP_EQ.
8424         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8425         BUILT_IN_STRNCMP_EQ.
8426         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8427         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8428         (gimple_fold_builtin): Likewise.
8429         * tree-ssa-strlen.c (compute_string_length): New function.
8430         (determine_min_obsize): New function.
8431         (handle_builtin_string_cmp): New function to handle calls to
8432         string compare functions.
8433         (strlen_optimize_stmt): Add handling to builtin string compare
8434         calls.
8435         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8436         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8437         * tree.c (build_common_builtin_nodes): Add new defines of
8438         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8440 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8442         PR target/85984
8443         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8444         functions with naked attribute.
8446 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8448         * config/i386/sse.md (avx_vec_concat<mode>):
8449         Substitute concat_tg_mode mode attribute with xtg_mode.
8450         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8451         (concat_tg_mode): Remove mode attribute.
8453 2018-05-31  Martin Sebor  <msebor@redhat.com>
8455         PR c/82063
8456         * calls.c (alloc_max_size): Correct a logic error/typo.
8457         Treat excessive arguments as infinite.  Warn for invalid arguments.
8458         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8460 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8462         PR target/85829
8463         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8464         and movx for Haswell.
8466 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8467             Cesar Philippidis  <cesar@codesourcery.com>
8469         PR middle-end/85879
8470         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8471         when emitting error on private/firstprivate reductions.
8472         * omp-low.c (lower_omp_target): Avoid reference-type processing
8473         on pointers for firstprivate clause.
8475 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8477         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8478         (st1x2): Likewise.
8479         (st1x3): Likewise.
8480         * config/aarch64/aarch64-simd.md
8481         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8482         (aarch64_ld1_x3_<mode>): Likewise
8483         (aarch64_st1x2<VALLDIF:mode>): Likewise
8484         (aarch64_st1_x2_<mode>): Likewise
8485         (aarch64_st1x3<VALLDIF:mode>): Likewise
8486         (aarch64_st1_x3_<mode>): Likewise
8487         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8488         (vld1_s8_x3): Likewise.
8489         (vld1_u16_x3): Likewise.
8490         (vld1_s16_x3): Likewise.
8491         (vld1_u32_x3): Likewise.
8492         (vld1_s32_x3): Likewise.
8493         (vld1_u64_x3): Likewise.
8494         (vld1_s64_x3): Likewise.
8495         (vld1_f16_x3): Likewise.
8496         (vld1_f32_x3): Likewise.
8497         (vld1_f64_x3): Likewise.
8498         (vld1_p8_x3): Likewise.
8499         (vld1_p16_x3): Likewise.
8500         (vld1_p64_x3): Likewise.
8501         (vld1q_u8_x3): Likewise.
8502         (vld1q_s8_x3): Likewise.
8503         (vld1q_u16_x3): Likewise.
8504         (vld1q_s16_x3): Likewise.
8505         (vld1q_u32_x3): Likewise.
8506         (vld1q_s32_x3): Likewise.
8507         (vld1q_u64_x3): Likewise.
8508         (vld1q_s64_x3): Likewise.
8509         (vld1q_f16_x3): Likewise.
8510         (vld1q_f32_x3): Likewise.
8511         (vld1q_f64_x3): Likewise.
8512         (vld1q_p8_x3): Likewise.
8513         (vld1q_p16_x3): Likewise.
8514         (vld1q_p64_x3): Likewise.
8515         (vst1_s64_x2): Likewise.
8516         (vst1_u64_x2): Likewise.
8517         (vst1_f64_x2): Likewise.
8518         (vst1_s8_x2): Likewise.
8519         (vst1_p8_x2): Likewise.
8520         (vst1_s16_x2): Likewise.
8521         (vst1_p16_x2): Likewise.
8522         (vst1_s32_x2): Likewise.
8523         (vst1_u8_x2): Likewise.
8524         (vst1_u16_x2): Likewise.
8525         (vst1_u32_x2): Likewise.
8526         (vst1_f16_x2): Likewise.
8527         (vst1_f32_x2): Likewise.
8528         (vst1_p64_x2): Likewise.
8529         (vst1q_s8_x2): Likewise.
8530         (vst1q_p8_x2): Likewise.
8531         (vst1q_s16_x2): Likewise.
8532         (vst1q_p16_x2): Likewise.
8533         (vst1q_s32_x2): Likewise.
8534         (vst1q_s64_x2): Likewise.
8535         (vst1q_u8_x2): Likewise.
8536         (vst1q_u16_x2): Likewise.
8537         (vst1q_u32_x2): Likewise.
8538         (vst1q_u64_x2): Likewise.
8539         (vst1q_f16_x2): Likewise.
8540         (vst1q_f32_x2): Likewise.
8541         (vst1q_f64_x2): Likewise.
8542         (vst1q_p64_x2): Likewise.
8543         (vst1_s64_x3): Likewise.
8544         (vst1_u64_x3): Likewise.
8545         (vst1_f64_x3): Likewise.
8546         (vst1_s8_x3): Likewise.
8547         (vst1_p8_x3): Likewise.
8548         (vst1_s16_x3): Likewise.
8549         (vst1_p16_x3): Likewise.
8550         (vst1_s32_x3): Likewise.
8551         (vst1_u8_x3): Likewise.
8552         (vst1_u16_x3): Likewise.
8553         (vst1_u32_x3): Likewise.
8554         (vst1_f16_x3): Likewise.
8555         (vst1_f32_x3): Likewise.
8556         (vst1_p64_x3): Likewise.
8557         (vst1q_s8_x3): Likewise.
8558         (vst1q_p8_x3): Likewise.
8559         (vst1q_s16_x3): Likewise.
8560         (vst1q_p16_x3): Likewise.
8561         (vst1q_s32_x3): Likewise.
8562         (vst1q_s64_x3): Likewise.
8563         (vst1q_u8_x3): Likewise.
8564         (vst1q_u16_x3): Likewise.
8565         (vst1q_u32_x3): Likewise.
8566         (vst1q_u64_x3): Likewise.
8567         (vst1q_f16_x3): Likewise.
8568         (vst1q_f32_x3): Likewise.
8569         (vst1q_f64_x3): Likewise.
8570         (vst1q_p64_x3): Likewise.
8572 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8574         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8575         user_label_prefix to name.
8577         * tree-core.h: Update comment about the format of NAME string
8578         passed to handler in attribute_spec.
8580         * config/msp430/msp430.md: Remove erroneous subreg expression from
8581         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8582         zero_extend{q,h}isi2.
8584 2018-05-30  Borislav Petkov  <bp@suse.de>
8586         * doc/extend.texi: Document some architecture specific
8587         constraints and sort entries.
8589 2018-05-30  Martin Sebor  <msebor@redhat.com>
8591         PR middle-end/85369
8592         * builtins.c (expand_builtin_stpcpy_1): New function.
8593         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8594         only if the former succeeds.
8596 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8598         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8599         in saphira.
8601 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8603         * doc/invoke.texi (-flinker-output): Document
8605 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8607         * passes.c (ipa_write_summaries): Only modify statements if body
8608         is in memory.
8609         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8610         incrementally linking.
8611         (ipa_passes): Likewise.
8612         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8613         pass down resolution info.
8614         * common.opt (flag_incremental_link): Update info.
8615         * gcc.c (plugin specs): Turn flinker-output=* to
8616         -plugin-opt=-linker-output-known
8617         * toplev.c (compile_file): Also cut compilation when doing incremental
8618         link.
8619         * flag-types. (enum lto_partition_model): Add
8620         LTO_LINKER_OUTPUT_NOLTOREL.
8621         (invoke.texi): Add -flinker-output docs.
8622         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8623         link same way as WPA; do not stream in dead initializers.
8625         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8626         darf2out_register_external_decl): Support incremental link.
8628 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8630         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8632 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8634         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8635         it down to simple_object_copy_lto_debug_sections.
8636         (run_gcc): Determine incremental LTO link time and configure
8637         lto1 into non-wpa mode, disable renaming of debug sections.
8639 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8641         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8642         descriptions of various incorrectly documented functions.
8644 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8646         Revert:
8647         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8648         address check not strict.
8650 2018-05-30  Richard Biener  <rguenther@suse.de>
8652         PR tree-optimization/85964
8653         * tracer.c (better_p): Drop initialized count check, we only
8654         call the function with initialized counts now.
8655         (find_best_successor): Do find a best edge if one
8656         has uninitialized count.
8657         (find_best_predecessor): Likewise.  Do BB frequency check only
8658         if count is initialized.
8660 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8662         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8663         (aarch64_ldrstr_offset_compare): New.
8664         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8665         load/store orderings.
8666         (aarch64_gen_adjusted_ldpstp): Likewise.
8668 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8670         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8671         Check for subset of GENERAL_REGS and FP_REGS.
8672         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8673         r=w alternative.
8675 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8677         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8678         and wi::to_poly_offset.  Add the current offset and then check
8679         whether the sum fits, rather than using an unchecked addition of
8680         a checked term.  Check for a shwi rather than a uhwi.
8681         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8682         (store_constructor): Use poly_int_tree_p.
8683         (expand_expr_real_1): Likewise.
8684         * function.c (assign_temp): Likewise.
8685         * fold-const.c (const_binop): Use poly_int_tree_p and
8686         wi::to_poly_offset.
8687         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8688         division.
8689         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8690         to_poly_offset for MEM offsets.
8691         * ipa-icf.c (sem_variable::equals): Likewise.
8692         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8693         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8694         wi::to_poly_offset for BIT_FIELD_REF offsets.
8695         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8696         wi::to_poly_offset.
8697         * var-tracking.c (emit_note_insn_var_location): Use
8698         tree_to_poly_uint64.
8700 2018-05-29  Jim Wilson  <jimw@sifive.com>
8702         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8704 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8706         PR target/85950
8707         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8708         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8709         sequence.
8710         (sse4_1_round<mode>2): Use nonimmediate_operand
8711         for operand 1 predicate.
8713 2018-05-29  Martin Sebor  <msebor@redhat.com>
8714             Richard Biener  <rguenther@suse.de>
8716         PR testsuite/85888
8717         * calls.c (get_size_range): Call determine_value_range instead
8718         of get_value_range..
8719         * tree-vrp.h (determine_value_range): Declared new function.
8720         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8722 2018-05-29  Richard Biener  <rguenther@suse.de>
8724         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8725         sure to use non-pattern stmts for get_earlier_stmt arguments.
8726         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8727         called on pattern stmts.
8728         (get_later_stmt): Likewise.
8730 2018-05-29  Martin Liska  <mliska@suse.cz>
8732         PR gcov-profile/85759
8733         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8734         env variables.
8736 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8738         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8739         VEC_UNPACK_*_EXPR.
8740         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8741         VEC_PACK_*_EXPR.
8743         PR target/85918
8744         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8745         VEC_PACK_FLOAT_EXPR): New tree codes.
8746         * tree-pretty-print.c (op_code_prio): Handle
8747         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8748         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8749         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8750         * tree-inline.c (estimate_operator_cost): Likewise.
8751         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8752         * fold-const.c (const_binop): Likewise.
8753         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8754         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8755         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8756         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8757         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8758         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8759         * expr.c (expand_expr_real_2): Likewise.
8760         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8761         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8762         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8763         optabs.
8764         * optabs.c (expand_widen_pattern_expr): For
8765         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8766         sign from result type rather than operand's type.
8767         (expand_binop_directly): For vec_packu_float_optab and
8768         vec_packs_float_optab allow result type to be different from operand's
8769         type.
8770         * optabs-tree.c (optab_for_tree_code): Handle
8771         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8772         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8773         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8774         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8775         VEC_PACK_FLOAT_EXPR.
8776         * tree-vect-stmts.c (supportable_widening_operation): Handle
8777         FIX_TRUNC_EXPR.
8778         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8779         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8780         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8781         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8782         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8783         mode attributes.
8784         (vec_pack<floatprefix>_float_<mode>): New expander.
8785         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8786         attributes.
8787         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8788         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8789         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8790         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8791         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8792         Document.
8793         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8794         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8795         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8796         VEC_PACK_FLOAT_EXPR): Document.
8798 2018-05-29  Richard Biener  <rguenther@suse.de>
8800         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8801         member.
8802         (stmt_vec_info_vec): Make pointer.
8803         (init_stmt_vec_info_vec): Remove.
8804         (free_stmt_vec_info_vec): Likewise.
8805         (set_stmt_vec_info_vec): New function.
8806         (free_stmt_vec_infos): Likewise.
8807         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8808         (set_vinfo_for_stmt): Likewise.
8809         (get_earlier_stmt): Likewise.
8810         (get_later_stmt): Likewise.
8811         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8812         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8813         (vec_info::~vec_info): Free stmt_vec_infos.
8814         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8815         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8816         (pass_slp_vectorize::execute): Likewise.
8817         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8818         (free_stmt_vec_info_vec): Likewise.
8819         (set_stmt_vec_info_vec): New function.
8820         (free_stmt_vec_infos): Likewise.
8821         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8822         the global stmt_vec_info_vec.
8823         * tree-parloops.c (gather_scalar_reductions): Use
8824         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8825         vector.
8827 2018-05-29  Richard Biener  <rguenther@suse.de>
8829         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8831 2018-05-29  Martin Liska  <mliska@suse.cz>
8832             David Malcolm  <dmalcolm@redhat.com>
8834         * vec.c (test_reverse): New.
8835         (vec_c_tests): Add new test.
8836         * vec.h (vl_ptr>::reverse): New function.
8838 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8840         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8842         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8843         and later.
8845 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8847         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8849 2018-05-28  Richard Biener  <rguenther@suse.de>
8851         PR tree-optimization/85933
8852         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8853         look at stmts marked as vectorizable.
8855 2018-05-28  Richard Biener  <rguenther@suse.de>
8857         PR tree-optimization/85934
8858         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8859         vector boolean check before scalar optimization.
8861 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8863         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8864         for armv5te.
8866 2018-05-28  Mark Wielaard  <mark@klomp.org>
8868         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8869         if it is an expression containing a minus sign.
8871 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8873         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8875 2018-05-27  Paul Koning  <ni1d@arrl.net>
8877         * config/pdp11/pdp11.md (truncsihi2): Remove.
8879 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8880             Chung-Ju Wu  <jasonwucj@gmail.com>
8882         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8883         implementation.
8884         (unaligned_store_dw): Ditto.
8885         * config/nds32/nds32-memory-manipulation.c
8886         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8887         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8888         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8889         (emit_setmem_word_loop): Rename to ...
8890         (emit_setmem_doubleword_loop): ... this.
8891         (nds32_gen_dup_4_byte_to_word_value): New function.
8892         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8893         (nds32_expand_setmem_loop): Refine implementation.
8894         (nds32_expand_setmem_loop_v3m): Ditto.
8895         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8896         pattern.
8898 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8900         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8902 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8904         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8905         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8906         machine->attr_no_prologue_p.
8907         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8908         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8909         (nds32_expand_epilogue): Consider attr_naked_p.
8910         (nds32_expand_epilogue_v3pop): Likewise.
8911         (nds32_can_use_return_insn): Likewise.
8912         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8913         attr_no_prologue_p fields.
8914         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8916 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8918         PR target/85918
8919         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8920         attributes.
8921         * config/i386/sse.md
8922         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8923         Rename to ...
8924         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8925         ... this.
8926         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8927         Rename to ...
8928         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8929         ... this.
8930         (*<floatsuffix>floatv2div2sf2): Rename to ...
8931         (*float<floatunssuffix>v2div2sf2): ... this.
8932         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8933         (float<floatunssuffix>v2div2sf2_mask): ... this.
8934         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8935         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8936         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8937         to ...
8938         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8939         ... this.
8940         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8941         Rename to ...
8942         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8943         ... this.
8944         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8945         Rename to ...
8946         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8947         ... this.
8948         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8949         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8950         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8951         gen_ufix_truncv8dfv8si2.
8952         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8953         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8954         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8955         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8956         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8957         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8958         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8959         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8961 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8963         PR target/85900
8964         PR target/85345
8965         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8967 2018-05-25  Jim Wilson  <jimw@sifive.com>
8969         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8970         * config/riscv/riscv.c (struct machine_function): Add
8971         interrupt_handler_p and attribute_checked_p fields.
8972         (riscv_attribute_table): Add interrupt.
8973         (riscv_interrupt_type_p): New.
8974         (riscv_save_reg_p): Save extra regs for interrupt handler.
8975         (riscv_use_save_libcall): Return false  for interrupt handler.
8976         (riscv_first_stack_step): Add forward declaration.
8977         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8978         for interrupt handler with large frame.  Use it for saved reg list.
8979         (riscv_expand_prologue): Move flag_stack_usage_info support to
8980         eliminate duplication.
8981         (riscv_expand_epilogue): Generate mret for interrupt handler.
8982         (riscv_epilogue_uses): New.
8983         (riscv_can_use_return_insn): Return false for interrupt handler.
8984         (riscv_function_ok_for_sibcall): Likewise.
8985         (riscv_set_current_function): Add interrupt handler support.
8986         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8987         * config/riscv/riscv.md (UNSPECV_MRET): New.
8988         (GP_REGNUM): New.
8989         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8990         (riscv_mret): New.
8991         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8993 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8995         PR tree-optimization/85712
8996         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8997         this candidate has already been replaced in-situ by a copy.
8999 2018-05-25  Jason Merrill  <jason@redhat.com>
9001         PR c++/80485 - inline function non-zero address.
9002         * symtab.c (nonzero_address): Check DECL_COMDAT.
9004 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9006         PR target/83628
9007         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9008         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9009         extension of SImode operation.  Use const123_operand predicate.
9010         (*saddsi_1): Remove.
9011         (*saddl_se_1): Ditto.
9012         (*ssubsi_1): Ditto.
9013         (*ssubl_se_1): Ditto.
9014         * config/alpha/predicates.md (const123_operand): New predicate.
9015         * config/alpha/constraints.md (P): Use IN_RANGE.
9017 2018-05-25  Richard Biener  <rguenther@suse.de>
9019         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9020         defaulted to true.
9021         (ref_maybe_used_by_stmt_p): Likewise.
9022         (stmt_may_clobber_ref_p): Likewise.
9023         (stmt_may_clobber_ref_p_1): Likewise.
9024         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9025         and pass it along.
9026         (ref_maybe_used_by_stmt_p): Likewise.
9027         (stmt_may_clobber_ref_p): Likewise.
9028         (stmt_may_clobber_ref_p_1): Likewise.
9029         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9030         the alias oracle to disambiguate DRs with stmts DR analysis
9031         couldn't handle.
9032         (vect_analyze_data_refs): Do not give up on not analyzable
9033         DRs for BB vectorization.  Remove code truncating the dataref
9034         vector.
9036 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9038         PR target/85832
9039         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9040         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9041         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9043 2018-05-25  Richard Biener  <rguenther@suse.de>
9045         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9046         function, combining stmt data ref gathering and fatal analysis
9047         parts.
9048         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9049         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9050         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9051         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9052         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9054 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9056         PR tree-optimization/85720
9057         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9058         SCC if all partitions are builtins.
9059         (version_loop_by_alias_check): New parameter.  Generate cancelable
9060         runtime alias check if all partitions are builtins.
9061         (distribute_loop): Update call to above function.
9063 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9065         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9066         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9067         (parm_default_def_partition_arg): Ditto.
9068         (set_parm_default_def_partition): Ditto.
9069         (get_parm_default_def_partitions): Ditto and make it static.
9070         (get_undefined_value_partitions): Ditto and make it static.
9071         (remove_ssa_form): Refactor call to init_var_map here.
9072         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9073         computation for loop region.
9074         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9075         (register_default_def): Delete.
9076         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9077         (parm_default_def_partition_arg): Ditto.
9078         (set_parm_default_def_partition): Ditto.
9079         (get_parm_default_def_partitions): Ditto and make it static.
9080         (get_undefined_value_partitions): Ditto and make it static.
9081         (coalesce_with_default, coalesce_with_default): Update comment.
9082         (create_coalesce_list_for_region): New func factored out from
9083         create_outofssa_var_map.
9084         (populate_coalesce_list_for_outofssa): New func factored out from
9085         create_outofssa_var_map and coalesce_ssa_name.
9086         (create_outofssa_var_map): Delete.
9087         (coalesce_ssa_name): Refactor to support live range computation.
9088         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9089         (get_parm_default_def_partitions): Delete.
9090         (get_undefined_value_partitions): Ditto.
9091         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9092         computation for loop region.
9093         (new_tree_live_info, loe_visit_block): Ditto.
9094         (live_worklist, set_var_live_on_entry): Ditto.
9095         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9096         * tree-ssa-live.h (struct _var_map): New fields.
9097         (init_var_map): Change decl.
9098         (region_contains_p): New.
9100 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9102         * tree-ssa-live.h (live_merge_and_clear): Delete.
9104 2018-05-25  Richard Biener  <rguenther@suse.de>
9106         PR c++/85912
9107         * tree-dump.c (dequeue_and_dump): Remove access to removed
9108         operand 2 of a SWITCH_EXPR.
9110 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9112         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9113         multiplication and division.
9114         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9115         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9116         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9117         (cond_udiv_optab, cond_umod_optab): New optabs.
9118         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9119         (IFN_COND_RDIV): New internal functions.
9120         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9121         TRUNC_MOD_EXPR and RDIV_EXPR.
9122         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9123         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9124         New unspecs.
9125         (SVE_INT_BINARY): Include mult.
9126         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9127         (optab, sve_int_op): Handle mult.
9128         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9129         UNSPEC_COND_DIV.
9130         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9131         for SVE_INT_BINARY_SD.
9133 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9135         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9136         (optab, sve_int_op): Handle div and udiv.
9137         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9138         for SVE_INT_BINARY_SD.
9139         (*<optab><mode>3): New insn for the same.
9141 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9143         * tree-vect-patterns.c: Include predict.h.
9144         (vect_recog_divmod_pattern): Restrict check for division support
9145         to when optimizing for size.
9147 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9149         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9150         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9151         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9152         (gimple_match_op::set_op): Likewise.
9153         (gimple_resimplify4): Declare.
9154         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9155         (expr::gen_transform): Likewise.
9156         (decision_tree::gen): Generate a simplification routine for 4 operands.
9157         * gimple-match-head.c (gimple_simplify): Add an overload for
9158         4 operands.  In the top-level function, handle up to 4 call
9159         arguments and call gimple_resimplify4.
9160         (gimple_resimplify4): New function.
9161         (build_call_internal): Pass a fourth operand.
9162         (maybe_push_to_seq): Likewise.
9163         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9164         Fold VEC_COND_EXPRs of an operation and a default value into
9165         an IFN_COND_* function if possible.
9166         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9167         New unspecs.
9168         (SVE_COND_FP_BINARY): Include them.
9169         (optab, sve_fp_op): Handle them.
9170         (SVE_INT_BINARY_REV): New code iterator.
9171         (SVE_COND_FP_BINARY_REV): New int iterator.
9172         (commutative): New int attribute.
9173         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9174         Declare.
9175         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9176         function.
9177         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9178         (*cond_<optab><mode>): New patterns for reversed operands.
9180 2018-05-25  Richard Biener  <rguenther@suse.de>
9182         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9183         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9184         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9185         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9186         * tree-vect-data-refs.c (everywhere): Adjust users.
9187         * tree-vect-loop.c (everywhere): Likewise.
9188         * tree-vect-slp.c (everywhere): Likewise.
9189         * tree-vect-stmts.c (everywhere): Likewise.
9190         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9192 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9194         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9195         Rename to...
9196         (gcc_cv_as_section_exclude): ... this.
9197         Try Solaris as #exclude syntax.
9198         * configure: Regenerate.
9199         * config.in: Regenerate.
9200         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9201         SECTION_EXCLUDE.
9202         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9203         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9205         * varasm.c (default_elf_asm_named_section): Don't check if
9206         HAVE_GAS_SECTION_EXCLUDE is defined.
9208 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9210         * doc/md.texi: Update the documentation of the cond_* optabs
9211         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9212         Describe the scalar case too.
9213         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9214         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9215         instead of 2.
9216         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9217         (get_conditional_internal_fn): Update comment.
9218         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9219         accumulator value as a final argument to conditional functions.
9220         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9221         a define_expand and add an "else" operand.  Assert for now that
9222         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9223         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9224         (*cond_<optab><mode>): New patterns.
9225         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9226         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9227         (UNSPEC_COND_EOR): Delete.
9228         (optab): Remove associated mappings.
9229         (SVE_INT_BINARY): New code iterator.
9230         (sve_int_op): Remove int attribute and add "minus" to the code
9231         attribute.
9232         (SVE_COND_INT_OP): Delete.
9233         (SVE_COND_FP_OP): Rename to...
9234         (SVE_COND_FP_BINARY): ...this.
9236 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9238         * optabs.c (can_reuse_operands_p): New function.
9239         (maybe_legitimize_operands): Try to reuse the results for
9240         earlier operands.
9242 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9244         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9245         Add {q} suffix to insn mnemonic.
9247 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9249         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9250         (msp430_warn_func_return): New.
9252 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9254         * fold-const.c (tree_nonzero_bits): New function.
9255         * fold-const.h (tree_nonzero_bits): Likewise.
9256         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9257         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9259 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9261         PR target/85900
9262         PR target/85345
9263         * varasm.c (assemble_alias): Check ifunc_resolver only on
9264         FUNCTION_DECL.
9266 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9268         PR target/85903
9269         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9270         when memory input operand is handled.
9272 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9274         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9275         global.
9276         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9278 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9280         * match.pd: Delay FMA folds until after vectorization.
9282 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9284         PR target/83009
9285         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9286         address check not strict.
9288 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9290         * gimple-match.h (gimple_match_op): New class.
9291         (mprts_hook): Replace parameters with a gimple_match_op *.
9292         (maybe_build_generic_op): Likewise.
9293         (gimple_simplified_result_is_gimple_val): Replace parameters with
9294         a const gimple_match_op *.
9295         (gimple_simplify): Replace code_helper * and tree * parameters with
9296         a gimple_match_op * parameter.
9297         (gimple_resimplify1): Replace code_helper *, tree and tree *
9298         parameters with a gimple_match_op * parameter.
9299         (gimple_resimplify2): Likewise.
9300         (gimple_resimplify3): Likewise.
9301         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9302         parameters with a gimple_match_op * parameter.
9303         * gimple-match-head.c (gimple_simplify): Change prototypes of
9304         auto-generated functions to take a gimple_match_op * instead of
9305         separate code_helper * and tree * parameters.  Make the same
9306         change in the top-level overload and update calls to the
9307         gimple_resimplify routines.  Update calls to the auto-generated
9308         functions and to maybe_push_res_to_seq in the publicly-facing
9309         operation-specific gimple_simplify overloads.
9310         (gimple_match_op::MAX_NUM_OPS): Define.
9311         (gimple_resimplify1): Replace rcode and ops with a single res_op
9312         parameter.  Update call to gimple_simplify.
9313         (gimple_resimplify2): Likewise.
9314         (gimple_resimplify3): Likewise.
9315         (mprts_hook): Replace parameters with a gimple_match_op *.
9316         (maybe_build_generic_op): Likewise.
9317         (build_call_internal): Replace type, nargs and ops with
9318         a gimple_match_op *.
9319         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9320         with a single gimple_match_op *.  Update calls to mprts_hook,
9321         build_call_internal and gimple_simplified_result_is_gimple_val.
9322         Factor out code that is common to the tree_code and combined_fn cases.
9323         * genmatch.c (expr::gen_transform): Replace tem_code and
9324         tem_ops with a gimple_match_op called tem_op.  Update calls
9325         to the gimple_resimplify functions and maybe_push_res_to_seq.
9326         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9327         res_ops.  Update call to the gimple_resimplify functions.
9328         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9329         (decision_tree::gen): Make the functions take a gimple_match_op *
9330         called res_op instead of separate res_code and res_ops parameters.
9331         Update call accordingly.
9332         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9333         and ops with a single res_op parameter.  Update calls to
9334         maybe_build_generic_op and maybe_push_res_to_seq.
9335         (fold_stmt_1): Update calls to gimple_simplify and
9336         replace_stmt_with_simplification.
9337         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9338         and gimple_simplified_result_is_gimple_val.
9339         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9340         gimple_simplify.
9341         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9342         with a gimple_match_op *.
9343         (vn_nary_build_or_lookup): Likewise.  Update call to
9344         vn_nary_build_or_lookup_1.
9345         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9346         gimple_match_op *.  Update calls to the gimple_resimplify routines
9347         and to gimple_simplified_result_is_gimple_val.
9348         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9349         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9350         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9351         (visit_nary_op): Likewise.
9352         (visit_reference_op_load): Likewise.
9354 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9356         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9357         modifier for printing the step amount.
9359 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9361         PR target/78849
9362         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9363         types.
9365 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9367         * doc/sourcebuild.texi (Endianness): New subsubsection.
9369 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9371         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9372         <prefetch_dynamic_strides>: New const bool field.
9373         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9374         prefetch_dynamic_strides.
9375         (exynosm1_prefetch_tune): Likewise.
9376         (thunderxt88_prefetch_tune): Likewise.
9377         (thunderx_prefetch_tune): Likewise.
9378         (thunderx2t99_prefetch_tune): Likewise.
9379         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9380         false.
9381         (aarch64_override_options_internal): Update to set
9382         PARAM_PREFETCH_DYNAMIC_STRIDES.
9383         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9384         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9385         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9386         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9387         prefetch-dynamic-strides setting.
9389 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9391         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9392         <minimum_stride>: New const int field.
9393         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9394         minimum_stride field defaulting to -1.
9395         (exynosm1_prefetch_tune): Likewise.
9396         (thunderxt88_prefetch_tune): Likewise.
9397         (thunderx_prefetch_tune): Likewise.
9398         (thunderx2t99_prefetch_tune): Likewise.
9399         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9400         <default_opt_level>: Set to 3.
9401         (aarch64_override_options_internal): Update to set
9402         PARAM_PREFETCH_MINIMUM_STRIDE.
9403         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9404         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9405         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9406         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9407         stride is constant and is below the minimum stride threshold.
9409 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9411         * config/arm/arm-cpus.in (mode26): Delete.
9412         (armv4): Delete mode26 reference.
9413         * config/arm/arm.c (arm_configure_build_target): Delete use of
9414         isa_bit_mode26.
9416 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9418         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9419         New insn pattern.
9420         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9421         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9422         for non-SSE modes.
9423         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9424         (floatunsdidf2): Ditto.
9426 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9428         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9429         (fixuns_trunc<mode>si2_avx512f): Ditto.
9430         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9431         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9432         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9434 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9436         PR rtl-optimization/79985
9437         * df-scan.c (df_insn_refs_collect): Remove special case for
9438         global registers and asm statements.
9440 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9442         * extend.texi (Global Register Variables): Rewrite the bullet list.
9443         Note that the register is available for allocation. Note that access
9444         via inline asm must use constraints. Add note about async-signal
9445         handlers. Remove paragraph about automagic register selection.
9447 2018-05-23  Richard Biener  <rguenther@suse.de>
9449         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9450         of fixed offset from memset VN.
9452 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9454         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9455         first_interp field.
9456         (alloc_cand_and_find_basis): Initialize first_interp field.
9457         (slsr_process_mul): Modify first_interp field.
9458         (slsr_process_add): Likewise.
9459         (slsr_process_cast): Modify first_interp field for each new
9460         interpretation.
9461         (slsr_process_copy): Likewise.
9462         (dump_candidate): Dump first_interp field.
9463         (replace_mult_candidate): Process all interpretations, not just
9464         subsequent ones.
9465         (replace_rhs_if_not_dup): Likewise.
9466         (replace_one_candidate): Likewise.
9468 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9470         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9471         Add new boolean.
9472         (aarch64_needs_frame_chain): New function.
9473         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9475 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9477         PR target/84882
9478         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9479         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9480         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9481         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9482         as true for strict-align.
9483         (aarch64_can_inline_p): Perform checks even when callee has no
9484         attributes to check for strict alignment.
9485         * doc/extend.texi (AArch64 Function Attributes): Document
9486         no-strict-align.
9487         * doc/invoke.texi: (AArch64 Options): Likewise.
9489 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9491         PR tree-optimization/85853
9492         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9493         the handling of the root of the node to...
9494         (vect_slp_analyze_node_operations_1): ...this new function,
9495         and run the whole thing with the child nodes' def types
9496         set according to their SLP node's def type.
9498 2018-05-23  Richard Biener  <rguenther@suse.de>
9500         PR middle-end/85874
9501         * tree-data-ref.c (create_runtime_alias_checks): Defer
9502         and ignore overflow warnings.
9504 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9506         PR tree-optimization/85822
9507         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9508         constants.
9510 2018-05-23  Richard Biener  <rguenther@suse.de>
9512         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9513         memset constants via native_interpret_expr.
9515 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9517         PR target/85345
9518         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9519         attribute.
9520         (cgraph_node::create_alias): Likewise.
9521         (cgraph_node::get_availability): Check ifunc_resolver instead
9522         of looking up ifunc attribute.
9523         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9524         * varasm.c (do_assemble_alias): Likewise.
9525         (assemble_alias): Likewise.
9526         (default_binds_local_p_3): Likewise.
9527         * cgraph.h (cgraph_node): Add ifunc_resolver.
9528         (cgraph_node::only_called_directly_or_aliased_p): Return false
9529         for IFUNC resolver.
9530         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9531         attribute.
9532         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9533         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9534         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9535         instead of looking up ifunc attribute.
9537 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9539         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9541 2018-05-22  Martin Sebor  <msebor@redhat.com>
9543         PR middle-end/85359
9544         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9545         only when expasion succeeds.
9546         (expand_builtin_strcmp): Same.
9547         (expand_builtin_strncmp): Same.
9549 2018-05-22  Martin Sebor  <msebor@redhat.com>
9551         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9553 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9554             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9556         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9557         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9558         code.
9559         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9560         Add check for legitimate_address.
9561         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9562         (aarch64_swap_ldrstr_operands): New.
9563         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9564         Define prototype.
9566 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9567             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9569         * config/aarch64/aarch64.md: New patterns to generate stp
9570         and ldp.
9571         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9572         single words and double words.
9573         (load_pair_sw, load_pair_dw): Likewise.
9574         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9575         Delete.
9576         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9577         Delete.
9578         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9579         for different mode ldpstp and add peephole for merged zero stores.
9580         Likewise for loads.
9581         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9582         Add size check.
9583         (aarch64_gen_store_pair): Rename calls to match new patterns.
9584         (aarch64_gen_load_pair): Rename calls to match new patterns.
9585         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9586         (load_pair<DREG:mode><DREG2:mode>): ... This.
9587         (store_pair<mode>): Rename to...
9588         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9589         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9590         New mode iterators.
9591         (V_INT_EQUIV): Handle SImode.
9592         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9593         New predicate.
9595 2018-05-22  Martin Sebor  <msebor@redhat.com>
9597         PR c/85623
9598         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9599         or ajust the presumed bound on an operation to avoid unnecessary
9600         warnings.
9602 2018-05-22  Martin Sebor  <msebor@redhat.com>
9604         PR tree-optimization/85826
9605         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9606         assuming that a DECL necesarily has a constant size.
9608 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9610         PR middle-end/85862
9611         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9613 2018-05-22  Richard Biener  <rguenther@suse.de>
9615         PR tree-optimization/85834
9616         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9617         non-constant and non-zero memset arguments.
9619 2018-05-22  Martin Liska  <mliska@suse.cz>
9621         PR ipa/85607
9622         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9624 2018-05-22  Richard Biener  <rguenther@suse.de>
9626         PR tree-optimization/85863
9627         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9628         comparisons when vectype is specified.
9629         (vectorizable_condition): Do not specify vectype for
9630         vect_is_simple_cond when SLP vectorizing.
9632 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9634         PR target/85657
9635         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9636         define __ibm128 as long double.
9637         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9638         as a distinct type when IEEE 128-bit support is enabled.
9639         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9640         128-bit types to use the correct functions.
9641         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9642         convert between 128-bit floating point types that have different
9643         modes but the same representation, instead of using gen_lowpart to
9644         makean alias.
9645         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9646         KFmode.
9647         (IFKF_reg): New attributes to give the register constraints for
9648         IFmode and KFmode.
9649         (extend<mode>tf2_internal): New insns to mark an explicit
9650         conversion between 128-bit floating point types that have a
9651         different mode but share the same representation.
9653 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9655         PR tree-optimization/85814
9656         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9657         a null return from get_strinfo when unsharing the next
9658         strinfo in the chain.
9660 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9662         PR gcc/84923
9663         * varasm.c (weak_finish): Clean up weak_decls.
9665 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9667         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9668         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9669         UNSPEC_UADALP values.
9670         * config/aarch64/iterators.md (ABAL): New int iterator.
9671         (ABDL2): Likewise.
9672         (ADALP): Likewise.
9673         (sur): Add mappings for the above.
9674         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9675         New define_insn.
9676         (aarch64_<sur>abal<mode>_4): Likewise.
9677         (aarch64_<sur>adalp<mode>_3): Likewise.
9678         (<sur>sadv16qi): New define_expand.
9680 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9682         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9683         (*movdf_internal): Ditto.
9684         (*rcpsf2_sse): Ditto.
9685         (*rsqrtsf2_sse): Ditto.
9686         (*sqrt<mode>2_sse): Ditto.
9688 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9690         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9691         eor3q<mode>4.
9692         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9693         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9694         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9695         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9696         vbcaxq_s64): New.
9697         * config/aarch64/arm_neon.h: Likewise.
9698         * config/aarch64/iterators.md (VQ_I): New.
9700 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9702         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9703         arc*-*-linux*.
9704         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9705         MULTILIB_DIRNAMES
9707 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9709         * config/nds32/constraints.md (S): New constraint.
9710         * config/nds32/nds32.md (call_internal): Use constraint S.
9711         (call_value_internal): Likewise.
9712         (sibcall_internal): Likewise.
9713         (sibcall_value_internal): Likewise.
9715 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9716             Chung-Ju Wu  <jasonwucj@gmail.com>
9718         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9719         into consideration.
9721 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9722             Chung-Ju Wu  <jasonwucj@gmail.com>
9724         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9725         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9726         (nds32_rtx_costs_impl): Simplify.
9727         (nds32_address_cost_impl): Simplify.
9728         (nds32_init_rtx_costs): New function.
9729         (nds32_rtx_costs_speed_prefer): Likewise.
9730         (nds32_rtx_costs_size_prefer): Likewise.
9731         (nds32_address_cost_speed_prefer): Likewise.
9732         (nds32_address_cost_speed_fwprop): Likewise.
9733         (nds32_address_cost_size_prefer): Likewise.
9734         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9735         * config/nds32/nds32.c (nds32_option_override): Use
9736         nds32_init_rtx_costs function.
9738 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9740         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9741         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9742         (TARGET_PIPELINE_N8): Likewise.
9743         (TARGET_PIPELINE_N10): Likewise.
9744         (TARGET_PIPELINE_N13): Likewise.
9745         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9747 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9749         * config/nds32/nds32-fpu.md: Update copyright year.
9751 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9753         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9755 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9757         * config/nds32/nds32.c
9758         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9759         * config/nds32/nds32.opt (minline-asm-r15): New option.
9761 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9763         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9764         MASK_HW_ABS.
9765         * config/nds32/nds32.md (abssi2): New pattern.
9767 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9769         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9770         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9771         Merge insn pattern from sse_cvtsi2ss<round_name> and
9772         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9773         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9774         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9775         using SWI48 mode iterator.
9776         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9777         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9778         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9779         pattern from sse_cvttss2si<round_saeonly_name>
9780         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9781         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9782         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9783         using SWI48 mode iterator.
9784         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9785         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9786         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9787         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9788         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9789         using SWI48 mode iterator.
9790         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9791         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9792         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9793         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9794         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9795         SWI48 mode iterator.
9796         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9797         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9798         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9799         pattern from sse_cvttsd2si<round_saeonly_name>
9800         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9802 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9804         * config/nds32/nds32-md-auxiliary.c
9805         (nds32_valid_smw_lwm_base_p): Refine.
9806         (nds32_output_smw_single_word): Refine.
9807         (nds32_output_smw_double_word): New.
9808         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9810 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9812         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9813         (nds32_output_stack_pop): Refine.
9814         (nds32_expand_unaligned_load): Refine.
9815         (nds32_expand_unaligned_store): Refine.
9817 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9818             Chung-Ju Wu  <jasonwucj@gmail.com>
9820         * config/nds32/constants.md: Add TP_REGNUM constant.
9821         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9822         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9823         UNSPEC_ADD32.
9824         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9825         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9826         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9827         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9828         and PIC code generation.
9829         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9830         code generation.
9831         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9832         optimization.
9833         * config/nds32/nds32.md: Support TLS and PIC.
9834         * config/nds32/nds32.c: Support TLS and PIC.
9835         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9836         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9837         predicate.
9839 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9841         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9842         mode with E_ prefix.
9844 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9845             Chung-Ju Wu  <jasonwucj@gmail.com>
9847         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9848         * config/nds32/nds32-md-auxiliary.c
9849         (symbolic_reference_mentioned_p): New.
9850         (nds32_legitimize_ict_address): New.
9851         (nds32_expand_ict_move): New.
9852         (nds32_indirect_call_referenced_p): New.
9853         (nds32_symbol_binds_local_p): Delete.
9854         (nds32_long_call_p): Modify.
9855         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9856         * config/nds32/nds32-protos.h
9857         (symbolic_reference_mentioned_p): Declare.
9858         (nds32_legitimize_ict_address): Declare.
9859         (nds32_expand_ict_move): Declare.
9860         (nds32_indirect_call_referenced_p): Declare.
9861         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9862         (nds32_relax_group): Use nds32_ict_const_p as condition.
9863         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9864         (nds32_asm_file_start): Output ict_model directive in asm code.
9865         (nds32_legitimate_address_p): Consider indirect call.
9866         (nds32_print_operand): Consider indirect call.
9867         (nds32_print_operand_address): Consider indirect call.
9868         (nds32_insert_attributes): Handle "indirect_call" attribute.
9869         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9870         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9871         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9872         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9873         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9874         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9875         (TARGET_ICT_MODEL_SMALL): Define.
9876         (TARGET_ICT_MODEL_LARGE): Define.
9877         * config/nds32/nds32.md (movsi): Consider ict model.
9878         (call, call_value): Consider ict model.
9879         (sibcall, sibcall_value): Consider ict model.
9880         * config/nds32/nds32.opt (mict-model): New option.
9881         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9882         model.
9884 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9885             Monk Chiang  <sh.chiang04@gmail.com>
9886             Jim Wilson <jimw@sifive.com>
9888         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9889         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9890         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9891         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9892         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9893         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9894         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9895         compute save_libcall_adjustment properly.
9896         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9897         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9898         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9899         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9900         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9901         (ABI_SPEC): Handle mabi=ilp32e.
9902         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9903         (RVE): Add RVE mask.
9904         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9905         <-march>: Add rv32e as an example.
9907 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9909         PR c++/82899
9910         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9911         (intra_create_variable_infos): Handle C++ constructors.
9913 2018-05-18  Martin Liska  <mliska@suse.cz>
9915         * passes.def: Remove a redundant pass.
9917 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9919         PR bootstrap/85838
9920         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9922 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9924         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9925         (ARMv4): Update.
9926         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9927         (ARMv6m): Update.
9928         (armv2, armv2a, armv3, armv3m): Delete architectures.
9929         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9930         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9931         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9932         Delete cpus.
9933         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9934         (*mulsidi3adddi): Likewise.
9935         (mulsidi3): Likewise.
9936         (*mulsidi3_nov6): Likewise.
9937         (umulsidi3): Likewise.
9938         (umulsidi3_nov6): Likewise.
9939         (umaddsidi4): Likewise.
9940         (*umulsidi3adddi): Likewise.
9941         (smulsi3_highpart): Likewise.
9942         (*smulsi3_highpart_nov6): Likewise.
9943         (umulsi3_highpart): Likewise.
9944         (*umulsi3_highpart_nov6): Likewise.
9945         * config/arm/arm.h (arm_arch3m): Delete.
9946         * config/arm/arm.c (arm_arch3m): Delete.
9947         (arm_option_override_internal): Update armv3-related comment.
9948         (arm_configure_build_target): Delete use of isa_bit_mode32.
9949         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9950         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9951         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9952         (mulsa3): Likewise.
9953         (mulusa3): Likewise.
9954         * config/arm/arm-protos.h (arm_arch3m): Delete.
9955         * config/arm/arm-tables.opt: Regenerate.
9956         * config/arm/arm-tune.md: Likewise.
9957         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9958         deleted architectures.
9960 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9962         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9963         (armv5t, armv5te): New features.
9964         (ARMv5, ARMv5e): Delete fgroups.
9965         (ARMv5t, ARMv5te): Adjust for above changes.
9966         (ARMv6m): Likewise.
9967         (armv5, armv5e): Delete arches.
9968         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9969         arm_arch5.
9970         (*call_reg_arm): Likewise.
9971         (*call_value_reg_armv5): Likewise.
9972         (*call_value_reg_arm): Likewise.
9973         (*call_symbol): Likewise.
9974         (*call_value_symbol): Likewise.
9975         (*sibcall_insn): Likewise.
9976         (*sibcall_value_insn): Likewise.
9977         (clzsi2): Likewise.
9978         (prefetch): Likewise.
9979         (define_split and define_peephole2 dependent on arm_arch5):
9980         Likewise.
9981         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9982         arm_arch5e.
9983         (TARGET_ARM_QBIT): Likewise.
9984         (TARGET_DSP_MULTIPLY): Likewise.
9985         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9986         (arm_arch5, arm_arch5e): Delete.
9987         (arm_arch5t, arm_arch5te): Declare.
9988         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9989         (arm_arch5t): Declare.
9990         (arm_option_reconfigure_globals): Update for the above.
9991         (arm_options_perform_arch_sanity_checks): Update comment, replace
9992         use of arm_arch5 with arm_arch5t.
9993         (use_return_insn): Likewise.
9994         (arm_emit_call_insn): Likewise.
9995         (output_return_instruction): Likewise.
9996         (arm_final_prescan_insn): Likewise.
9997         (arm_coproc_builtin_available): Likewise.
9998         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9999         arm_arch5e with arm_arch5t and arm_arch5te.
10000         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10001         (arm_arch5t, arm_arch5te): Declare.
10002         * config/arm/arm-tables.opt: Regenerate.
10003         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10004         * config/arm/t-multilib: Likewise.
10005         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10006         instead of arm_arch5.
10007         (*call_reg_thumb1): Likewise.
10008         (*call_value_reg_thumb1_v5): Likewise.
10009         (*call_value_reg_thumb1): Likewise.
10010         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10011         unreachable path.
10012         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10014 2018-05-18  Martin Liska  <mliska@suse.cz>
10016         PR gcov-profile/84846
10017         * doc/gcov.texi: Document -t option of gcov tool.
10019 2018-05-18  Martin Liska  <mliska@suse.cz>
10021         PR gcov-profile/84846
10022         * gcov.c (print_usage): Add new -t option.
10023         (process_args): Handle the option.
10024         (generate_results): Use stdout as output when requested by
10025         the option.
10027 2018-05-18  Martin Liska  <mliska@suse.cz>
10029         PR gcov-profile/84846
10030         * coverage.c (coverage_init): Write PWD to .gcno file.
10031         * doc/gcov.texi: Document how working directory is printed.
10032         * gcov-dump.c (dump_gcov_file): Print PWD.
10033         * gcov.c (output_intermediate_file): Likewise.
10034         (read_graph_file): Read PWD string.
10035         (output_lines): Print PWD.
10037 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10039         PR middle-end/85817
10040         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10041         for retval and return false if all args to phi are zero.
10043 2018-05-18  Richard Biener  <rguenther@suse.de>
10045         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10046         method.
10047         (evrp_dom_walker::before_dom_children): Call it.
10049 2018-05-18  Richard Biener  <rguenther@suse.de>
10051         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10052         results when processing array refs with variable index.
10054 2018-05-18  Toon Moene  <toon@moene.org>
10056         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10057         directly after that of -floop-interchange. Indicate that both
10058         options are enabled by default when specifying -O3.
10060 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10062         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10063         iterator.  Delete separate integer-mode vec_set<mode> expander.
10064         (aarch64_simd_vec_setv2di): Delete.
10065         (vec_setv2di): Delete.
10066         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10067         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10068         the "w, r" alternative.
10070 2018-05-18  Martin Liska  <mliska@suse.cz>
10072         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10073         * tree-pass.h (make_pass_lower_switch_O0): New function.
10074         * tree-switch-conversion.c (node_has_low_bound): Remove.
10075         (node_has_high_bound): Likewise.
10076         (node_is_bounded): Likewise.
10077         (class pass_lower_switch): Make it a template type and create
10078         two instances.
10079         (pass_lower_switch::execute): Add template argument.
10080         (make_pass_lower_switch): New function.
10081         (make_pass_lower_switch_O0): New function.
10082         (do_jump_if_equal): Remove.
10083         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10084         all the hard work to tree optimization passes.
10086 2018-05-18  Martin Liska  <mliska@suse.cz>
10088         * dbgcnt.c (limit_low): Renamed from limit.
10089         (limit_high): New variable.
10090         (dbg_cnt_is_enabled): Check for upper limit.
10091         (dbg_cnt): Adjust dumping.
10092         (dbg_cnt_set_limit_by_index): Add new argument for high
10093         value.
10094         (dbg_cnt_set_limit_by_name): Likewise.
10095         (dbg_cnt_process_single_pair): Parse new format.
10096         (dbg_cnt_process_opt): Use strtok.
10097         (dbg_cnt_list_all_counters): Remove 'value' and add
10098         'limit_high'.
10099         * doc/invoke.texi: Document changes.
10101 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10103         * doc/sourcebuild.texi (scalar_all_fma): Document.
10104         * tree.def (FMA_EXPR): Delete.
10105         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10106         * internal-fn.c (ternary_direct): New macro.
10107         (expand_ternary_optab_fn): Likewise.
10108         (direct_ternary_optab_supported_p): Likewise.
10109         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10110         * builtins.c (fold_builtin_fma): Delete.
10111         (fold_builtin_3): Don't call it.
10112         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10113         * expr.c (expand_expr_real_2): Likewise.
10114         * fold-const.c (operand_equal_p): Likewise.
10115         (fold_ternary_loc): Likewise.
10116         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10117         * gimple.c (DEFTREECODE): Likewise.
10118         * gimplify.c (gimplify_expr): Likewise.
10119         * optabs-tree.c (optab_for_tree_code): Likewise.
10120         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10121         * tree-eh.c (operation_could_trap_p): Likewise.
10122         (stmt_could_throw_1_p): Likewise.
10123         * tree-inline.c (estimate_operator_cost): Likewise.
10124         * tree-pretty-print.c (dump_generic_node): Likewise.
10125         (op_code_prio): Likewise.
10126         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10127         * tree-ssa-operands.c (get_expr_operands): Likewise.
10128         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10129         * fold-const-call.h (fold_fma): Delete.
10130         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10131         CFN_FNMA and CFN_FNMS.
10132         (fold_fma): Delete.
10133         * genmatch.c (combined_fn): New enum.
10134         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10135         (commutative_op): New function.
10136         (commutate): Use it.  Handle more than 2 operands.
10137         (dt_operand::gen_gimple_expr): Use commutative_op.
10138         (parser::parse_expr): Allow :c to be used with non-binary
10139         operators if the commutative operand is known.
10140         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10141         CFN_FMS, CFN_FNMA and CFN_FNMS.
10142         (backprop::process_assign_use): Remove FMA_EXPR handling.
10143         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10144         (gen_hsa_fma): New function.
10145         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10146         IFN_FNMA and IFN_FNMS.
10147         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10148         * gimple-fold.h (follow_all_ssa_edges): Declare.
10149         * gimple-fold.c (follow_all_ssa_edges): New function.
10150         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10151         gimple_build interface and use follow_all_ssa_edges to fold the result.
10152         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10153         instead of checking for optabs directly.
10154         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10155         rather than FMA_EXPRs.
10156         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10157         call to IFN_FMA instead of an FMA_EXPR.
10159 2018-05-17  Jim Wilson  <jimw@sifive.com>
10161         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10162         sign extended promoted subreg, and the range does not have the sign bit
10163         set, then do a sign extend.
10165         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10166         test, check for sign extended subreg and/or constant operands, and
10167         do a sign extend in that case.
10169 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10171         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10172         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10173         Add untyped.
10174         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10175         Change logics_shift_reg to logics_shift_imm.
10176         (thunderx2t99_fp_loadpair_basic): Delete.
10177         (thunderx2t99_fp_storepair_basic): Delete.
10178         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10179         (thunderx2t99_asimd_polynomial): Delete.
10180         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10181         and neon_fp_mul_d_scalar_q.
10182         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10183         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10184         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10185         (thunderx2t99_asimd_lut): Add missing tbl types.
10186         (thunderx2t99_asimd_ext): Delete.
10187         (thunderx2t99_asimd_load1_1_mult): Delete.
10188         (thunderx2t99_asimd_load1_2_mult): Delete.
10189         (thunderx2t99_asimd_load1_ldp): New.
10190         (thunderx2t99_asimd_load1): New.
10191         (thunderx2t99_asimd_load2): Add missing *load2* types.
10192         (thunderx2t99_asimd_load3): New.
10193         (thunderx2t99_asimd_load4): New.
10194         (thunderx2t99_asimd_store1_1_mult): Delete.
10195         (thunderx2t99_asimd_store1_2_mult): Delete.
10196         (thunderx2t99_asimd_store2_mult): Delete.
10197         (thunderx2t99_asimd_store2_onelane): Delete.
10198         (thunderx2t99_asimd_store_stp): New.
10199         (thunderx2t99_asimd_store1): New.
10200         (thunderx2t99_asimd_store2): New.
10201         (thunderx2t99_asimd_store3): New.
10202         (thunderx2t99_asimd_store4): New.
10204 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10206         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10207         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10209 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10210             Segher Boessenkool  <segher@kernel.crashing.org>
10212         PR target/85698
10213         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10214         operand.
10216 2018-05-17  Richard Biener  <rguenther@suse.de>
10218         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10219         for pruning loop and prune defs feeding only already visited PHIs.
10221 2018-05-17  Richard Biener  <rguenther@suse.de>
10223         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10225 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10226             Richard Biener  <rguenther@suse.de>
10228         PR tree-optimization/85793
10229         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10230         for VMAT_ELEMENTWISE.
10232 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10234         * internal-fn.h (lookup_internal_fn): Declare
10235         * internal-fn.c (lookup_internal_fn): New function.
10236         * gimple.c (gimple_build_call_from_tree): Handle calls to
10237         internal functions.
10238         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10239         internal function names.
10240         * tree-pretty-print.c (dump_generic_node): Likewise.
10241         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10243 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10245         * gimple-fold.h (gimple_build): Make the function forms take
10246         combined_fn rather than built_in_function.
10247         (gimple_simplify): Likewise.
10248         * gimple-match-head.c (gimple_simplify): Likewise.
10249         * gimple-fold.c (gimple_build): Likewise.
10250         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10251         rather than gimple_build_call_internal.
10252         (get_initial_defs_for_reduction): Likewise.
10253         (vect_create_epilog_for_reduction): Likewise.
10254         (vectorizable_live_operation): Likewise.
10256 2018-05-17  Martin Liska  <mliska@suse.cz>
10258         * gimple-ssa-sprintf.c (format_directive): Do not use
10259         space in between 'G_' and '('.
10261 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10263         PR target/85323
10264         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10265         even if the mask is not all ones.
10267         PR target/85323
10268         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10269         vector.
10270         (ix86_gimple_fold_builtin): Likewise.
10272         PR target/85323
10273         * config/i386/i386.c: Include tree-vector-builder.h.
10274         (ix86_vector_shift_count): New function.
10275         (ix86_fold_builtin): Fold shift builtins by scalar count.
10276         (ix86_gimple_fold_builtin): Likewise.
10278         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10279         _mm512_setzero): New intrinsics.
10281 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10282             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10284         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10285         code generation for cases where splatting a value is not useful.
10286         * simplify-rtx.c (simplify_ternary_operation): Simplify
10287         vec_merge across a vec_duplicate and a paradoxical subreg forming
10288         a vector mode to a vec_concat.
10290 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10292         * config.gcc: Support "goldmont-plus".
10293         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10294         "goldmont-plus".
10295         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10296         PROCESSOR_GOLDMONT_PLUS.
10297         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10298         (processor_target_table): Add "goldmont-plus".
10299         (PTA_GOLDMONT_PLUS): Define.
10300         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10301         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10302         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10303         (fold_builtin_cpu): Add "goldmont-plus".
10304         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10305         (ix86_option_override_internal): Add "goldmont-plus".
10306         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10307         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10308         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10309         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10311 2018-05-17  Richard Biener  <rguenther@suse.de>
10313         PR tree-optimization/85757
10314         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10315         remove defs that only feed that PHI from further processing.
10317 2018-05-16  Jim Wilson  <jimw@sifive.com>
10319         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10320         asterisk to name.
10321         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10323 2018-05-16  Mark Wielaard  <mark@klomp.org>
10325         * dwarf2out.c (count_index_strings): New function.
10326         (output_indirect_strings): Call count_index_strings and generate
10327         header for dwarf_version >= 5.
10329 2018-05-16  Mark Wielaard  <mark@klomp.org>
10331         * dwarf2out.c (dwarf_FORM): New function.
10332         (set_indirect_string): Use dwarf_FORM.
10333         (reset_indirect_string): Likewise.
10334         (size_of_die): Likewise.
10335         (value_format): Likewise.
10336         (output_die): Likewise.
10337         (add_skeleton_AT_string): Likewise.
10338         (output_macinfo_op): Likewise.
10339         (index_string): Likewise.
10340         (output_index_string_offset): Likewise.
10341         (output_index_string): Likewise.
10342         (count_index_strings): Likewise.
10344 2018-05-16  Carl Love  <cel@us.ibm.com>
10346         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10347         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10349 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10351         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10352         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10354 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10356         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10357         (fnma<mode>4): Likewise.
10358         (fms<mode>4): Likewise.
10359         (fnms<mode>4): Likewise.
10360         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10361         (aarch64_fnma<mode>4): Likewise.
10362         (aarch64_fms<mode>4): Likewise.
10363         (aarch64_fnms<mode>4): Likewise.
10364         (aarch64_fnmadd<mode>4): Likewise.
10366 2018-05-16  Jason Merrill  <jason@redhat.com>
10368         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10370 2018-05-16  Richard Biener  <rguenther@suse.de>
10372         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10373         (dump_stmt_cost): Declare.
10374         (add_stmt_cost): Dump cost we add.
10375         (add_stmt_costs): New function.
10376         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10377         No longer exported.
10378         (vect_analyze_stmt): Adjust prototype.
10379         (vectorizable_condition): Likewise.
10380         (vectorizable_live_operation): Likewise.
10381         (vectorizable_reduction): Likewise.
10382         (vectorizable_induction): Likewise.
10383         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10384         cost vector to pass to vectorizable_ and record afterwards.
10385         (vect_model_reduction_cost): Take cost vector argument and adjust.
10386         (vect_model_induction_cost): Likewise.
10387         (vectorizable_reduction): Likewise.
10388         (vectorizable_induction): Likewise.
10389         (vectorizable_live_operation): Likewise.
10390         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10391         SLP_TREE_NUMBER_OF_VEC_STMTS.
10392         (vect_analyze_slp_cost_1): Remove.
10393         (vect_analyze_slp_cost): Likewise.
10394         (vect_slp_analyze_node_operations): Take visited args and
10395         a target cost vector.  Avoid processing already visited stmt sets.
10396         (vect_slp_analyze_operations): Use a local cost vector to gather
10397         costs and register those of non-discarded instances.
10398         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10399         (vect_schedule_slp_instance): Remove copying of
10400         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10401         zero.
10402         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10403         adding cost.  Record cost entry location.
10404         (vect_prologue_cost_for_slp_op): Function to compute cost of
10405         a constant or invariant generated for SLP vect in the prologue,
10406         split out from vect_analyze_slp_cost_1.
10407         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10408         (vect_model_promotion_demotion_cost): Likewise.
10409         (vect_model_store_cost): Likewise, make static.
10410         (vect_model_load_cost): Likewise.
10411         (vectorizable_bswap): Add cost vector arg and adjust.
10412         (vectorizable_call): Likewise.
10413         (vectorizable_simd_clone_call): Likewise.
10414         (vectorizable_conversion): Likewise.
10415         (vectorizable_assignment): Likewise.
10416         (vectorizable_shift): Likewise.
10417         (vectorizable_operation): Likewise.
10418         (vectorizable_store): Likewise.
10419         (vectorizable_load): Likewise.
10420         (vectorizable_condition): Likewise.
10421         (vectorizable_comparison): Likewise.
10422         (can_vectorize_live_stmts): Likewise.
10423         (vect_analyze_stmt): Likewise.
10424         (vect_transform_stmt): Adjust calls to vectorizable_*.
10425         * tree-vectorizer.c: Include gimple-pretty-print.h.
10426         (dump_stmt_cost): New function.
10428 2018-05-16  Richard Biener  <rguenther@suse.de>
10430         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10431         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10432         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10433         (check_name): New callback.
10434         (dse_classify_store): Track cycles via a visited bitmap of PHI
10435         defs and simplify handling of in-loop and across loop dead stores
10436         and properly fail for loop-variant refs.  Handle byte-tracking with
10437         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10438         limiting the walk.
10440 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10442         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10443         (vect_get_mask_type_for_stmt): Likewise.
10444         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10445         split out from...
10446         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10447         to determine the statement's vector type and the vector type that
10448         should be used for calculating nunits.  Deal with cases in which
10449         the type has to be deferred.
10450         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10451         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10452         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10453         (vect_determine_vf_for_stmt): New functions, split out from...
10454         (vect_determine_vectorization_factor): ...here.
10455         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10456         (vect_get_mask_type_for_stmt): New functions, split out from
10457         vect_determine_vectorization_factor.
10459 2018-05-16  Richard Biener  <rguenther@suse.de>
10461         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10462         verify the [VEC_]COND_EXPR embedded comparison.
10464 2018-05-15  Martin Sebor  <msebor@redhat.com>
10466         PR tree-optimization/85753
10467         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10468         RECORD_TYPE in addition to ARRAY_TYPE.
10470 2018-05-15  Martin Sebor  <msebor@redhat.com>
10472         PR middle-end/85643
10473         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10475 2018-05-15  Richard Biener  <rguenther@suse.de>
10477         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10478         add by_clobber_p one.  Change algorithm to collect all defs
10479         representing uses we need to walk and try reducing them to
10480         a single one before failing.
10481         (dse_dom_walker::dse_optimize_stmt): Adjust.
10483 2018-05-13  Mark Wielaard  <mark@klomp.org>
10485         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10486         (size_of_loc_descr): Likewise.
10487         (output_loc_operands): Likewise.
10488         (output_loc_operands_raw): Likewise.
10489         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10490         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10491         (hash_loc_operands): Likewise.
10492         (compare_loc_operands): Likewise.
10494 2018-05-14  Mark Wielaard  <mark@klomp.org>
10496         * dwarf2out.c (count_index_addrs): New function.
10497         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10499 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10501         PR tree-optimization/83648
10502         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10503         return value as malloc candidate.
10505 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10507         PR ipa/85734
10508         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10509         param as true in call to suggest_attribute.
10511 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10513         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10514         -mreadonly-in-sdata.
10516 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10518         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10519         New pattern.
10520         (aarch64_crypto_aesd_fused): Likewise.
10522 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10524         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10525         (movsi_aarch64): Likewise.
10526         (load_pairsi): Likewise.
10527         (load_pairdi): Likewise.
10528         (store_pairsi): Likewise.
10529         (store_pairdi): Likewise.
10530         (load_pairsf): Likewise.
10531         (load_pairdf): Likewise.
10532         (store_pairsf): Likewise.
10533         (store_pairdf): Likewise.
10534         (zero_extend): Likewise.
10535         (trunc): Swap alternatives.
10536         (fcvt_target): Add '?' to prefer w over r.
10538 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10540         PR target/85756
10541         * config/i386/i386.md: Disallow non-commutative arithmetics in
10542         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10543         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10544         in the peephole2 before it.
10546 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10548         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10549         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10550         (ix86_handle_option): Handle -mcldemote.
10551         * config.gcc: New header.
10552         * config/i386/cldemoteintrin.h: New file.
10553         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10554         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10555         -mcldemote.
10556         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10557         OPTION_MASK_ISA_CLDEMOTE.
10558         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10559         (ix86_valid_target_attribute_inner_p): Ditto.
10560         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10561         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10562         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10563         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10564         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10565         (cldemote): New.
10566         * config/i386/i386.opt: Add -mcldemote.
10567         * config/i386/x86intrin.h: New header.
10568         * doc/invoke.texi: Add -mcldemote.
10570 2018-05-14  Richard Biener  <rguenther@suse.de>
10572         * doc/match-and-simplify.texi: Adjust :s documentation.
10574 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10576         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10577         intended memcpy size.
10578         (REORDER_45): Likewise.
10580 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10582         * sort.cc: New file.
10583         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10584         * vec.c (qsort_chk): Use gcc_qsort.
10585         * Makefile.in (OBJS-libcommon): Add sort.o.
10586         (build/sort.o): New target.  Use it...
10587         (BUILD_RTL): ... here, and...
10588         (build/gencfn-macros): ... here, and...
10589         (build/genmatch): ... here.
10591 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10592             Chung-Ju Wu  <jasonwucj@gmail.com>
10594         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10595         * config/nds32/nds32-graywolf.md: New file.
10596         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10597         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10598         pipeline.
10599         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10600         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10601         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10602         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10603         * config/nds32/pipelines.md: Include n15 settings.
10605 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10606             Chung-Ju Wu  <jasonwucj@gmail.com>
10608         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10609         * config/nds32/nds32-n13.md: New file.
10610         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10611         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10612         pipeline.
10613         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10614         * config/nds32/nds32.md (pipeline_model): Add n13.
10615         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10616         * config/nds32/pipelines.md: Include n13 settings.
10618 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10619             Chung-Ju Wu  <jasonwucj@gmail.com>
10621         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10622         * config/nds32/nds32-n10.md: New file.
10623         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10624         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10625         pipeline.
10626         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10627         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10628         * config/nds32/nds32.md (pipeline_model): Add n10.
10629         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10630         * config/nds32/pipelines.md: Include n10 settings.
10632 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10633             Kito Cheng  <kito.cheng@gmail.com>
10634             Chung-Ju Wu  <jasonwucj@gmail.com>
10636         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10637         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10638         Add enum values for DSP extension instructions.
10639         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10640         New constraints.
10641         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10642         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10643         New code iterators.
10644         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10645         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10646         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10647         * config/nds32/nds32-intrinsic.md: Likewise.
10648         * config/nds32/nds32_intrinsic.h: Likewise.
10649         * config/nds32/nds32-md-auxiliary.c: Likewise.
10650         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10651         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10652         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10653         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10654         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10655         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10656         TYPE_DMAC in switch statement.
10657         * config/nds32/nds32.c: New checking and implementation for DSP
10658         extension instructions.
10659         * config/nds32/nds32.h: Likewise.
10660         * config/nds32/nds32.md: Likewise.
10661         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10662         * config/nds32/predicates.md: Implement new predicates for DSP
10663         extension.
10665 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10667         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10668         Reformat alternatives and attributes so it is easier to identify
10669         which constraints/attributes go with which instruction.
10670         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10671         (mov<mode>_softfloat32, FMOVE64): Likewise.
10672         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10673         (mov<mode>_softfloat64, FMOVE64): Likewise.
10675 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10677         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10678         subsection.
10679         (Basic PowerPC Built-in Functions): The new name of the
10680         subsection previously known as "PowerPC Built-in Functions".
10681         (Basic PowerPC Built-in Functions Available on all Configurations):
10682         New subsubsection.
10683         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10684         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10685         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10686         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10688 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10690         PR ipa/85655
10691         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10692         single const.
10694 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10696         PR target/85733
10697         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10699 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10701         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10702         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10703         (ix86_handle_option): Handle -mwaitpkg.
10704         * config.gcc: New header.
10705         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10706         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10707         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10708         function type.
10709         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10710         OPTION_MASK_ISA_WAITPKG.
10711         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10712         (ix86_option_override_internal): Add PTA_WAITPKG.
10713         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10714         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10715         IX86_BUILTIN_TPAUSE.
10716         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10717         __builtin_ia32_umwait and __builtin_ia32_tpause.
10718         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10719         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10720         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10721         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10722         UNSPECV_TPAUSE): New.
10723         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10724         * config/i386/i386.opt: Add -mwaitpkg.
10725         * config/i386/waitpkgintrin.h: New file.
10726         * config/i386/x86intrin.h: New header.
10727         * doc/invoke.texi: Add -mwaitpkg.
10729 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10731         PR target/85606
10732         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10733         equivalent.
10734         (cortex-m0): Use armv6s-m isa.
10735         (cortex-m0plus): Likewise.
10736         (cortex-m1): Likewise.
10737         (cortex-m0.small-multiply): Likewise.
10738         (cortex-m0plus.small-multiply): Likewise.
10739         (cortex-m1.small-multiply): Likewise.
10741 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10742             Jakub Jelinek  <jakub@redhat.com>
10744         PR tree-optimization/85692
10745         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10746         source permute as well.
10748 2018-05-11  Martin Liska  <mliska@suse.cz>
10750         PR sanitizer/85556
10751         * doc/extend.texi: Document LLVM style format for no_sanitize
10752         attribute.
10754 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10756         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10757         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10758         (mode_supports_vsx_dform_quad): Likewise.
10759         (mode_supports_vmx_dform): Move these functions to be next to the
10760         other mode_supports functions.
10761         (mode_supports_dq_form): Likewise.
10762         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10763         mode_supports_dq_form.
10764         (reg_offset_addressing_ok_p): Likewise.
10765         (offsettable_ok_by_alignment): Likewise.
10766         (rs6000_legitimate_offset_address_p): Likewise.
10767         (legitimate_lo_sum_address_p): Likewise.
10768         (rs6000_legitimize_address): Likewise.
10769         (rs6000_legitimize_reload_address): Likewise.
10770         (rs6000_secondary_reload_inner): Likewise.
10771         (rs6000_preferred_reload_class): Likewise.
10772         (rs6000_output_move_128bit): Likewise.
10774 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10776         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10777         Generate SImode target register for null target.
10778         <case IX86_BUILTIN_XGETBV>: Ditto.
10779         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10780         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10782 2018-05-10  Carl Love  <cel@us.ibm.com>
10784         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10785         dcbtt and dcbtstt if operands[2] is 0.
10787 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10789         PR target/85693
10790         * config/i386/sse.md (usadv64qi): New expander.
10792 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10794         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10795         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10796         -maltivec=be support.
10797         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10798         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10799         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10800         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10801         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10802         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10803         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10804         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10805         altivec_vsumsws): Adjust.
10806         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10807         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10808         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10809         support.
10810         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10811         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10812         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10813         (altivec_lve<VI_char>x): Delete expand.
10814         (*altivec_lve<VI_char>x_internal): Rename to...
10815         (altivec_lve<VI_char>x): ... this.
10816         (altivec_lvxl_<mode>): Delete expand.
10817         (*altivec_lvxl_<mode>_internal): Rename to ...
10818         (altivec_lvxl_<mode>): ... this.
10819         (altivec_stvxl_<mode>): Delete expand.
10820         (*altivec_stvxl_<mode>_internal): Rename to ...
10821         (altivec_stvxl_<mode>): ... this.
10822         (altivec_stve<VI_char>x): Delete expand.
10823         (*altivec_stve<VI_char>x_internal): Rename to ...
10824         (altivec_stve<VI_char>x): ... this.
10825         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10826         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10827         reduc_plus_scal_<mode>): Adjust.
10828         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10829         comment.
10830         (rs6000_cpu_cpp_builtins): Adjust.
10831         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10832         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10833         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10834         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10835         -maltivec=be support.
10836         (rs6000_split_vec_extract_var): Adjust.
10837         (rs6000_split_v4si_init): Adjust.
10838         (swap_selector_for_mode): Delete.
10839         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10840         altivec_expand_stvex_be): Delete.
10841         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10842         -maltivec=be support.
10843         (rs6000_gimple_fold_builtin): Ditto.
10844         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10845         Adjust.
10846         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10847         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10848         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10849         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10850         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10851         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10852         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10853         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10854         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10855         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10856         anonymous split): Adjust.
10857         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10858         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10860 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10862         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10863         when --with-gxx-include-dir is also specified.
10864         * configure: Regenerate.
10866 2018-05-09  Jim Wilson  <jimw@sifive.com>
10868         PR target/84797
10869         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10870         * config/riscv/t-withmultilib: New.
10871         * config/riscv/withmultilib.h: New.
10872         * doc/install.texi: Document RISC-V --with-multilib-list support.
10874 2018-05-09  Richard Biener  <rguenther@suse.de>
10876         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10877         vector.
10878         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10879         actual scalar cost using the cost vector and the add_stmt_cost
10880         machinery.
10882 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10884         PR rtl-optimization/85645
10885         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10886         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10888 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10890         PR rtl-optimization/85645
10891         * shrink-wrap.c (spread_components): Return a boolean saying if
10892         anything was changed.
10893         (try_shrink_wrapping_separate): Iterate spread_components until
10894         nothing changes anymore.
10896 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10898         PR rtl-optimization/85645
10899         * regrename.c (build_def_use): Also kill the chains that include the
10900         destination of a REG_CFA_REGISTER note.
10902 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10904         PR rtl-optimization/85645
10905         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10906         insn that has a REG_CFA_REGISTER note.
10908 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10910         * cfgexpand.c (expand_clobber): New function.
10911         (expand_gimple_stmt_1): Use it.
10912         * tree-vect-stmts.c (vect_clobber_variable): New function,
10913         split out from...
10914         (vectorizable_simd_clone_call): ...here.
10915         (vectorizable_store): Emit a clobber either side of an
10916         IFN_STORE_LANES sequence.
10917         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10919 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10921         PR target/85626
10922         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10923         (define_insn "trap_if_false"): Add exit after trap.
10925 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10927         PR rtl-optimization/85638
10928         * bb-reorder.c: Include common/common-target.h.
10929         (create_forwarder_block): New function extracted from...
10930         (fix_up_crossing_landing_pad): ...here.  Rename into...
10931         (dw2_fix_up_crossing_landing_pad): ...this.
10932         (sjlj_fix_up_crossing_landing_pad): New function.
10933         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10934         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10935         from both partitions and exit the loop after one iteration.
10937 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10939         Revert:
10940         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10941         subsection.
10942         (Basic PowerPC Built-in Functions): The new name of the
10943         subsection previously known as "PowerPC Built-in Functions".
10944         (Basic PowerPC Built-in Functions Available on all Configurations):
10945         New subsubsection.
10946         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10947         subsubsection.
10948         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10949         subsubsection.
10950         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10951         subsubsection.
10952         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10953         subsubsection.
10955 2018-05-08  Jim Wilson  <jimw@sifive.com>
10957         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10958         (LD_EMUL_SUFFIX): New.
10959         (LINK_SPEC): Use it.
10961 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10963         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10964         subsection.
10965         (Basic PowerPC Built-in Functions): The new name of the
10966         subsection previously known as "PowerPC Built-in Functions".
10967         (Basic PowerPC Built-in Functions Available on all Configurations):
10968         New subsubsection.
10969         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10970         subsubsection.
10971         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10972         subsubsection.
10973         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10974         subsubsection.
10975         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10976         subsubsection.
10978 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10980         PR target/85683
10981         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10982         after cmpelim optimization.
10984 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10986         * config.gcc: Support "goldmont".
10987         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10988         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10989         PROCESSOR_GOLDMONT.
10990         * config/i386/i386.c (m_GOLDMONT): Define.
10991         (processor_target_table): Add "goldmont".
10992         (PTA_GOLDMONT): Define.
10993         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10994         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10995         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10996         (fold_builtin_cpu): Add "goldmont".
10997         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10998         (ix86_option_override_internal): Add "goldmont".
10999         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11000         (processor_type): Add PROCESSOR_GOLDMONT.
11001         * config/i386/i386.md: Add CPU "glm".
11002         * config/i386/glm.md: New file.
11003         * config/i386/x86-tune.def: Add m_GOLDMONT.
11004         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11006 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11008         PR target/85572
11009         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11010         E_V4DImode.
11011         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11012         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11013         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11015         PR target/85317
11016         * config/i386/i386.c (ix86_fold_builtin): Handle
11017         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11019         PR target/85480
11020         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11021         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11023 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11025         PR target/85658
11026         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11027         (check_arch): Likewise.
11028         (check_fpu): Return the result rather than printing it.
11029         (end arch): Fix operator precedence.
11030         (end cpu): Likewise.
11031         (END): Print the result from check_fpu.
11033 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11034             Alan Hayward  <alan.hayward@arm.com>
11035             David Sherwood  <david.sherwood@arm.com>
11037         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11038         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11039         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11040         (*fcmuo<mode>_and): New patterns.
11042 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11044         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11045         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11046         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11047         (cmp_op, sve_imm_con): New code attributes.
11048         (SVE_COND_INT_CMP, imm_con): Delete.
11049         (cmp_op): Remove above unspecs from int attribute.
11050         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11051         to...
11052         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11053         comparison-specific unspecs.
11054         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11055         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11056         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11057         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11058         (*vec_fcm<cmp_op><mode>): Rename to...
11059         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11060         (*vec_fcmuo<mode>): Rename to...
11061         (*fcmuo<mode>): ...this and adjust likewise.
11062         (*pred_fcm<cmp_op><mode>): New pattern.
11063         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11064         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11065         functions.
11066         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11067         and UNORDERED.
11068         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11069         (aarch64_emit_sve_predicated_cond): New function.
11070         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11071         (aarch64_emit_unspec_cond_or): Replace with...
11072         (aarch64_emit_sve_or_conds): ...this new function.  Use
11073         aarch64_emit_sve_ptrue_op for the individual comparisons and
11074         aarch64_emit_binop to OR them together.
11075         (aarch64_emit_inverted_unspec_cond): Replace with...
11076         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11077         aarch64_emit_sve_ptrue_op for the comparison and
11078         aarch64_emit_unop to invert the result.
11079         (aarch64_expand_sve_vec_cmp_float): Update after the above
11080         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11082 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11084         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11085         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11086         (Backwards Compatibility): Likewise.
11088 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11090         PR bootstrap/85681
11091         Revert:
11092         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11094         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11095         <prefetch_dynamic_strides>: New const bool field.
11096         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11097         prefetch_dynamic_strides.
11098         (exynosm1_prefetch_tune): Likewise.
11099         (thunderxt88_prefetch_tune): Likewise.
11100         (thunderx_prefetch_tune): Likewise.
11101         (thunderx2t99_prefetch_tune): Likewise.
11102         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11103         to false.
11104         (aarch64_override_options_internal): Update to set
11105         PARAM_PREFETCH_DYNAMIC_STRIDES.
11106         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11107         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11108         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11109         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11110         prefetch-dynamic-strides setting.
11112         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11114         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11115         <minimum_stride>: New const int field.
11116         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11117         minimum_stride field.
11118         (exynosm1_prefetch_tune): Likewise.
11119         (thunderxt88_prefetch_tune): Likewise.
11120         (thunderx_prefetch_tune): Likewise.
11121         (thunderx2t99_prefetch_tune): Likewise.
11122         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11123         (aarch64_override_options_internal): Update to set
11124         PARAM_PREFETCH_MINIMUM_STRIDE.
11125         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11126         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11127         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11128         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11129         stride is constant and is below the minimum stride threshold.
11131 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11133         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11134         to 512.
11136 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11138         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11139         <prefetch_dynamic_strides>: New const bool field.
11140         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11141         prefetch_dynamic_strides.
11142         (exynosm1_prefetch_tune): Likewise.
11143         (thunderxt88_prefetch_tune): Likewise.
11144         (thunderx_prefetch_tune): Likewise.
11145         (thunderx2t99_prefetch_tune): Likewise.
11146         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11147         to false.
11148         (aarch64_override_options_internal): Update to set
11149         PARAM_PREFETCH_DYNAMIC_STRIDES.
11150         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11151         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11152         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11153         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11154         prefetch-dynamic-strides setting.
11156 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11158         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11159         <minimum_stride>: New const int field.
11160         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11161         minimum_stride field.
11162         (exynosm1_prefetch_tune): Likewise.
11163         (thunderxt88_prefetch_tune): Likewise.
11164         (thunderx_prefetch_tune): Likewise.
11165         (thunderx2t99_prefetch_tune): Likewise.
11166         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11167         (aarch64_override_options_internal): Update to set
11168         PARAM_PREFETCH_MINIMUM_STRIDE.
11169         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11170         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11171         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11172         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11173         stride is constant and is below the minimum stride threshold.
11175 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11177         PR c++/85659
11178         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11179         the type is addressable.  Don't force op into register if it has
11180         BLKmode.
11182 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11184         PR other/77609
11185         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11186         any section for which we don't know a specific type it should have,
11187         regardless of name.  Previously this was done only for the exact
11188         names ".init_array", ".fini_array", and ".preinit_array".
11189         (default_elf_asm_named_section): Add comment about
11190         relationship with default_section_type_flags and SECTION_NOTYPE.
11191         (get_section): Don't consider it a type conflict if one side has
11192         SECTION_NOTYPE and the other doesn't, as long as neither has the
11193         SECTION_BSS et al used in the default_section_type_flags logic.
11195 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11197         PR target/85653
11198         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11199         (workaround_barsyncs): New function.
11200         (nvptx_reorg): Use workaround_barsyncs.
11201         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11202         (define_expand "nvptx_membar_cta"): New define_expand.
11203         (define_insn "*nvptx_membar_cta"): New insn.
11205 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11207         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11208         To improve optimization opportunities.
11209         * builtin-types.def: The new needed builtin types for the above.
11211 2018-05-04  Richard Biener  <rguenther@suse.de>
11213         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11214         * gimple-ssa-store-merging.c
11215         (imm_store_chain_info::output_merged_store): Remove redundant create,
11216         release split_store vector contents on failure.
11217         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11218         scalar stmt vector on cache hit.
11220 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11222         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11223         Xilinx FP support.
11224         * config.gcc (powerpc-xilinx-eabi*): Remove.
11225         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11226         support.
11227         (fusion_addis_mem_combo_load): Ditto.
11228         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11229         FP support.
11230         (rs6000_cpu_cpp_builtins): Ditto.
11231         * config/rs6000/rs6000-linux.c
11232         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11233         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11234         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11235         support.
11236         (rs6000_setup_reg_addr_masks): Ditto.
11237         (rs6000_init_hard_regno_mode_ok): Ditto.
11238         (rs6000_option_override_internal): Ditto.
11239         (legitimate_lo_sum_address_p): Ditto.
11240         (rs6000_legitimize_address): Ditto.
11241         (rs6000_legitimize_reload_address): Ditto.
11242         (rs6000_legitimate_address_p): Ditto.
11243         (abi_v4_pass_in_fpr): Ditto.
11244         (setup_incoming_varargs): Ditto.
11245         (rs6000_gimplify_va_arg): Ditto.
11246         (rs6000_split_multireg_move): Ditto.
11247         (rs6000_savres_strategy): Ditto.
11248         (rs6000_emit_prologue_components): Ditto.
11249         (rs6000_emit_epilogue_components): Ditto.
11250         (rs6000_emit_prologue): Ditto.
11251         (rs6000_emit_epilogue): Ditto.
11252         (rs6000_elf_file_end): Ditto.
11253         (rs6000_function_value): Ditto.
11254         (rs6000_libcall_value): Ditto.
11255         * config/rs6000/rs6000.h: Ditto.
11256         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11257         (TARGET_MINMAX): ... this.  New.
11258         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11259         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11260         (*movsi_internal1_single): Delete.
11261         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11262         mfpu=, mxilinx-fpu): Delete.
11263         * config/rs6000/singlefp.h: Delete.
11264         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11265         * config/rs6000/t-rs6000: Ditto.
11266         * config/rs6000/t-xilinx: Delete.
11267         * config/rs6000/titan.md: Adjust for fp_type removal.
11268         * config/rs6000/vsx.md: Remove Xilinx FP support.
11269         (VStype_simple): Delete.
11270         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11271         * config/rs6000/xfpu.h: Delete.
11272         * config/rs6000/xfpu.md: Delete.
11273         * config/rs6000/xilinx.h: Delete.
11274         * config/rs6000/xilinx.opt: Delete.
11275         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11276         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11278 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11280         PR libgomp/85639
11281         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11282         if ignore == 0.
11284 2018-05-04  Richard Biener  <rguenther@suse.de>
11286         PR middle-end/85627
11287         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11288         (expand_complex_div_wide): Likewise.
11289         (expand_complex_operations_1): Likewise.
11290         (expand_complex_libcall): Preserve EH info of the original stmt.
11291         (tree_lower_complex): Handle removed blocks.
11292         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11293         on complex multiplication and division libcall builtins.
11295 2018-05-04  Richard Biener  <rguenther@suse.de>
11297         PR middle-end/85574
11298         * fold-const.c (negate_expr_p): Restrict negation of operand
11299         zero of a division to when we know that can happen without
11300         overflow.
11301         (fold_negate_expr_1): Likewise.
11303 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11305         PR libstdc++/85466
11306         * real.h (real_nextafter): Declare.
11307         * real.c (real_nextafter): New function.
11308         * fold-const-call.c (fold_const_nextafter): New function.
11309         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11310         CASE_CFN_NEXTTOWARD.
11311         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11312         even when arg1_mode is different from arg0_mode.
11314 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11316         * doc/extend.texi (Deprecated Features): Remove
11317         -ffriend-injection.
11318         (Backwards Compatibility): Likewise.
11319         * doc/invoke.texi (C++ Language Options): Likewise.
11320         (C++ Dialect Options): Likewise.
11322 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11324         PR target/85530
11325         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11326         _mm512_mask_mullox_epi64): New intrinsics.
11328 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11330         PR testsuite/85106
11331         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11332         dump files): Add offload-tree.
11334 2018-05-03  Richard Biener  <rguenther@suse.de>
11336         PR tree-optimization/85615
11337         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11338         to loops not nested in BBs loop father to avoid creating multi-entry
11339         loops.
11341 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11343         PR tree-optimization/70291
11344         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11345         arguments.  Change return type to tree.  Emit libcall as a new
11346         statement rather than replacing existing one when inplace_p is true.
11347         (expand_complex_multiplication_components): New function.
11348         (expand_complex_multiplication): Expand floating-point complex
11349         multiplication using the above.
11350         (expand_complex_division): Rename inner_type parameter to type.
11351         Update expand_complex_libcall call-site.
11352         (expand_complex_operations_1): Update expand_complex_multiplication
11353         and expand_complex_division call-sites.
11355 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11357         PR target/85582
11358         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11359         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11360         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11361         the highest significant bit of the shift count mask is clear.  In
11362         check whether and[sq]i3 is needed verify that all significant bits
11363         of the shift count other than the highest are set.
11365 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11367         PR libgomp/82428
11368         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11369         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11370         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11371         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11372         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11373         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11374         __builtin_goacc_parlevel_size.
11376 2018-05-02  Richard Biener  <rguenther@suse.de>
11378         PR tree-optimization/85597
11379         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11380         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11381         directly.
11383 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11385         PR testsuite/85106
11386         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11387         dump files): Add ltrans-tree.
11389 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11391         PR testsuite/85106
11392         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11393         dump files): Add wpa-ipa.
11395 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11397         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11398         powerpc*-*-linux*paired* target.
11399         * config/rs6000/750cl.h: Delete.
11400         * config/rs6000/paired.h: Delete.
11401         * config/rs6000/paired.md: Delete.
11402         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11403         float support.
11404         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11405         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11406         comment.  Remove paired float support.
11407         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11408         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11409         VECTOR_PAIRED.
11410         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11411         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11412         declarations.
11413         * config/rs6000/rs6000.c: Remove paired float support.
11414         (paired_expand_vector_init, paired_expand_vector_move,
11415         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11416         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11417         paired_expand_builtin, paired_expand_predicate_builtin,
11418         paired_init_builtins): Delete.
11419         * config/rs6000/rs6000.h: Remove paired float support.
11420         * config/rs6000/rs6000.md: Remove paired float support.
11421         (move_from_CR_ov_bit): Delete.
11422         * config/rs6000/rs6000.opt (mpaired): Delete.
11423         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11424         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11426 2018-05-02  Richard Biener  <rguenther@suse.de>
11428         PR middle-end/85567
11429         * gimplify.c (gimplify_save_expr): When in SSA form allow
11430         SAVE_EXPRs to compute to SSA vars.
11432 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11434         PR target/85582
11435         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11436         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11437         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11438         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11440 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11442         PR tree-optimization/85586
11443         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11444         exit early for statements in the same group if the accesses are
11445         not strided.
11447 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11449         PR lto/85451
11450         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11451         error message.
11453 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11455         PR tree-optimization/85143
11456         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11458 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11460         PR lto/85451
11461         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11462         not found" error message.
11464 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11466         PR other/83786
11467         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11468         * vec.c (test_ordered_remove_if): New function.
11469         (vec_c_tests): Call test_ordered_remove_if.
11470         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11471         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11472         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11473         VEC_ORDERED_REMOVE_IF.
11475 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11477         PR tree-optimization/82665
11478         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11479         pointer subtraction where arguments come from a memchr call.
11481 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11483         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11484         --push-state --as-needed and --pop-state instead of --as-needed and
11485         --no-as-needed if ld supports it.
11486         * configure: Regenerated.
11488         PR web/85578
11489         * doc/install.texi2html: Replace _002d with - and _002a with * in
11490         generated html files using sed.
11492 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11494         PR c++/85523
11495         * gcc-rich-location.c (blank_line_before_p): New function.
11496         (use_new_line): New function.
11497         (gcc_rich_location::add_fixit_insert_formatted): New function.
11498         * gcc-rich-location.h
11499         (gcc_rich_location::add_fixit_insert_formatted): New function.
11501 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11503         * selftest.c (assert_streq): Rename "expected" and "actual" to
11504         "val1" and "val2".  Extend NULL-handling to cover both inputs
11505         symmetrically, while still requiring both to be non-NULL for a pass.
11506         * selftest.h (assert_streq): Rename "expected" and "actual" to
11507         "val1" and "val2".
11508         (ASSERT_EQ): Likewise.
11509         (ASSERT_EQ_AT): Likewise.
11510         (ASSERT_KNOWN_EQ): Likewise.
11511         (ASSERT_KNOWN_EQ_AT): Likewise.
11512         (ASSERT_NE): Likewise.
11513         (ASSERT_MAYBE_NE): Likewise.
11514         (ASSERT_MAYBE_NE_AT): Likewise.
11515         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11516         the assertion to pass.
11517         (ASSERT_STREQ_AT): Likewise.
11519 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11521         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11522         interaction with -pie.
11524 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11526         * selftest.h: Fix alphabetization of per-source-file selftest
11527         declarations.
11529 2018-04-30  Jason Merrill  <jason@redhat.com>
11531         PR c++/61982 - dead stores to destroyed objects.
11532         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11533         of clobber.
11535 2018-04-30  Jason Merrill  <jason@redhat.com>
11537         * tree.c (build_clobber): New.
11538         * tree.h: Declare it.
11539         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11541 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11543         * diagnostic-show-locus.c (layout::layout): Update for
11544         location_get_source_line returning a char_span.
11545         (struct char_span): Move to input.h.
11546         (struct correction): Update for fields in char_span becoming
11547         private.
11548         (struct source_line): Update for location_get_source_line
11549         returning a char_span.
11550         (layout::print_line): Likewise.
11551         * edit-context.c (edited_file::print_content): Likewise.
11552         (edited_file::print_diff_hunk): Likewise.
11553         (edited_file::print_run_of_changed_lines): Likewise.
11554         (edited_file::get_num_lines): Likewise.
11555         (edited_line::edited_line): Likewise.
11556         * final.c (asm_show_source): Likewise.
11557         * input.c (location_get_source_line): Convert return type
11558         from const char * to char_span, losing the final "line_len"
11559         param.
11560         (dump_location_info): Update for the above.
11561         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11562         when handling the literal within the line.
11563         (test_reading_source_line): Update for location_get_source_line
11564         returning a char_span.
11565         * input.h (class char_span): Move here from
11566         diagnostic-show-locus.c, converting from a struct to a class.
11567         Make data members private.
11568         (char_span::operator bool): New.
11569         (char_span::length): New.
11570         (char_span::get_buffer): New.
11571         (char_span::operator[]): New.
11572         (char_span::subspan): Make const.
11573         (char_span::xstrdup): New.
11574         (location_get_source_line): Convert return type from const char *
11575         to char_span, losing the final "line_size" param.
11577 2018-04-30  Jan Hubicka  <jh@suse.cz>
11579         * lto-wrapper.c (ltrans_priorities): New static var.
11580         (cmp_priority): New.
11581         (run_gcc): Read priorities and if doing parallel build order
11582         the Makefile by them.
11584 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11586         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11588 2018-04-30  Richard Biener  <rguenther@suse.de>
11590         * tree-cfg.c (verify_address): Remove base argument, add
11591         flag whether to check TREE_ADDRESSABLE and do that.
11592         (verify_expr): Remove.
11593         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11594         (verify_gimple_assign_single): Likewise.
11595         (verify_gimple_switch): Likewise.
11596         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11597         piece from verify_expr.
11598         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11600 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11602         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11604 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11606         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11607         (small_data_pattern): Likewise.
11608         (arc_rewrite_small_data): Likewise.
11609         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11610         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11611         (get_symbol_alignment): New function.
11612         (legitimate_small_data_address_p): Likewise.
11613         (legitimate_scaled_address): Update, call
11614         legitimate_small_data_address_p.
11615         (output_sdata): New static variable.
11616         (arc_print_operand): Update how we handle small data operands.
11617         (arc_print_operand_address): Likewise.
11618         (arc_legitimate_address_p): Update, use
11619         legitimate_small_data_address_p.
11620         (arc_rewrite_small_data_p): Remove.
11621         (arc_rewrite_small_data_1): Likewise.
11622         (arc_rewrite_small_data): Likewise.
11623         (small_data_pattern): Likewise.
11624         (compact_sda_memory_operand): Update to use
11625         legitimate_small_data_address_p and get_symbol_alignment.
11626         (prepare_move_operands): Don't rewite sdata pattern.
11627         (prepare_extend_operands): Remove.
11628         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11629         pattern.
11630         (zero_extendqisi2): Likewise.
11631         (zero_extendhisi2): Likewise.
11632         (extendqihi2): Likewise.
11633         (extendqisi2): Likewise.
11634         (extendhisi2): Likewise.
11635         (addsi3): Likewise.
11636         (subsi3): Likewise.
11637         (andsi3): Likewise.
11638         * config/arc/constraints.md (Usd): Change it to memory constraint.
11640 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11642         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11643         as source of std instructions.
11644         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11645         allow 6-bit constants as source for store instructions.
11646         (movdi_insn): Update instruction pattern to allow 6-bit constants
11647         as source for store instructions.
11649 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11651         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11653 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11654             Sandra Loosemore <sandra@codesourcery.com>
11656         * dumpfile.c (dump_open): Allow '-' for stdout.
11657         * doc/invoke.texi (Developer Options): Document dump filename
11658         determination early.  Document stdin/stdout selection.
11660 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11662         Microblaze Target: PIC data text relative
11664         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11665         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11666         Add declaration.
11667         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11668         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11669         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11670         New addressing mode for data-text relative position indepenedent code.
11671         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11672         'ADDRESS_SYMBOLIC_TXT_REL'.
11673         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11674         (microblaze_legitimate_pic_operand): Exclude function calls from
11675         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11676         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11677         addresses cases.
11678         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11679         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11680         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11681         for 'address + offset'.
11682         (microblaze_expand_prologue): Add new function prologue call for
11683         'r20' assignation.
11684         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11685         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11686         table in case of TARGET_PIC_DATA_TEXT_REL.
11687         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11688         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11689         Add new macros 'UNSPEC_TEXT',
11690         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11691         + exclude function calls from 'UNSPEC_PLT' in case of data text
11692         relative mode.
11693         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11694         new target hook for generating address diff vector tables in case of
11695         flag_pic.
11696         * doc/tm.texi : Regenerate.
11697         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11698         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11699         of addr diff vector generation.
11700         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11701         target hook definition.
11702         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11703         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11704         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11705         option for data text relative.
11707 2018-04-30  Richard Biener  <rguenther@suse.de>
11709         * tree-chrec.h (evolution_function_is_constant_p): Remove
11710         redundant check.
11711         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11713 2018-04-30  Richard Biener  <rguenther@suse.de>
11715         PR bootstrap/85571
11716         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11718 2018-04-30  Richard Biener  <rguenther@suse.de>
11720         PR tree-optimization/28364
11721         PR tree-optimization/85275
11722         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11723         copying first exit test.
11725 2018-04-28  Mark Wielaard  <mark@klomp.org>
11727         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11728         dwarf_version >= 5.
11729         (dwarf_AT): Handle DW_AT_addr_base.
11730         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11732 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11734         PR target/84431
11735         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11736         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11737         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11738         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11740 2018-04-28  Richard Biener  <rguenther@suse.de>
11742         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11743         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11744         to reflect use.  Only add interesting stmts.
11746 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11748         PR ipa/85549
11749         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11750         the jump function allows for passing through aggregate values.
11752 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11754         * input.h (in_system_header_at): Convert from macro to inline
11755         function.
11756         (from_macro_expansion_at): Likewise.
11757         (from_macro_definition_at): Likewise.
11759 2018-04-27  Jeff Law  <law@redhat.com>
11761         * config.gcc: Mark tile* targets as deprecated/obsolete.
11763 2018-04-27  Richard Biener  <rguenther@suse.de>
11765         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11766         fix for ILP32.
11768 2018-04-27  Richard Biener  <rguenther@suse.de>
11770         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11772 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11774         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11775         with Yd constraint. Set "preferred_for_speed" attribute from
11776         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11777         with Yd constraint.
11778         (*movdi_internal): Ditto.
11779         (movti_interunit splitters): Remove
11780         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11781         (movdi_interunit splitters): Ditto.
11782         * config/i386/constraints.md (Ye): Remove.
11783         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11785 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11787         PR target/85512
11788         * config/aarch64/constraints.md (Usg): Limit to 31.
11789         (Usj): Limit to 63.
11791 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11793         PR tree-optimization/85529
11794         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11795         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11796         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11797         zero extension or masking of the MSB bit.
11798         (optimize_range_tests): Add FIRST_BB argument, pass it through
11799         to optimize_range_tests_var_bound.
11800         (maybe_optimize_range_tests, reassociate_bb): Adjust
11801         optimize_range_tests callers.
11803 2018-04-26  Richard Biener  <rguenther@suse.de>
11804             Jakub Jelinek  <jakub@redhat.com>
11806         * cgraph.h (symbol_table): Just declare debug method here.
11807         * symtab.c (symbol_table::debug): Define.
11809 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11811         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11813 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11815         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11816         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11817         (*movdi_internal): Substitute Yi and Yj constraint with x
11818         and Ym and Yn constraint with y constraint.  Update "isa"
11819         attribute and set "preferred_for_speed" attribute from
11820         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11821         (*movsi_internal): Ditto.
11822         (*movdf_internal): Ditto.
11823         (*movsf_internal): Ditto.
11824         (*zero_extendsidi2): Ditto.
11825         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11826         (sse2_loadld): Ditto.
11827         (*vec_extract<ssevecmodelower>_0): Ditto.
11828         (*vec_extractv4si_0_zext_sse4): Ditto.
11829         (vec_concatv2di): Ditto.
11830         (*vec_dup<mode>): Ditto.
11831         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11832         * config/i386/constraints.md (Yi): Remove.
11833         (Yj): Remove.
11834         (Ym): Remove.
11835         (Yn): Remove.
11837 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11839         * dumpfile.c (dump_open): New.
11840         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11841         (dump_finish): Detect stdio/stderr by value not name.
11843 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11845         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11847 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11849         PR target/84952
11850         * config/nvptx/nvptx.c (verify_neutering_jumps)
11851         (verify_neutering_labels): New function
11852         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11854 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11856         PR target/84025
11857         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11858         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11859         need neutering.
11861 2018-04-26  Richard Biener <rguenther@suse.de>
11862             Tom de Vries  <tom@codesourcery.com>
11864         PR lto/85422
11865         * lto-streamer-out.c (output_function): Fixup loops if required to match
11866         discovery done in the reader.
11868 2018-04-26  Richard Biener  <rguenther@suse.de>
11870         PR tree-optimization/85116
11871         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11872         have a loop exit from the single latch predecessor.  Remove
11873         case of header with just condition.
11874         (ch_base::copy_headers): Exclude infinite loops from any
11875         processing.
11876         (pass_ch::execute): Record exits.
11878 2018-04-26  Richard Biener  <rguenther@suse.de>
11880         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11881         prologue cost vector and pass it to vect_get_load_cost.
11882         (vect_get_peeling_costs_all_drs): Likewise.
11883         (vect_peeling_hash_get_lowest_cost): Likewise.
11884         (vect_enhance_data_refs_alignment): Likewise.
11886 2018-04-26  Richard Biener  <rguenther@suse.de>
11888         PR middle-end/85450
11889         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11890         checking of integer<->pointer conversions.
11891         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11892         sign-/zero-extending pointer types.
11893         (expand_omp_for_static_chunk): Likewise.
11895 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11896             Jean Lee  <xiaoyur347@gmail.com>
11898         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11899         (TARGET_ASAN_SHADOW_OFFSET): Define.
11900         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11901         true for -fsanitize=address.
11903 2018-04-25  Mark Wielaard  <mark@klomp.org>
11905         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11906         shorter ones.
11908 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11910         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11911         than "alu", remove explicit "memory" and "imm_disp" attributes.
11912         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11914         PR middle-end/85414
11915         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11916         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11917         gen_lowpart_no_emit.
11919 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11921         PR target/85473
11922         * config/i386/i386.c (ix86_expand_builtin): Change memory
11923         operand to XI, extend p0 to Pmode.
11924         * config/i386/i386.md: Change unspec volatile and operand
11925         1 mode to XI, change operand 0 mode to P.
11927 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11929         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11930         GET_MODE_MASK before any checking.
11931         (nds32_can_use_bset_p): Likewise.
11932         (nds32_can_use_btgl_p): Likewise.
11934 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11936         * config/nds32/nds32-doubleword.md: New define_split pattern for
11937         illegal register number.
11939 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11941         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11943 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11945         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11947 2018-04-25  Richard Biener  <rguenther@suse.de>
11949         * lto-streamer.h (LTO_major_version): Bump to 8.
11951 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11953         * BASE-VER: Set to 9.0.0.
11955 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11957         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11958         in __abskf2 and __powikf2.
11960 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11962         PR target/85512
11963         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11964         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11965         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11966         Use the above on operand 2.  Reindent.
11967         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11969 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11971         PR target/85485
11972         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11973         handle OPT_mcet.
11974         * config/i386/i386.opt (mcet): Removed.
11975         * doc/install.texi: Remove -mcet documentation.
11976         * doc/invoke.texi: Likewise.
11978 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11980         PR target/85485
11981         * doc/install.texi: Remove -mcet from bootstrap-cet.
11983 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11985         PR target/85511
11986         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11987         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11988         if TARGET_64BIT.
11990         PR target/85503
11991         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11992         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11993         containing a CONST_VECTOR.
11995 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11997         * doc/install.texi: Update newlib dependency for nvptx.
11999 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12001         PR target/85508
12002         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12003         instead of INTVAL when shifting x left.
12005 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12007         PR tree-optimization/85478
12008         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12009         vect_grouped_store_supported for single element vectors.
12011 2018-04-24  Richard Biener  <rguenther@suse.de>
12013         PR target/85491
12014         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12015         load cost increase to the case of non-constant step.
12017 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12019         PR target/84828
12020         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12021         destination if any_malformed_asm.
12023 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12025         PR middle-end/85496
12026         * expr.c (store_field): In the bitfield case, if the value comes from
12027         a function call and is returned in registers by means of a PARALLEL,
12028         do not change the mode of the temporary unless BLKmode and VOIDmode.
12030 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12032         PR rtl-optimization/85423
12033         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12034         dependencies to debug insns when the previous insn is non-debug.
12036 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12038         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12039         enums into a single definition.
12040         (fls): Fix predicates and printing.
12041         (seti): Likewise.
12043 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12045         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12046         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12047         and short u6 immediate.
12048         (check_if_valid_sleep_operand): Remove.
12049         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12051 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12053         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12054         flag_always_save_lp condition.
12055         * config/nds32/nds32.opt (malways-save-lp): New option.
12057 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12059         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12060         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12061         * config/nds32/nds32.h
12062         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12063         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12065 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12067         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12068         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12070 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12071             Chung-Ju Wu  <jasonwucj@gmail.com>
12073         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12074         Declare.
12075         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12076         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12078 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12080         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12082 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12084         * config/nds32/nds32-protos.h (nds32_data_alignment,
12085         nds32_local_alignment): Declare.
12086         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12087         nds32_local_alignment): New functions.
12088         (TARGET_CONSTANT_ALIGNMENT): Define.
12089         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12091 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12093         * config/nds32/nds32.c
12094         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12095         (TARGET_MODES_TIEABLE_P): Likewise.
12097 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12099         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12100         level Ofast and Og.
12102 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12103             Chung-Ju Wu  <jasonwucj@gmail.com>
12105         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12106         for unaligned access.
12107         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12108         unaligned access.
12109         * config/nds32/nds32-intrinsic.md: Likewise.
12110         * config/nds32/nds32_intrinsic.h: Likewise.
12111         * config/nds32/nds32.h (nds32_builtins): Likewise.
12112         * config/nds32/nds32.opt (munaligned-access): New option.
12113         * config/nds32/nds32.c (nds32_asm_file_start): Display
12114         flag_unaligned_access status.
12116 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12118         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12119         -mno-relax is present.
12120         * config/riscv/linux.h (LINK_SPEC): Ditto.
12122 2018-04-20  Martin Sebor  <msebor@redhat.com>
12124         PR c/85365
12125         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12126         for null pointers.
12127         (gimple_fold_builtin_stxcpy_chk): Same.
12128         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12130 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12132         PR target/85456
12133         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12134         __powikf2 when long double is IEEE 128-bit.
12136 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12138         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12139         step to make sure stack always aligned.
12141 2018-04-20  Carl Love  <cel@us.ibm.com>
12143         PR target/83402
12144         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12145         size check for arg0.
12147 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12148             Tom de Vries  <tom@codesourcery.com>
12150         PR target/85445
12151         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12152         Emit insns for calls too.
12153         (nvptx_find_par): Always look for worker-level predecessor insn.
12154         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12155         calls.
12156         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12157         (nvptx_process_pars): Propagate frames for calls.
12159 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12161         PR target/85469
12162         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12163         Removed.
12164         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12165         (ix86_handle_option): Don't handle OPT_mibt.
12166         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12167         __SHSTK__.
12168         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12169         has_ibt and ibt.
12170         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12171         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12172         (ix86_target_macros): Define __CET__ with flag_cf_protection
12173         for -fcf-protection.
12174         * config/i386/i386.c (isa2_opts): Remove -mibt.
12175         * config/i386/i386.h (TARGET_IBT): Removed.
12176         (TARGET_IBT_P): Likewise.
12177         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12178         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12179         * config/i386/i386.opt (mcet): Update help message.
12180         (mshstk): Likewise.
12181         (mibt): Removed.
12182         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12183         -mcet as an alias for -mshstk.
12185 2018-04-20  Richard Biener <rguenther@suse.de>
12187         PR middle-end/85475
12188         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12189         complexity by forcing a single use of the multiply operand.
12191 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12193         ipa/85449
12194         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12195         recursion dependency to only apply to non-clones.
12197 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12199         ipa/85447
12200         * ipa-cp.c (create_specialized_node): Check that clones of
12201         self-recursive edges exist during IPA-CP.
12203 2018-04-19  Toon Moene  <toon@moene.org>
12205         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12206         by -O3.
12208 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12210         PR tree-optimization/85467
12211         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12212         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12213         VECTOR_CST element to type.
12215 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12217         PR target/85397
12218         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12219         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12220         (builtin_longjmp): Likewise.
12221         (save_stack_nonlocal): New pattern.
12222         (restore_stack_nonlocal): Likewise.
12224 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12226         PR target/85404
12227         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12228         Replace ASM_OUTPUT_LABEL with fprintf.
12230 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12232         PR target/85417
12233         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12234         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12235         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12236         define __IBT__ and __SHSTK__ for -fcf-protection.
12237         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12238         TARGET_IBT.
12239         (ix86_trampoline_init): Likewise.
12240         (x86_output_mi_thunk): Likewise.
12241         (ix86_notrack_prefixed_insn_p): Likewise.
12242         (ix86_option_override_internal): Don't disallow -fcf-protection.
12243         * config/i386/i386.md (rdssp<mode>): Also enable for
12244         -fcf-protection.
12245         (incssp<mode>): Likewise.
12246         (nop_endbr): Likewise.
12247         * config/i386/i386.opt (mcet): Change help message to built-in
12248         functions only.
12249         (mibt): Likewise.
12250         (mshstk): Likewise.
12251         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12252         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12253         enable CET built-in functions.
12255 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12257         * common/config/i386/i386-common.c
12258         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12259         OPTION_MASK_ISA_MOVDIRI_UNSET,
12260         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12261         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12262         * config.gcc (movdirintrin.h): New header.
12263         * config/i386/cpuid.h (bit_MOVDIRI,
12264         bit_MOVDIR64B): New bits.
12265         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12266         and -mmvodir64b.
12267         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12268         (VOID, PVOID, PCVOID)): New function types.
12269         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12270         __builtin_ia32_directstoreu_u64,
12271         __builtin_ia32_movdir64b): New builtins.
12272         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12273         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12274         and -mmovdiri.
12275         (ix86_valid_target_attribute_inner_p): Ditto.
12276         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12277         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12278         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12279         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12280         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12281         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12282         (movdiri<mode>, movdir64b_<mode>): New.
12283         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12284         * config/i386/immintrin.h: Include movdirintrin.h.
12285         * config/i386/movdirintrin.h: New file.
12286         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12288 2018-04-19  Richard Biener  <rguenther@suse.de>
12290         PR middle-end/85455
12291         * cfg.c (clear_bb_flags): When loop state says we have
12292         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12294 2018-04-19  Richard Biener  <rguenther@suse.de>
12296         PR tree-optimization/84737
12297         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12298         copying restrict info.
12299         (vect_setup_realignment): Use it.
12300         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12301         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12302         the first DR to all generated stores.
12303         (vectorizable_load): Likewise for loads.
12305 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12307         PR tree-optimization/85446
12308         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12309         the integral and pointer types to have the same precision.
12311         * doc/install.texi: Document --disable-cet being the default and
12312         --enable-cet=auto.
12314 2018-04-18  Martin Liska  <mliska@suse.cz>
12316         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12317         style.
12319 2018-04-18  Martin Liska  <mliska@suse.cz>
12321         Revert
12322         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12324         PR ipa/83983
12325         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12326         arguments if they are comparable.
12328 2018-04-18  Martin Liska  <mliska@suse.cz>
12330         Revert
12331         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12333         PR lto/84805
12334         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12335         incomplete types.
12337 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12339         PR target/85388
12340         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12341         ENDBR after calling __morestack.
12343 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12345         PR jit/85384
12346         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12347         by using gcc_base_ver to generate a gcc_driver_version, and use
12348         it when generating GCC_DRIVER_NAME.
12349         * configure: Regenerate.
12351 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12353         PR target/81084
12354         * config.gcc: Obsolete powerpc*-*-*spe*.
12356 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12358         PR debug/84637
12359         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12360         (stabstr_D): Change type of unum from unsigned int to
12361         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12362         type.
12364 2018-04-17  Jim Wilson  <jimw@sifive.com>
12366         PR 84856
12367         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12368         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12369         Set arg_pointer_offset after using pretend_args_size.
12371 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12373         PR rtl-optimization/85431
12374         * dse.c (record_store): Ignore zero width stores.
12376         PR sanitizer/85230
12377         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12378         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12379         __builtin_stack_restore rather than after it.
12380         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12381         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12382         argument instead of virtual_dynamic_stack_rtx.
12384 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12386         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12387         New prototype.
12388         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12389         Add note to error message to explain internal mapping of overloaded
12390         built-in function name to non-overloaded built-in function name.
12391         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12392         function.
12394 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12396         PR target/85424
12397         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12398         where the inputs overlap with the output.
12400 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12402         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12403         (=v, v) alternative and explicit "memory" attribute.
12404         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12405         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12406         attributes.
12407         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12408         "sselog1" type instead of "sselog".
12409         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12410         "sselog".  Remove explicit "memory" attribute.
12411         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12412         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12413         attributes.
12414         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12415         "sselog1" type instead of "sselog".  Remove explicit "memory"
12416         attribute.
12417         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12418         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12419         attribute.
12420         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12421         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12422         attributes.
12423         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12424         "sselog1" type instead of "sselog".  Remove explicit "memory"
12425         attribute.
12426         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12427         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12428         attribute.
12430         PR target/85430
12431         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12433         PR middle-end/85414
12434         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12435         on a SUBREG.
12437 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12439         PR ipa/85421
12440         * ipa-cp.c (create_specialized_node): Call
12441         expand_all_artificial_thunks if necessary.
12443 2018-04-17  Martin Liska  <mliska@suse.cz>
12445         PR lto/85405
12446         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12447         in message, remote space in between '_G' and '('.
12449 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12451         PR target/85281
12452         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12453         avx512f_vmcmp<mode>3<round_saeonly_name>,
12454         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12455         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12456         avx512f_rndscale<mode><round_saeonly_name>,
12457         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12458         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12459         Use %<iptr>2 instead of %2 for -masm=intel.
12460         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12461         avx512f_vcvttss2usi<round_saeonly_name>,
12462         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12463         -masm=intel.
12464         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12465         avx512f_vcvttsd2usi<round_saeonly_name>,
12466         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12467         Use %q1 instead of %1 for -masm=intel.
12468         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12469         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12470         of %3 for -masm=intel.
12471         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12472         -masm=intel.
12473         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12474         -masm=intel.
12475         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12476         -masm=intel.
12477         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12478         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12479         %g1.
12480         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12481         -masm=intel.
12482         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12483         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12484         %g1 and one with %0 and %1.
12485         (avx512er_vmrcp28<mode><round_saeonly_name>,
12486         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12487         %1 for -masm=intel.
12488         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12489         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12490         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12491         of %0 and %{%4%} for -masm=intel.
12492         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12493         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12494         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12495         order of %0 and %{%5%}%{z%} for -masm=intel.
12497 2018-04-17  Jan Hubicka  <jh@suse.cz>
12499         PR lto/85405
12500         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12502 2018-04-17  Martin Liska  <mliska@suse.cz>
12504         PR ipa/85329
12505         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12506         for target_clone error message.  Make default implementation
12507         clone to be a local declaration.
12508         (separate_attrs): Add new argument and check for an empty
12509         string.
12510         (expand_target_clones): Handle it.
12511         (ipa_target_clone): Make redirection just for target_clones
12512         functions.
12514 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12515             Tom de Vries  <tom@codesourcery.com>
12517         PR middle-end/84955
12518         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12519         tiled basic blocks without omp continue statements.
12521 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12523         PR target/83660
12524         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12525         vec_extract expression as having side effects to make sure it gets
12526         a cleanup point.
12528 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12530         PR target/85403
12531         * config/i386/i386.c (get_builtin_code_for_version): Check
12532         error_mark_node.
12534 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12536         PR target/84331
12537         * config.gcc: Support "skylake".
12538         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12539         PROCESSOR_SKYLAKE.
12540         * config/i386/i386.c (m_SKYLAKE): Define.
12541         (processor_target_table): Add "skylake".
12542         (ix86_option_override_internal): Add "skylake".
12543         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12544         PROCESSOR_CANNONLAKE.
12545         (get_builtin_code_for_version): Fix priority for
12546         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12547         PROCESSOR_SKYLAKE-AVX512.
12548         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12549         (processor_type): Add PROCESSOR_SKYLAKE.
12551 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12552             Jason Merrill  <jason@redhat.com>
12554         PR c++/85112
12555         * convert.c (convert_to_integer_1): Use direct recursion for
12556         enumeral types and types with a precision less than the number
12557         of bits in their mode.
12559 2018-04-16  Julia Koval  <julia.koval@intel.com>
12561         PR target/84413
12562         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12563         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12565 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12567         PR target/85293
12568         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12569         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12570         and -mno-direct-move.
12572 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12574         PR target/83402
12575         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12576         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12577         Ensure negative shifts result in {0}.
12579 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12581         PR rtl-optimization/79916
12582         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12583         regs (if any) to define how to gnerate SD moves when LRA is in
12584         progress.
12586 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12588         PR rtl-optimization/85393
12589         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12590         * except.c (expand_dw2_landing_pad_for_region): Make static.
12591         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12592         a label and unconditional jump to old_bb, rather than
12593         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12594         basic block.
12596         PR rtl-optimization/85376
12597         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12598         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12599         instead of a specific value.
12601 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12602             Bin Cheng  <bin.cheng@arm.com>
12604         PR tree-optimization/82965
12605         PR tree-optimization/83991
12606         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12607         by_profile_only parameter.
12608         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12609         information if the loop was predicted to iterate too many times.
12610         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12612 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12614         PR lto/71991
12615         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12616         always inline.
12618 2018-04-13  Martin Liska  <mliska@suse.cz>
12619             Jakub Jelinek  <jakub@redhat.com>
12621         PR middle-end/81657
12622         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12623         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12624         * builtins.c (expand_builtin_memory_copy_args): Use
12625         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12626         handle dest_addr == pc_rtx.
12628 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12630         PR target/85291
12631         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12632         asked to not generate direct moves.
12633         (fix_trunc<mode>si2_stfiwx): Similar.
12634         (fix_trunc<mode>si2_internal): Similar.
12636 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12638         PR debug/83157
12639         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12640         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12641         lookup if dest in some wider mode is known to be const0_rtx and
12642         if so, record permanent equivalence for it to be ZERO_EXTEND of
12643         the narrower mode destination.
12645 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12647         * lto-streamer-out.c (output_function): Revert 259346.
12648         * omp-expand.c (expand_oacc_for): Likewise.
12650 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12652         PR rtl-optimization/85354
12653         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12654         * sel-sched.c (sel_global_init): ... here.
12656 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12658         PR target/85238
12659         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12660         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12661         mode for PE-COFF targets.
12662         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12663         (i386_pe_asm_lto_end): Likewise.
12664         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12665         (TARGET_ASM_LTO_END): Likewise.
12666         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12667         (i386_pe_asm_lto_start): New function.
12668         (i386_pe_asm_lto_end): Likewise.
12670 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12671             Richard Biener  <rguenther@suse.de>
12673         PR middle-end/84955
12674         * lto-streamer-out.c (output_function): Fix CFG loop state before
12675         streaming out.
12676         * omp-expand.c (expand_oacc_for): Handle calls to internal
12677         functions like regular functions.
12679 2018-04-12  Richard Biener  <rguenther@suse.de>
12681         PR lto/85371
12682         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12683         for the early LTO debug to properly generate references to it
12684         during DIE emission.  Do not re-use that for the skeleton for
12685         split-dwarf.
12686         (dwarf2out_early_finish): Likewise.
12688 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12690         PR target/85328
12691         * config/i386/sse.md
12692         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12693         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12694         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12695         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12696         and output is a reg, avoid creating invalid lowpart subreg, but
12697         instead split into a 512-bit move.  Don't split if not AVX512VL,
12698         input is xmm16+ reg and output is a mem.
12699         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12700         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12701         xmm16+ reg and output is a mem.
12703 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12705         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12706         also for flag_dwarf2_cfi_asm.
12708 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12710         PR rtl-optimization/85342
12711         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12712         a bool scalar var inside of the loop instead.  Don't try to update
12713         recog_data.operand after failed apply_change_group.
12715 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12717         PR target/85296
12718         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12719         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12720         array with flexible array member as array without given dimension.
12721         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12722         argument for undefined param to true.
12724 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12726         PR target/85321
12727         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12728         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12729         from PowerPC section.
12730         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12731         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12732         help text that is too long.
12733         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12734         help text that is too long.
12735         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12736         help text that is too long.
12738 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12740         * config/alpha/alpha.md (stack_probe_internal): Rename
12741         from "probe_stack".  Update all callers.
12743 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12745         PR rtl-optimization/84566
12746         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12747         sched_macro_fuse_insns.
12749 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12751         PR target/84301
12752         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12753         (compute_block_dependences): ... from here.
12755 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12757         PR tree-optimization/85331
12758         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12759         from int to HOST_WIDE_INT.
12761 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12763         PR ipa/84149
12764         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12765         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12766         not the same as the source val.
12767         (cgraph_edge_brings_value_p): New parameter.
12768         (gather_edges_for_value): Pass destination value to
12769         cgraph_edge_brings_value_p.
12770         (perhaps_add_new_callers): Likewise.
12771         (get_info_about_necessary_edges): Likewise and exclude values brought
12772         only by self-recursive edges.
12773         (create_specialized_node): Redirect only clones of self-calling edges.
12774         (+self_recursive_pass_through_p): New function.
12775         (find_more_scalar_values_for_callers_subset): Use it.
12776         (find_aggregate_values_for_callers_subset): Likewise.
12777         (known_aggs_to_agg_replacement_list): Removed.
12778         (decide_whether_version_node): Re-calculate known constants for all
12779         remaining context clones.
12781 2018-04-11  Richard Biener  <rguenther@suse.de>
12783         PR lto/85339
12784         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12785         from early DWARF output.
12786         (dwarf2out_early_finish): Output line info unconditionally into
12787         early DWARF and add reference to it.
12789 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12791         PR target/85281
12792         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12793         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12794         other than V2DFmode using iptr mode attribute.
12795         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12797 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12799         PR rtl-optimization/84659
12800         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12802 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12804         PR debug/85302
12805         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12806         SIZEP is NULL.
12807         (output_loc_list): Pass address of a dummy size variable even in the
12808         locview handling loop.
12809         (index_location_lists): Add comment on why skip_loc_list_entry can't
12810         call size_of_locs.
12812 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12814         PR target/85261
12815         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12816         into register.
12818 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12820         PR target/85321
12821         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12822         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12823         and -mstring-compare-inline-limit.
12825 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12827         PR target/85287
12828         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12829         for stack clash protection in a register whenever we need it to be in
12830         a register.
12832 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12834         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12835         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12837 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12839         PR target/85321
12840         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12841         the help text.
12842         (mlong-double-): Ditto.
12843         * config/rs6000/sysv4.opt (msdata=): Ditto.
12844         (mtls-size=): Ditto.
12846 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12848         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12849         erroneous entries for
12850         "vector int vec_ldl (int, long int *)", and
12851         "vector unsigned int vec_ldl (int, unsigned long int *)".
12852         Add comments and entries for
12853         "vector bool char vec_ldl (int, bool char *)",
12854         "vector bool short vec_ldl (int, bool short *)",
12855         "vector bool int vec_ldl (int, bool int *)",
12856         "vector bool long long vec_ldl (int, bool long long *)",
12857         "vector pixel vec_ldl (int, pixel *)",
12858         "vector long long vec_ldl (int, long long *)",
12859         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12860         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12861         type tree bool_long_long_type_node and correct definition of
12862         bool_V2DI_type_node to make reference to this new type tree.
12863         (rs6000_mangle_type): Replace erroneous reference to
12864         bool_long_type_node with bool_long_long_type_node.
12865         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12866         comments to emphasize sign distinctions for char and int types and
12867         replace RS6000_BTI_bool_long constant with
12868         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12869         use of RS6000_BTI_pixel.
12870         (bool_long_type_node): Remove this macro definition.
12871         (bool_long_long_type_node): New macro definition
12873 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12875         PR rtl-optimization/85300
12876         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12877         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12878         simplify_unary_operation fails.
12880 2018-04-10  Martin Liska  <mliska@suse.cz>
12882         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12883         cgraph_edge and ipa_ref.
12885 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12887         PR target/85177
12888         PR target/85255
12889         * config/i386/sse.md
12890         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12891         computation of the VEC_MERGE selector from mask.
12892         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12893         Fix decoding of the VEC_MERGE selector into mask.
12895 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12897         PR tree-optimization/85286
12898         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12900 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12902         * final.c (final_1): Set insn_last_address as well as
12903         insn_current_address.
12905 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12907         PR target/85173
12908         * explow.c (emit_stack_probe): Call validize_mem on memory location
12909         before passing it to gen_probe_stack.  Create address operand and
12910         legitimize it for the probe_stack_address case.
12912 2018-04-09  Jan Hubicka  <jh@suse.cz>
12914         PR lto/85078
12915         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12916         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12917         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12918         walk basetypes.
12919         (free_lang_data): Rebuild type inheritance graph.
12921 2018-04-09  Martin Sebor  <msebor@redhat.com>
12923         * invoke.texi (-finline-small-functions): Mention other optimization
12924         options.
12925         (-findirect-inlining, -fpartial-inlining): Same.
12926         (-finline-functions-called-once): Same.
12927         (-freorder-blocks-and-partition): Same.
12929 2018-04-09  Jan Hubicka  <jh@suse.cz>
12931         PR rtl/84058
12932         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12933         jumps; choose last target that matches the criteria (i.e.
12934         no partition changes for non-crossing jumps).
12935         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12936         support for redirecting crossing jumps to non-crossing.
12938 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12940         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12941         also for naked functions.
12943 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12945         * config/arc/arc.md (add_shift): New pattern.
12946         (add_shift2): Likewise.
12947         (sub_shift): Likewise.
12948         (sub_shift_cmp0_noout): Likewise.
12949         (compare_si_ashiftsi): Likewise.
12950         (xbfu_cmp0_noout): New combine pattern.
12951         (xbfu_cmp0"): Likewise.
12952         (movsi_set_cc_insn): Place the predicable variant first.
12953         (commutative_binary_cmp0_noout): Remove clobber.
12954         (commutative_binary_cmp0): New pattern.
12955         (noncommutative_binary_cmp0): Likewise.
12956         (noncommutative_binary_cmp0_noout): Likewise.
12957         (noncommutative_binary_comparison_result_used): Removed.
12958         (rsub_cmp0): New pattern.
12959         (rsub_cmp0_noout): Likewise.
12960         (extzvsi): Changed, keep only meaningful variants.
12961         (SQH, SEZ): New iterators.
12962         (SQH_postfix): New mode attribute.
12963         (SEZ_prefix): New code attribute.
12964         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12965         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12966         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12967         of numerical value.
12968         (noncommutative_operator): Check the availability of barrel
12969         shifter option.
12971 2018-04-09  Richard Biener  <rguenther@suse.de>
12973         PR tree-optimization/85284
12974         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12975         Only use the niter constraining form of simple_iv when the exit
12976         is always executed.
12978 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12980         PR target/84041
12981         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12982         (define_expand "*memory_barrier"): New define_expand.
12983         (define_insn "memory_barrier"): New insn.
12985 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12987         PR rtl-optimization/80463
12988         PR rtl-optimization/83972
12989         PR rtl-optimization/83480
12991         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12992         correct producer for the insn.
12993         (tidy_control_flow): Fixup seqnos in case of debug insns.
12995 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12997         PR rtl-optimization/83913
12999         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13000         different sched-times when merging exprs.
13002 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13004         PR rtl-optimization/83962
13006         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13007         tidy_fallthru_edge and tidy_control_flow.
13009 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13011         PR rtl-optimization/83530
13013         * sel-sched.c (force_next_insn): New global variable.
13014         (remove_insn_for_debug): When force_next_insn is true, also leave only
13015         next insn in the ready list.
13016         (sel_sched_region): When the region wasn't scheduled, make another pass
13017         over it with force_next_insn set to 1.
13019 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13021         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13022         into tm_file.
13023         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13024         for interrupt control.
13025         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13026         functions for interrupt control.
13027         * config/nds32/nds32-intrinsic.md: Likewise.
13028         * config/nds32/nds32_intrinsic.h: Likewise.
13029         * config/nds32/nds32.h (nds32_builtins): Likewise.
13031 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13033         * config/nds32/nds32.c (nds32_init_machine_status,
13034         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13035         strict_aligned_p field.
13036         (nds32_expand_to_rtl_hook): New function.
13037         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13038         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13040 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13041             Chung-Ju Wu  <jasonwucj@gmail.com>
13043         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13044         * config/nds32/nds32-n7.md: New file.
13045         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13046         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13047         pipeline.
13048         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13049         * config/nds32/nds32.md (pipeline_model): Add n7.
13050         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13051         * config/nds32/pipelines.md: Include n7 settings.
13053 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13054             Chung-Ju Wu  <jasonwucj@gmail.com>
13056         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13057         * config/nds32/nds32-e8.md: New file.
13058         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13059         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13060         pipeline.
13061         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13062         * config/nds32/nds32.md (pipeline_model): Add e8.
13063         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13064         * config/nds32/pipelines.md: Include e8 settings.
13066 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13067             Chung-Ju Wu  <jasonwucj@gmail.com>
13069         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13070         * config/nds32/nds32-n8.md: New file.
13071         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13072         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13073         pipeline.
13074         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13075         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13076         * config/nds32/nds32.md (pipeline_model): Add n8.
13077         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13078         * config/nds32/pipelines.md: Include n8 settings.
13080 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13081             Chung-Ju Wu  <jasonwucj@gmail.com>
13083         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13084         * config/nds32/nds32-n9-2r1w.md: New file.
13085         * config/nds32/nds32-n9-3r2w.md: New file.
13086         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13087         nds32_register_ports): New or modify for cpu n9.
13088         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13089         pipeline.
13090         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13091         * config/nds32/nds32-utils.c: New file.
13092         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13093         TARGET_MUL_SLOW): Define.
13094         * config/nds32/nds32.md (pipeline_model): New attribute.
13095         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13096         New options that support cpu n9.
13097         * config/nds32/pipelines.md: Include n9 settings.
13098         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13100 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13102         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13103         information if necessary.
13104         (output_cond_branch_compare_zero): Likewise.
13105         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13106         (nds32_target_alignment): Refine for alignment.
13107         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13108         (FUNCTION_BOUNDARY): Modify.
13109         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13110         align case.
13111         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13113 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13115         * config/nds32/constants.md (unspec_volatile_element): Add values for
13116         TLB operation and data prefetch.
13117         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13118         functions for TLB operation and data prefetch.
13119         * config/nds32/nds32-intrinsic.md: Likewise.
13120         * config/nds32/nds32_intrinsic.h: Likewise.
13121         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13122         (nds32_print_operand): Likewise.
13123         * config/nds32/nds32.h (nds32_builtins): Likewise.
13125 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13126         Andrew Pinski <pinsika@gcc.gnu.org>
13128         PR middle-end/82976
13129         * match.pd: Use constant_boolean_node of correct type instead of
13130         boolean_true_node or boolean_false_node for simplifying
13131         pointer comparisons to zero.
13133 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13135         PR tree-optimization/80021
13136         * tree.c (verify_type_variant): Make error call in verify_variant_match
13137         translatable and remove final full stop.
13139 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13141         * config/nds32/constants.md (unspec_volatile_element): Add
13142         UNSPEC_VOLATILE_EH_RETURN.
13143         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13144         nds32_output_stack_pop): Support dwarf exception handling process.
13145         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13146         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13147         exception handling process.
13148         (nds32_compute_stack_frame): Likewise.
13149         (nds32_return_addr_rtx): Likewise.
13150         (nds32_initial_elimination_offset): Likewise.
13151         (nds32_expand_prologue): Likewise.
13152         (nds32_expand_epilogue): Likewise.
13153         (nds32_dynamic_chain_address): New function.
13154         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13155         exception handling.
13156         (DYNAMIC_CHAIN_ADDRESS): Define.
13157         (EH_RETURN_DATA_REGNO): Define.
13158         (EH_RETURN_STACKADJ_RTX): Define.
13159         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13160         patterns for dwarf exception handling.
13162 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13164         * config/nds32/nds32.h: Clean up obsolete macros.
13166 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13168         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13169         Add enum values for particular instructions.
13170         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13171         particular intrinsic functions.
13172         * config/nds32/nds32-intrinsic.md: Likewise.
13173         * config/nds32/nds32_intrinsic.h: Likewise.
13174         * config/nds32/nds32.h (nds32_builtins): Likewise.
13175         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13176         (btst, ave): New patterns for particular instructions.
13178 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13180         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13181         Add enum values for atomic load/store and memory sync.
13182         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13183         and memory sync.
13184         * config/nds32/nds32-intrinsic.md: Likewise.
13185         * config/nds32/nds32_intrinsic.h: Likewise.
13186         * config/nds32/nds32.h (nds32_builtins): Likewise.
13188 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13190         PR tree-optimization/85257
13191         * fold-const.c (native_encode_vector): If not all elts could fit
13192         and off is -1, return 0 rather than offset.
13193         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13194         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13195         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13196         adjust buffer in native_interpret_expr call.
13198 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13200         * config/nds32/constants.md (unspec_volatile_element): Add cache
13201         control enum values.
13202         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13203         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13204         * config/nds32/nds32.c (nds32_cctl_names): New.
13205         (nds32_print_operand): Handle cache control register names.
13206         * config/nds32/nds32.h (nds32_builtins): New enum values.
13207         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13208         macros.
13209         * config/nds32/nds32.md (type): Add mmu.
13210         * config/nds32/pipelines.md (simple_insn): Add mmu.
13212 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13214         * config/nds32/nds32.md (type): Remove call.
13215         * config/nds32/pipelines.md (simple_insn): Likewise.
13217 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13219         * config/nds32/constants.md (unspec_volatile_element): Add
13220         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13221         UNSPEC_VOLATILE_FMFCFG.
13222         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13223         description for fmfcfg and fmfcsr.
13224         (bdesc_1arg): Add fmtcsr.
13225         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13226         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13227         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13228         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13229         unspec_fmfcfg): New patterns.
13230         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13231         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13232         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13233         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13234         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13235         __nds32__fmfcfg): Define.
13237 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13239         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13240         intrinsic register names.
13241         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13242         intrinsic register enum values and macros.
13244 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13246         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13247         for load/store addressing form.
13248         (nds32_print_operand_address): Likewise.
13250 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13252         PR target/85196
13253         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13254         based on LABEL_REF.  Remove useless assertion.
13255         (pic_address_needs_scratch): Fix formatting.
13256         (sparc_legitimize_pic_address): Minor tweaks.
13257         (sparc_delegitimize_address): Adjust assertion accordingly.
13258         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13259         into symbolic_operand.
13260         (movsi_high_pic_label_ref): Likewise.
13261         (movsi_lo_sum_pic_label_ref): Likewise.
13262         (movdi_pic_label_ref): Likewise.
13263         (movdi_high_pic_label_ref): Likewise.
13264         (movdi_lo_sum_pic_label_ref): Likewise.
13266 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13268         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13269         custom LIB_SPEC setup.
13271 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13272             Kito Cheng  <kito.cheng@gmail.com>
13274         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13275         * config/riscv/freebsd.h: New.
13277 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13279         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13280         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13281         file.
13283 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13284             Kito Cheng  <kito.cheng@gmail.com>
13286         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13287         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13288         * config/nds32/nds32-protos.h (nds32_output_call,
13289         nds32_output_return): Declare.
13290         * config/nds32/nds32.md: Refine all the call and return patterns.
13292 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13294         PR debug/85252
13295         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13296         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13298         PR rtl-optimization/84872
13299         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13300         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13301         EDGE_CROSSING edge.
13303 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13305         * expr.c (copy_blkmode_to_reg): Revert 254862.
13306         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13308 2018-04-06  Richard Biener  <rguenther@suse.de>
13310         PR middle-end/85244
13311         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13312         after seeing a component reference with an adjacent field.  Treat
13313         refs to arrays at struct end of external decls similar to
13314         refs to unconstrained commons.
13316 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13318         PR sanitizer/85213
13319         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13320         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13321         recursive calls.
13322         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13323         save_p here.
13325 2018-04-06  Richard Biener  <rguenther@suse.de>
13327         PR middle-end/85180
13328         * alias.c (find_base_term): New wrapper around find_base_term
13329         unwinding CSELIB_VAL_PTR changes.
13330         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13331         recursion.
13333 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13335         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13336         instructions.
13337         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13338         constant definitions.
13339         ("nop"): lr 0,0 -> nopr r0
13340         ("nop_lr0", "nop_lr1"): New insn definitions.
13342 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13344         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13345         NDS32_V3PUSH_AVAILABLE_P macro.
13347 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13348             Chung-Ju Wu  <jasonwucj@gmail.com>
13350         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13351         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13352         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13353         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13354         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13355         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13356         * config/nds32/constraints.md: New constraints and checking for hard
13357         float configuration.
13358         * config/nds32/iterators.md: New mode iterator and attribute for hard
13359         float configuration.
13360         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13361         patterns.
13362         * config/nds32/nds32-fpu.md: New file.
13363         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13364         deal with hard float code generation.
13365         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13366         ARCH_V3S.
13367         (abi_type, float_reg_number): New enum type.
13368         * config/nds32/nds32-predicates.c: New predicates for hard float.
13369         * config/nds32/nds32-protos.h: Declare functions for hard float.
13370         * config/nds32/nds32.c: Implementation for hard float configuration.
13371         * config/nds32/nds32.h: Definitions for hard float configuration.
13372         * config/nds32/nds32.md: Include hard float machine description and
13373         modify patterns for hard float configuration.
13374         * config/nds32/nds32.opt: New options for hard float configuration.
13375         * config/nds32/predicates.md: New predicates for hard float
13376         configuration.
13378 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13380         * common/config/nds32/nds32-common.c
13381         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13383 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13385         PR middle-end/85195
13386         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13387         CONSTRUCTOR_ELT (ctor, ...)->value.
13389 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13391         PR target/85193
13392         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13394 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13396         PR target/85204
13397         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13398         cond jump.
13400 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13401             Kito Cheng  <kito.cheng@gmail.com>
13403         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13404         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13405         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13406         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13408 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13409             Kito Cheng  <kito.cheng@gmail.com>
13411         * config/nds32/constraints.md (Ufe): New memory constraint.
13412         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13413         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13414         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13415         operands.
13416         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13417         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13419 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13421         * config/nds32/nds32.md: Use optimize_size in the condition for
13422         alu-shift instructions.
13424 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13426         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13428 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13430         * config/nds32/nds32.md (negsi2): Refine pattern.
13432 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13433             Chung-Ju Wu  <jasonwucj@gmail.com>
13435         * config/nds32/iterators.md (shift_rotate): New code iterator.
13436         (shift): New code attribute.
13437         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13438         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13439         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13440         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13441         bit-wise operations.
13442         (andsi3, *andsi3): Ditto.
13443         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13444         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13445         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13446         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13447         nds32_ior_operand, nds32_xor_operand): New predicates.
13449 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13451         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13452         (addsi3, subsi3): ... this.
13454 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13456         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13458 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13460         * config/nds32/nds32.md: Adjust indention.
13462 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13464         * config/nds32/nds32.md (feature): New attribute.
13466 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13468         * config/nds32/nds32.md (subtype): New attribute.
13470 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13472         PR target/85203
13473         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13474         expansion to perform a bitwise AND of the argument followed by a
13475         boolean negation of the result.
13477 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13479         PR rtl-optimization/84878
13480         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13481         the basic block.  Assert the use reference is not artificial and that
13482         it has an associated insn.
13484 2018-04-04  Michael Matz  <matz@suse.de>
13486         * builtins.c (compute_objsize): Pass correct operand
13487         to array_at_struct_end_p.
13489 2018-04-04  Richard Biener  <rguenther@suse.de>
13491         PR lto/85176
13492         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13493         from contexts for DINFO_LEVEL_TERSE and below.
13495 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13497         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13498         resiter_operand condition.
13499         * config/nds32/nds32.md (*move<mode>): Ditto.
13501 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13502             Monk Chiang  <sh.chiang04@gmail.com>
13504         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13506 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13508         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13510 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13511             Kito Cheng  <kito.cheng@gmail.com>
13513         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13514         nds32_cond_code_str, output_cond_branch,
13515         output_cond_branch_compare_zero, nds32_expand_cbranch,
13516         nds32_expand_cstore, nds32_expand_movcc,
13517         nds32_output_cbranchsi4_equality_zero,
13518         nds32_output_cbranchsi4_equality_reg,
13519         nds32_output_cbranchsi4_equality_reg_or_const_int,
13520         nds32_output_cbranchsi4_greater_less_zero: New functions.
13521         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13522         nds32_expand_cstore, nds32_expand_movcc,
13523         nds32_output_cbranchsi4_equality_zero,
13524         nds32_output_cbranchsi4_equality_reg,
13525         nds32_output_cbranchsi4_equality_reg_or_const_int,
13526         nds32_output_cbranchsi4_greater_less_zero): Declare.
13527         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13528         nds32_rimm11s_operand): New predicates.
13529         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13530         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13531         patterns.
13533 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13535         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13536         * config/nds32/nds32.md: Ditto.
13537         * config/nds32/pipelines.md: Ditto.
13539 2018-04-04  Richard Biener  <rguenther@suse.de>
13541         PR tree-optimization/85168
13542         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13543         propagating abnormals.
13545 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13547         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13549 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13550             Kito Cheng  <kito.cheng@gmail.com>
13552         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13553         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13554         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13555         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13556         * config/nds32/nds32.md (sibcall_internal): New.
13557         (sibcall_register): Remove.
13558         (sibcall_immediate): Remove.
13559         (sibcall_value_internal): New.
13560         (sibcall_value_register): Remove.
13561         (sibcall_value_immediate): Remove.
13562         * config/nds32/predicates.md (nds32_general_register_operand): New.
13563         (nds32_call_address_operand): New.
13565 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13567         PR rtl-optimization/85167
13568         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13569         bb_defs if *split_p, instead preinitialize it to NULL.
13571         PR tree-optimization/85156
13572         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13573         evaluating the argument multiple times.
13575 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13577         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13578         than vector.
13579         (_mm_cvtpd_ps): Likewise.
13580         (_mm_cvttpd_epi32): Likewise.
13581         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13582         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13583         vector, pixel, and bool following altivec.h include.
13585 2018-04-03  Martin Sebor  <msebor@redhat.com>
13587         * doc/extend.texi (Common Function Attributes): Clarify.
13588         (const attribute): Likewise.
13589         (pure attribute): Likewise.
13591 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13593         PR target/85169
13594         * config/i386/i386.c (ix86_expand_vector_set): Use
13595         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13597 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13599         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13600         instructions when changing rounding bits to preserve precision bits
13601         in the x87 control word.
13603 2018-04-03  Martin Liska  <mliska@suse.cz>
13605         PR tree-optimization/82491
13606         * rtl.h (strip_offset_and_add): Replace += suboffset with
13607         poly_uint64 () + suboffset.
13609 2018-03-29  Martin Liska  <mliska@suse.cz>
13610             Martin Jambor  <mjambor@suse.cz>
13612         PR ipa/84947
13613         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13614         param_type is not an integral or pointer type.
13616 2018-04-03  Richard Biener  <rguenther@suse.de>
13618         * sese.h (recompute_all_dominators): Remove.
13620 2018-04-02  Martin Sebor  <msebor@redhat.com>
13622         * doc/invoke.texi (-Wrestrict): Fix typos.
13624 2018-04-02  Jim Wilson  <jimw@sifive.com>
13626         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13627         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13628         (<optab>di3, <optab>si3_extend): Likewise.
13629         (<optab>si3_mask, <optab>si3_mask_1): New.
13630         (<optab>di3_mask, <optab>di3_mask_1): New.
13631         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13632         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13633         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13635 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13637         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13638         example.
13640 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13642         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13643         (nds32_canonicalize_comparison): New function.
13645 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13646             Kito Cheng  <kito.cheng@gmail.com>
13647             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13649         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13650         * config/nds32/constants.md (unspec_volatile_element): Add
13651         UNSPEC_VOLATILE_RELAX_GROUP.
13652         * config/nds32/nds32-relax-opt.c: New file.
13653         * config/nds32/nds32-predicates.c
13654         (nds32_symbol_load_store_p): New function.
13655         * config/nds32/nds32-protos.h
13656         (nds32_symbol_load_store_p): Declare function.
13657         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13658         * config/nds32/nds32.c
13659         (nds32_register_pass): New function to register pass.
13660         (nds32_register_passes): New function to register passes.
13661         * config/nds32/nds32.md (relax_group): New pattern.
13662         * config/nds32/nds32.opt (mrelax-hint): New option.
13663         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13665 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13667         * config/nds32/t-nds32: Modify files dependency.
13669 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13671         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13672         (PROFILE_HOOK): Define its implementation.
13674 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13676         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13677         type and 32-bit size.
13679 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13681         PR middle-end/85090
13682         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13683         (V_128_256): New mode iterator.
13684         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13685         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13686         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13687         of V.
13688         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13689         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13691 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13693         PR target/83315
13694         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13695         NaN inputs correctly.
13697 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13699         PR target/80546
13700         * config/rs6000/vsx.md (??r): New mode attribute.
13701         (*vsx_mov<mode>_64bit): Use it.
13702         (*vsx_mov<mode>_32bit): Likewise.
13704 2018-03-30  Martin Sebor  <msebor@redhat.com>
13706         PR tree-optimization/84818
13707         * builtins.c (check_access): Use warning_n.
13709 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13711         PR target/83822
13712         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13713         condition.
13714         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13715         condition.
13717 2018-03-30  Julia Koval  <julia.koval@intel.com>
13719         PR target/84413
13720         * x86-tune.def (movx, partial_reg_dependency): Enable for
13721         m_SKYLAKE_AVX512.
13723 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13725         PR inline-asm/84985
13726         * lra-constraints.c (process_alt_operands): Move setting
13727         this_alternative_matches below.
13729 2018-03-29  Martin Liska  <mliska@suse.cz>
13731         PR lto/84995.
13732         * doc/invoke.texi: Document how LTO works with debug info.
13733         Describe auto-load support of binutils.  Mention 'x86-64'
13734         as valid option value of -march option.
13736 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13738         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13740         PR c/85094
13741         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13742         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13743         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13744         checking.
13746 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13748         PR target/84912
13749         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13750         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13751         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13752         for RS6000_BTM_POWERPC64.
13753         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13754         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13755         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13756         definition.
13757         (DIVDE): Use it.
13758         (DIVDEU): Likewise.
13760 2018-03-28  Carl Love  <cel@us.ibm.com>
13762         Revert
13763         2017-09-27  Carl Love  <cel@us.ibm.com>
13765         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13766         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13767         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13768         fctiw instruction.
13770 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13772         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13773         instead of __vector bool.
13774         (_mm_max_pu8): Likewise.
13775         (_mm_min_pi16): Likewise.
13777 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13779         PR target/84912
13780         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13781         (DIVWEUO): Likewise.
13782         (DIVDEO): Likewise.
13783         (DIVDEUO): Likewise.
13784         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13785         DIVWEUO and DIVDEUO.
13786         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13787         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13788         (div_extend): Likewise.
13789         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13790         builtin function.
13791         (__builtin_divweuo): Likewise.
13792         (__builtin_divdeo): Likewise.
13793         (__builtin_divdeuo): Likewise.
13795 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13797         PR target/85095
13798         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13799         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13801         PR tree-optimization/82004
13802         * gimple-match-head.c (optimize_pow_to_exp): New function.
13803         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13804         Don't fold to exp if optimize_pow_to_exp is false.
13806 2018-03-28  Martin Liska  <mliska@suse.cz>
13808         PR other/84819
13809         * calls.c (initialize_argument_information): Fix trailing space.
13810         * common.opt: Fix typo and provide better explanation for
13811         -fsanitize-coverage option.
13812         * config/i386/i386.opt: Fix typo.
13814 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13815             Martin Liska  <mliska@suse.cz>
13817         PR sanitizer/85081
13818         * gimplify.c (asan_poison_variable): Don't do the check for
13819         gimplify_omp_ctxp here.
13820         (gimplify_decl_expr): Do it here.
13821         (gimplify_target_expr): Likewise.
13823 2018-03-28  Martin Liska  <mliska@suse.cz>
13825         PR target/84988
13826         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13827         chkp_type_bounds_count if MPX is not enabled.
13829 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13831         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13833 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13835         PR target/84914
13836         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13837         function to create the function decl for complex long double
13838         multiply and divide for -mabi=ieeelongdouble.
13839         (init_float128_ieee): Call it.
13841 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13843         PR target/85044
13844         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13845         -fcf-protection=branch -mibt.
13846         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13848 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13850         PR target/81863
13851         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13852         arm_word_relocations.
13854 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13856         PR target/85056
13857         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13858         extern array declarations.
13860 2018-03-27  Richard Biener  <rguenther@suse.de>
13862         PR middle-end/84067
13863         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13864         explicit single_use checks.
13866 2018-03-27  Richard Biener  <rguenther@suse.de>
13868         PR tree-optimization/85082
13869         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13870         Valueize the VUSE.
13872 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13874         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13875         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13876         Turn on fasynchronous-unwind-tables and funwind-tables.
13878 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13880         PR target/85073
13881         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13882         (*bmi_blsr_<mode>_ccz): Ditto.
13884 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13886         PR tree-optimization/85063
13887         * omp-general.c (offloading_function_p): New function.  Factor out
13888         of ...
13889         * omp-offload.c (pass_omp_target_link::gate): ... here.
13890         * omp-general.h (offloading_function_p): Declare.
13891         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13892         with attribute omp declare target for offloading functions.
13894 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13896         PR tree-optimization/84005
13897         * tree-data-ref.h (get_base_for_alignment): Declare.
13898         * tree-data-ref.c (get_base_for_alignment_1): New function.
13899         (get_base_for_alignment): Likewise.
13900         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13901         get_base_for_alignment to find a suitable base object, instead
13902         of always using drb->base_address.
13904 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13906         PR inline-asm/85022
13907         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13908         known size by default.
13910 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13912         PR inline-asm/85030
13913         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13914         and non BLKmode operands.
13916 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13918         PR target/85026
13919         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13920         Clean up attributes.
13922 2018-03-23  Richard Biener  <rguenther@suse.de>
13924         PR debug/85020
13925         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13926         we are going to emit early debug for LTO.
13928 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13930         PR inline-asm/85034
13931         * function.c (match_asm_constraints_1): Don't optimize if input
13932         doesn't satisfy general_operand predicate for output's mode.
13934         PR inline-asm/85022
13935         * alias.c (write_dependence_p): Don't require for x_canonicalized
13936         non-VOIDmode if x has VOIDmode.
13938         PR sanitizer/85029
13939         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13940         just don't try to optimize it rather than assert it never happens.
13942 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13944         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13945         macro expansions for definition of ST_INTERNAL_<mode> and
13946         LD_INTERNAL_<mode> builtins.
13947         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13948         Remove prototype.
13949         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13950         function.
13951         (altivec_expand_st_builtin): Likewise.
13952         (altivec_expand_builtin): Remove calls to deleted functions.
13953         (rs6000_address_for_altivec): Delete this function.
13954         * config/rs6000/vector.md: Remove expands for
13955         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13957 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13959         PR target/84826
13960         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13961         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13962         re-computing once computed.
13963         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13964         (arm_init_machine_status): Initialize
13965         machine->static_chain_stack_bytes.
13967 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13969         PR target/84760
13970         * doc/extend.texi: Add four new prototypes for vec_ld.
13971         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13972         definitions for more logical presentation.
13973         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13974         entries for V1TI variants of __builtin_altivec_ld builtin.
13975         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13976         handling of V1TI variant of LVX icode pattern.
13977         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13978         (rs6000_gimple_fold_builtin): Likewise.
13979         (altivec_init_builtins): Add code to define
13980         __builtin_altivec_lvx_v1ti function.
13982 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13984         PR inline-asm/84941
13985         * function.c (match_asm_constraints_1): Don't do the optimization
13986         if input isn't a REG, SUBREG, MEM or constant.
13988 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13990         PR tree-optimization/84956
13991         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13992         bb_has_abnormal_pred.
13994 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13996         PR sanitizer/85018
13997         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13998         DECL_INITIAL (decl) to decl at the end.
13999         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14000         adjust the comment.
14002 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14004         * doc/extend.texi (__builtin_tgmath): Document when complex
14005         integer types are treated as _Complex _Float64.
14007 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14009         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14011 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14013         PR tree-optimization/84960
14014         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14015         if it is ENTRY block, move them into single succ of ENTRY in that case.
14017 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14019         PR tree-optimization/84811
14020         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14021         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14022         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14023         (known_subrange_p): Update accordingly.  Cast each value involved
14024         in the size comparison, rather than casting the result of the
14025         subtraction.
14027 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14029         PR tree-optimization/84982
14030         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14031         by flipping the least significant bit rather than all bits from
14032         bitpos to bitpos + bitsize - 1.
14034 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14036         * doc/extend.texi (Deprecated Features): Remove mention of
14037         long-deleted deprecations.
14039 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14041         PR jit/84288
14042         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14043         * configure: Regenerate.
14045 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14047         PR tree-optimization/83126
14048         * tree-parloops.c (num_phis): New function.
14049         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14051 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14053         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14054         mention anon-struct/union members and trailing attributes.
14056 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14058         PR tree-optimization/84969
14059         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14060         builtin memset partitions if they set different rhs values.
14062 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14064         PR rtl-optimization/84989
14065         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14066         VEC_DUPLICATE with scalar result mode.
14068 2018-03-21  Martin Liska  <mliska@suse.cz>
14070         PR ipa/84963
14071         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14072         not intended return statement.
14074 2018-03-21  Martin Liska  <mliska@suse.cz>
14076         PR target/84988
14077         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14078         (chkp_find_bound_slots_1): Limit number of iterations.
14080 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14082         PR target/84838
14083         * Minor grammar fixes for x86 options.
14085 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14087         PR debug/84875
14088         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14089         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14091 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14093         PR target/83789
14094         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14095         (altivec_lvx_<mode>_1op): Likewise.
14096         (altivec_stvx_<mode>_2op): Likewise.
14097         (altivec_stvx_<mode>_1op): Likewise.
14098         (altivec_lvx_<VM2:mode>): New define_expand.
14099         (altivec_stvx_<VM2:mode>): Likewise.
14100         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14101         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14102         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14103         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14104         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14105         (rs6000_gen_lvx): Likewise.
14106         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14107         (altivec_expand_stv_builtin): Likewise.
14108         (altivec_expand_builtin): Likewise.
14109         * config/rs6000/vector.md: Likewise.
14111 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14113         PR target/82518
14114         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14115         BYTES_BIG_ENDIAN.
14117 2018-03-20  Richard Biener  <rguenther@suse.de>
14119         PR target/84986
14120         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14121         sign-conversions as zero, fall back to standard scalar_stmt
14122         cost for the rest.
14124 2018-03-20  Martin Liska  <mliska@suse.cz>
14126         PR ipa/84825
14127         * predict.c (rebuild_frequencies): Handle case when we have
14128         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14130 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14132         PR target/84990
14133         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14134         flag_section_anchors.
14135         * varasm.c (use_blocks_for_decl_p): Remove hack for
14136         dw2_force_const_mem.
14138         PR target/84845
14139         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14140         to ...
14141         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14142         be created, use lowpart_subreg of operands[0] rather than operands[0]
14143         itself.
14144         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14145         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14146         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14147         and n constraint instead of aarch64_shift_imm_di and Usd.
14148         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14149         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14151 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14153         PR target/82989
14154         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14155         to favor GPR over NEON registers.
14156         (<shift>di3_neon): Likewise.
14158 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14160         PR target/84952
14161         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14162         (nvptx_process_pars): Emit bar.sync asap and alap.
14164 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14166         PR target/84954
14167         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14168         seen_label if seen_label is already set.
14170 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14172         PR target/84945
14173         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14174         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14175         Use 1U instead of 1.  Formatting fixes.
14177         PR c/84953
14178         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14179         instead of TREE_TYPE (s1) for the return value.
14181 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14183         PR tree-optimization/84946
14184         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14185         bitsize + bitsize in poly_uint64 rather than poly_int64.
14187         PR sanitizer/78651
14188         * dwarf2asm.c: Include fold-const.c.
14189         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14190         of decl rather than decl itself.
14192         PR rtl-optimization/84643
14193         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14195 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14197         PR sanitizer/78651
14198         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14199         calling assemble_variable.
14201 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14203         PR target/81647
14204         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14205         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14207 2018-03-19  Jim Wilson  <jimw@sifive.com>
14209         PR bootstrap/84856
14210         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14211         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14212         (riscv_first_stack_step): Likewise.
14213         (riscv_option_override): Use STACK_BOUNDARY instead of
14214         MIN_STACK_BOUNDARY.
14215         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14216         MIN_STACK_BOUNDARY.
14217         (BIGGEST_ALIGNMENT): Set to 128.
14218         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14219         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14220         STACK_BOUNDARY.
14222 2018-03-19  Richard Biener  <rguenther@suse.de>
14224         PR tree-optimization/84933
14225         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14226         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14228 2018-03-19  Richard Biener  <rguenther@suse.de>
14230         PR tree-optimization/84859
14231         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14232         (cond_if_else_store_replacement): Perform sinking operation on
14233         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14234         Generalize what a BB with a single eligible store is.
14236 2018-03-19  Richard Biener  <rguenther@suse.de>
14238         PR tree-optimization/84929
14239         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14240         chrec_is_positive against non-chrec arg.
14242 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14244         PR target/84711
14245         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14247 2018-03-18  Martin Liska  <mliska@suse.cz>
14249         PR rtl-optimization/84635
14250         * regrename.c (build_def_use): Use matches_mode only when
14251         matches >= 0.
14253 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14255         PR tree-optimization/84913
14256         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14257         vectorize chains of COND_EXPRs.
14259 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14261         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14263 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14265         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14267 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14269         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14271 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14272             Kito Cheng  <kito.cheng@gmail.com>
14274         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14275         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14276         (nds32_adjust_reg_alloc_order): New function.
14277         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14279 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14281         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14282         nds32_print_operand, nds32_print_operand_address): Use
14283         HOST_WIDE_INT_PRINT_DEC instead.
14285 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14287         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14289 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14291         PR target/84902
14292         * config/i386/i386.c (initial_ix86_tune_features,
14293         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14294         unsigned long long.
14295         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14296         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14297         rather than 1u << ix86_tune.  Formatting fix.
14298         (ix86_option_override_internal): Change ix86_arch_mask from
14299         unsigned int to unsigned HOST_WIDE_INT, initialize to
14300         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14301         (ix86_function_specific_restore): Likewise.
14303 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14305         PR target/84899
14306         * postreload.c (reload_combine_recognize_pattern): Perform
14307         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14308         truncate_int_for_mode the result for the destination's mode.
14310         PR c/84909
14311         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14312         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14313         Likewise.
14314         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14315         Likewise.
14317 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14319         PR target/84876
14320         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14321         regno_allocno_class_array and sorted_pseudos.
14322         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14323         insns where regno is used.
14325 2018-03-16  Martin Liska  <mliska@suse.cz>
14327         PR ipa/84833
14328         * multiple_target.c (create_dispatcher_calls): Redirect
14329         reference in the symbol table.
14331 2018-03-16  Martin Liska  <mliska@suse.cz>
14333         PR ipa/84722
14334         * multiple_target.c (create_dispatcher_calls): Redirect also
14335         an alias.
14337 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14339         PR c++/79937
14340         PR c++/82410
14341         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14342         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14343         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14345 2018-03-16  Julia Koval  <julia.koval@intel.com>
14347         * doc/invoke.texi (Skylake Server): Add CLWB.
14348         Cannonlake): Remove CLWB.
14350 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14352         PR tree-optimization/84841
14353         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14354         1 << 3.
14355         (FLOAT_ONE_CONST_TYPE): Define.
14356         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14357         (sort_by_operand_rank): Put entries with higher constant_type last
14358         rather than first to match comments.
14360 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14362         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14363         split predicate.
14365 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14367         PR c++/79085
14368         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14369         check and use address of target always.
14371 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14373         PR target/84574
14374         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14375         (indirect_thunk_bnd_needed): Likewise.
14376         (indirect_thunks_used): Likewise.
14377         (indirect_thunks_bnd_used): Likewise.
14378         (indirect_return_needed): New.
14379         (indirect_return_bnd_needed): Likewise.
14380         (output_indirect_thunk_function): Add a bool argument for
14381         function return.
14382         (output_indirect_thunk_function): Don't generate alias for
14383         function return thunk.
14384         (ix86_code_end): Call output_indirect_thunk_function to generate
14385         function return thunks.
14386         (ix86_output_function_return): Set indirect_return_bnd_needed
14387         and indirect_return_needed instead of indirect_thunk_bnd_needed
14388         and indirect_thunk_needed.
14390 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14392         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14393         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14394         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14396 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14397             Paul Hua <paul.hua.gm@gmail.com>
14399         PR c/84852
14400         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14402 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14404         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14405         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14406         resp. SFmode cases.
14408 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14410         PR target/84711
14411         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14412         instead of GET_MODE_SIZE when comparing Units.
14414 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14416         PR target/68256
14417         * varasm.c (hash_section): Return an unchangeble hash value
14418         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14419         Return !aarch64_can_use_per_function_literal_pools_p ().
14421 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14423         PR target/84860
14424         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14425         rather than address of cmode as last argument to prepare_cmp_insn.
14427 2018-03-15  Julia Koval  <julia.koval@intel.com>
14429         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14430         F_AVX512VNNI, F_AVX512BITALG): New.
14432 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14434         PR target/83451
14435         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14436         insn for floating-point loads and stores.
14438 2018-03-14  Carl Love  <cel@us.ibm.com>
14440         * config/rs6000/rs6000-c.c: Add macro definitions for
14441         ALTIVEC_BUILTIN_VEC_PERMXOR.
14442         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14443         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14444         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14445         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14446         UNSPEC_VPERMXOR.
14447         * config/doc/extend.texi: Add prototypes for vec_permxor.
14449 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14451         PR c/84852
14452         * diagnostic-show-locus.c (class layout_point): Convert m_line
14453         from int to linenum_type.
14454         (line_span::comparator): Use linenum "compare" function when
14455         comparing line numbers.
14456         (test_line_span): New function.
14457         (layout_range::contains_point): Convert param "row" from int to
14458         linenum_type.
14459         (layout_range::intersects_line_p): Likewise.
14460         (layout::will_show_line_p): Likewise.
14461         (layout::print_source_line): Likewise.
14462         (layout::should_print_annotation_line_p): Likewise.
14463         (layout::print_annotation_line): Likewise.
14464         (layout::print_leading_fixits): Likewise.
14465         (layout::annotation_line_showed_range_p): Likewise.
14466         (struct line_corrections): Likewise for field m_row.
14467         (line_corrections::line_corrections): Likewise for param "row".
14468         (layout::print_trailing_fixits): Likewise.
14469         (layout::get_state_at_point): Likewise.
14470         (layout::get_x_bound_for_row): Likewise.
14471         (layout::print_line): Likewise.
14472         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14473         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14474         * input.c (selftest::test_linenum_comparisons): New function.
14475         (selftest::input_c_tests): Call it.
14476         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14477         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14478         * selftest.h (ASSERT_GT): New macro.
14479         (ASSERT_GT_AT): New macro.
14480         (ASSERT_LT): New macro.
14481         (ASSERT_LT_AT): New macro.
14483 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14485         PR rtl-optimization/84780
14486         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14488 2018-03-14  Martin Liska  <mliska@suse.cz>
14490         * tree.c (record_node_allocation_statistics): Use
14491         get_stats_node_kind.
14492         (get_stats_node_kind): New function extracted from
14493         record_node_allocation_statistics.
14494         (free_node): Use get_stats_node_kind.
14496 2018-03-14  Richard Biener  <rguenther@suse.de>
14498         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14499         that the value-set of ANTIC_IN doesn't grow.
14501         Revert
14502         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14503         member.
14504         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14505         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14507 2018-03-14  Julia Koval  <julia.koval@intel.com>
14509         * config.gcc (icelake-client, icelake-server): New.
14510         (icelake): Remove.
14511         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14512         (initial_ix86_arch_features): Ditto.
14513         (PTA_SKYLAKE): Add SGX.
14514         (PTA_ICELAKE): Remove.
14515         (PTA_ICELAKE_CLIENT): New.
14516         (PTA_ICELAKE_SERVER): New.
14517         (ix86_option_override_internal): Split up icelake on icelake client and
14518         icelake server.
14519         (get_builtin_code_for_version): Ditto.
14520         (fold_builtin_cpu): Ditto.
14521         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14522         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14523         * config/i386/i386.h (processor_type): Ditto.
14524         * doc/invoke.texi: Ditto.
14526 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14528         PR sanitizer/83392
14529         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14530         INTEGER_CST offset, add it together with bitpos / 8 and
14531         sign extend based on POINTER_SIZE.
14533         PR target/84844
14534         Revert
14535         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14537         PR target/78090
14538         * config/i386/constraints.md (Yc): New register constraint.
14539         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14540         Use Yc constraint for alternative 2 of operand 0.  Remove
14541         preferred_for_speed attribute.
14543 2018-03-14  Richard Biener  <rguenther@suse.de>
14545         PR tree-optimization/84830
14546         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14547         with the old one to avoid oscillations.
14549 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14551         PR target/83712
14552         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14553         pseudos.
14554         (assign_by_spills): Return a flag of reload assignment failure.
14555         Do not process the reload assignment failures.  Do not spill other
14556         reload pseudos if they has the same reg class.  Update n if
14557         necessary.
14558         (lra_assign): Add a return arg.  Set up from the result of
14559         assign_by_spills call.
14560         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14561         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14562         usage_insns if it is not NULL.
14563         (spill_hard_reg_in_range): New function.
14564         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14565         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14566         function prototypes.
14567         (lra_assign): Change prototype.
14568         * lra.c (lra): Add code to deal with fails by splitting hard reg
14569         live ranges.
14571 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14573         * config/riscv/riscv.opt (mrelax): New option.
14574         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14575         "norelax" when riscv_mrelax is disabled.
14576         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14578 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14580         PR target/84743
14581         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14582         reassociation for int modes.
14584 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14586         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14587         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14588         for big-endian.
14589         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14590         * config/aarch64/aarch64-sve.md
14591         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14592         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14593         (*extend<mode><Vwide>2): Rename to...
14594         (aarch64_sve_extend<mode><Vwide>2): ...this.
14595         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14596         renaming the old pattern to...
14597         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14598         unsigned packs.
14599         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14600         define_expand, renaming the old pattern to...
14601         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14602         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14603         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14604         account when deciding which SVE instruction the optab should use.
14605         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14607 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14609         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14610         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14611         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14612         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14613         (tlsdesc_small_<mode>): Turn a define_expand and use
14614         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14615         (tlsdesc_small_advsimd_<mode>): ...this.
14616         (tlsdesc_small_sve_<mode>): New pattern.
14618 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14620         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14621         (UNSPEC_UMUL_HIGHPART): New constants.
14622         (MUL_HIGHPART): New int iteraor.
14623         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14624         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14625         define_expand.
14626         (*<su>mul<mode>3_highpart): New define_insn.
14628 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14630         PR lto/84805
14631         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14632         incomplete types.
14634 2018-03-13  Martin Liska  <mliska@suse.cz>
14636         PR ipa/84658.
14637         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14638         vector.
14639         (sem_item_optimizer::~sem_item_optimizer): Release it.
14640         (sem_item_optimizer::merge_classes): Register variable aliases.
14641         (sem_item_optimizer::fixup_pt_set): New function.
14642         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14643         * ipa-icf.h: Declare new variables and functions.
14645 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14647         PR middle-end/84834
14648         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14649         integer_pow2p@2 and test integer_pow2p in condition.
14650         (A < 0 ? C : 0): Similarly for @1.
14652         PR middle-end/84831
14653         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14654         characters starting at p contain '\0' character, don't look beyond
14655         that.
14657         PR target/84827
14658         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14659         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14661         PR target/84828
14662         * reg-stack.c (change_stack): Change update_end var from int to
14663         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14664         also call set_block_for_insn on the newly added insns and rescan.
14666         PR target/84786
14667         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14668         on the last operand.
14670         PR c++/84704
14671         * tree.c (stabilize_reference_1): Return save_expr (e) for
14672         STATEMENT_LIST even if it doesn't have side-effects.
14674 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14676         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14678 2018-03-12  Renlin Li  <renlin.li@arm.com>
14680         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14681         aarch64_output_scalar_simd_mov_immediate.
14683 2018-03-12  Martin Sebor  <msebor@redhat.com>
14685         PR tree-optimization/83456
14686         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14687         for perfectly overlapping calls to memcpy.
14688         (gimple_fold_builtin_memory_chk): Same.
14689         (gimple_fold_builtin_strcpy): Handle no-warning.
14690         (gimple_fold_builtin_stxcpy_chk): Same.
14691         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14693 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14695         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14696         parameter.  Use it for SFmode.
14697         (rs6000_function_arg_advance_1): Adjust.
14698         (rs6000_function_arg): Adjust.
14699         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14701 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14703         PR rtl-optimization/84169
14704         PR rtl-optimization/84780
14705         * combine.c (can_combine_p): Check for a 2-insn combination whether
14706         the destination register is used between the two insns, too.
14708 2018-03-12  Richard Biener  <rguenther@suse.de>
14710         PR tree-optimization/84803
14711         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14712         for refs DR analysis didn't process.
14714 2018-03-12  Richard Biener  <rguenther@suse.de>
14716         PR tree-optimization/84777
14717         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14718         force-vectorize loops ignore whether we are optimizing for size.
14720 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14722         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14723         (TARGET_MD_ASM_ADJUST): Define.
14725 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14726             Kito Cheng  <kito.cheng@gmail.com>
14727             Chung-Ju Wu  <jasonwucj@gmail.com>
14729         * config/nds32/nds32.c (nds32_compute_stack_frame,
14730         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14731         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14732         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14733         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14734         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14735         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14736         * config/nds32/nds32.md (prologue, epilogue): Use macro
14737         NDS32_V3PUSH_AVAILABLE_P to do checking.
14739 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14741         PR debug/58150
14742         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14743         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14744         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14745         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14746         addition of most attributes on !orig_type_die or the attribute not
14747         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14749 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14750             Chung-Ju Wu  <jasonwucj@gmail.com>
14752         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14753         __NDS32_VH__ macro.
14754         * config/nds32/nds32.opt (mvh): New option.
14756 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14757             Chung-Ju Wu  <jasonwucj@gmail.com>
14759         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14760         function.
14761         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14762         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14763         definition.
14765 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14766             Chung-Ju Wu  <jasonwucj@gmail.com>
14768         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14769         function.
14770         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14771         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14773 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14774             Kito Cheng  <kito.cheng@gmail.com>
14775             Chung-Ju Wu  <jasonwucj@gmail.com>
14777         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14778         UNSPEC_FFMISM and UNSPEC_FLMISM.
14779         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14780         for ffb, ffmism and flmism.
14781         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14782         (unspec_ffmism): Ditto.
14783         (unspec_flmism): Ditto.
14784         (nds32_expand_builtin_impl): Check if string extension is available.
14785         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14786         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14788 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14790         Reverting patch:
14791         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14793         PR target/83712
14794         * lra-assigns.c (assign_by_spills): Return a flag of reload
14795         assignment failure.  Do not process the reload assignment
14796         failures.  Do not spill other reload pseudos if they has the same
14797         reg class.
14798         (lra_assign): Add a return arg.  Set up from the result of
14799         assign_by_spills call.
14800         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14801         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14802         usage_insns if it is not NULL.
14803         (spill_hard_reg_in_range): New function.
14804         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14805         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14806         function prototypes.
14807         (lra_assign): Change prototype.
14808         * lra.c (lra): Add code to deal with fails by splitting hard reg
14809         live ranges.
14811 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14813         PR target/84807
14814         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14816 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14818         PR debug/84620
14819         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14820         (dw_val_node): Add val_symbolic_view.
14821         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14822         (symview_upper_bound): New.
14823         (new_line_info_table): Initialize symviews_since_reset.
14824         (dwarf2out_source_line): Count symviews_since_reset and set
14825         symview_upper_bound.
14826         (dw_val_equal_p): Handle symview.
14827         (add_AT_symview): New.
14828         (print_dw_val): Handle symview.
14829         (attr_checksum, attr_checksum_ordered): Likewise.
14830         (same_dw_val_p, size_of_die): Likewise.
14831         (value_format, output_die): Likewise.
14832         (add_high_low_attributes): Use add_AT_symview for entry_view.
14833         (dwarf2out_finish): Reset symview_upper_bound, clear
14834         zero_view_p.
14836 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14838         PR target/83969
14839         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14840         Add strict argument and use it.
14841         (rs6000_split_multireg_move): Update for new strict argument.
14842         (mem_operand_gpr): Disallow all non-offsettable addresses.
14843         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14845 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14847         PR target/84772
14848         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14849         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14850         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14852         PR c++/84767
14853         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14854         decl, use remap_type if we want to use the type.
14856 2018-03-09  Martin Sebor  <msebor@redhat.com>
14858         PR tree-optimization/84526
14859         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14860         Remove dead code.
14861         (builtin_access::generic_overlap): Be prepared to handle non-array
14862         base objects.
14864 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14866         PR rtl-optimization/84682
14867         * lra-constraints.c (process_address_1): Check is_address flag
14868         for address constraints.
14869         (process_alt_operands): Likewise.
14870         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14871         preprocess_constraints.
14872         * recog.h (preprocess_constraints): Add oploc parameter.
14873         Adjust callers.
14874         * recog.c (preprocess_constraints): Test address_operand for
14875         CT_ADDRESS constraints.
14877 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14879         PR target/83712
14880         * lra-assigns.c (assign_by_spills): Return a flag of reload
14881         assignment failure.  Do not process the reload assignment
14882         failures.  Do not spill other reload pseudos if they has the same
14883         reg class.
14884         (lra_assign): Add a return arg.  Set up from the result of
14885         assign_by_spills call.
14886         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14887         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14888         usage_insns if it is not NULL.
14889         (spill_hard_reg_in_range): New function.
14890         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14891         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14892         function prototypes.
14893         (lra_assign): Change prototype.
14894         * lra.c (lra): Add code to deal with fails by splitting hard reg
14895         live ranges.
14897 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14899         PR target/83193
14900         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14901         Accept complain bool parameter.  Only emit errors if it is true.
14902         (arm_parse_cpu_option_name): Likewise.
14903         (arm_target_thumb_only): Adjust callers of the above.
14904         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14905         prototype to take a default true bool parameter.
14906         (arm_parse_arch_option_name): Likewise.
14908 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14909             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14911         PR jit/64089
14912         PR jit/84288
14913         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14914         * configure: Regenerate.
14915         * configure.ac ("linker --version-script option"): New.
14916         ("linker soname option"): New.
14918 2018-03-09  Richard Biener  <rguenther@suse.de>
14920         PR tree-optimization/84775
14921         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14922         immediate uses of predicate stmts and mark them modified.
14924         Revert
14925         PR tree-optimization/84178
14926         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14927         to caller.
14928         (version_loop_for_if_conversion): Delay update_ssa call.
14929         (tree_if_conversion): Delay update_ssa until after predicate
14930         insertion.
14932 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14934         PR target/84763
14935         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14936         when the function accesses prior frames.
14938 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14940         PR debug/84456
14941         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14942         gen_llsym, otherwise call maybe_gen_llsym.
14944         PR inline-asm/84742
14945         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14946         has ',' character inside of it.
14948 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14950         PR target/84748
14951         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14952         as clobbering CC_REGNUM.
14954 2018-03-08  Richard Biener  <rguenther@suse.de>
14956         PR middle-end/84552
14957         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14958         (follow_copies_to_constant): Do not follow SSA names registered
14959         for update.
14961 2018-03-08  Richard Biener  <rguenther@suse.de>
14963         PR tree-optimization/84178
14964         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14965         to caller.
14966         (version_loop_for_if_conversion): Delay update_ssa call.
14967         (tree_if_conversion): Delay update_ssa until after predicate
14968         insertion.
14970 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14972         PR tree-optimization/84178
14973         * tree-if-conv.c (release_bb_predicate): Remove the
14974         the assertion that the stmts have NULL use_ops.
14975         Discard the statements, asserting that they haven't
14976         yet been added to a BB.
14978 2018-03-08  Richard Biener  <rguenther@suse.de>
14980         PR tree-optimization/84746
14981         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14982         (phi_translate): Pass in destination ANTIC_OUT set.
14983         (phi_translate_1): Likewise.  For a simplified result lookup
14984         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14985         (phi_translate_set): Adjust.
14986         (do_pre_regular_insertion): Likewise.
14987         (do_pre_partial_partial_insertion): Likewise.
14989 2018-03-08  Martin Liska  <mliska@suse.cz>
14991         PR gcov-profile/84735
14992         * doc/gcov.texi: Document usage of profile files.
14993         * gcov-io.h: Document changes in the format.
14995 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14997         PR debug/84404
14998         PR debug/84408
14999         * dwarf2out.c (struct dw_line_info_table): Update comments for
15000         view == -1.
15001         (FORCE_RESET_NEXT_VIEW): New.
15002         (FORCE_RESETTING_VIEW_P): New.
15003         (RESETTING_VIEW_P): Check for -1 too.
15004         (ZERO_VIEW_P): Likewise.
15005         (new_line_info_table): Force-reset next view.
15006         (dwarf2out_begin_function): Likewise.
15007         (dwarf2out_source_line): Simplify zero_view_p initialization.
15008         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15009         view directly.  Omit view when omitting .loc at line 0.
15011 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15013         PR tree-optimization/84740
15014         * tree-switch-conversion.c (process_switch): Call build_constructors
15015         only if info.phi_count is non-zero.
15017         PR tree-optimization/84739
15018         * tree-tailcall.c (find_tail_calls): Check call arguments against
15019         DECL_ARGUMENTS (current_function_decl) rather than
15020         DECL_ARGUMENTS (func) when checking for tail recursion.
15022 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15024         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15025         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15026         Volker Reichelt's entry and add entries for people that perform
15027         GCC fuzzy testing and report numerous bugs.
15029 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15031         PR target/82411
15032         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15033         readonly data in sdata, if that is disabled.
15034         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15035         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15036         -mreadonly-in-sdata option.
15038 2018-03-07  Martin Sebor  <msebor@redhat.com>
15040         PR tree-optimization/84468
15041         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15042         basic block when looking for nul assignment.
15044 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15046         PR target/84277
15047         * except.h (output_function_exception_table): Adjust prototype.
15048         * except.c (output_function_exception_table): Remove FNNAME parameter
15049         and add SECTION parameter.  Ouput one part of the table at a time.
15050         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15051         the first part of the exception table and emit unwind directives.
15052         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15053         (i386_pe_seh_cold_init): Likewise.
15054         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15055         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15056         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15057         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15058         * config/i386/winnt.c: Include except.h.
15059         (struct seh_frame_state): Add reg_offset, after_prologue and
15060         in_cold_section fields.
15061         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15062         (i386_pe_seh_cold_init): New function.
15063         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15064         to seh->in_cold_section.
15065         (seh_emit_push): Record the offset of the push.
15066         (seh_emit_save): Record the offet of the save.
15067         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15068         Test seh->after_prologue to disregard the epilogue.
15069         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15070         (i386_pe_end_cold_function): New function.
15072 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15074         PR fortran/84565
15075         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15076         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15078         PR c++/84704
15079         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15080         on tmp_var.
15081         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15082         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15084         PR middle-end/84723
15085         * multiple_target.c: Include tree-inline.h and intl.h.
15086         (expand_target_clones): Diagnose and fail if node->definition and
15087         !tree_versionable_function_p (node->decl).
15089 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15091         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15092         sprint_ul.
15093         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15094         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15095         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15097 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15099         PR target/84710
15100         * combine.c (try_combine): Use reg_or_subregno instead of handling
15101         just paradoxical SUBREGs and REGs.
15103 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15105         * config/arc/arc.c (arc_finalize_pic): Remove function.
15106         (arc_must_save_register): We use single base PIC register, remove
15107         checks to save/restore the PIC register.
15108         (arc_expand_prologue): Likewise.
15109         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15110         Remove.
15111         (arc_verify_short): Likewise.
15112         (arc_attr_type): Likewise.
15113         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15114         (walk_stores): Likewise.
15115         (arc_address_cost): Make it static.
15116         (arc_verify_short): Likewise.
15117         (branch_dest): Likewise.
15118         (arc_attr_type): Likewise.
15119         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15120         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15121         (arc_final_prescan_insn): Remove inserting the nops due to
15122         hardware hazards.  It is done in reorg step.
15123         (insn_length_variant_t): Remove.
15124         (insn_length_parameters_t): Likewise.
15125         (arc_insn_length_parameters): Likewise.
15126         (arc_get_insn_variants): Likewise.
15127         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15129 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15131         PR inline-asm/84683
15132         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15133         assertion failure.
15135         PR tree-optimization/84687
15136         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15137         on new_node->decl.
15138         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15140 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15142         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15143         Rename to ppc_speculation_barrier.
15144         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15145         __builtin_ppc_speculation_barrier.
15147 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15149         PR target/84700
15150         * combine.c (combine_simplify_rtx): Don't try to simplify if
15151         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15152         are equal to x.
15154 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15156         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15157         to 32 bytes when compiling for POWER9.
15159 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15161         PR target/84564
15162         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15163         regparm >= 3 with no arg reg available also for calls with
15164         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15166         PR target/84524
15167         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15168         orig,vex.
15169         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15171 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15173         PR target/84264
15174         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15176 2018-03-05  Richard Biener  <rguenther@suse.de>
15178         PR tree-optimization/84486
15179         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15180         When inserting a __builtin_assume_aligned call set the LHS
15181         SSA name alignment info accordingly.
15183 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15185         PR tree-optimization/84114
15186         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15187         Avoid reassociation of FLOAT_MODE addition.
15189 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15191         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15192         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15193         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15194         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15195         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15196         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15197         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15198         and -mwbnoinvd.
15199         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15200         __builtin_ia32_wbinvd): New builtins.
15201         (SPECIAL_ARGS2): New.
15202         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15203         (SPECIAL_ARGS2): New.
15204         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15205         (ix86_valid_target_attribute_inner_p): Ditto.
15206         (ix86_init_mmx_sse_builtins): Add special_args2.
15207         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15208         TARGET_WBNOINVD_P): New.
15209         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15210         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15211         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15212         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15213         * config/i386/pconfigintrin.h: New file.
15214         * config/i386/wbnoinvdintrin.h: Ditto.
15215         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15216         wbnoinvdintrin.h.
15217         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15219 2018-03-05  Richard Biener  <rguenther@suse.de>
15221         PR tree-optimization/84670
15222         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15223         member.
15224         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15225         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15226         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15227         doesn't grow if all successors (recursively) were visited at least
15228         once.
15230 2018-03-05  Richard Biener  <rguenther@suse.de>
15232         PR tree-optimization/84650
15233         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15234         if executed in the loop pipeline.
15236 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15238         * doc/configfiles.texi (Configuration Files): Move info about
15239         conditionalizing $target-protos.h to...
15240         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15241         differs from $target-protos.h.
15243 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15244             Chung-Ju Wu  <jasonwucj@gmail.com>
15246         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15247         * config/nds32/nds32-multiple.md (setmemsi): Define.
15248         * config/nds32/nds32-memory-manipulation.c
15249         (nds32_gen_dup_4_byte_to_word_value): New.
15250         (emit_setmem_word_loop): New.
15251         (emit_setmem_byte_loop): New.
15252         (nds32_expand_setmem_loop): New.
15253         (nds32_expand_setmem_loop_v3m): New.
15254         (nds32_expand_setmem_unroll): New.
15255         (nds32_expand_setmem): New.
15257 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15258             Chung-Ju Wu  <jasonwucj@gmail.com>
15260         * config/nds32/nds32-memory-manipulation.c
15261         (nds32_emit_load_store): New.
15262         (nds32_emit_post_inc_load_store): New.
15263         (nds32_emit_mem_move): New.
15264         (nds32_emit_mem_move_block): New.
15265         (nds32_expand_movmemsi_loop_unknown_size): New.
15266         (nds32_expand_movmemsi_loop_known_size): New.
15267         (nds32_expand_movmemsi_loop): New.
15268         (nds32_expand_movmemsi_unroll): New.
15269         (nds32_expand_movmemqi): Rename ...
15270         (nds32_expand_movmemsi): ... to this.
15271         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15272         (movmemsi): ... to this.
15273         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15274         (nds32_expand_movmemsi): ... to this.
15276 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15277             Monk Chiang  <sh.chiang04@gmail.com>
15278             Chung-Ju Wu  <jasonwucj@gmail.com>
15280         * config/nds32/nds32-protos.h
15281         (nds32_expand_load_multiple): New arguments.
15282         (nds32_expand_store_multiple): Ditto.
15283         (nds32_valid_multiple_load_store): Rename ...
15284         (nds32_valid_multiple_load_store_p): ... to this.
15285         * config/nds32/nds32-memory-manipulation.c
15286         (nds32_expand_load_multiple): Refine implementation.
15287         (nds32_expand_store_multiple): Ditto.
15288         * config/nds32/nds32-multiple.md
15289         (load_multiple): Update nds32_expand_load_multiple interface.
15290         (store_multiple): Update nds32_expand_store_multiple interface.
15291         * config/nds32/nds32-predicates.c
15292         (nds32_valid_multiple_load_store): Rename ...
15293         (nds32_valid_multiple_load_store_p): ... to this and refine
15294         implementation.
15295         * config/nds32/predicates.md
15296         (nds32_load_multiple_and_update_address_operation): New predicate.
15297         (nds32_store_multiple_and_update_address_operation): New predicate.
15299 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15300             Chung-Ju Wu  <jasonwucj@gmail.com>
15302         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15303         (combo): New attribute.
15304         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15306 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15308         * config/nds32/nds32.opt: Change -mcmodel= default value.
15310 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15311             Monk Chiang  <sh.chiang04@gmail.com>
15312             Chung-Ju Wu  <jasonwucj@gmail.com>
15314         * config/nds32/constants.md (unspec_element): New enum.
15315         * config/nds32/constraints.md (Umw): New constraint.
15316         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15317         * config/nds32/nds32-intrinsic.md: Likewise.
15318         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15319         (nds32_valid_smw_lwm_base_p): New.
15320         (nds32_output_smw_single_word): New.
15321         (nds32_output_lmw_single_word): New.
15322         (nds32_expand_unaligned_load): New.
15323         (nds32_expand_unaligned_store): New.
15324         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15325         (nds32_output_smw_single_word): Declare.
15326         (nds32_output_lmw_single_word): Declare.
15327         (nds32_expand_unaligned_load): Declare.
15328         (nds32_expand_unaligned_store): Declare.
15329         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15330         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15331         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15332         NDS32_BUILTIN_UASTORE_DW.
15333         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15334         predicate.
15336 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15337             Kito Cheng  <kito.cheng@gmail.com>
15338             Chung-Ju Wu  <jasonwucj@gmail.com>
15340         * config/nds32/nds32-intrinsic.c
15341         (nds32_expand_builtin_null_ftype_reg): Delete.
15342         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15343         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15344         (nds32_read_argument): New.
15345         (nds32_legitimize_target): Ditto.
15346         (nds32_legitimize_argument): Ditto.
15347         (nds32_check_constant_argument): Ditto.
15348         (nds32_expand_unop_builtin): Ditto.
15349         (nds32_expand_unopimm_builtin): Ditto.
15350         (nds32_expand_binop_builtin): Ditto.
15351         (nds32_builtin_decl_impl): Ditto.
15352         (builtin_description): Ditto.
15353         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15354         (nds32_init_builtins_impl): Ditto.
15355         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15356         (nds32_builtin_decl): New.
15357         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15358         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15360 2018-03-02  Jeff Law  <law@redhat.com>
15362         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15363         (redundant_insn, fill_simple_delay_slots): Likewise.
15364         (fill_slots_from_thread): Likewise.
15365         * resource.c (mark_referenced_resources): Likewise.
15366         (mark_set_resources, find_dead_or_set_registers): Likewise.
15368 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15370         * substring-locations.h (format_warning_va): Formatting fix for
15371         ATTRIBUTE_GCC_DIAG.
15372         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15373         argument.
15374         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15375         * substring-locations.c: Include intl.h.
15376         (format_warning_va): Turned into small wrapper around
15377         format_warning_n_va, renamed to ...
15378         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15379         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15380         use ngettext.
15381         (format_warning_at_substring_n): New function.
15382         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15383         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15384         format_warning_at_substring with just a shorter name instead of
15385         const function pointer.
15386         (fmtwarn_n): New function.
15387         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15388         appropriate, get rid of all the fmtstr temporaries, move conditionals
15389         with G_() wrapped string literals directly into fmtwarn arguments,
15390         cast dir.len to (int), formatting fixes.
15392 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15394         * doc/invoke.texi: Remove "Cilk Plus" references.
15396 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15397             Richard Biener  <rguenther@suse.de>
15399         PR ipa/84628
15400         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15401         for error or warning attributes if CALL_FROM_THUNK_P is set.
15402         Formatting fixes.
15404 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15406         PR target/56540
15407         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15408         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15410         PR target/56540
15411         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15412         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15414         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15415         instead of -1U in last predictors element's probability member.
15417 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15419         PR ipa/83983
15420         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15421         arguments if they are comparable.
15423 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15425         PR tree-optimization/84634
15426         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15427         masks and masked_loop_p with a single loop_masks, making sure it's
15428         null for bb vectorization.
15430 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15432         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15433         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15434         loop->force_vectorize to check whether there is no alias.
15436 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15438         PR target/84614
15439         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15440         prototypes.
15441         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15442         comments.
15443         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15444         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15445         instead of a loop around prev_real_insn.
15446         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15447         prev_real_insn.
15449         PR inline-asm/84625
15450         * config/i386/i386.c (ix86_print_operand): Use conditional
15451         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15452         zero vector.
15454 2018-03-02  Richard Biener  <rguenther@suse.de>
15456         PR tree-optimization/84427
15457         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15458         (bitmap_set_subtract_values): Rewrite to handle multiple
15459         exprs per value.
15460         (clean): Likewise.
15461         (prune_clobbered_mems): Likewise.
15462         (phi_translate): Take edge instead of pred/phiblock.
15463         (phi_translate_1): Likewise.
15464         (phi_translate_set): Likewise.  Insert all translated
15465         exprs for a value into the set, keeping possibly multiple
15466         expressions per value.
15467         (compute_antic_aux): Adjust for phi_translate changes.
15468         When intersecting union the expressions and prune those
15469         not in the final value set, keeping possibly multiple
15470         expressions per value.  Do not use value-insertion
15471         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15472         all expressions.  Add verification that the value-sets
15473         only shrink during iteration.
15474         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15475         (do_pre_regular_insertion): Likewise.
15476         (do_pre_partial_partial_insertion): Likewise.
15478 2018-03-02  Richard Biener  <rguenther@suse.de>
15480         PR target/82005
15481         * config/darwin.c (saved_debug_info_level): New static global.
15482         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15483         (darwin_asm_lto_end): Restore debug info generation settings.
15485 2018-03-01  Martin Liska  <mliska@suse.cz>
15487         PR sanitizer/82484
15488         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15489         volatile arguments.
15491 2018-03-01  Richard Biener  <rguenther@suse.de>
15493         PR debug/84645
15494         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15495         type annotation with LTO when debug was disabled at compile-time.
15497 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15499         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15500         XINT with INTVAL.
15501         (mips_final_postscan_insn): Likewise.
15503 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15505         PR rtl-optimization/84528
15506         * alias.c (init_alias_target): Add commentary.
15507         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15508         a unique base value if the frame pointer is not eliminated
15509         to the stack pointer.
15511 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15513         PR rtl-optimization/83327
15514         * lra-int.h (hard_regs_spilled_into): Declare.
15515         * lra.c (hard_regs_spilled_into): Define.
15516         (init_reg_info): Init hard_regs_spilled_into.
15517         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15518         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15519         (process_bb_lives): Handle hard_regs_spilled_into.
15520         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15521         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15523 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15525         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15526         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15527         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15528         * config/rs6000/aix72.h: New file.
15530 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15532         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15533         instead of warning_at with conditional singular and plural messages
15534         where possible.
15536         PR target/52991
15537         * stor-layout.c (update_alignment_for_field): For
15538         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15539         && !DECL_PACKED (field), do the alignment update, just use
15540         only desired_align instead of MAX (type_align, desired_align)
15541         as the alignment.
15542         (place_field): Don't do known_align < desired_align handling
15543         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15544         is non-NULL, instead do it after rli->prev_field handling and
15545         only if not within a bitfield word.  For DECL_PACKED (field)
15546         use type_align of BITS_PER_UNIT.
15548 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15550         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15551         superfluous parentheses and trailing spaces.
15553 2018-02-28  Richard Biener  <rguenther@suse.de>
15555         PR tree-optimization/84584
15556         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15557         SCoPs with fake exit edge.
15559 2018-02-28  Martin Liska  <mliska@suse.cz>
15561         PR testsuite/84597
15562         * timevar.c (timer::print): Fix format to properly print 100%
15563         values.
15565 2018-02-28  Richard Biener  <rguenther@suse.de>
15567         PR middle-end/84607
15568         * genmatch.c (capture_info::walk_match): Do not mark
15569         captured expressions without operands as expr_p given
15570         they act more like predicates and should be subject to
15571         "lost tail" side-effect preserving.
15573 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15575         PR rtl-optimization/81611
15576         * auto-inc-dec.c (attempt_change): Move dead note from
15577         mem_insn if it's the next use of regno
15578         (find_address): Take address use of reg holding
15579         non-incremented value.  Add parm to limit search to the named
15580         reg only.
15581         (merge_in_block): Attempt to use a mem insn that is the next
15582         use of the original regno.
15584 2018-02-27  Martin Sebor  <msebor@redhat.com>
15586         PR c++/83871
15587         * doc/invoke.texi (-Wmissing-attributes): New option.
15588         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15590 2018-02-27  Martin Sebor  <msebor@redhat.com>
15592         PR translation/84207
15593         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15594         n argument to unsigned HOST_WIDE_INT.
15595         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15596         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15597         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15598         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15600 2018-02-27  Richard Biener  <rguenther@suse.de>
15602         PR tree-optimization/84512
15603         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15604         Do not use the estimate returned from record_stmt_cost for
15605         the scalar iteration cost but sum properly using add_stmt_cost.
15607 2018-02-27  Richard Biener  <rguenther@suse.de>
15609         PR tree-optimization/84466
15610         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15611         Adjust last change to less strictly validate use operands.
15613 2018-02-27  Martin Liska  <mliska@suse.cz>
15615         PR gcov-profile/84548
15616         * gcov.c (process_file): Allow partial overlap and consider it
15617         also as group functions.
15618         (output_lines): Properly calculate range of lines for a group.
15620 2018-02-27  Martin Liska  <mliska@suse.cz>
15622         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15623         'ggc' suffixes.  Change first column width.
15624         (timer::print): Fix formatting of the column.
15626 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15628         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15629         preserve inline entry blocks for the sake of debug inline
15630         entry point markers alone.
15631         (remove_unused_locals): Suggest in comments a better place to
15632         force the preservation of inline entry blocks that are
15633         otherwise unused, but do not preserve them.
15635 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15637         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15639 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15641         PR target/84039
15642         * config/i386/constraints.md (Bs): Replace
15643         ix86_indirect_branch_register with
15644         TARGET_INDIRECT_BRANCH_REGISTER.
15645         (Bw): Likewise.
15646         * config/i386/i386.md (indirect_jump): Likewise.
15647         (tablejump): Likewise.
15648         (*sibcall_memory): Likewise.
15649         (*sibcall_value_memory): Likewise.
15650         Peepholes of indirect call and jump via memory: Likewise.
15651         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15652         (*sibcall_value_GOT_32): Likewise.
15653         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15654         (GOT_memory_operand): Likewise.
15655         (call_insn_operand): Likewise.
15656         (sibcall_insn_operand): Likewise.
15657         (GOT32_symbol_operand): Likewise.
15658         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15660 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15662         PR rtl-optimization/83496
15663         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15664         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15665         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15666         redundant insn, if any.
15667         (relax_delay_slots): Likewise.
15668         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15670 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15672         PR tree-optimization/83965
15673         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15674         that grouped statements are part of a reduction chain.  Return
15675         true if the statement is not marked as a reduction itself but
15676         is part of a group.
15677         (vect_recog_dot_prod_pattern): Don't check whether the statement
15678         is part of a group here.
15679         (vect_recog_sad_pattern): Likewise.
15680         (vect_recog_widen_sum_pattern): Likewise.
15682 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15684         PR debug/84545
15685         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15687 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15689         PR target/84530
15690         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15691         the bool argument.
15692         (ix86_output_indirect_function_return): New prototype.
15693         (ix86_split_simple_return_pop_internal): Likewise.
15694         * config/i386/i386.c (indirect_return_via_cx): New.
15695         (indirect_return_via_cx_bnd): Likewise.
15696         (indirect_thunk_name): Handle return va CX_REG.
15697         (output_indirect_thunk_function): Create alias for
15698         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15699         (ix86_output_indirect_jmp): Remove the bool argument.
15700         (ix86_output_indirect_function_return): New function.
15701         (ix86_split_simple_return_pop_internal): Likewise.
15702         * config/i386/i386.md (*indirect_jump): Don't pass false
15703         to ix86_output_indirect_jmp.
15704         (*tablejump_1): Likewise.
15705         (simple_return_pop_internal): Change it to define_insn_and_split.
15706         Call ix86_split_simple_return_pop_internal to split it for
15707         -mfunction-return=.
15708         (simple_return_indirect_internal): Call
15709         ix86_output_indirect_function_return instead of
15710         ix86_output_indirect_jmp.
15712 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15714         PR bootstrap/84405
15715         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15716         memset and value initialization afterwards.
15718 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15720         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15722 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15724         PR target/84521
15725         * common/config/aarch64/aarch64-common.c
15726         (aarch_option_optimization_table[]): Switch
15727         off fomit-frame-pointer
15729 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15730             Chung-Ju Wu  <jasonwucj@gmail.com>
15732         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15733         volatile memory.
15734         (store_multiple): Ditto.
15736 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15738         * config.gcc: Add --with-cpu support for nds32 target.
15739         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15740         * config/nds32/nds32.opt: Add -mcpu= option.
15742 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15744         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15745         isel=yes): Warn for these deprecated options.
15747 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15749         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15750         ISA_2_5_MASKS_EMBEDDED.
15752 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15754         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15755         p->max as pointers rather than using iterative_hash_expr.
15757 2018-02-23  Carl Love  <cel@us.ibm.com>
15759         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15760         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15761         BU_P8V_OVERLOAD_2.
15762         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15763         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15764         P8V_BUILTIN_VEC_VUNSIGNED2.
15766 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15768         PR target/81572
15769         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15770         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15771         LRA_UNKNOWN_ALT.
15772         * lra-constraints.c (curr_insn_transform): Set up
15773         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15774         LRA_UNKNOWN_ALT.
15775         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15776         * lra-eliminations.c (spill_pseudos): Ditto.
15777         (process_insn_for_elimination): Ditto.
15778         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15779         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15780         LRA_NON_CLOBBERED_ALT.
15782 2018-02-22  Martin Sebor  <msebor@redhat.com>
15784         PR tree-optimization/84480
15785         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15786         to maybe_diag_stxncpy_trunc.  Call it.
15787         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15788         from gimple_fold_builtin_strcpy.  Print inlining stack.
15789         (handle_builtin_stxncpy): Print inlining stack.
15790         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15792 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15794         PR target/84176
15795         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15796         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15797         and -fcheck-pointer-bounds are used together.
15798         (indirect_thunk_prefix): New enum.
15799         (indirect_thunk_need_prefix): New function.
15800         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15801         "_nt" instead of "_bnd" for NOTRACK prefix.
15802         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15803         (output_indirect_thunk_function): Likewise.
15804         (): Likewise.
15805         (ix86_code_end): Update output_indirect_thunk_function calls.
15806         (ix86_output_indirect_branch_via_reg): Replace
15807         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15808         (ix86_output_indirect_branch_via_push): Likewise.
15809         (ix86_output_function_return): Likewise.
15810         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15811         incompatible with -fcf-protection=branch and
15812         -fcheck-pointer-bounds.
15814 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15816         PR target/83335
15817         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15818         Change gcc_assert call to output_operand_lossage.
15820 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15822         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15824 2018-02-22  DJ Delorie  <dj@redhat.com>
15825             Sebastian Perta  <sebastian.perta@renesas.com>
15826             Oleg Endo  <olegendo@gcc.gnu.org>
15828         * config/rx/rx.c (rx_rtx_costs): New function.
15829         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15831 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15833         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15835 2018-02-22  Martin Liska  <mliska@suse.cz>
15837         PR driver/83193
15838         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15839         Add "native" as a possible value.
15841 2018-02-22  Martin Liska  <mliska@suse.cz>
15843         PR driver/83193
15844         * config/i386/i386.c (ix86_option_override_internal):
15845         Add "native" as a possible value for -march and -mtune.
15847 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15849         PR target/84502
15850         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15851         to all type variants.
15853         PR tree-optimization/84503
15854         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15855         width as info->bitpos + info->bitsize - start.
15856         (merged_store_group::merge_overlapping): Simplify width computation.
15857         (check_no_overlap): New function.
15858         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15859         start + width and last_order of the group, fail if check_no_overlap
15860         fails.
15861         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15862         to group if check_no_overlap fails.
15864 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15866         * config/rs6000/altivec.md: Delete contraint arguments to
15867         define_expand, define_split, and define_peephole2, and in
15868         define_insn_and_split if always unused.
15869         * config/rs6000/darwin.md: Ditto.
15870         * config/rs6000/dfp.md: Ditto.
15871         * config/rs6000/rs6000.md: Ditto.
15872         * config/rs6000/sync.md: Ditto.
15873         * config/rs6000/vector.md: Ditto.
15874         * config/rs6000/vsx.md: Ditto.
15876 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15878         * config/rs6000/altivec.md: Write output control strings as braced
15879         blocks instead of double-quoted strings.
15880         * config/rs6000/darwin.md: Ditto.
15881         * config/rs6000/rs6000.md: Ditto.
15882         * config/rs6000/vector.md: Ditto.
15883         * config/rs6000/vsx.md: Ditto.
15885 2018-02-21  Jason Merrill  <jason@redhat.com>
15887         PR c++/84314 - ICE with templates and fastcall attribute.
15888         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15890 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15892         * ipa-cp.c (determine_versionability): Fix comment typos.
15894 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15896         PR c/84229
15897         * ipa-cp.c (determine_versionability): Do not version functions caling
15898         va_arg_pack.
15900 2018-02-21  Martin Liska  <mliska@suse.cz>
15902         PR driver/83193
15903         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15904         Add "native" as a possible value.
15905         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15906         the macro when native cpu detection is available.
15908 2018-02-21  Martin Liska  <mliska@suse.cz>
15910         PR driver/83193
15911         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15912         Add "native" as a possible value.
15913         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15914         when native cpu detection is available.
15916 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15917             Martin Sebor  <msebor@redhat.com>
15919         PR tree-optimization/84478
15920         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15921         false.
15922         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15923         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15924         support which is conservatively correct, for 2 only stay conservative
15925         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15926         argument to the 2 argument get_range_strlen, adjust 6 arg
15927         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15928         false.
15929         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15930         (gimple_fold_builtin_strlen): Pass true as last argument to
15931         get_range_strlen.
15933 2018-02-20  Martin Sebor  <msebor@redhat.com>
15935         PR middle-end/84095
15936         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15937         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15938         (builtin_memref::builtin_memref): Factor out parts into
15939         set_base_and_offset and call it.
15941 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15943         PR middle-end/84406
15944         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15945         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15946         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15947         search at the associated MODE_INT.
15949 2018-02-20  Jeff Law  <law@redhat.com>
15951         PR middle-end/82123
15952         PR tree-optimization/81592
15953         PR middle-end/79257
15954         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15955         for range data rather than using global data.
15956         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15957         range data rather than using global data.
15958         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15959         pass it to children as needed.
15960         (struct directive::fmtresult): Similarly.
15961         (struct directive::set_width): Similarly.
15962         (struct directive::set_precision): Similarly.
15963         (format_integer, format_directive, parse_directive): Similarly.
15964         (format_none): Accept unnamed vr_values parameter.
15965         (format_percent, format_floating, format_character): Similarly.
15966         (format_string, format_plain): Similarly.
15967         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15968         the EVRP range analyzer for range data rather than using global data.
15969         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15970         gimple-ssa-evrp-analyze.h
15971         (class sprintf_dom_walker): Add after_dom_children member function.
15972         Add evrp_range_analyzer member.
15973         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15974         range analyzer as needed.
15975         (sprintf_dom_walker::after_dom_children): New member function.
15976         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15977         if not optimizing.
15978         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15979         (evrp_range_analyzer::pop_to_marker): Likewise.
15981 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15983         PR tree-optimization/84419
15984         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15985         with the required type if its current type is compatible but
15986         different.
15988 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15990         PR middle-end/82004
15991         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15992         after vectorization.
15994 2018-02-20  Martin Liska  <mliska@suse.cz>
15996         PR driver/83193
15997         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15998         possible values if we don't have a hint.
16000 2018-02-20  Martin Liska  <mliska@suse.cz>
16002         PR c/84310
16003         PR target/79747
16004         * final.c (shorten_branches): Build align_tab array with one
16005         more element.
16006         * opts.c (finish_options): Add alignment option limit check.
16007         (MAX_CODE_ALIGN): Likewise.
16008         (MAX_CODE_ALIGN_VALUE): Likewise.
16009         * doc/invoke.texi: Document maximum allowed option value for
16010         all -falign-* options.
16012 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16014         PR target/84146
16015         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16016         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16017         * var-tracking.c (emit_note_insn_var_location): Remove all references
16018         to NOTE_INSN_CALL_ARG_LOCATION.
16019         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16020         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16021         Use copy_rtx_if_shared.
16022         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16023         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16024         (dwarf2out_var_location): Remove handling of
16025         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16026         on call_insn.
16027         * final.c (final_scan_insn): Remove all references to
16028         NOTE_INSN_CALL_ARG_LOCATION.
16029         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16030         before dumping final insns.
16031         * except.c (emit_note_eh_region_end): Remove all references to
16032         NOTE_INSN_CALL_ARG_LOCATION.
16033         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16034         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16035         * config/arc/arc.c (hwloop_optimize): Likewise.
16036         * config/arm/arm.c (create_fix_barrier): Likewise.
16037         * config/s390/s390.c (s390_chunkify_start): Likewise.
16038         * config/sh/sh.c (find_barrier): Likewise.
16039         * config/i386/i386.c (rest_of_insert_endbranch,
16040         ix86_seh_fixup_eh_fallthru): Likewise.
16041         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16042         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16043         * config/frv/frv.c (frv_function_prologue): Likewise.
16044         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16045         reg note.
16046         (note_outside_basic_block_p): Remove all references to
16047         NOTE_INSN_CALL_ARG_LOCATION.
16048         * gengtype.c (adjust_field_rtx_def): Likewise.
16049         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16050         Likewise.
16051         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16052         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16054         PR c++/84444
16055         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16056         is ADDR_EXPR.
16058         PR tree-optimization/84452
16059         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16060         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16061         is NULL.
16063 2018-02-19  Martin Liska  <mliska@suse.cz>
16065         PR sanitizer/82183
16066         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16068 2018-02-19  Martin Liska  <mliska@suse.cz>
16069             Richard Sandiford  <richard.sandiford@linaro.org>
16071         PR tree-optimization/82491
16072         * gimple-fold.c (get_base_constructor): Make earlier bail out
16073         to prevent ubsan.
16075 2018-02-19  Carl Love  <cel@us.ibm.com>
16077         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16078         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16079         BU_P8V_OVERLOAD_1.
16080         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16081         P8V_BUILTIN_VEC_NEG.
16083 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16085         * config/rl78/rl78.md (movdf): New define expand.
16087 2018-02-19  Martin Liska  <mliska@suse.cz>
16089         PR other/80589
16090         * doc/invoke.texi: Fix typo.
16091         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16093 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16095         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16096         handle rs6000_single_float and rs6000_double_float specially for
16097         e500 family CPUs.
16099 2018-02-16  Jeff Law  <law@redhat.com>
16101         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16102         (pop_regs): Use it.
16104 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16106         PR ipa/84425
16107         * ipa-inline.c (inline_small_functions): Fix a typo.
16109 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16111         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16113 2018-02-16  Carl Love  <cel@us.ibm.com>
16115         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16116         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16117         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16118         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16119         expansion to P8V_BUILTIN_VEC_FLOAT2.
16121 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16123         PR rtl-optimization/70023
16124         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16125         src_regno into account.
16127 2018-02-16  Carl Love  <cel@us.ibm.com>
16129         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16130         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16131         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16132         * config/rs6000/rs6000.c: Remove case statements for
16133         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16134         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16135         and P9V_BUILTIN_VEC_VINSERT4B.
16136         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16137         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16138         * config/rs6000/vsx.md:
16139         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16140         vec_insert4b.
16142 2018-02-16  Carl Love  <cel@us.ibm.com>
16144         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16145         vec_insert4b.
16146         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16147         definitions.
16148         * config/rs6000/rs6000-c.c: Add the definitions for
16149         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16150         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16151         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16152         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16153         definition for insert4b and define insn *insert3b_internal.
16154         * doc/extend.texi: Add documentation for vec_extract4b.
16156 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16158         * doc/extend.texi (Backwards Compatibility): Mention friend
16159         injection.  Note for-scope is deprecated.
16160         * doc/invoke.texi (-ffriend-injection): Deprecate.
16162 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16164         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16165         that moved to I2, also allow destinations that are a paradoxical
16166         subreg (instead of a normal reg).
16168 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16170         PR target/83831
16171         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16172         to QImode.
16174 2018-02-16  Richard Biener  <rguenther@suse.de>
16176         PR tree-optimization/84037
16177         PR tree-optimization/84016
16178         PR target/82862
16179         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16180         Adjust vec_construct for the fact we need additional higher latency
16181         128bit inserts for AVX256 and AVX512 vector builds.
16182         (ix86_add_stmt_cost): Scale vector construction cost for
16183         elementwise loads.
16185 2018-02-16  Richard Biener  <rguenther@suse.de>
16187         PR tree-optimization/84417
16188         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16189         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16190         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16192 2018-02-16  Martin Liska  <mliska@suse.cz>
16194         PR sanitizer/84307
16195         * internal-fn.def (ASAN_CHECK): Set proper flags.
16196         (ASAN_MARK): Likewise.
16198 2018-02-16  Julia Koval  <julia.koval@intel.com>
16200         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16201         from PTA_CANNONLAKE.
16203 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16205         PR target/84272
16206         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16207         Use ++iter rather than iter++ for std::list iterators.
16208         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16209         defer deleting them until all nodes in the forest are processed.  Do
16210         free even leaf nodes.  Change to_process into auto_vec.
16212         PR bootstrap/84405
16213         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16214         * vec.h (vec_default_construct): Use memset instead of placement new
16215         if BROKEN_VALUE_INITIALIZATION is defined.
16216         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16217         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16218         is defined.
16220         PR rtl-optimization/83723
16221         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16222         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16223         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16224         recursive calls.
16225         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16226         callers.
16227         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16229 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16231         PR rtl-optimization/81443
16232         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16233         from inner REGs to paradoxical SUBREGs.
16235 2018-02-16  Richard Biener  <rguenther@suse.de>
16237         PR tree-optimization/84399
16238         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16239         For operands we can analyze at their definition make sure we can
16240         analyze them at each use as well.
16242 2018-02-16  Richard Biener  <rguenther@suse.de>
16244         PR tree-optimization/84190
16245         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16246         volatile accesses if the decl isn't volatile.
16248 2018-02-15  Jason Merrill  <jason@redhat.com>
16250         PR c++/84314 - ICE with templates and fastcall attribute.
16251         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16252         TYPE_CANONICAL on an existing type.
16254 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16256         PR tree-optimization/84383
16257         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16258         dstoff nor call operand_equal_p if dstbase is NULL.
16260         PR tree-optimization/84334
16261         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16262         also a CONSTANT_CLASS_P, punt.
16264 2018-02-14  Jim Wilson  <jimw@sifive.com>
16266         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16267         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16268         to where locals are set.  Add TARGET_RVC support.
16269         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16271 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16273         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16275 2018-02-14  Martin Sebor  <msebor@redhat.com>
16277         PR tree-optimization/83698
16278         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16279         arrays constrain the offset range to their bounds.
16280         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16281         (builtin_access::overlap): Avoid setting the size of overlap if it's
16282         already been set.
16283         (maybe_diag_overlap): Also consider arrays when deciding what values
16284         of offsets to include in diagnostics.
16286 2018-02-14  Martin Sebor  <msebor@redhat.com>
16288         PR c/84108
16289         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16290         that correspond to the kind of a declaration.
16292 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16294         PR target/83984
16295         * config/pa/pa.md: Load address of PIC label using the linkage table
16296         if the label is nonlocal.
16298 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16300         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16301         warning message if user requests -maltivec=be.
16302         * doc/invoke.texi: Document deprecation of -maltivec=be.
16304 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16306         PR target/84220
16307         * config/rs6000/rs6000-c.c: Update definitions for
16308         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16309         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16311 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16313         PR target/84239
16314         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16315         add _get_ssp intrinsics. Remove argument from
16316         __builtin_ia32_rdssp[d|q].
16317         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16318         * config/i386/i386-builtin.def: Remove argument from
16319         __builtin_ia32_rdssp[d|q].
16320         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16321         ix86_expand_special_args_builtin for _rdssp[d|q].
16322         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16323         Clear register before usage.
16324         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16325         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16327 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16329         PR tree-optimization/84357
16330         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16331         operand 1 of an ARRAY_REF too.
16333 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16335         PR target/83831
16336         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16337         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16338         declarations.
16339         (set_of_reg): New struct.
16340         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16341         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16342         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16343         functions.
16344         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16345         Split into bitclr, bitset, bitinvert patterns if appropriate.
16346         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16347         use rx_fuse_in_memory_bitop.
16348         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16349         to named insn, correct maximum insn length.
16351 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16353         PR target/79242
16354         * machmode.def: Define a complex mode for PARTIAL_INT.
16355         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16356         MODE_PARTIAL_INT.
16357         * doc/rtl.texi: Document CSPImode.
16358         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16359         handling.
16360         (msp430_hard_regno_nregs_with_padding): Likewise.
16362 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16364         PR target/84279
16365         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16367 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16369         PR rtl-optimization/84169
16370         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16371         we generated a parallel as new i3 and we split that to new i2 and i3
16372         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16373         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16374         those to i2, not i1.  Partially rewrite this scan code.
16376 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16378         PR c/82210
16379         * stor-layout.c (place_field): For variable length fields, adjust
16380         offset_align afterwards not just based on the field's alignment,
16381         but also on the size.
16383         PR middle-end/84309
16384         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16385         of exps and logs in the use_exp2 case.
16387 2018-02-13  Jeff Law  <law@redhat.com>
16389         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16390         entry for "vector".
16392         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16393         ARGS as unused.
16395 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16397         PR debug/84342
16398         PR debug/84319
16399         * common.opt (gas-loc-support, gas-locview-support): New.
16400         (ginline-points, ginternal-reset-location-views): New.
16401         * doc/invoke.texi: Document them.  Use @itemx where intended.
16402         (gvariable-location-views): Adjust.
16403         * target.def (reset_location_view): New.
16404         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16405         (TARGET_RESET_LOCATION_VIEW): New.
16406         * doc/tm.texi: Rebuilt.
16407         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16408         (dwarf2out_default_as_locview_support): New.
16409         (output_asm_line_debug_info): Use option variables.
16410         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16411         (output_loc_list): Likewise.
16412         (add_high_low_attributes): Check option variables.
16413         Don't output entry view attribute in strict mode.
16414         (gen_inlined_subroutine_die): Check option variables.
16415         (dwarf2out_inline_entry): Likewise.
16416         (init_sections_and_labels): Likewise.
16417         (dwarf2out_early_finish): Likewise.
16418         (maybe_reset_location_view): New, from...
16419         (dwarf2out_var_location): ... here.  Call it.
16420         * debug.h (dwarf2out_default_as_loc_support): Declare.
16421         (dwarf2out_default_as_locview_support): Declare.
16422         * hooks.c (hook_int_rtx_insn_0): New.
16423         * hooks.h (hook_int_rtx_insn_0): Declare.
16424         * toplev.c (process_options): Take -gas-loc-support and
16425         -gas-locview-support from dwarf2out.  Enable
16426         -gvariable-location-views by default only with locview
16427         assembler support.  Enable -ginternal-reset-location-views by
16428         default only if the target defines the corresponding hook.
16429         Enable -ginline-points by default if location views are
16430         enabled; force it disabled if statement frontiers are
16431         disabled.
16432         * tree-inline.c (expand_call_inline): Check option variables.
16433         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16435 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16437         PR tree-optimization/84321
16438         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16439         handling.  Also check whether the anti-range contains any values
16440         that satisfy the mask; switch to a VR_RANGE if not.
16442 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16444         PR sanitizer/84340
16445         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16447 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16449         PR c++/83990
16450         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16451         of call statements, also set location of a load to a temporary.
16453 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16455         * config/rl78/rl78.c (add_vector_labels): New function.
16456         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16457         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16458         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16459         which checks that no arguments are passed.
16460         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16461         * doc/extend.texi: Documentation for the new attribute.
16463 2018-02-13  Andreas Schwab  <schwab@suse.de>
16465         * config/riscv/linux.h (CPP_SPEC): Define.
16467 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16469         PR target/84335
16470         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16471         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16472         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16473         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16474         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16475         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16476         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16477         temporarily for AES and PCLMUL builtins.
16479         PR tree-optimization/84339
16480         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16481         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16482         Formatting fixes.
16484         PR middle-end/84309
16485         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16486         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16487         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16488         inline function.
16489         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16490         inline function.
16491         * omp-simd-clone.h: New file.
16492         * omp-simd-clone.c: Include omp-simd-clone.h.
16493         (expand_simd_clones): No longer static.
16494         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16495         cgraph.h and omp-simd-clone.h.
16496         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16497         (vect_recog_widen_shift_pattern): Formatting fix.
16498         (vect_pattern_recog_1): Don't check optab for calls.
16500         PR target/84336
16501         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16502         operands[2] into a REG before using gen_lowpart on it.
16504 2018-02-12  Jeff Law  <law@redhat.com>
16506         PR target/83760
16507         * config/sh/sh.c (find_barrier): Consider a sibling call
16508         a barrier as well.
16510         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16511         successfully back substituting a reg.
16513 2018-02-12  Richard Biener  <rguenther@suse.de>
16515         PR tree-optimization/84037
16516         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16517         parameter, move visited init to caller.
16518         (vect_slp_analyze_operations): Separate cost from validity
16519         check, initialize visited once for all instances.
16520         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16521         for all instances.
16522         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16523         out an assert.
16524         (vect_model_promotion_demotion_cost): Likewise.
16525         (vectorizable_bswap): Guard cost modeling with !slp_node
16526         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16527         SLP stmts.
16528         (vectorizable_call): Likewise.
16529         (vectorizable_conversion): Likewise.
16530         (vectorizable_assignment): Likewise.
16531         (vectorizable_shift): Likewise.
16532         (vectorizable_operation): Likewise.
16533         (vectorizable_store): Likewise.
16534         (vectorizable_load): Likewise.
16535         (vectorizable_condition): Likewise.
16536         (vectorizable_comparison): Likewise.
16538 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16540         PR sanitizer/84307
16541         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16542         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16543         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16545 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16547         PR middle-end/83665
16548         * params.def (inline-min-speedup): Increase from 8 to 15.
16549         (max-inline-insns-auto): Decrease from 40 to 30.
16550         * ipa-split.c (consider_split): Add some buffer for function to
16551         be considered inlining candidate.
16552         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16553         default values.
16555 2018-02-12  Richard Biener  <rguenther@suse.de>
16557         PR tree-optimization/84037
16558         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16559         matched stmts if we cannot swap the non-matched ones.
16561 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16563         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16564         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16565         _mm_maskz_scalef_round_ss): New intrinsics.
16566         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16567         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16568         __builtin_ia32_scalefss_round): Remove.
16569         (__builtin_ia32_scalefsd_mask_round,
16570         __builtin_ia32_scalefss_mask_round): New intrinsics.
16571         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16572         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16573         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16574         "<round_constraint>")): Changed to ...
16575         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16576         "<round_scalar_constraint>")): ... this.
16577         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16578         %0, %1, %2<round_op3>}"): Changed to ...
16579         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16580         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16581         %2<round_scalar_mask_op3>}"): ... this.
16582         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16584 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16586         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16587         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16588         (_mm_maskz_sqrt_round_ss): New intrinsics.
16589         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16590         (__builtin_ia32_sqrtsd_mask_round)
16591         (__builtin_ia32_sqrtss_mask_round): New builtins.
16592         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16593         (__builtin_ia32_sqrtss_round): Remove.
16594         (__builtin_ia32_sqrtsd_mask_round)
16595         (__builtin_ia32_sqrtss_mask_round): New builtins.
16596         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16597         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16598         ((match_operand:VF_128 1 "vector_operand"
16599         "xBm,<round_constraint>")): Changed to ...
16600         ((match_operand:VF_128 1 "vector_operand"
16601         "xBm,<round_scalar_constraint>")): ... this.
16602         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16603         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16604         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16605         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16606         %<iptr>1<round_scalar_mask_op3>}): ... this.
16607         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16608         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16610 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16612         PR target/84266
16613         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16614         Cast vec_cmpeq result to correct type.
16615         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16616         Cast vec_cmpgt result to correct type.
16618 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16620         * final.c (final_scan_insn_1): Renamed from...
16621         (final_scan_insn): ... this.  New wrapper, to recover
16622         seen from the outermost call in recursive ones.
16623         * config/sparc/sparc.c (output_return): Drop seen from call.
16624         (output_sibcall): Likewise.
16625         * config/visium/visium.c (output_branch): Likewise.
16627 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16629         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16630         function label.
16632 2018-02-10  Alan Modra  <amodra@gmail.com>
16634         PR target/84300
16635         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16636         Specify LR as an input.
16638 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16640         PR sanitizer/83987
16641         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16642         remove_member_access_dummy_vars): New functions.
16643         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16644         lower_omp_1, execute_lower_omp): Use them.
16646         PR rtl-optimization/84308
16647         * shrink-wrap.c (spread_components): Release todo vector.
16649 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16651         PR rtl-optimization/57193
16652         * ira-color.c (struct allocno_color_data): Add member
16653         conflict_allocno_hard_prefs.
16654         (update_conflict_allocno_hard_prefs): New.
16655         (bucket_allocno_compare_func): Add a preference based on
16656         conflict_allocno_hard_prefs.
16657         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16658         (color_allocnos): Remove a dead code.  Initiate
16659         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16661 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16663         PR target/84226
16664         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16665         constraint from =wa to wa.  Avoid a subreg on the output operand,
16666         instead use a pseudo and subreg it in a move.
16667         (p9_xxbrd_<mode>): Changed to ...
16668         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16669         (p9_xxbrd_v2df): New expander.
16670         (p9_xxbrw_<mode>): Changed to ...
16671         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16672         (p9_xxbrw_v4sf): New expander.
16674 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16676         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16678 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16680         PR target/83926
16681         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16682         multiply in 32-bit mode.
16683         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16684         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16685         mode.
16687 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16689         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16690         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16691         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16692         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16694 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16696         PR lto/84213
16697         * dwarf2out.c (is_trivial_indirect_ref): New function.
16698         (dwarf2out_late_global_decl): Do not generate a location
16699         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16700         and that are not defined in the current unit.
16702 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16704         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16705         instead of a libcall for UNORDERED.
16707 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16709         PR target/82641
16710         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16711         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16713 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16715         PR target/PR84295
16716         * config/s390/s390.c (s390_set_current_function): Invoke
16717         s390_indirect_branch_settings also if fndecl didn't change.
16719 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16721         * config/rs6000/rs6000.md (blockage): Set length to zero.
16723 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16725         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16727 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16729         PR sanitizer/84285
16730         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16731         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16732         -static-lib*san.
16734         PR debug/84252
16735         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16736         PARALLEL incoming that failed vt_get_decl_and_offset check.
16738         PR middle-end/84237
16739         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16740         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16741         TREE_READONLY bit.
16742         (get_variable_section): For decls in named .bss* sections pass true as
16743         second argument to bss_initializer_p.
16745 2018-02-09  Marek Polacek  <polacek@redhat.com>
16746             Jakub Jelinek  <jakub@redhat.com>
16748         PR c++/83659
16749         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16750         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16751         Sync some changes from cxx_fold_indirect_ref.
16753 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16755         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16756         markers.
16757         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16758         (BLOCK_INLINE_ENTRY_LABEL): New.
16759         (dwarf2out_var_location): Disregard inline entry markers.
16760         (inline_entry_data): New struct.
16761         (inline_entry_data_hasher): New hashtable type.
16762         (inline_entry_data_hasher::hash): New.
16763         (inline_entry_data_hasher::equal): New.
16764         (inline_entry_data_table): New variable.
16765         (add_high_low_attributes): Add DW_AT_entry_pc and
16766         DW_AT_GNU_entry_view attributes if a pending entry is found
16767         in inline_entry_data_table.  Add old entry_pc attribute only
16768         if debug nonbinding markers are disabled.
16769         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16770         markers are enabled.
16771         (block_within_block_p, dwarf2out_inline_entry): New.
16772         (dwarf2out_finish): Check that no entries remained in
16773         inline_entry_data_table.
16774         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16775         (final_scan_insn, notice_source_line): Likewise.
16776         (rest_of_clean_state): Skip inline entry markers.
16777         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16778         markers.
16779         * gimple.c (gimple_build_debug_inline_entry): New.
16780         * gimple.h (enum gimple_debug_subcode): Add
16781         GIMPLE_DEBUG_INLINE_ENTRY.
16782         (gimple_build_debug_inline_entry): Declare.
16783         (gimple_debug_inline_entry_p): New.
16784         (gimple_debug_nonbind_marker_p): Adjust.
16785         * insn-notes.def (INLINE_ENTRY): New.
16786         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16787         inline entry marker notes.
16788         (print_insn): Likewise.
16789         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16790         (INSN_DEBUG_MARKER_KIND): Likewise.
16791         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16792         * tree-inline.c (expand_call_inline): Build and insert
16793         debug_inline_entry stmt.
16794         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16795         inline entry blocks early, if nonbind markers are enabled.
16796         (dump_scope_block): Dump fragment info.
16797         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16798         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16799         (gimple_build_debug_inline_entry): New.
16800         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16801         Enable/disable inline entry points too.
16802         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16803         (DEBUG_INSN): Describe inline entry markers.
16805         * common.opt (gvariable-location-views): New.
16806         (gvariable-location-views=incompat5): New.
16807         * config.in: Rebuilt.
16808         * configure: Rebuilt.
16809         * configure.ac: Test assembler for view support.
16810         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16811         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16812         * dwarf2out.c (var_loc_view): New typedef.
16813         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16814         (dwarf2out_locviews_in_attribute): New.
16815         (dwarf2out_locviews_in_loclist): New.
16816         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16817         (enum dw_line_info_opcode): Add LI_adv_address.
16818         (struct dw_line_info_table): Add view.
16819         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16820         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16821         (zero_view_p): New variable.
16822         (ZERO_VIEW_P): New macro.
16823         (output_asm_line_debug_info): New.
16824         (struct var_loc_node): Add view.
16825         (add_AT_view_list, AT_loc_list): New.
16826         (add_var_loc_to_decl): Add view param.  Test it against last.
16827         (new_loc_list): Add view params.  Record them.
16828         (AT_loc_list_ptr): Handle loc and view lists.
16829         (view_list_to_loc_list_val_node): New.
16830         (print_dw_val): Handle dw_val_class_view_list.
16831         (size_of_die): Likewise.
16832         (value_format): Likewise.
16833         (loc_list_has_views): New.
16834         (gen_llsym): Set vl_symbol too.
16835         (maybe_gen_llsym, skip_loc_list_entry): New.
16836         (dwarf2out_maybe_output_loclist_view_pair): New.
16837         (output_loc_list): Output view list or entries too.
16838         (output_view_list_offset): New.
16839         (output_die): Handle dw_val_class_view_list.
16840         (output_dwarf_version): New.
16841         (output_compilation_unit_header): Use it.
16842         (output_skeleton_debug_sections): Likewise.
16843         (output_rnglists, output_line_info): Likewise.
16844         (output_pubnames, output_aranges): Update version comments.
16845         (output_one_line_info_table): Output view numbers in asm comments.
16846         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16847         Call maybe_gen_llsym.
16848         (loc_list_from_tree_1): Adjust.
16849         (add_AT_location_description): Create view list attribute if
16850         needed, check it's absent otherwise.
16851         (convert_cfa_to_fb_loc_list): Adjust.
16852         (maybe_emit_file): Call output_asm_line_debug_info for test.
16853         (dwarf2out_var_location): Reset views as needed.  Precompute
16854         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16855         attribute.  Set view.
16856         (new_line_info_table): Reset next view.
16857         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16858         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16859         the assembler, or select appropriate line info opcodes.
16860         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16861         (optimize_string_length): Catch it.  Adjust.
16862         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16863         dw_val_class_view_list, and remove it if no longer needed.
16864         (hash_loc_list): Hash view numbers.
16865         (loc_list_hasher::equal): Compare them.
16866         (optimize_location_lists): Check whether a view list symbol is
16867         needed, and whether the locview attribute is present, and
16868         whether they match.  Remove the locview attribute if no longer
16869         needed.
16870         (index_location_lists): Call skip_loc_list_entry for test.
16871         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16872         Use output_dwarf_version.
16873         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16874         (struct dw_val_node): Add val_view_list.
16875         * final.c (SEEN_NEXT_VIEW): New.
16876         (set_next_view_needed): New.
16877         (clear_next_view_needed): New.
16878         (maybe_output_next_view): New.
16879         (final_start_function): Rename to...
16880         (final_start_function_1): ... this.  Take pointer to FIRST,
16881         add SEEN parameter.  Emit param bindings in the initial view.
16882         (final_start_function): Reintroduce SEEN-less interface.
16883         (final): Rename to...
16884         (final_1): ... this.  Take SEEN parameter.  Output final pending
16885         next view at the end.
16886         (final): Reintroduce seen-less interface.
16887         (final_scan_insn): Output pending next view before switching
16888         sections or ending a block.  Mark the next view as needed when
16889         outputting variable locations.  Notify debug backend of section
16890         changes, and of location view changes.
16891         (rest_of_handle_final): Adjust.
16892         * toplev.c (process_options): Autodetect value for debug variable
16893         location views option.  Warn on incompat5 without -gdwarf-5.
16894         * doc/invoke.texi (gvariable-location-views): New.
16895         (gvariable-location-views=incompat5): New.
16896         (gno-variable-location-views): New.
16898 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16900         PR tree-optimization/84136
16901         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16902         that the result of find_edge is non-NULL.
16904 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16906         PR target/83008
16907         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16908         storing integer register in SImode.  Fix cost of 256 and 512
16909         byte aligned SSE register store.
16911 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16913         * config/i386/i386.c (ix86_multiplication_cost): Fix
16914         multiplication cost for TARGET_AVX512DQ.
16916 2018-02-08  Marek Polacek  <polacek@redhat.com>
16918         PR tree-optimization/84238
16919         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16920         get_range_strlen.
16922 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16924         PR tree-optimization/84265
16925         * tree-vect-stmts.c (vectorizable_store): Don't treat
16926         VMAT_CONTIGUOUS accesses as grouped.
16927         (vectorizable_load): Likewise.
16929 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16931         PR tree-optimization/81635
16932         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16933         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16934         (test_round_for_mask): New functions.
16935         (wide_int_cc_tests): Call test_round_for_mask.
16936         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16937         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16938         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16939         range returned by get_range_info.
16941 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16943         PR ipa/81360
16944         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16945         * symtab.c: Include builtins.h
16946         (symtab_node::output_to_lto_symbol_table_p): Move here
16947         from lto-streamer-out.c:output_symbol_p.
16948         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16949         (output_symbol_p): Move all logic to symtab.c
16950         (produce_symtab): Update.
16952 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16954         * config/s390/s390-opts.h (enum indirect_branch): Define.
16955         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16956         (s390_indirect_branch_via_thunk)
16957         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16958         (enum s390_indirect_branch_type): Define.
16959         * config/s390/s390.c (struct s390_frame_layout, struct
16960         machine_function): Remove.
16961         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16962         (indirect_branch_table_label_no, indirect_branch_table_name):
16963         Define variables.
16964         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16965         (enum s390_indirect_branch_option): Define.
16966         (s390_return_addr_from_memory): New function.
16967         (s390_handle_string_attribute): New function.
16968         (s390_attribute_table): Add new attribute handler.
16969         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16970         (s390_indirect_branch_via_thunk): New function.
16971         (s390_indirect_branch_via_inline_thunk): New function.
16972         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16973         sibling call optimization for non z10 compiles.
16974         (s390_emit_call): Force indirect branch target to be a single
16975         register.  Add r1 clobber for non-z10 compiles.
16976         (s390_emit_epilogue): Emit return jump via return_use expander.
16977         (s390_reorg): Handle JUMP_INSNs as execute targets.
16978         (s390_option_override_internal): Perform validity checks for the
16979         new command line options.
16980         (s390_indirect_branch_attrvalue): New function.
16981         (s390_indirect_branch_settings): New function.
16982         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16983         (s390_output_indirect_thunk_function):  New function.
16984         (s390_code_end): Implement target hook.
16985         (s390_case_values_threshold): Implement target hook.
16986         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16987         macros.
16988         * config/s390/s390.h (struct s390_frame_layout)
16989         (struct machine_function): Move here from s390.c.
16990         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16991         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16992         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16993         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16994         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16995         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16996         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16997         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16998         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16999         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17000         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17001         (mnemonic attribute): Add values which aren't recognized
17002         automatically.
17003         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17004         pattern for branch conversion.  Fix mnemonic attribute.
17005         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17006         indirect branch via thunk if requested.
17007         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17008         ("*indirect_jump"): Disable for branch conversion using out of
17009         line thunks.
17010         ("indirect_jump_via_thunk<mode>_z10")
17011         ("indirect_jump_via_thunk<mode>")
17012         ("indirect_jump_via_inlinethunk<mode>_z10")
17013         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17014         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17015         ("casesi_jump_via_inlinethunk<mode>_z10")
17016         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17017         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17018         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17019         ("*indirect2_jump"): Disable for branch conversion.
17020         ("casesi_jump"): Turn into expander and expand patterns for branch
17021         conversion.
17022         ("return_use"): New expander.
17023         ("*return"): Emit return via thunk and rename it to ...
17024         ("*return<mode>"): ... this one.
17025         * config/s390/s390.opt: Add new options and and enum for the
17026         option values.
17028 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17030         * lra-constraints.c (match_reload): Unconditionally use
17031         gen_lowpart_SUBREG, rather than selecting between that
17032         and equivalent gen_rtx_SUBREG code.
17034 2018-02-08  Richard Biener  <rguenther@suse.de>
17036         PR tree-optimization/84233
17037         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17038         changed flag instead of boguously re-using phi_inserted.
17040 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17042         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17043         static local variables.
17045 2018-02-08  Richard Biener  <rguenther@suse.de>
17047         PR tree-optimization/84278
17048         * tree-vect-stmts.c (vectorizable_store): When looking for
17049         smaller vector types to perform grouped strided loads/stores
17050         make sure the mode is supported by the target.
17051         (vectorizable_load): Likewise.
17053 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17055         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17056         Increase LDP/STP opportunities by adding adjacent callee-saves.
17058 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17060         PR rtl-optimization/84068
17061         PR rtl-optimization/83459
17062         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17064 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17066         PR tree-optimization/84224
17067         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17068         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17069         non-zero arguments.
17071 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17073         PR target/84113
17074         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17075         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17076         count, remove one USE.
17078 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17080         * doc/install.texi (Configuration): Document the
17081         --with-long-double-format={ibm,ieee} PowerPC configuration
17082         options.
17084         PR target/84154
17085         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17086         Convert from define_expand to be define_insn_and_split.  Rework
17087         float/double/_Float128 conversions to QI/HI/SImode to work with
17088         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17089         conversions to QI/HImode types did a store and then a load to
17090         truncate the value.  For conversions to VSX registers, don't split
17091         the insn, instead emit the code directly.  Use the code iterator
17092         any_fix to combine signed and unsigned conversions.
17093         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17094         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17095         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17096         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17097         (fix_<mode>di2_hw): Likewise.
17098         (fixuns_<mode>di2_hw): Likewise.
17099         (fix_<mode>si2_hw): Likewise.
17100         (fixuns_<mode>si2_hw): Likewise.
17101         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17102         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17103         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17104         fix<uns>_trunc<SFDF:mode>si2_p8.
17105         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17106         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17107         (fix<uns>_<mode>_mem): Likewise.
17108         (fctiw<u>z_<mode>_mem): Likewise.
17109         (fix<uns>_<mode>_mem): Likewise.
17110         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17111         the register allocator from doing a direct move to the GPRs to do
17112         a store, and instead use the ISA 3.0 store byte/half-word from
17113         vector register instruction.  For IEEE 128-bit floating point,
17114         also optimize stores of 32-bit ints.
17115         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17117 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17119         * genextract.c (push_pathstr_operand): New function to support
17120         [a-zA-Z].
17121         (walk_rtx): Call push_pathstr_operand.
17122         (print_path): Support [a-zA-Z].
17124 2018-02-07  Richard Biener  <rguenther@suse.de>
17126         PR tree-optimization/84037
17127         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17128         (cse_and_gimplify_to_preheader): Declare.
17129         (vect_get_place_in_interleaving_chain): Likewise.
17130         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17131         ivexpr_map.
17132         (_loop_vec_info::~_loop_vec_info): Delete it.
17133         (cse_and_gimplify_to_preheader): New function.
17134         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17135         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17136         (vectorizable_load): Likewise.  For grouped stores always base
17137         the IV on the first element.
17138         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17139         condition before gimplifying.
17141 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17143         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17144         *DIV_EXPR and *MOD_EXPR.
17146 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17148         PR target/84248
17149         * config/i386/i386.c (ix86_option_override_internal): Mask out
17150         the CF_SET bit when checking -fcf-protection.
17152 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17154         PR libgomp/84217
17155         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17156         enough.
17158 2018-02-07  Richard Biener  <rguenther@suse.de>
17160         PR tree-optimization/84204
17161         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17162         this place.
17164         PR tree-optimization/84205
17165         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17166         special-case isl_ast_op_zdiv_r.
17168         PR tree-optimization/84223
17169         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17170         Only add conditions from within the region.
17171         (gather_bbs::after_dom_children): Adjust.
17173 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17175         PR target/84209
17176         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17177         * config/avr/avr.md: Only post-reload split REG-REG moves if
17178         either register is GENERAL_REG_P.
17180 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17182         PR tree-optimization/84235
17183         * tree-ssa-scopedtables.c
17184         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17185         if the subtraction is performed in floating point type where NaNs are
17186         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17187         build 1.  Formatting fix.
17189 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17191         PR target/84146
17192         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17193         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17194         and skip it regardless of bb boundaries.  Use CALL_P macro,
17195         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17196         unnecessarily, formatting fix.
17198 2018-02-06  Michael Collison  <michael.collison@arm.com>
17200         * config/arm/thumb2.md:
17201         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17202         (*thumb_mov_notscc): Ditto.
17204 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17206         PR target/84154
17207         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17208         unsigned_fix, not "s".
17210 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17212         * configure.ac (gcc_fn_eh_frame_ro): New function.
17213         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17214         correct .eh_frame permissions.
17215         * configure: Regenerate.
17217 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17219         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17220         irrelevant options.
17222 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17224         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17225         Display warning message for -mno-speculate-indirect-jumps.
17227 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17229         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17230         Undocumented.
17231         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17233 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17235         PR tree-optimization/84225
17236         * tree-eh.c (find_trapping_overflow): Only call
17237         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17239 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17241         PR target/84145
17242         * config/i386/i386.c: Reimplement the check of possible options
17243         -mibt/-mshstk conbination. Change error messages.
17244         * doc/invoke.texi: Fix a typo: remove extra '='.
17246 2018-02-06  Marek Polacek  <polacek@redhat.com>
17248         PR tree-optimization/84228
17249         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17251 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17253         PR target/82641
17254         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17255         emitted arch directives.
17256         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17257         __ARM_FEATURE_COPROC before changing architectures.
17259 2018-02-06  Richard Biener  <rguenther@suse.de>
17261         * config/i386/i386.c (print_reg): Fix typo.
17262         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17264 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17266         * configure: Regenerate.
17268 2018-02-05  Martin Sebor  <msebor@redhat.com>
17270         PR tree-optimization/83369
17271         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17272         inlining context.
17274 2018-02-05  Martin Liska  <mliska@suse.cz>
17276         * doc/invoke.texi: Cherry-pick upstream r323995.
17278 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17280         * ira.c (ira_init_register_move_cost): Adjust comment.
17282 2018-02-05  Martin Liska  <mliska@suse.cz>
17284         PR gcov-profile/84137
17285         * doc/gcov.texi: Fix typo in documentation.
17287 2018-02-05  Martin Liska  <mliska@suse.cz>
17289         PR gcov-profile/83879
17290         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17291         using dlopen functionality.
17293 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17295         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17296         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17297         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17298         _mm_maskz_range_round_ss): New intrinsics.
17299         (__builtin_ia32_rangesd128_round)
17300         (__builtin_ia32_rangess128_round): Remove.
17301         (__builtin_ia32_rangesd128_mask_round,
17302         __builtin_ia32_rangess128_mask_round): New builtins.
17303         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17304         __builtin_ia32_rangess128_round): Remove.
17305         (__builtin_ia32_rangesd128_mask_round,
17306         __builtin_ia32_rangess128_mask_round): New builtins.
17307         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17308         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17309         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17310         "<round_saeonly_constraint>")): Changed to ...
17311         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17312         "<round_saeonly_scalar_constraint>")): ... this.
17313         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17314         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17315         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17316         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17317         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17319 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17321         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17322         options.
17323         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17324         Remove all values except native, 8540 and 8548.
17326 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17328         * config/i386/i386.c (ix86_output_function_return): Pass
17329         INVALID_REGNUM, instead of -1, as invalid register number to
17330         indirect_thunk_name and output_indirect_thunk.
17332 2018-02-02  Julia Koval  <julia.koval@intel.com>
17334         * config.gcc: Add -march=icelake.
17335         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17336         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17337         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17338         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17339         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17340         (processor_target_table): Add icelake.
17341         (ix86_option_override_internal): Handle new PTAs.
17342         (get_builtin_code_for_version): Handle icelake.
17343         (M_INTEL_COREI7_ICELAKE): New.
17344         (fold_builtin_cpu): Handle icelake.
17345         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17346         * doc/invoke.texi: Add -march=icelake.
17348 2018-02-02  Julia Koval  <julia.koval@intel.com>
17350         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17351         to wide_int_bitmask.
17352         * wide-int-bitmask.h: New.
17354 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17356         PR target/84066
17357         * config/i386/i386.md: Replace Pmode with word_mode in
17358         builtin_setjmp_setup and builtin_longjmp to support x32.
17360 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17362         PR target/56010
17363         PR target/83743
17364         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17365         #include "opts.h".
17366         (rs6000_supported_cpu_names): New static variable.
17367         (linux_cpu_translation_table): Likewise.
17368         (elf_platform) <cpu>: Define new static variable and use it.
17369         Translate kernel AT_PLATFORM name to canonical name if needed.
17370         Error if platform name is unknown.
17372 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17374         PR target/84089
17375         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17377 2018-02-01  Jeff Law  <law@redhat.com>
17379         PR target/84128
17380         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17381         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17382         the scratch if RELEASE_VIA_POP is false.
17383         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17384         If we have to save a temporary register, decrement SIZE appropriately.
17385         Pass new arguments to release_scratch_register_on_entry.
17386         (ix86_adjust_stack_and_probe): Likewise.
17387         (ix86_emit_probe_stack_range): Pass new arguments to
17388         release_scratch_register_on_entry.
17390 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17392         PR rtl-optimization/84157
17393         * combine.c (change_zero_ext): Use REG_P predicate in
17394         front of HARD_REGISTER_P predicate.
17396 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17398         * config/avr/avr.c (avr_option_override): Move disabling of
17399         -fdelete-null-pointer-checks to...
17400         * common/config/avr/avr-common.c (avr_option_optimization_table):
17401         ...here.
17403 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17405         PR tree-optimization/81635
17406         * tree-data-ref.c (split_constant_offset_1): For types that
17407         wrap on overflow, try to use range info to prove that wrapping
17408         cannot occur.
17410 2018-02-01  Renlin Li  <renlin.li@arm.com>
17412         PR target/83370
17413         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17414         TAILCALL_ADDR_REGS.
17415         (aarch64_register_move_cost): Likewise.
17416         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17417         TAILCALL_ADDR_REGS.
17418         (REG_CLASS_NAMES): Likewise.
17419         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17420         TAILCALL_ADDR_REGS. Remove IP registers.
17421         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17423 2018-02-01  Richard Biener  <rguenther@suse.de>
17425         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17426         for specifying RPO order and allow NULL for that.
17427         * domwalk.c (dom_walker::dom_walker): Likewise.
17428         (dom_walker::walk): Handle NULL RPO order.
17429         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17430         in RPO order.
17431         (rewrite_update_dom_walker): Likewise.
17432         (mark_def_dom_walker): Likewise.
17434 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17436         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17437         (aarch64_maybe_expand_sve_subreg_move): Declare.
17438         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17439         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17440         predicate.
17441         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17442         that are semantically a reverse operation.
17443         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17444         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17445         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17446         functions.
17447         (aarch64_can_change_mode_class): For big-endian, forbid changes
17448         between two SVE modes if they have different element sizes.
17450 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17452         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17453         the TImode handling for big-endian targets.
17455 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17457         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17458         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17459         not just bytes.
17460         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17461         Remove BSWAP handing for big-endian targets and use the form of
17462         LD1RQ appropariate for the mode.
17464 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17466         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17467         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17468         duplicated element.
17470 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17472         PR tearget/83845
17473         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17474         check for operands that need to go through aarch64_sve_reload_be.
17476 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17478         PR tree-optimization/81661
17479         PR tree-optimization/84117
17480         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17481         * tree-eh.c: Include gimplify.h.
17482         (find_trapping_overflow, replace_trapping_overflow,
17483         rewrite_to_non_trapping_overflow): New functions.
17484         * tree-vect-loop.c: Include tree-eh.h.
17485         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17486         * tree-data-ref.c: Include tree-eh.h.
17487         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17489 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17491         PR rtl-optimization/84123
17492         * combine.c (change_zero_ext): Check if hard register satisfies
17493         can_change_dest_mode before calling gen_lowpart_SUBREG.
17495 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17497         PR target/82444
17498         * ira.c (ira_init_register_move_cost): Remove assert.
17500 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17502         PR rtl-optimization/84071
17503         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17504         * doc/tm.texi: Regenerate.
17506 2018-01-31  Richard Biener  <rguenther@suse.de>
17508         PR tree-optimization/84132
17509         * tree-data-ref.c (analyze_miv_subscript): Properly
17510         check whether evolution_function_is_affine_multivariate_p
17511         before calling gcd_of_steps_may_divide_p.
17513 2018-01-31  Julia Koval  <julia.koval@intel.com>
17515         PR target/83618
17516         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17517         * config/i386/i386.md (rdpid_rex64) New.
17518         (rdpid): Make 32bit only.
17520 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17522         PR lto/84105
17523         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17524         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17526 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17528         Revert
17529         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17531         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17533 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17535         PR rtl-optimization/84071
17536         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17537         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17539 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17541         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17542         (arc_attribute_table): Add 'aux' attribute.
17543         (arc_in_small_data_p): Consider aux like variables.
17544         (arc_is_aux_reg_p): New function.
17545         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17546         (arc_get_aux_arg): New function.
17547         (prepare_move_operands): Handle aux-register access.
17548         (arc_handle_aux_attribute): New function.
17549         * doc/extend.texi (ARC Variable attributes): Add subsection.
17551 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17553         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17554         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17555         (arc_attribute_table): Add 'uncached' attribute.
17556         (arc_print_operand): Print '.di' flag for uncached memory
17557         accesses.
17558         (arc_in_small_data_p): Do not consider for small data the uncached
17559         types.
17560         (arc_is_uncached_mem_p): New function.
17561         * config/arc/predicates.md (compact_store_memory_operand): Check
17562         for uncached memory accesses.
17563         (nonvol_nonimm_operand): Likewise.
17564         * doc/extend.texi (ARC Type Attribute): New subsection.
17566 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17568         PR c/84100
17569         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17570         falign-loops=): Add Optimization flag.
17572 2018-01-30  Jeff Law  <law@redhat.com>
17574         PR target/84064
17575         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17576         INT_REGISTERS_SAVED.  Check it prior to calling
17577         get_scratch_register_on_entry.
17578         (ix86_adjust_stack_and_probe): Similarly.
17579         (ix86_emit_probe_stack_range): Similarly.
17580         (ix86_expand_prologue): Corresponding changes.
17582 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17584         PR target/40411
17585         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17586         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17588 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17590         PR target/84112
17591         * lra-constraints.c (curr_insn_transform): Process AND in the
17592         address.
17594 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17596         PR rtl-optimization/83986
17597         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17598         dependence against last_pending_memory_flush in addition to
17599         pending_jump_insns.
17601 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17603         PR tree-optimization/81611
17604         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17605         copies.
17607 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17609         PR target/83758
17610         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17611         a reg rtx.
17613 2018-01-30  Richard Biener  <rguenther@suse.de>
17614             Jakub Jelinek  <jakub@redhat.com>
17616         PR tree-optimization/84111
17617         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17618         inner loops added during recursion, as they don't have up-to-date
17619         SSA form.
17621 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17623         PR ipa/81360
17624         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17625         (can_inline_edge_by_limits_p): ... here.
17626         (can_early_inline_edge_p, check_callers,
17627         update_caller_keys, update_callee_keys, recursive_inlining,
17628         add_new_edges_to_heap, speculation_useful_p,
17629         inline_small_functions,
17630         inline_small_functions, flatten_function,
17631         inline_to_all_callers_1): Update.
17633 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17635         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17636         zeros correctly.
17638 2018-01-30  Richard Biener  <rguenther@suse.de>
17640         PR tree-optimization/83008
17641         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17642         invariant and constant vector uses in stmts when they need
17643         more than one stmt.
17645 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17647         PR bootstrap/84017
17648         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17649         * configure: Regenerate.
17651 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17653         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17654         pattern.
17655         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17656         Use gen_rtx_REG rather than gen_lowpart.
17658 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17660         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17661         rather than 0 when creating partial subregs.
17663 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17665         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17666         of usage.
17668 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17670         PR target/81550
17671         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17672         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17673         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17674         flags.  This restores the settings used before the 2017-07-24.
17675         Turning off pre increment/decrement/modify allows IVOPTS to
17676         optimize DF/SF loops where the index is an int.
17678 2018-01-29  Richard Biener  <rguenther@suse.de>
17679             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17681         PR bootstrap/80867
17682         * tree-vect-stmts.c (vectorizable_call): Don't call
17683         targetm.vectorize_builtin_md_vectorized_function if callee is
17684         NULL.
17686 2018-01-22  Carl Love  <cel@us.ibm.com>
17688         * doc/extend.tex: Fix typo in second arg in
17689         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17691 2018-01-29  Richard Biener  <rguenther@suse.de>
17693         PR tree-optimization/84086
17694         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17695         (flush_ssaname_freelist): When SSA names were released reset
17696         the SCEV hash table.
17698 2018-01-29  Richard Biener  <rguenther@suse.de>
17700         PR tree-optimization/84057
17701         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17702         removed paths when removing edges.
17704 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17706         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17707         -mfunction-return=@var{choice}.
17709 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17711         PR diagnostic/84034
17712         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17713         Handle CR like TAB.
17714         (layout::print_source_line): Likewise.
17715         (test_get_line_width_without_trailing_whitespace): Add test cases.
17717 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17719         PR middle-end/84040
17720         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17721         debug insns.
17723 2018-01-26  Jim Wilson  <jimw@sifive.com>
17725         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17727         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17728         specified.
17730 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17732         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17733         and CMP + SUB-immediate -> SUBS.
17735 2018-01-26  Martin Sebor  <msebor@redhat.com>
17737         PR tree-optimization/83896
17738         * tree-ssa-strlen.c (get_string_len): Rename...
17739         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17740         Avoid assuming length is constant.
17741         (handle_char_store): Use HOST_WIDE_INT for string length.
17743 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17745         PR target/81763
17746         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17747         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17749 2018-01-26  Richard Biener  <rguenther@suse.de>
17751         PR rtl-optimization/84003
17752         * dse.c (record_store): Only record redundant stores when
17753         the earlier store aliases at least all accesses the later one does.
17755 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17757         PR rtl-optimization/83985
17758         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17759         REG_CFA_RESTORE insns.
17760         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17761         REG_CFA_RESTORE insns here.
17763         PR c/83989
17764         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17765         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17767 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17769         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17770         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17771         (arc_init): Likewise.
17772         (arc_override_options): Likewise.
17773         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17774         value.
17775         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17776         support.
17777         * config/arc/arc.h (TARGET_DBNZ): Define.
17778         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17779         properly set the tune attribute.
17780         (dbnz): Use TARGET_DBNZ guard.
17781         * config/arc/arc.opt (mtune): Add core3 option.
17783 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17785         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17786         recognize new pic like addresses.
17787         (arc_delegitimize_address): Clean up.
17789 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17791         * config/arc/arc-arches.def: Option mrf16 valid for all
17792         architectures.
17793         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17794         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17795         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17796         * config/arc/arc-tables.opt: Regenerate.
17797         * config/arc/arc.c (arc_conditional_register_usage): Handle
17798         reduced register file case.
17799         (arc_file_start): Set must have build attributes.
17800         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17801         mrf16 option value.
17802         * config/arc/arc.opt (mrf16): Add new option.
17803         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17804         * config/arc/genmultilib.awk: Handle new mrf16 option.
17805         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17806         * config/arc/t-multilib: Regenerate.
17807         * doc/invoke.texi (ARC Options): Document mrf16 option.
17809 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17811         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17812         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17813         (arc_attribute_table): Add 'secure_call' attribute.
17814         (arc_print_operand): Print secure call operand.
17815         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17816         secure.
17817         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17818         (call_i): Add support for sjli instruction.
17819         (call_value_i): Likewise.
17820         * config/arc/constraints.md (Csc): New constraint.
17822 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17823             John Eric Martin  <John.Martin@emmicro-us.com>
17825         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17826         * config/arc/arc.c (_arc_jli_section): New struct.
17827         (arc_jli_section): New type.
17828         (rc_jli_sections): New static variable.
17829         (arc_handle_jli_attribute): New function.
17830         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17831         (arc_file_end): New function.
17832         (TARGET_ASM_FILE_END): Define.
17833         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17834         (arc_add_jli_section): New function.
17835         (jli_call_scan): Likewise.
17836         (arc_reorg): Call jli_call_scan.
17837         (arc_output_addsi): Remove 'S' from printing asm operand.
17838         (arc_is_jli_call_p): New function.
17839         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17840         operand.
17841         (movhi_insn): Likewise.
17842         (movsi_insn): Likewise.
17843         (movsi_set_cc_insn): Likewise.
17844         (loadqi_update): Likewise.
17845         (load_zeroextendqisi_update): Likewise.
17846         (load_signextendqisi_update): Likewise.
17847         (loadhi_update): Likewise.
17848         (load_zeroextendhisi_update): Likewise.
17849         (load_signextendhisi_update): Likewise.
17850         (loadsi_update): Likewise.
17851         (loadsf_update): Likewise.
17852         (movsicc_insn): Likewise.
17853         (bset_insn): Likewise.
17854         (bxor_insn): Likewise.
17855         (bclr_insn): Likewise.
17856         (bmsk_insn): Likewise.
17857         (bicsi3_insn): Likewise.
17858         (cmpsi_cc_c_insn): Likewise.
17859         (movsi_ne): Likewise.
17860         (movsi_cond_exec): Likewise.
17861         (clrsbsi2): Likewise.
17862         (norm_f): Likewise.
17863         (normw): Likewise.
17864         (swap): Likewise.
17865         (divaw): Likewise.
17866         (flag): Likewise.
17867         (sr): Likewise.
17868         (kflag): Likewise.
17869         (ffs): Likewise.
17870         (ffs_f): Likewise.
17871         (fls): Likewise.
17872         (call_i): Remove 'S' asm letter, add jli instruction.
17873         (call_value_i): Likewise.
17874         * config/arc/arc.op (mjli-always): New option.
17875         * config/arc/constraints.md (Cji): New constraint.
17876         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17877         operand.
17878         (subsf3_fpx): Likewise.
17879         (mulsf3_fpx): Likewise.
17880         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17881         asm operand.
17882         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17883         function attrbutes.
17884         * doc/invoke.texi (ARC): Document mjli-always option.
17886 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17888         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17889         avoid addition with 0 and use incw and decw where possible.
17891 2018-01-26  Richard Biener  <rguenther@suse.de>
17893         PR tree-optimization/81082
17894         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17895         association if it requires casting to unsigned.
17896         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17897         from fold_plusminus_mult_expr to catch important cases late when
17898         range info is available.
17900 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17902         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17903         * configure.ac (hidden_linkonce): New test.
17904         * configure: Regenerate.
17905         * config.in: Regenerate.
17907 2018-01-26  Julia Koval  <julia.koval@intel.com>
17909         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17910         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17911         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17912         _mm_mask_bitshuffle_epi64_mask): Fix type.
17913         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17914         USI_FTYPE_V4DI_V4DI_USI): Remove.
17915         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17916         __builtin_ia32_vpshufbitqmb256_mask,
17917         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17918         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17919         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17921 2018-01-26  Alan Modra  <amodra@gmail.com>
17923         PR target/84033
17924         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17925         UNSPEC_VBPERMQ.  Sort other unspecs.
17927 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17929         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17931 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17933         PR middle-end/83055
17934         * predict.c (drop_profile): Do not push/pop cfun; update also
17935         node->count.
17936         (handle_missing_profiles): Fix logic looking for zero profiles.
17938 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17940         PR middle-end/83977
17941         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17942         on functions with #pragma omp declare simd or functions with simd
17943         attribute.
17944         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17945         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17946         Remove trailing \n from warning_at calls.
17948 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17950         PR target/84028
17951         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17952         for neutered workers.
17954 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17956         PR target/68467
17957         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17958         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17960 2018-01-24  Jeff Law  <law@redhat.com>
17962         PR target/83994
17963         * i386.c (get_probe_interval): Move to earlier point.
17964         (ix86_compute_frame_layout): If -fstack-clash-protection and
17965         the frame is larger than the probe interval, then use pushes
17966         to save registers rather than reg->mem moves.
17967         (ix86_expand_prologue): Remove conditional for int_registers_saved
17968         assertion.
17970 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17972         PR target/84014
17973         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17974         min/max for never referenced object.
17976 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17978         PR middle-end/83977
17979         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17980         here.
17981         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17982         attributes from DECL_ATTRIBUTES (decl) without affecting
17983         DECL_ATTRIBUTES (current_function_decl).
17984         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17985         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17987 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17989         PR tree-optimization/83979
17990         * fold-const.c (fold_comparison): Use constant_boolean_node
17991         instead of boolean_{true,false}_node.
17993 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17995         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17996         with zero counts.
17998 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18000         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18001         Simplify the clause that sets the length attribute.
18002         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18003         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18004         clause that sets the length attribute.
18005         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18007 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18009         PR target/83589
18010         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18011         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18012         Add strict parameter.
18013         (prevent_branch_around_nothing): Insert dummy insn between branch to
18014         label and label with no ptx insn inbetween.
18015         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18017 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18019         PR target/81352
18020         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18021         for neutered threads in warp.
18022         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18024 2018-01-24  Richard Biener  <rguenther@suse.de>
18026         PR tree-optimization/83176
18027         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18028         operands.
18030 2018-01-24  Richard Biener  <rguenther@suse.de>
18032         PR tree-optimization/82819
18033         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18034         code generating pluses that are no-ops in the target precision.
18036 2018-01-24  Richard Biener  <rguenther@suse.de>
18038         PR middle-end/84000
18039         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18041 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18043         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18044         to merge probabilities.
18045         * predict.c (probably_never_executed): Also mark as cold functions
18046         with global 0 profile and guessed local profile.
18047         * profile-count.c (profile_probability::combine_with_count): New
18048         member function.
18049         * profile-count.h (profile_probability::operator*,
18050         profile_probability::operator*=, profile_probability::operator/,
18051         profile_probability::operator/=): Reduce precision to adjusted
18052         and set value to guessed on contradictory divisions.
18053         (profile_probability::combine_with_freq): Remove.
18054         (profile_probability::combine_wiht_count): Declare.
18055         (profile_count::force_nonzero):: Set to adjusted.
18056         (profile_count::probability_in):: Set quality to adjusted.
18057         * tree-ssa-tail-merge.c (replace_block_by): Use
18058         combine_with_count.
18060 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18061             Jim Wilson  <jimw@sifive.com>
18063         * config/riscv/riscv.c (riscv_stack_boundary): New.
18064         (riscv_option_override): Set riscv_stack_boundary.  Handle
18065         riscv_preferred_stack_boundary_arg.
18066         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18067         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18068         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18069         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18070         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18071         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18073 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18075         PR target/83905
18076         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18077         of struct ix86_frame.
18078         (ix86_expand_epilogue): Likewise.  Add a local variable for
18079         the reg_save_offset field in struct ix86_frame.
18081 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18083         PR tree-optimization/82604
18084         * tree-loop-distribution.c (enum partition_kind): New enum item
18085         PKIND_PARTIAL_MEMSET.
18086         (partition_builtin_p): Support above new enum item.
18087         (generate_code_for_partition): Ditto.
18088         (compute_access_range): Differentiate cases that equality can be
18089         proven at all loops, the innermost loops or no loops.
18090         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18091         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18092         (finalize_partitions, distribute_loop): Don't fuse partition of
18093         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18094         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18095         parloop is enabled.
18097 2018-01-23  Martin Liska  <mliska@suse.cz>
18099         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18100         order to ignore the predictor.
18101         (PRED_POLYMORPHIC_CALL): Likewise.
18102         (PRED_RECURSIVE_CALL): Likewise.
18104 2018-01-23  Martin Liska  <mliska@suse.cz>
18106         * tree-profile.c (tree_profiling): Print function header to
18107         aware reader which function we are working on.
18108         * value-prof.c (gimple_find_values_to_profile): Do not print
18109         not interesting value histograms.
18111 2018-01-23  Martin Liska  <mliska@suse.cz>
18113         * profile-count.h (enum profile_quality): Add
18114         profile_uninitialized as the first value. Do not number values
18115         as they are zero based.
18116         (profile_count::verify): Update sanity check.
18117         (profile_probability::verify): Likewise.
18119 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18121         * doc/invoke.texi (ffor-scope): Deprecate.
18123 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18125         PR tree-optimization/83510
18126         * domwalk.c (set_all_edges_as_executable): New function.
18127         (dom_walker::dom_walker): Convert bool param
18128         "skip_unreachable_blocks" to enum reachability.  Move setup of
18129         edge flags to set_all_edges_as_executable and only do it when
18130         reachability is REACHABLE_BLOCKS.
18131         * domwalk.h (enum dom_walker::reachability): New enum.
18132         (dom_walker::dom_walker): Convert bool param
18133         "skip_unreachable_blocks" to enum reachability.
18134         (set_all_edges_as_executable): New decl.
18135         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18136         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18137         "reachability".
18138         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18139         but converting true to REACHABLE_BLOCKS.
18140         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18141         * tree-vrp.c
18142         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18143         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18144         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18145         REACHABLE_BLOCKS.
18146         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18147         if check_all_array_refs will be called.
18149 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18151         * tree.c (selftest::test_location_wrappers): Add more test
18152         coverage.
18154 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18156         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18157         (selftest::test_bit_in_range): Likewise.
18159 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18161         PR testsuite/83888
18162         * doc/sourcebuild.texi (vect_float): Say that the selector
18163         only describes the situation when -funsafe-math-optimizations is on.
18164         (vect_float_strict): Document.
18166 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18168         PR tree-optimization/83965
18169         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18170         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18171         instead of checking only for a reduction.
18172         (vect_recog_widen_sum_pattern): Likewise.
18174 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18176         * predict.c (probably_never_executed): Only use precise profile info.
18177         (compute_function_frequency): Skip after inlining hack since we now
18178         have quality checking.
18180 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18182         * profile-count.h (profile_probability::very_unlikely,
18183         profile_probability::unlikely, profile_probability::even): Set
18184         precision to guessed.
18186 2018-01-23  Richard Biener  <rguenther@suse.de>
18188         PR tree-optimization/83963
18189         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18190         Properly terminate dominator walk when crossing the exit edge not
18191         when visiting its source block.
18193 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18195         PR c++/83918
18196         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18197         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18199 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18201         PR tree-optimization/83957
18202         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18203         semicolon after for body surrounded by braces.
18205         PR tree-optimization/83081
18206         * profile-count.h (profile_probability::split): New method.
18207         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18208         Use profile_probability::split.
18209         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18210         when splitting a single conditional jump into 2.
18212 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18214         PR tree-optimization/69452
18215         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18216         decl.
18218 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18220         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18221         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18222         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18224 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18226         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18227         declaration.
18228         * config/rl78/rl78.md (movdi): New define_expand.
18229         * config/rl78/rl78.c (rl78_split_movdi): New function.
18231 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18233         PR target/83862
18234         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18235         no longer used.
18236         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18237         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18238         128-bit to produce an UNSPEC move to get the double word with the
18239         signbit and then a shift directly to do signbit.
18240         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18241         implementation with a new version that just does either a direct
18242         move or a regular move.  Move memory interface to separate insns.
18243         Move insns so they are next to the expander.
18244         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18245         with signbit move.  Split big and little endian case.
18246         (signbit<mode>2_dm_mem_le): Likewise.
18247         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18248         (signbit<mode>2_dm2): Likewise.
18250 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18252         * config/rl78/rl78.md (anddi3): New define_expand.
18254 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18256         * config/rl78/rl78.md (umindi3): New define_expand.
18258 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18260         * config/rl78/rl78.md (smindi3): New define_expand.
18262 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18264         * config/rl78/rl78.md (smaxdi3): New define_expand.
18266 2018-01-22  Carl Love  <cel@us.ibm.com>
18268         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18269         LVX_V1TI): Add macro expansion.
18270         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18271         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18272         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18273         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18274         Change check to determine if the instruction is a byte reversing
18275         entry.  Fix typo in comment.
18276         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18277         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18278         Add def_builtin calls for new builtins.
18279         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18280         Add define_insn expansion.
18282 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18284         * config/rl78/rl78.md (umaxdi3): New define_expand.
18286 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18288         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18289         for non-QImode registers.
18291 2018-01-22  Richard Biener  <rguenther@suse.de>
18293         PR tree-optimization/83963
18294         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18295         including the loop exit block.
18296         (scop_detection::merge_sese): Likewise.
18297         (scop_detection::add_scop): Do it here instead.
18299 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18301         * doc/sourcebuild.texi (arm_softfloat): Document.
18303 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18305         PR gcc/77734
18306         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18307         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18308         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18310 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18311             David Edelsohn  <dje.gcc@gmail.com>
18313         PR target/83946
18314         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18315         Change "crset eq" to "crset 2".
18316         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18317         (*call_indirect_aix<mode>_nospec): Likewise.
18318         (*call_value_indirect_aix<mode>_nospec): Likewise.
18319         (*call_indirect_elfv2<mode>_nospec): Likewise.
18320         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18321         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18322         change assembly output from . to $.
18323         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18324         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18325         (*tablejump<mode>_internal1_nospec): Likewise.
18327 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18329         PR target/80870
18330         * config/sh/sh_optimize_sett_clrt.cc:
18331         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18333 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18335         PR tree-optimization/83940
18336         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18337         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18338         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18339         use it to pass back the definition type.
18340         (vect_check_store_rhs): Likewise rhs_dt_out.
18341         (vect_build_gather_load_calls): Add a mask_dt argument and use
18342         it instead of a call to vect_is_simple_use.
18343         (vectorizable_store): Update calls to vect_check_load_store_mask
18344         and vect_check_store_rhs.  Use the dt returned by the latter instead
18345         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18346         instead of calls to vect_is_simple_use.  Pass the scalar rather
18347         than the vector operand to vect_is_simple_use when handling
18348         second and subsequent copies of an rhs value.
18349         (vectorizable_load): Update calls to vect_check_load_store_mask
18350         and vect_build_gather_load_calls.  Use the cached mask_dt and
18351         gs_info.offset_dt instead of calls to vect_is_simple_use.
18353 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18355         PR middle-end/83945
18356         * tree-emutls.c: Include gimplify.h.
18357         (lower_emutls_2): New function.
18358         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18359         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18360         it before further processing.
18362         PR target/83930
18363         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18364         UINTVAL (trueop1) instead of INTVAL (op1).
18366 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18368         PR debug/81570
18369         PR debug/83728
18370         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18371         INCOMING_FRAME_SP_OFFSET if not defined.
18372         (scan_trace): Add ENTRY argument.  If true and
18373         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18374         emit a note to adjust the CFA offset.
18375         (create_cfi_notes): Adjust scan_trace callers.
18376         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18377         INCOMING_FRAME_SP_OFFSET in the CIE.
18378         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18379         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18380         Likewise.
18381         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18382         * doc/tm.texi: Regenerated.
18384 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18386         PR rtl-optimization/83147
18387         * lra-constraints.c (remove_inheritance_pseudos): Use
18388         lra_substitute_pseudo_within_insn.
18390 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18391             Cesar Philippidis  <cesar@codesourcery.com>
18393         PR target/83920
18394         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18396 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18398         PR target/83790
18399         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18400         spaces for function labels.
18402 2018-01-19  Martin Liska  <mliska@suse.cz>
18404         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18405         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18406         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18407         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18408         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18409         (PRED_CONST_RETURN): Change from 69 to 65.
18410         (PRED_NULL_RETURN): Change from 91 to 71.
18411         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18412         (PRED_LOOP_GUARD): Change from 66 to 73.
18414 2018-01-19  Martin Liska  <mliska@suse.cz>
18416         * predict.c (predict_insn_def): Add new assert.
18417         (struct branch_predictor): Change type to signed integer.
18418         (test_prediction_value_range): Amend test to cover
18419         PROB_UNINITIALIZED.
18420         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18421         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18422         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18423         (PRED_LOOP_IV_COMPARE): Likewise.
18424         * predict.h (PROB_UNINITIALIZED): Define new constant.
18426 2018-01-19  Martin Liska  <mliska@suse.cz>
18428         * predict.c (dump_prediction): Add new format for
18429         analyze_brprob.py script which is enabled with -details
18430         suboption.
18431         * profile-count.h (precise_p): New function.
18433 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18435         PR tree-optimization/83922
18436         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18437         there are no statements that need masking.
18438         (vect_active_double_reduction_p): New function.
18439         (vect_analyze_loop_operations): Use it when handling phis that
18440         are not in the loop header.
18442 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18444         PR tree-optimization/83914
18445         * tree-vect-loop.c (vectorizable_induction): Don't convert
18446         init_expr or apply the peeling adjustment for inductions
18447         that are nested within the vectorized loop.
18449 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18451         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18452         instead of NEG.
18454 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18456         PR sanitizer/81715
18457         PR testsuite/83882
18458         * function.h (gimplify_parameters): Add gimple_seq * argument.
18459         * function.c: Include gimple.h and options.h.
18460         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18461         for the added local temporaries if needed.
18462         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18463         if there are any parameter cleanups, wrap whole body into a
18464         try/finally with the cleanups.
18466 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18468         PR target/82964
18469         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18470         Use GET_MODE_CLASS for scalar floating point.
18472 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18474         PR ipa/82256
18475         patch by PaX Team
18476         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18477         Fix call of call_cgraph_insertion_hooks.
18479 2018-01-18  Martin Sebor  <msebor@redhat.com>
18481         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18483 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18485         PR ipa/83619
18486         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18487         frequencies.
18489 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18491         PR other/70268
18492         * common.opt: (-ffile-prefix-map): New option.
18493         * opts.c (common_handle_option): Defer it.
18494         * opts-global.c (handle_common_deferred_options): Handle it.
18495         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18496         * file-prefix-map.h: New file.
18497         (remap_debug_filename, add_debug_prefix_map): ...here.
18498         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18499         * final.c (debug_prefix_map, add_debug_prefix_map
18500         remap_debug_filename): Move to...
18501         * file-prefix-map.c: New file.
18502         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18503         generalize, get rid of alloca(), use strrchr() instead of strchr().
18504         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18505         Implement in terms of add_prefix_map().
18506         (remap_macro_filename, remap_debug_filename): Implement in term of
18507         remap_filename().
18508         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18509         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18510         * dbxout.c: Include file-prefix-map.h.
18511         * varasm.c: Likewise.
18512         * vmsdbgout.c: Likewise.
18513         * xcoffout.c: Likewise.
18514         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18515         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18516         * doc/invoke.texi (-ffile-prefix-map): Document.
18517         (-fdebug-prefix-map): Update description.
18519 2018-01-18  Martin Liska  <mliska@suse.cz>
18521         * config/i386/i386.c (indirect_thunk_name): Document that also
18522         lfence is emitted.
18523         (output_indirect_thunk): Document why both instructions
18524         (pause and lfence) are generated.
18526 2018-01-18  Richard Biener  <rguenther@suse.de>
18528         PR tree-optimization/83887
18529         * graphite-scop-detection.c
18530         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18531         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18532         (scop_detection::merge_sese): Re-implement with a flood-fill
18533         algorithm that properly finds a SESE region if it exists.
18535 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18537         PR c/61240
18538         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18539         pointer_diff optimizations use view_convert instead of convert.
18541 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18543         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18544         Generate different code for -mno-speculate-indirect-jumps.
18545         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18546         (*call_indirect_aix<mode>): Disable for
18547         -mno-speculate-indirect-jumps.
18548         (*call_indirect_aix<mode>_nospec): New define_insn.
18549         (*call_value_indirect_aix<mode>): Disable for
18550         -mno-speculate-indirect-jumps.
18551         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18552         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18553         -mno-speculate-indirect-jumps.
18554         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18556 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18558         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18559         long double type, set the flags for noting the default long double
18560         type, even if we don't pass or return a long double type.
18562 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18564         PR ipa/83051
18565         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18566         failure.
18568 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18570         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18571         support for merge[hl].
18572         (fold_mergehl_helper): New helper function.
18573         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18574         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18575         (altivec_vmrglw_direct): Add xxmrglw insn.
18577 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18579         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18580         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18582 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18584         PR lto/83121
18585         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18586         call the lto_location_cache before reading the
18587         DECL_SOURCE_LOCATION of the types.
18589 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18590             Richard Sandiford  <richard.sandiford@linaro.org>
18592         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18593         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18594         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18595         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18596         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18597         Add declaration.
18598         * config/aarch64/constraints.md (aarch64_movti_operand):
18599         Limit immediates.
18600         * config/aarch64/predicates.md (Uti): Add new constraint.
18602 2018-01-17  Carl Love  <cel@us.ibm.com>
18604         * config/rs6000/vsx.md (define_expand xl_len_r,
18605         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18606         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18607         lxvll.
18608         (define_expand, define_insn): Move the shift left from  the
18609         define_insn to the define_expand for lxvl and stxvl instructions.
18610         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18611         and XL_LEN_R definitions to PURE.
18613 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18615         * config/i386/i386.c (indirect_thunk_name): Declare regno
18616         as unsigned int.  Compare regno with INVALID_REGNUM.
18617         (output_indirect_thunk): Ditto.
18618         (output_indirect_thunk_function): Ditto.
18619         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18620         in the call to output_indirect_thunk_function.
18622 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18624         PR middle-end/83884
18625         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18626         rather than the size of inner_type to determine the stack slot size
18627         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18629 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18631         PR target/83546
18632         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18633         to PTA_SILVERMONT.
18635 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18637         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18638         endian Linux systems to optionally enable multilibs for selecting
18639         the long double type if the user configured an explicit type.
18640         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18641         have no long double multilibs if not defined.
18642         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18643         warn if the user used -mabi={ieee,ibm}longdouble and we built
18644         multilibs for long double.
18645         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18646         appropriate multilib option.
18647         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18648         multilib options.
18649         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18650         for building long double multilibs.
18651         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18653 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18655         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18656         copies.
18658         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18659         64 bits.
18660         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18661         128 bits.
18663         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18664         variables.
18666         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18667         return value.
18669 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18671         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18672         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18674 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18676         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18677         different rtl trees depending on TARGET_64BIT.
18678         (rs6000_gen_lvx): Likewise.
18680 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18682         * config/visium/visium.md (nop): Tweak comment.
18683         (hazard_nop): Likewise.
18685 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18687         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18688         -mspeculate-indirect-jumps.
18689         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18690         for -mno-speculate-indirect-jumps.
18691         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18692         (*call_value_indirect_elfv2<mode>): Disable for
18693         -mno-speculate-indirect-jumps.
18694         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18695         (indirect_jump): Emit different RTL for
18696         -mno-speculate-indirect-jumps.
18697         (*indirect_jump<mode>): Disable for
18698         -mno-speculate-indirect-jumps.
18699         (*indirect_jump<mode>_nospec): New define_insn.
18700         (tablejump): Emit different RTL for
18701         -mno-speculate-indirect-jumps.
18702         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18703         (tablejumpsi_nospec): New define_expand.
18704         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18705         (tablejumpdi_nospec): New define_expand.
18706         (*tablejump<mode>_internal1): Disable for
18707         -mno-speculate-indirect-jumps.
18708         (*tablejump<mode>_internal1_nospec): New define_insn.
18709         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18710         option.
18712 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18714         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18715         callers updated.
18717 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18718             Richard Biener  <rguenth@suse.de>
18720         PR libgomp/83590
18721         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18722         return early, inline manually is_gimple_sizepos.  Make sure if we
18723         call gimplify_expr we don't end up with a gimple constant.
18724         * tree.c (variably_modified_type_p): Don't return true for
18725         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18726         * gimplify.h (is_gimple_sizepos): Remove.
18728 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18730         PR tree-optimization/83857
18731         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18732         vectorizable_live_operation for pure SLP statements.
18733         (vectorizable_live_operation): Handle PHIs.
18735 2018-01-16  Richard Biener  <rguenther@suse.de>
18737         PR tree-optimization/83867
18738         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18739         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18741 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18743         PR c/83844
18744         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18745         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18746         If off is not INTEGER_CST, issue a may not be aligned warning
18747         rather than isn't aligned.  Use isn%'t rather than isn't.
18748         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18749         into MULT_EXPR.
18750         <case MULT_EXPR>: Improve the case when bottom and one of the
18751         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18752         operand, in that case check if the other operand is multiple of
18753         bottom divided by the INTEGER_CST operand.
18755 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18757         PR target/83858
18758         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18759         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18760         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18761         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18762         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18763         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18764         (pa_function_arg_size): New function.
18766 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18768         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18769         in a separate statement.
18771 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18773         PR tree-optimization/83847
18774         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18775         group gathers and scatters.
18777 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18779         PR rtl-optimization/86620
18780         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18782         PR rtl-optimization/83213
18783         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18784         to last if both are JUMP_INSNs.
18786         PR tree-optimization/83843
18787         * gimple-ssa-store-merging.c
18788         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18789         store_immediate_info for bswap/nop orig_stores.
18791 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18793         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18794         !TARGET_MUL.
18795         <UDIV>: Increase cost if !TARGET_DIV.
18797 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18799         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18800         (define_attr "cr_logical_3op"): New.
18801         (cceq_ior_compare): Adjust.
18802         (cceq_ior_compare_complement): Adjust.
18803         (*cceq_rev_compare): Adjust.
18804         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18805         (is_cracked_insn): Adjust.
18806         (insn_must_be_first_in_group): Adjust.
18807         * config/rs6000/40x.md: Adjust.
18808         * config/rs6000/440.md: Adjust.
18809         * config/rs6000/476.md: Adjust.
18810         * config/rs6000/601.md: Adjust.
18811         * config/rs6000/603.md: Adjust.
18812         * config/rs6000/6xx.md: Adjust.
18813         * config/rs6000/7450.md: Adjust.
18814         * config/rs6000/7xx.md: Adjust.
18815         * config/rs6000/8540.md: Adjust.
18816         * config/rs6000/cell.md: Adjust.
18817         * config/rs6000/e300c2c3.md: Adjust.
18818         * config/rs6000/e500mc.md: Adjust.
18819         * config/rs6000/e500mc64.md: Adjust.
18820         * config/rs6000/e5500.md: Adjust.
18821         * config/rs6000/e6500.md: Adjust.
18822         * config/rs6000/mpc.md: Adjust.
18823         * config/rs6000/power4.md: Adjust.
18824         * config/rs6000/power5.md: Adjust.
18825         * config/rs6000/power6.md: Adjust.
18826         * config/rs6000/power7.md: Adjust.
18827         * config/rs6000/power8.md: Adjust.
18828         * config/rs6000/power9.md: Adjust.
18829         * config/rs6000/rs64.md: Adjust.
18830         * config/rs6000/titan.md: Adjust.
18832 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18834         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18835         ix86_indirect_branch_register logic.
18837 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18839         * config/i386/constraints.md (Bs): Update
18840         ix86_indirect_branch_register check.  Don't check
18841         ix86_indirect_branch_register with GOT_memory_operand.
18842         (Bw): Likewise.
18843         * config/i386/predicates.md (GOT_memory_operand): Don't check
18844         ix86_indirect_branch_register here.
18845         (GOT32_symbol_operand): Likewise.
18847 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18849         * config/i386/predicates.md (constant_call_address_operand):
18850         Rewrite ix86_indirect_branch_register logic.
18851         (sibcall_insn_operand): Likewise.
18853 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18855         * config/i386/constraints.md (Bs): Replace
18856         ix86_indirect_branch_thunk_register with
18857         ix86_indirect_branch_register.
18858         (Bw): Likewise.
18859         * config/i386/i386.md (indirect_jump): Likewise.
18860         (tablejump): Likewise.
18861         (*sibcall_memory): Likewise.
18862         (*sibcall_value_memory): Likewise.
18863         Peepholes of indirect call and jump via memory: Likewise.
18864         * config/i386/i386.opt: Likewise.
18865         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18866         (GOT_memory_operand): Likewise.
18867         (call_insn_operand): Likewise.
18868         (sibcall_insn_operand): Likewise.
18869         (GOT32_symbol_operand): Likewise.
18871 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18873         PR middle-end/83837
18874         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18875         type rather than type addr's type points to.
18876         (expand_omp_atomic_mutex): Likewise.
18877         (expand_omp_atomic): Likewise.
18879 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18881         PR target/83839
18882         * config/i386/i386.c (output_indirect_thunk_function): Use
18883         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18884         for  __x86_return_thunk.
18886 2018-01-15  Richard Biener  <rguenther@suse.de>
18888         PR middle-end/83850
18889         * expmed.c (extract_bit_field_1): Fix typo.
18891 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18893         PR target/83687
18894         * config/arm/iterators.md (VF): New mode iterator.
18895         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18896         Remove integer-related logic from pattern.
18897         (neon_vabd<mode>_3): Likewise.
18899 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18901         PR middle-end/82694
18902         * common.opt (fstrict-overflow): No longer an alias.
18903         (fwrapv-pointer): New option.
18904         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18905         also for pointer types based on flag_wrapv_pointer.
18906         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18907         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18908         opts->x_flag_wrapv got set.
18909         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18910         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18911         POINTER_TYPE_OVERFLOW_UNDEFINED.
18912         * match.pd: Likewise in address comparison pattern.
18913         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18915 2018-01-15  Richard Biener  <rguenther@suse.de>
18917         PR lto/83804
18918         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18919         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18920         Reset type names to their identifier if their TYPE_DECL doesn't
18921         have linkage (and thus is used for ODR and devirt).
18922         (save_debug_info_for_decl): Remove.
18923         (save_debug_info_for_type): Likewise.
18924         (add_tree_to_fld_list): Adjust.
18925         * tree-pretty-print.c (dump_generic_node): Make dumping of
18926         type names more robust.
18928 2018-01-15  Richard Biener  <rguenther@suse.de>
18930         * BASE-VER: Bump to 8.0.1.
18932 2018-01-14  Martin Sebor  <msebor@redhat.com>
18934         PR other/83508
18935         * builtins.c (check_access): Avoid warning when the no-warning bit
18936         is set.
18938 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18940         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18941         * ira-color (allocno_hard_regs_compare): Likewise.
18943 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18945         PR target/83013
18946         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18947         Use .pushsection/.popsection.
18949 2018-01-14  Martin Sebor  <msebor@redhat.com>
18951         PR c++/81327
18952         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18954 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18956         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18957         entry from extra_headers.
18958         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18959         extra_headers, make the list bitwise identical to the i?86-*-* one.
18961 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18963         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18964         -mcmodel=large with -mindirect-branch=thunk,
18965         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18966         -mfunction-return=thunk-extern.
18967         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18968         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18969         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18971 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18973         * config/i386/i386.c (print_reg): Print the name of the full
18974         integer register without '%'.
18975         (ix86_print_operand): Handle 'V'.
18976         * doc/extend.texi: Document 'V' modifier.
18978 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18980         * config/i386/constraints.md (Bs): Disallow memory operand for
18981         -mindirect-branch-register.
18982         (Bw): Likewise.
18983         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18984         (GOT_memory_operand): Likewise.
18985         (call_insn_operand): Likewise.
18986         (sibcall_insn_operand): Likewise.
18987         (GOT32_symbol_operand): Likewise.
18988         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18989         for -mindirect-branch-register.
18990         (tablejump): Likewise.
18991         (*sibcall_memory): Likewise.
18992         (*sibcall_value_memory): Likewise.
18993         Disallow peepholes of indirect call and jump via memory for
18994         -mindirect-branch-register.
18995         (*call_pop): Replace m with Bw.
18996         (*call_value_pop): Likewise.
18997         (*sibcall_pop_memory): Replace m with Bs.
18998         * config/i386/i386.opt (mindirect-branch-register): New option.
18999         * doc/invoke.texi: Document -mindirect-branch-register option.
19001 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19003         * config/i386/i386-protos.h (ix86_output_function_return): New.
19004         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19005         set function_return_type.
19006         (indirect_thunk_name): Add ret_p to indicate thunk for function
19007         return.
19008         (output_indirect_thunk_function): Pass false to
19009         indirect_thunk_name.
19010         (ix86_output_indirect_branch_via_reg): Likewise.
19011         (ix86_output_indirect_branch_via_push): Likewise.
19012         (output_indirect_thunk_function): Create alias for function
19013         return thunk if regno < 0.
19014         (ix86_output_function_return): New function.
19015         (ix86_handle_fndecl_attribute): Handle function_return.
19016         (ix86_attribute_table): Add function_return.
19017         * config/i386/i386.h (machine_function): Add
19018         function_return_type.
19019         * config/i386/i386.md (simple_return_internal): Use
19020         ix86_output_function_return.
19021         (simple_return_internal_long): Likewise.
19022         * config/i386/i386.opt (mfunction-return=): New option.
19023         (indirect_branch): Mention -mfunction-return=.
19024         * doc/extend.texi: Document function_return function attribute.
19025         * doc/invoke.texi: Document -mfunction-return= option.
19027 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19029         * config/i386/i386-opts.h (indirect_branch): New.
19030         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19031         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19032         with local indirect jump when converting indirect call and jump.
19033         (ix86_set_indirect_branch_type): New.
19034         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19035         (indirectlabelno): New.
19036         (indirect_thunk_needed): Likewise.
19037         (indirect_thunk_bnd_needed): Likewise.
19038         (indirect_thunks_used): Likewise.
19039         (indirect_thunks_bnd_used): Likewise.
19040         (INDIRECT_LABEL): Likewise.
19041         (indirect_thunk_name): Likewise.
19042         (output_indirect_thunk): Likewise.
19043         (output_indirect_thunk_function): Likewise.
19044         (ix86_output_indirect_branch_via_reg): Likewise.
19045         (ix86_output_indirect_branch_via_push): Likewise.
19046         (ix86_output_indirect_branch): Likewise.
19047         (ix86_output_indirect_jmp): Likewise.
19048         (ix86_code_end): Call output_indirect_thunk_function if needed.
19049         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19050         needed.
19051         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19052         (ix86_attribute_table): Add indirect_branch.
19053         * config/i386/i386.h (machine_function): Add indirect_branch_type
19054         and has_local_indirect_jump.
19055         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19056         to true.
19057         (tablejump): Likewise.
19058         (*indirect_jump): Use ix86_output_indirect_jmp.
19059         (*tablejump_1): Likewise.
19060         (simple_return_indirect_internal): Likewise.
19061         * config/i386/i386.opt (mindirect-branch=): New option.
19062         (indirect_branch): New.
19063         (keep): Likewise.
19064         (thunk): Likewise.
19065         (thunk-inline): Likewise.
19066         (thunk-extern): Likewise.
19067         * doc/extend.texi: Document indirect_branch function attribute.
19068         * doc/invoke.texi: Document -mindirect-branch= option.
19070 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19072         PR ipa/83051
19073         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19075 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19077         * ipa-inline.c (want_inline_small_function_p): Return false if
19078         inlining has already failed with CIF_FINAL_ERROR.
19079         (update_caller_keys): Call want_inline_small_function_p before
19080         can_inline_edge_p.
19081         (update_callee_keys): Likewise.
19083 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19085         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19086         New function.
19087         (rs6000_quadword_masked_address_p): Likewise.
19088         (quad_aligned_load_p): Likewise.
19089         (quad_aligned_store_p): Likewise.
19090         (const_load_sequence_p): Add comment to describe the outer-most loop.
19091         (mimic_memory_attributes_and_flags): New function.
19092         (rs6000_gen_stvx): Likewise.
19093         (replace_swapped_aligned_store): Likewise.
19094         (rs6000_gen_lvx): Likewise.
19095         (replace_swapped_aligned_load): Likewise.
19096         (replace_swapped_load_constant): Capitalize argument name in
19097         comment describing this function.
19098         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19099         and stores that access quad-word aligned addresses and replace
19100         with stvx or lvx instructions when appropriate.
19101         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19102         New function prototype.
19103         (rs6000_quadword_masked_address_p): Likewise.
19104         (rs6000_gen_lvx): Likewise.
19105         (rs6000_gen_stvx): Likewise.
19106         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19107         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19108         when memory address is aligned.
19109         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19110         this split to select lvx instruction when memory address is aligned.
19111         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19112         instruction when memory address is aligned.
19113         (*vsx_le_perm_load_v16qi): Likewise.
19114         (four unnamed splitters): Modify to select the stvx instruction
19115         when memory is aligned.
19117 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19119         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19120         which appears in the queue multiple times.
19122 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19123             Alan Hayward  <alan.hayward@arm.com>
19124             David Sherwood  <david.sherwood@arm.com>
19126         * tree-vectorizer.h (vec_lower_bound): New structure.
19127         (_loop_vec_info): Add check_nonzero and lower_bounds.
19128         (LOOP_VINFO_CHECK_NONZERO): New macro.
19129         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19130         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19131         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19132         fields.  Make seg_len the distance travelled, not including the
19133         access size.
19134         (dr_direction_indicator): Declare.
19135         (dr_zero_step_indicator): Likewise.
19136         (dr_known_forward_stride_p): Likewise.
19137         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19138         tree-ssanames.h.
19139         (runtime_alias_check_p): Allow runtime alias checks with
19140         variable strides.
19141         (operator ==): Compare access_size and align.
19142         (prune_runtime_alias_test_list): Rework for new distinction between
19143         the access_size and seg_len.
19144         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19145         segment lengths.
19146         (get_segment_min_max): New function.
19147         (create_intersect_range_checks): Use it.
19148         (dr_step_indicator): New function.
19149         (dr_direction_indicator): Likewise.
19150         (dr_zero_step_indicator): Likewise.
19151         (dr_known_forward_stride_p): Likewise.
19152         * tree-loop-distribution.c (data_ref_segment_size): Return
19153         DR_STEP * (niters - 1).
19154         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19155         constructor.
19156         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19157         (vect_preserves_scalar_order_p): New function, split out from...
19158         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19159         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19160         (vect_vfa_access_size): New function.
19161         (vect_vfa_align): Likewise.
19162         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19163         (dump_lower_bound): New function.
19164         (vect_check_lower_bound): Likewise.
19165         (vect_small_gap_p): Likewise.
19166         (vectorizable_with_step_bound_p): Likewise.
19167         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19168         depencies if the vectorization factor is 1.  Convert the checks
19169         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19170         a bunds check for variable steps if the minimum required step is
19171         relatively small. Update calls to the dr_with_seg_len
19172         constructor and to vect_compile_time_alias.
19173         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19174         function.
19175         (vect_loop_versioning): Call it.
19176         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19177         when retrying.
19178         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19180 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19181             Alan Hayward  <alan.hayward@arm.com>
19182             David Sherwood  <david.sherwood@arm.com>
19184         * doc/sourcebuild.texi (vect_scatter_store): Document.
19185         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19186         optabs.
19187         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19188         Document.
19189         * genopinit.c (main): Add supports_vec_scatter_store and
19190         supports_vec_scatter_store_cached to target_optabs.
19191         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19192         IFN_MASK_SCATTER_STORE.
19193         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19194         functions.
19195         * internal-fn.h (internal_store_fn_p): Declare.
19196         (internal_fn_stored_value_index): Likewise.
19197         * internal-fn.c (scatter_store_direct): New macro.
19198         (expand_scatter_store_optab_fn): New function.
19199         (direct_scatter_store_optab_supported_p): New macro.
19200         (internal_store_fn_p): New function.
19201         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19202         IFN_MASK_SCATTER_STORE.
19203         (internal_fn_mask_index): Likewise.
19204         (internal_fn_stored_value_index): New function.
19205         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19206         for scatter stores.
19207         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19208         * optabs-query.c (supports_vec_scatter_store_p): New function.
19209         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19210         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19211         true for scatter stores.
19212         (vect_gather_scatter_fn_p): Handle scatter stores too.
19213         (vect_check_gather_scatter): Consider using scatter stores if
19214         supports_vec_scatter_store_p.
19215         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19216         scatter stores too.
19217         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19218         internal_fn_stored_value_index.
19219         (check_load_store_masking): Handle scatter stores too.
19220         (vect_get_store_rhs): Make public.
19221         (vectorizable_call): Use internal_store_fn_p.
19222         (vectorizable_store): Handle scatter store internal functions.
19223         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19224         when deciding whether the end of the group has been reached.
19225         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19226         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19227         (mask_scatter_store<mode>): New insns.
19229 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19230             Alan Hayward  <alan.hayward@arm.com>
19231             David Sherwood  <david.sherwood@arm.com>
19233         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19234         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19235         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19236         function.
19237         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19238         Use vect_truncate_gather_scatter_offset if we can't treat the
19239         operation as a normal gather load or scatter store.
19240         (get_group_load_store_type): Take the gather_scatter_info
19241         as argument.  Try using a gather load or scatter store for
19242         single-element groups.
19243         (get_load_store_type): Update calls to get_group_load_store_type
19244         and vect_use_strided_gather_scatters_p.
19246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19247             Alan Hayward  <alan.hayward@arm.com>
19248             David Sherwood  <david.sherwood@arm.com>
19250         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19251         optional tree argument.
19252         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19253         null target hooks.
19254         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19255         but continue to use the current value as a fallback.
19256         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19257         to compare the updates.
19258         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19259         (get_load_store_type): Use it when handling a strided access.
19260         (vect_get_strided_load_store_ops): New function.
19261         (vect_get_data_ptr_increment): Likewise.
19262         (vectorizable_load): Handle strided gather loads.  Always pass
19263         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19265 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19266             Alan Hayward  <alan.hayward@arm.com>
19267             David Sherwood  <david.sherwood@arm.com>
19269         * doc/md.texi (gather_load@var{m}): Document.
19270         (mask_gather_load@var{m}): Likewise.
19271         * genopinit.c (main): Add supports_vec_gather_load and
19272         supports_vec_gather_load_cached to target_optabs.
19273         * optabs-tree.c (init_tree_optimization_optabs): Use
19274         ggc_cleared_alloc to allocate target_optabs.
19275         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19276         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19277         functions.
19278         * internal-fn.h (internal_load_fn_p): Declare.
19279         (internal_gather_scatter_fn_p): Likewise.
19280         (internal_fn_mask_index): Likewise.
19281         (internal_gather_scatter_fn_supported_p): Likewise.
19282         * internal-fn.c (gather_load_direct): New macro.
19283         (expand_gather_load_optab_fn): New function.
19284         (direct_gather_load_optab_supported_p): New macro.
19285         (direct_internal_fn_optab): New function.
19286         (internal_load_fn_p): Likewise.
19287         (internal_gather_scatter_fn_p): Likewise.
19288         (internal_fn_mask_index): Likewise.
19289         (internal_gather_scatter_fn_supported_p): Likewise.
19290         * optabs-query.c (supports_at_least_one_mode_p): New function.
19291         (supports_vec_gather_load_p): Likewise.
19292         * optabs-query.h (supports_vec_gather_load_p): Declare.
19293         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19294         and memory_type field.
19295         (NUM_PATTERNS): Bump to 15.
19296         * tree-vect-data-refs.c: Include internal-fn.h.
19297         (vect_gather_scatter_fn_p): New function.
19298         (vect_describe_gather_scatter_call): Likewise.
19299         (vect_check_gather_scatter): Try using internal functions for
19300         gather loads.  Recognize existing calls to a gather load function.
19301         (vect_analyze_data_refs): Consider using gather loads if
19302         supports_vec_gather_load_p.
19303         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19304         (vect_get_gather_scatter_offset_type): Likewise.
19305         (vect_convert_mask_for_vectype): Likewise.
19306         (vect_add_conversion_to_patterm): Likewise.
19307         (vect_try_gather_scatter_pattern): Likewise.
19308         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19309         (vect_vect_recog_func_ptrs): Add it.
19310         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19311         internal_fn_mask_index and internal_gather_scatter_fn_p.
19312         (check_load_store_masking): Take the gather_scatter_info as an
19313         argument and handle gather loads.
19314         (vect_get_gather_scatter_ops): New function.
19315         (vectorizable_call): Check internal_load_fn_p.
19316         (vectorizable_load): Likewise.  Handle gather load internal
19317         functions.
19318         (vectorizable_store): Update call to check_load_store_masking.
19319         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19320         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19321         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19322         (aarch64_gather_scale_operand_d): New predicates.
19323         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19324         (mask_gather_load<mode>): New insns.
19326 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19327             Alan Hayward  <alan.hayward@arm.com>
19328             David Sherwood  <david.sherwood@arm.com>
19330         * optabs.def (fold_left_plus_optab): New optab.
19331         * doc/md.texi (fold_left_plus_@var{m}): Document.
19332         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19333         * internal-fn.c (fold_left_direct): Define.
19334         (expand_fold_left_optab_fn): Likewise.
19335         (direct_fold_left_optab_supported_p): Likewise.
19336         * fold-const-call.c (fold_const_fold_left): New function.
19337         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19338         * tree-parloops.c (valid_reduction_p): New function.
19339         (gather_scalar_reductions): Use it.
19340         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19341         (vect_finish_replace_stmt): Declare.
19342         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19343         (needs_fold_left_reduction_p): New function, split out from...
19344         (vect_is_simple_reduction): ...here.  Accept reductions that
19345         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19346         (vect_force_simple_reduction): Also store the reduction type in
19347         the assignment's STMT_VINFO_REDUC_TYPE.
19348         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19349         (merge_with_identity): New function.
19350         (vect_expand_fold_left): Likewise.
19351         (vectorize_fold_left_reduction): Likewise.
19352         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19353         scalar phi in place for it.  Check for target support and reject
19354         cases that would reassociate the operation.  Defer the transform
19355         phase to vectorize_fold_left_reduction.
19356         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19357         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19358         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19362         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19363         call to ifc_temp_var.
19365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19366             Alan Hayward  <alan.hayward@arm.com>
19367             David Sherwood  <david.sherwood@arm.com>
19369         * target.def (legitimize_address_displacement): Take the original
19370         offset as a poly_int.
19371         * targhooks.h (default_legitimize_address_displacement): Update
19372         accordingly.
19373         * targhooks.c (default_legitimize_address_displacement): Likewise.
19374         * doc/tm.texi: Regenerate.
19375         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19376         as an argument, moving assert of ad->disp == ad->disp_term to...
19377         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19378         Try calling targetm.legitimize_address_displacement before expanding
19379         the address rather than afterwards, and adjust for the new interface.
19380         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19381         Match the new hook interface.  Handle SVE addresses.
19382         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19383         new hook interface.
19385 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19387         * Makefile.in (OBJS): Add early-remat.o.
19388         * target.def (select_early_remat_modes): New hook.
19389         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19390         * doc/tm.texi: Regenerate.
19391         * targhooks.h (default_select_early_remat_modes): Declare.
19392         * targhooks.c (default_select_early_remat_modes): New function.
19393         * timevar.def (TV_EARLY_REMAT): New timevar.
19394         * passes.def (pass_early_remat): New pass.
19395         * tree-pass.h (make_pass_early_remat): Declare.
19396         * early-remat.c: New file.
19397         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19398         function.
19399         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19401 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19402             Alan Hayward  <alan.hayward@arm.com>
19403             David Sherwood  <david.sherwood@arm.com>
19405         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19406         vfm1 with a bound_epilog parameter.
19407         (vect_do_peeling): Update calls accordingly, and move the prologue
19408         call earlier in the function.  Treat the base bound_epilog as 0 for
19409         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19410         this base when peeling for gaps.
19411         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19412         with fully-masked loops.
19413         (vect_estimate_min_profitable_iters): Handle the single peeled
19414         iteration in that case.
19416 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19417             Alan Hayward  <alan.hayward@arm.com>
19418             David Sherwood  <david.sherwood@arm.com>
19420         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19421         single-element interleaving even if the size is not a power of 2.
19422         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19423         accesses for single-element interleaving if the group size is
19424         not a power of 2.
19426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19427             Alan Hayward  <alan.hayward@arm.com>
19428             David Sherwood  <david.sherwood@arm.com>
19430         * doc/md.texi (fold_extract_last_@var{m}): Document.
19431         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19432         * optabs.def (fold_extract_last_optab): New optab.
19433         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19434         * internal-fn.c (fold_extract_direct): New macro.
19435         (expand_fold_extract_optab_fn): Likewise.
19436         (direct_fold_extract_optab_supported_p): Likewise.
19437         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19438         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19439         EXTRACT_LAST_REDUCTION.
19440         (get_initial_def_for_reduction): Do not create an initial vector
19441         for EXTRACT_LAST_REDUCTION reductions.
19442         (vectorizable_reduction): Leave the scalar phi in place for
19443         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19444         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19445         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19446         transform phase to vectorizable_condition.
19447         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19448         split out from...
19449         (vect_finish_stmt_generation): ...here.
19450         (vect_finish_replace_stmt): New function.
19451         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19452         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19453         pattern.
19454         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19457             Alan Hayward  <alan.hayward@arm.com>
19458             David Sherwood  <david.sherwood@arm.com>
19460         * doc/md.texi (extract_last_@var{m}): Document.
19461         * optabs.def (extract_last_optab): New optab.
19462         * internal-fn.def (EXTRACT_LAST): New internal function.
19463         * internal-fn.c (cond_unary_direct): New macro.
19464         (expand_cond_unary_optab_fn): Likewise.
19465         (direct_cond_unary_optab_supported_p): Likewise.
19466         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19467         loops using EXTRACT_LAST.
19468         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19469         (extract_last_<mode>): ...this optab.
19470         (vec_extract<mode><Vel>): Update accordingly.
19472 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19473             Alan Hayward  <alan.hayward@arm.com>
19474             David Sherwood  <david.sherwood@arm.com>
19476         * target.def (empty_mask_is_expensive): New hook.
19477         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19478         * doc/tm.texi: Regenerate.
19479         * targhooks.h (default_empty_mask_is_expensive): Declare.
19480         * targhooks.c (default_empty_mask_is_expensive): New function.
19481         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19482         if the target says that empty masks are expensive.
19483         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19484         New function.
19485         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19487 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19488             Alan Hayward  <alan.hayward@arm.com>
19489             David Sherwood  <david.sherwood@arm.com>
19491         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19492         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19493         (vect_use_loop_mask_for_alignment_p): New function.
19494         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19495         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19496         niters_skip argument.  Make sure that the first niters_skip elements
19497         of the first iteration are inactive.
19498         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19499         Update call to vect_set_loop_masks_directly.
19500         (get_misalign_in_elems): New function, split out from...
19501         (vect_gen_prolog_loop_niters): ...here.
19502         (vect_update_init_of_dr): Take a code argument that specifies whether
19503         the adjustment should be added or subtracted.
19504         (vect_update_init_of_drs): Likewise.
19505         (vect_prepare_for_masked_peels): New function.
19506         (vect_do_peeling): Skip prologue peeling if we're using a mask
19507         instead.  Update call to vect_update_inits_of_drs.
19508         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19509         mask_skip_niters.
19510         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19511         alignment.  Do not include the number of peeled iterations in
19512         the minimum threshold in that case.
19513         (vectorizable_induction): Adjust the start value down by
19514         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19515         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19516         Take the number of skipped iterations into account when calculating
19517         the loop bounds.
19518         * tree-vect-stmts.c (vect_gen_while_not): New function.
19520 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19521             Alan Hayward  <alan.hayward@arm.com>
19522             David Sherwood  <david.sherwood@arm.com>
19524         * doc/sourcebuild.texi (vect_fully_masked): Document.
19525         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19526         default value to 0.
19527         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19528         split out from...
19529         (vect_analyze_loop_2): ...here. Don't check the vectorization
19530         factor against the number of loop iterations if the loop is
19531         fully-masked.
19533 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19534             Alan Hayward  <alan.hayward@arm.com>
19535             David Sherwood  <david.sherwood@arm.com>
19537         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19538         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19539         (dump_groups): Update accordingly.
19540         (iv_use::mem_type): New member variable.
19541         (address_p): New function.
19542         (record_use): Add a mem_type argument and initialize the new
19543         mem_type field.
19544         (record_group_use): Add a mem_type argument.  Use address_p.
19545         Remove obsolete null checks of base_object.  Update call to record_use.
19546         (find_interesting_uses_op): Update call to record_group_use.
19547         (find_interesting_uses_cond): Likewise.
19548         (find_interesting_uses_address): Likewise.
19549         (get_mem_type_for_internal_fn): New function.
19550         (find_address_like_use): Likewise.
19551         (find_interesting_uses_stmt): Try find_address_like_use before
19552         calling find_interesting_uses_op.
19553         (addr_offset_valid_p): Use the iv mem_type field as the type
19554         of the addressed memory.
19555         (add_autoinc_candidates): Likewise.
19556         (get_address_cost): Likewise.
19557         (split_small_address_groups_p): Use address_p.
19558         (split_address_groups): Likewise.
19559         (add_iv_candidate_for_use): Likewise.
19560         (autoinc_possible_for_pair): Likewise.
19561         (rewrite_groups): Likewise.
19562         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19563         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19564         (get_alias_ptr_type_for_ptr_address): New function.
19565         (rewrite_use_address): Rewrite address uses in calls that were
19566         identified by find_address_like_use.
19568 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19569             Alan Hayward  <alan.hayward@arm.com>
19570             David Sherwood  <david.sherwood@arm.com>
19572         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19573         TARGET_MEM_REFs.
19574         * gimple-expr.h (is_gimple_addressable: Likewise.
19575         * gimple-expr.c (is_gimple_address): Likewise.
19576         * internal-fn.c (expand_call_mem_ref): New function.
19577         (expand_mask_load_optab_fn): Use it.
19578         (expand_mask_store_optab_fn): Likewise.
19580 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19581             Alan Hayward  <alan.hayward@arm.com>
19582             David Sherwood  <david.sherwood@arm.com>
19584         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19585         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19586         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19587         (cond_umax@var{mode}): Document.
19588         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19589         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19590         (cond_umin_optab, cond_umax_optab): New optabs.
19591         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19592         (COND_IOR, COND_XOR): New internal functions.
19593         * internal-fn.h (get_conditional_internal_fn): Declare.
19594         * internal-fn.c (cond_binary_direct): New macro.
19595         (expand_cond_binary_optab_fn): Likewise.
19596         (direct_cond_binary_optab_supported_p): Likewise.
19597         (get_conditional_internal_fn): New function.
19598         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19599         Cope with reduction statements that are vectorized as calls rather
19600         than assignments.
19601         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19602         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19603         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19604         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19605         (UNSPEC_COND_EOR): New unspecs.
19606         (optab): Add mappings for them.
19607         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19608         (sve_int_op, sve_fp_op): New int attributes.
19610 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19611             Alan Hayward  <alan.hayward@arm.com>
19612             David Sherwood  <david.sherwood@arm.com>
19614         * optabs.def (while_ult_optab): New optab.
19615         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19616         * internal-fn.def (WHILE_ULT): New internal function.
19617         * internal-fn.h (direct_internal_fn_supported_p): New override
19618         that takes two types as argument.
19619         * internal-fn.c (while_direct): New macro.
19620         (expand_while_optab_fn): New function.
19621         (convert_optab_supported_p): Likewise.
19622         (direct_while_optab_supported_p): New macro.
19623         * wide-int.h (wi::udiv_ceil): New function.
19624         * tree-vectorizer.h (rgroup_masks): New structure.
19625         (vec_loop_masks): New typedef.
19626         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19627         and fully_masked_p.
19628         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19629         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19630         (vect_max_vf): New function.
19631         (slpeel_make_loop_iterate_ntimes): Delete.
19632         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19633         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19634         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19635         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19636         internal-fn.h, stor-layout.h and optabs-query.h.
19637         (vect_set_loop_mask): New function.
19638         (add_preheader_seq): Likewise.
19639         (add_header_seq): Likewise.
19640         (interleave_supported_p): Likewise.
19641         (vect_maybe_permute_loop_masks): Likewise.
19642         (vect_set_loop_masks_directly): Likewise.
19643         (vect_set_loop_condition_masked): Likewise.
19644         (vect_set_loop_condition_unmasked): New function, split out from
19645         slpeel_make_loop_iterate_ntimes.
19646         (slpeel_make_loop_iterate_ntimes): Rename to..
19647         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19648         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19649         (vect_do_peeling): Update call accordingly.
19650         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19651         loops.
19652         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19653         mask_compare_type, can_fully_mask_p and fully_masked_p.
19654         (release_vec_loop_masks): New function.
19655         (_loop_vec_info): Use it to free the loop masks.
19656         (can_produce_all_loop_masks_p): New function.
19657         (vect_get_max_nscalars_per_iter): Likewise.
19658         (vect_verify_full_masking): Likewise.
19659         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19660         retries, and free the mask rgroups before retrying.  Check loop-wide
19661         reasons for disallowing fully-masked loops.  Make the final decision
19662         about whether use a fully-masked loop or not.
19663         (vect_estimate_min_profitable_iters): Do not assume that peeling
19664         for the number of iterations will be needed for fully-masked loops.
19665         (vectorizable_reduction): Disable fully-masked loops.
19666         (vectorizable_live_operation): Likewise.
19667         (vect_halve_mask_nunits): New function.
19668         (vect_double_mask_nunits): Likewise.
19669         (vect_record_loop_mask): Likewise.
19670         (vect_get_loop_mask): Likewise.
19671         (vect_transform_loop): Handle the case in which the final loop
19672         iteration might handle a partial vector.  Call vect_set_loop_condition
19673         instead of slpeel_make_loop_iterate_ntimes.
19674         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19675         (check_load_store_masking): New function.
19676         (prepare_load_store_mask): Likewise.
19677         (vectorizable_store): Handle fully-masked loops.
19678         (vectorizable_load): Likewise.
19679         (supportable_widening_operation): Use vect_halve_mask_nunits for
19680         booleans.
19681         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19682         (vect_gen_while): New function.
19683         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19684         (aarch64_uqdec<mode>): New insn.
19686 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19687             Alan Hayward  <alan.hayward@arm.com>
19688             David Sherwood  <david.sherwood@arm.com>
19690         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19691         (reduc_xor_scal_optab): New optabs.
19692         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19693         (reduc_xor_scal_@var{m}): Document.
19694         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19695         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19696         internal functions.
19697         * fold-const-call.c (fold_const_call): Handle them.
19698         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19699         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19700         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19701         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19702         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19703         (UNSPEC_XORV): New unspecs.
19704         (optab): Add entries for them.
19705         (BITWISEV): New int iterator.
19706         (bit_reduc_op): New int attributes.
19708 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19709             Alan Hayward  <alan.hayward@arm.com>
19710             David Sherwood  <david.sherwood@arm.com>
19712         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19713         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19714         * optabs.def (vec_shl_insert_optab): New optab.
19715         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19716         (duplicate_and_interleave): Likewise.
19717         * tree-vect-loop.c: Include internal-fn.h.
19718         (neutral_op_for_slp_reduction): New function, split out from
19719         get_initial_defs_for_reduction.
19720         (get_initial_def_for_reduction): Handle option 2 for variable-length
19721         vectors by loading the neutral value into a vector and then shifting
19722         the initial value into element 0.
19723         (get_initial_defs_for_reduction): Replace the code argument with
19724         the neutral value calculated by neutral_op_for_slp_reduction.
19725         Use gimple_build_vector for constant-length vectors.
19726         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19727         but the first group_size elements have a neutral value.
19728         Use duplicate_and_interleave otherwise.
19729         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19730         Update call to get_initial_defs_for_reduction.  Handle SLP
19731         reductions for variable-length vectors by creating one vector
19732         result for each scalar result, with the elements associated
19733         with other scalar results stubbed out with the neutral value.
19734         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19735         Require IFN_VEC_SHL_INSERT for double reductions on
19736         variable-length vectors, or SLP reductions that have
19737         a neutral value.  Require can_duplicate_and_interleave_p
19738         support for variable-length unchained SLP reductions if there
19739         is no neutral value, such as for MIN/MAX reductions.  Also require
19740         the number of vector elements to be a multiple of the number of
19741         SLP statements when doing variable-length unchained SLP reductions.
19742         Update call to vect_create_epilog_for_reduction.
19743         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19744         and remove initial values.
19745         (duplicate_and_interleave): Make public.
19746         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19747         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19749 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19750             Alan Hayward  <alan.hayward@arm.com>
19751             David Sherwood  <david.sherwood@arm.com>
19753         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19754         (can_duplicate_and_interleave_p): New function.
19755         (vect_get_and_check_slp_defs): Take the vector of statements
19756         rather than just the current one.  Remove excess parentheses.
19757         Restriction rejectinon of vect_constant_def and vect_external_def
19758         for variable-length vectors to boolean types, or types for which
19759         can_duplicate_and_interleave_p is false.
19760         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19761         (duplicate_and_interleave): New function.
19762         (vect_get_constant_vectors): Use gimple_build_vector for
19763         constant-length vectors and suitable variable-length constant
19764         vectors.  Use duplicate_and_interleave for other variable-length
19765         vectors.  Don't defer the update when inserting new statements.
19767 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19768             Alan Hayward  <alan.hayward@arm.com>
19769             David Sherwood  <david.sherwood@arm.com>
19771         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19772         min_profitable_iters doesn't go negative.
19774 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19775             Alan Hayward  <alan.hayward@arm.com>
19776             David Sherwood  <david.sherwood@arm.com>
19778         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19779         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19780         * optabs.def (vec_mask_load_lanes_optab): New optab.
19781         (vec_mask_store_lanes_optab): Likewise.
19782         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19783         (MASK_STORE_LANES): Likewise.
19784         * internal-fn.c (mask_load_lanes_direct): New macro.
19785         (mask_store_lanes_direct): Likewise.
19786         (expand_mask_load_optab_fn): Handle masked operations.
19787         (expand_mask_load_lanes_optab_fn): New macro.
19788         (expand_mask_store_optab_fn): Handle masked operations.
19789         (expand_mask_store_lanes_optab_fn): New macro.
19790         (direct_mask_load_lanes_optab_supported_p): Likewise.
19791         (direct_mask_store_lanes_optab_supported_p): Likewise.
19792         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19793         parameter.
19794         (vect_load_lanes_supported): Likewise.
19795         * tree-vect-data-refs.c (strip_conversion): New function.
19796         (can_group_stmts_p): Likewise.
19797         (vect_analyze_data_ref_accesses): Use it instead of checking
19798         for a pair of assignments.
19799         (vect_store_lanes_supported): Take a masked_p parameter.
19800         (vect_load_lanes_supported): Likewise.
19801         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19802         vect_store_lanes_supported and vect_load_lanes_supported.
19803         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19804         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19805         parameter.  Don't allow gaps for masked accesses.
19806         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19807         and vect_load_lanes_supported.
19808         (get_load_store_type): Take a masked_p parameter and update
19809         call to get_group_load_store_type.
19810         (vectorizable_store): Update call to get_load_store_type.
19811         Handle IFN_MASK_STORE_LANES.
19812         (vectorizable_load): Update call to get_load_store_type.
19813         Handle IFN_MASK_LOAD_LANES.
19815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19816             Alan Hayward  <alan.hayward@arm.com>
19817             David Sherwood  <david.sherwood@arm.com>
19819         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19820         modes for SVE.
19821         * config/aarch64/aarch64-protos.h
19822         (aarch64_sve_struct_memory_operand_p): Declare.
19823         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19824         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19825         (VPRED, vpred): Handle SVE structure modes.
19826         * config/aarch64/constraints.md (Utx): New constraint.
19827         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19828         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19829         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19830         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19831         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19832         structure modes.  Split into pieces after RA.
19833         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19834         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19835         New patterns.
19836         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19837         SVE structure modes.
19838         (aarch64_classify_address): Likewise.
19839         (sizetochar): Move earlier in file.
19840         (aarch64_print_operand): Handle SVE register lists.
19841         (aarch64_array_mode): New function.
19842         (aarch64_sve_struct_memory_operand_p): Likewise.
19843         (TARGET_ARRAY_MODE): Redefine.
19845 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19846             Alan Hayward  <alan.hayward@arm.com>
19847             David Sherwood  <david.sherwood@arm.com>
19849         * target.def (array_mode): New target hook.
19850         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19851         * doc/tm.texi: Regenerate.
19852         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19853         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19854         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19855         targetm.array_mode.
19856         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19857         type sizes.
19859 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19860             Alan Hayward  <alan.hayward@arm.com>
19861             David Sherwood  <david.sherwood@arm.com>
19863         * fold-const.c (fold_binary_loc): Check the argument types
19864         rather than the result type when testing for a vector operation.
19866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19868         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19869         * doc/tm.texi: Regenerate.
19871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19872             Alan Hayward  <alan.hayward@arm.com>
19873             David Sherwood  <david.sherwood@arm.com>
19875         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19876         (sve): Document new AArch64 extension.
19877         * doc/md.texi (w): Extend the description of the AArch64
19878         constraint to include SVE vectors.
19879         (Upl, Upa): Document new AArch64 predicate constraints.
19880         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19881         enum.
19882         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19883         (msve-vector-bits=): New option.
19884         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19885         SVE when these are disabled.
19886         (sve): New extension.
19887         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19888         modes.  Adjust their number of units based on aarch64_sve_vg.
19889         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19890         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19891         aarch64_addr_query_type.
19892         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19893         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19894         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19895         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19896         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19897         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19898         (aarch64_simd_imm_zero_p): Delete.
19899         (aarch64_check_zero_based_sve_index_immediate): Declare.
19900         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19901         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19902         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19903         (aarch64_sve_float_mul_immediate_p): Likewise.
19904         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19905         rather than an rtx.
19906         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19907         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19908         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19909         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19910         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19911         (aarch64_regmode_natural_size): Likewise.
19912         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19913         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19914         left one place.
19915         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19916         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19917         for VG and the SVE predicate registers.
19918         (V_ALIASES): Add a "z"-prefixed alias.
19919         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19920         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19921         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19922         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19923         (REG_CLASS_NAMES): Add entries for them.
19924         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19925         and the predicate registers.
19926         (aarch64_sve_vg): Declare.
19927         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19928         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19929         (REGMODE_NATURAL_SIZE): Define.
19930         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19931         SVE macros.
19932         * config/aarch64/aarch64.c: Include cfgrtl.h.
19933         (simd_immediate_info): Add a constructor for series vectors,
19934         and an associated step field.
19935         (aarch64_sve_vg): New variable.
19936         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19937         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19938         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19939         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19940         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19941         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19942         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19943         (aarch64_get_mask_mode): New functions.
19944         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19945         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19946         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19947         predicate modes and predicate registers.  Explicitly restrict
19948         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19949         to store a vector mode if it is recognized by
19950         aarch64_classify_vector_mode.
19951         (aarch64_regmode_natural_size): New function.
19952         (aarch64_hard_regno_caller_save_mode): Return the original mode
19953         for predicates.
19954         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19955         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19956         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19957         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19958         functions.
19959         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19960         does not overlap dest if the function is frame-related.  Handle
19961         SVE constants.
19962         (aarch64_split_add_offset): New function.
19963         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19964         them aarch64_add_offset.
19965         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19966         and update call to aarch64_sub_sp.
19967         (aarch64_add_cfa_expression): New function.
19968         (aarch64_expand_prologue): Pass extra temporary registers to the
19969         functions above.  Handle the case in which we need to emit new
19970         DW_CFA_expressions for registers that were originally saved
19971         relative to the stack pointer, but now have to be expressed
19972         relative to the frame pointer.
19973         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19974         functions above.
19975         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19976         IP0 and IP1 values for SVE frames.
19977         (aarch64_expand_vec_series): New function.
19978         (aarch64_expand_sve_widened_duplicate): Likewise.
19979         (aarch64_expand_sve_const_vector): Likewise.
19980         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19981         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19982         into the register, rather than emitting a SET directly.
19983         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19984         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19985         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19986         (offset_9bit_signed_scaled_p): New functions.
19987         (aarch64_replicate_bitmask_imm): New function.
19988         (aarch64_bitmask_imm): Use it.
19989         (aarch64_cannot_force_const_mem): Reject expressions involving
19990         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19991         (aarch64_classify_index): Handle SVE indices, by requiring
19992         a plain register index with a scale that matches the element size.
19993         (aarch64_classify_address): Handle SVE addresses.  Assert that
19994         the mode of the address is VOIDmode or an integer mode.
19995         Update call to aarch64_classify_symbol.
19996         (aarch64_classify_symbolic_expression): Update call to
19997         aarch64_classify_symbol.
19998         (aarch64_const_vec_all_in_range_p): New function.
19999         (aarch64_print_vector_float_operand): Likewise.
20000         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20001         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20002         and the FP immediates 1.0 and 0.5.
20003         (aarch64_print_address_internal): Handle SVE addresses.
20004         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20005         (aarch64_regno_regclass): Handle predicate registers.
20006         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20007         data modes.
20008         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20009         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20010         (aarch64_convert_sve_vector_bits): New function.
20011         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20012         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20013         rather than an rtx.
20014         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20015         Handle SVE vector and predicate modes.  Accept VL-based constants
20016         that need only one temporary register, and VL offsets that require
20017         no temporary registers.
20018         (aarch64_conditional_register_usage): Mark the predicate registers
20019         as fixed if SVE isn't available.
20020         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20021         Return true for SVE vector and predicate modes.
20022         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20023         rather than an unsigned int.  Handle SVE modes.
20024         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20025         SVE modes.
20026         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20027         if SVE is enabled.
20028         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20029         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20030         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20031         (aarch64_sve_float_mul_immediate_p): New functions.
20032         (aarch64_sve_valid_immediate): New function.
20033         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20034         Explicitly reject structure modes.  Check for INDEX constants.
20035         Handle PTRUE and PFALSE constants.
20036         (aarch64_check_zero_based_sve_index_immediate): New function.
20037         (aarch64_simd_imm_zero_p): Delete.
20038         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20039         vector modes.  Accept constants in the range of CNT[BHWD].
20040         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20041         ask for an Advanced SIMD mode.
20042         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20043         (aarch64_simd_vector_alignment): Handle SVE predicates.
20044         (aarch64_vectorize_preferred_vector_alignment): New function.
20045         (aarch64_simd_vector_alignment_reachable): Use it instead of
20046         the vector size.
20047         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20048         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20049         functions.
20050         (MAX_VECT_LEN): Delete.
20051         (expand_vec_perm_d): Add a vec_flags field.
20052         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20053         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20054         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20055         for SVE modes.
20056         (aarch64_evpc_rev): Rename to...
20057         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20058         (aarch64_evpc_rev_global): New function.
20059         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20060         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20061         MAX_VECT_LEN.
20062         (aarch64_evpc_sve_tbl): New function.
20063         (aarch64_expand_vec_perm_const_1): Update after rename of
20064         aarch64_evpc_rev.  Handle SVE permutes too, trying
20065         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20066         than aarch64_evpc_tbl.
20067         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20068         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20069         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20070         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20071         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20072         (aarch64_expand_sve_vcond): New functions.
20073         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20074         of aarch64_vector_mode_p.
20075         (aarch64_dwarf_poly_indeterminate_value): New function.
20076         (aarch64_compute_pressure_classes): Likewise.
20077         (aarch64_can_change_mode_class): Likewise.
20078         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20079         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20080         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20081         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20082         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20083         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20084         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20085         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20086         constraints.
20087         (Dn, Dl, Dr): Accept const as well as const_vector.
20088         (Dz): Likewise.  Compare against CONST0_RTX.
20089         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20090         of "vector" where appropriate.
20091         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20092         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20093         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20094         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20095         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20096         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20097         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20098         (v_int_equiv): Extend to SVE modes.
20099         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20100         mode attributes.
20101         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20102         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20103         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20104         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20105         (SVE_COND_FP_CMP): New int iterators.
20106         (perm_hilo): Handle the new unpack unspecs.
20107         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20108         attributes.
20109         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20110         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20111         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20112         (aarch64_equality_operator, aarch64_constant_vector_operand)
20113         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20114         (aarch64_sve_nonimmediate_operand): Likewise.
20115         (aarch64_sve_general_operand): Likewise.
20116         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20117         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20118         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20119         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20120         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20121         (aarch64_sve_float_arith_immediate): Likewise.
20122         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20123         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20124         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20125         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20126         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20127         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20128         (aarch64_sve_float_arith_operand): Likewise.
20129         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20130         (aarch64_sve_float_mul_operand): Likewise.
20131         (aarch64_sve_vec_perm_operand): Likewise.
20132         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20133         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20134         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20135         as well as const_vector.
20136         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20137         in file.  Use CONST0_RTX and CONSTM1_RTX.
20138         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20139         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20140         Use aarch64_simd_imm_zero.
20141         * config/aarch64/aarch64-sve.md: New file.
20142         * config/aarch64/aarch64.md: Include it.
20143         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20144         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20145         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20146         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20147         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20148         (sve): New attribute.
20149         (enabled): Disable instructions with the sve attribute unless
20150         TARGET_SVE.
20151         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20152         aarch64_expand_mov_immediate.
20153         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20154         CNT[BHSD] immediates.
20155         (movti): Split CONST_POLY_INT moves into two halves.
20156         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20157         Split additions that need a temporary here if the destination
20158         is the stack pointer.
20159         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20160         (*add<mode>3_poly_1): New instruction.
20161         (set_clobber_cc): New expander.
20163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20165         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20166         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20167         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20168         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20169         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20170         Change innermode from fixed_mode_size to machine_mode.
20171         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20172         subreg of a variable-length CONST_VECTOR.
20174 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20175             Alan Hayward  <alan.hayward@arm.com>
20176             David Sherwood  <david.sherwood@arm.com>
20178         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20179         (add_offset_to_base): New function, split out from...
20180         (create_mem_ref): ...here.  When handling a scale other than 1,
20181         check first whether the address is valid without the offset.
20182         Add it into the base if so, leaving the index and scale as-is.
20184 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20186         PR c++/83778
20187         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20188         fold_for_warn before checking if arg2 is INTEGER_CST.
20190 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20192         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20193         (store_multiple_operation): Delete.
20194         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20195         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20196         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20197         guarded by TARGET_STRING.
20198         (rs6000_output_load_multiple): Delete.
20199         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20200         OPTION_MASK_STRING / TARGET_STRING handling.
20201         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20202         (const rs6000_opt_masks) <"string">: Change mask to 0.
20203         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20204         (MASK_STRING): Delete.
20205         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20206         parts.  Simplify.
20207         (load_multiple): Delete.
20208         (*ldmsi8): Delete.
20209         (*ldmsi7): Delete.
20210         (*ldmsi6): Delete.
20211         (*ldmsi5): Delete.
20212         (*ldmsi4): Delete.
20213         (*ldmsi3): Delete.
20214         (store_multiple): Delete.
20215         (*stmsi8): Delete.
20216         (*stmsi7): Delete.
20217         (*stmsi6): Delete.
20218         (*stmsi5): Delete.
20219         (*stmsi4): Delete.
20220         (*stmsi3): Delete.
20221         (movmemsi_8reg): Delete.
20222         (corresponding unnamed define_insn): Delete.
20223         (movmemsi_6reg): Delete.
20224         (corresponding unnamed define_insn): Delete.
20225         (movmemsi_4reg): Delete.
20226         (corresponding unnamed define_insn): Delete.
20227         (movmemsi_2reg): Delete.
20228         (corresponding unnamed define_insn): Delete.
20229         (movmemsi_1reg): Delete.
20230         (corresponding unnamed define_insn): Delete.
20231         * config/rs6000/rs6000.opt (mno-string): New.
20232         (mstring): Replace by deprecation warning stub.
20233         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20235 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20237         * regrename.c (regrename_do_replace): If replacing the same
20238         reg multiple times, try to reuse last created gen_raw_REG.
20240         PR debug/81155
20241         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20242         main to workaround a bug in GDB.
20244 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20246         PR target/83737
20247         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20249 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20251         PR rtl-optimization/80481
20252         * ira-color.c (get_cap_member): New function.
20253         (allocnos_conflict_by_live_ranges_p): Use it.
20254         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20255         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20257 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20259         PR target/83628
20260         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20261         (*saddl_se_1): Ditto.
20262         (*ssubsi_1): Ditto.
20263         (*ssubl_se_1): Ditto.
20265 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20267         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20268         rather than wi::to_widest for DR_INITs.
20269         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20270         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20271         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20272         INTEGER_CSTs.
20273         (vect_analyze_group_access_1): Note that here.
20275 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20277         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20278         polynomial type sizes.
20280 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20282         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20283         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20284         (gimple_add_tmp_var): Likewise.
20286 2018-01-12  Martin Liska  <mliska@suse.cz>
20288         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20289         (gimple_alloc_sizes): Likewise.
20290         (dump_gimple_statistics): Use PRIu64 in printf format.
20291         * gimple.h: Change uint64_t to int.
20293 2018-01-12  Martin Liska  <mliska@suse.cz>
20295         * tree-core.h: Use uint64_t instead of int.
20296         * tree.c (tree_node_counts): Likewise.
20297         (tree_node_sizes): Likewise.
20298         (dump_tree_statistics): Use PRIu64 in printf format.
20300 2018-01-12  Martin Liska  <mliska@suse.cz>
20302         * Makefile.in: As qsort_chk is implemented in vec.c, add
20303         vec.o to linkage of gencfn-macros.
20304         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20305         passing the info to record_node_allocation_statistics.
20306         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20307         and pass the info.
20308         * ggc-common.c (struct ggc_usage): Add operator== and use
20309         it in operator< and compare function.
20310         * mem-stats.h (struct mem_usage): Likewise.
20311         * vec.c (struct vec_usage): Remove operator< and compare
20312         function. Can be simply inherited.
20314 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20316         PR target/81616
20317         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20318         * tree-ssa-math-opts.c: Include domwalk.h.
20319         (convert_mult_to_fma_1): New function.
20320         (fma_transformation_info): New type.
20321         (fma_deferring_state): Likewise.
20322         (cancel_fma_deferring): New function.
20323         (result_of_phi): Likewise.
20324         (last_fma_candidate_feeds_initial_phi): Likewise.
20325         (convert_mult_to_fma): Added deferring logic, split actual
20326         transformation to convert_mult_to_fma_1.
20327         (math_opts_dom_walker): New type.
20328         (math_opts_dom_walker::after_dom_children): New method, body moved
20329         here from pass_optimize_widening_mul::execute, added deferring logic
20330         bits.
20331         (pass_optimize_widening_mul::execute): Moved most of code to
20332         math_opts_dom_walker::after_dom_children.
20333         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20334         * config/i386/i386.c (ix86_option_override_internal): Added
20335         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20337 2018-01-12  Richard Biener  <rguenther@suse.de>
20339         PR debug/83157
20340         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20341         inline instance vars.
20343 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20345         PR target/81819
20346         * config/rx/rx.c (rx_is_restricted_memory_address):
20347         Handle SUBREG case.
20349 2018-01-12  Richard Biener  <rguenther@suse.de>
20351         PR tree-optimization/80846
20352         * target.def (split_reduction): New target hook.
20353         * targhooks.c (default_split_reduction): New function.
20354         * targhooks.h (default_split_reduction): Declare.
20355         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20356         target requests first reduce vectors by combining low and high
20357         parts.
20358         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20359         (get_vectype_for_scalar_type_and_size): Export.
20360         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20361         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20362         * doc/tm.texi: Regenerate.
20363         * config/i386/i386.c (ix86_split_reduction): Implement
20364         TARGET_VECTORIZE_SPLIT_REDUCTION.
20366 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20368         PR target/83368
20369         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20370         in PIC mode except for TARGET_VXWORKS_RTP.
20371         * config/sparc/sparc.c: Include cfgrtl.h.
20372         (TARGET_INIT_PIC_REG): Define.
20373         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20374         (sparc_pic_register_p): New predicate.
20375         (sparc_legitimate_address_p): Use it.
20376         (sparc_legitimize_pic_address): Likewise.
20377         (sparc_delegitimize_address): Likewise.
20378         (sparc_mode_dependent_address_p): Likewise.
20379         (gen_load_pcrel_sym): Remove 4th parameter.
20380         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20381         (sparc_expand_prologue): Do not call load_got_register here.
20382         (sparc_flat_expand_prologue): Likewise.
20383         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20384         (sparc_use_pseudo_pic_reg): New function.
20385         (sparc_init_pic_reg): Likewise.
20386         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20387         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20389 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20391         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20392         Add item for branch_cost.
20394 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20396         PR rtl-optimization/83565
20397         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20398         not extend the result to a larger mode for rotate operations.
20399         (num_sign_bit_copies1): Likewise.
20401 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20403         PR target/40411
20404         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20405         -symbolic.
20406         Use values-Xc.o for -pedantic.
20407         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20409 2018-01-12  Martin Liska  <mliska@suse.cz>
20411         PR ipa/83054
20412         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20413         New function.
20414         (possible_polymorphic_call_targets): Use it.
20415         (ipa_devirt): Likewise.
20417 2018-01-12  Martin Liska  <mliska@suse.cz>
20419         * profile-count.h (enum profile_quality): Use 0 as invalid
20420         enum value of profile_quality.
20422 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20424         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20425         -mext-string options.
20427 2018-01-12  Richard Biener  <rguenther@suse.de>
20429         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20430         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20431         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20432         Likewise.
20433         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20435 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20437         * configure.ac (--with-long-double-format): Add support for the
20438         configuration option to change the default long double format on
20439         PowerPC systems.
20440         * config.gcc (powerpc*-linux*-*): Likewise.
20441         * configure: Regenerate.
20442         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20443         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20444         used without modification.
20446 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20448         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20449         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20450         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20451         MISC_BUILTIN_SPEC_BARRIER.
20452         (rs6000_init_builtins): Likewise.
20453         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20454         enum value.
20455         (speculation_barrier): New define_insn.
20456         * doc/extend.texi: Document __builtin_speculation_barrier.
20458 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20460         PR target/83203
20461         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20462         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20463         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20464         iterators.
20465         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20466         integral modes instead of "ss" and "sd".
20467         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20468         vectors with 32-bit and 64-bit elements.
20469         (vecdupssescalarmodesuffix): New mode attribute.
20470         (vec_dup<mode>): Use it.
20472 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20474         PR target/83330
20475         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20476         frame if argument is passed on stack.
20478 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20480         PR target/82682
20481         * ree.c (combine_reaching_defs): Optimize also
20482         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20483         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20485 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20487         PR middle-end/83189
20488         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20490 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20492         PR middle-end/83718
20493         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20494         after they are computed.
20496 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20498         PR tree-optimization/83695
20499         * gimple-loop-linterchange.cc
20500         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20501         reset cached scev information after interchange.
20502         (pass_linterchange::execute): Remove call to scev_reset_htab.
20504 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20506         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20507         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20508         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20509         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20510         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20511         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20512         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20513         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20514         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20515         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20516         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20517         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20518         (V_lane_reg): Likewise.
20519         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20520         New define_expand.
20521         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20522         (vfmal_lane_low<mode>_intrinsic,
20523         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20524         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20525         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20526         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20527         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20528         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20530 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20532         * config/arm/arm-cpus.in (fp16fml): New feature.
20533         (ALL_SIMD): Add fp16fml.
20534         (armv8.2-a): Add fp16fml as an option.
20535         (armv8.3-a): Likewise.
20536         (armv8.4-a): Add fp16fml as part of fp16.
20537         * config/arm/arm.h (TARGET_FP16FML): Define.
20538         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20539         when appropriate.
20540         * config/arm/arm-modes.def (V2HF): Define.
20541         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20542         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20543         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20544         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20545         vfmsl_low, vfmsl_high): New set of builtins.
20546         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20547         (vfml_op): New code attribute.
20548         (VFMLHALVES): New int iterator.
20549         (VFML, VFMLSEL): New mode attributes.
20550         (V_reg): Define mapping for V2HF.
20551         (V_hi, V_lo): New mode attributes.
20552         (VF_constraint): Likewise.
20553         (vfml_half, vfml_half_selector): New int attributes.
20554         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20555         define_expand.
20556         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20557         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20558         New define_insn.
20559         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20560         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20561         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20562         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20563         documentation.
20564         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20565         Document new effective target and option set.
20567 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20569         * config/arm/arm-cpus.in (armv8_4): New feature.
20570         (ARMv8_4a): New fgroup.
20571         (armv8.4-a): New arch.
20572         * config/arm/arm-tables.opt: Regenerate.
20573         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20574         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20575         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20576         Add matching rules for -march=armv8.4-a and extensions.
20577         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20579 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20581         PR target/81821
20582         * config/rx/rx.md (BW): New mode attribute.
20583         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20585 2018-01-11  Richard Biener  <rguenther@suse.de>
20587         PR tree-optimization/83435
20588         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20589         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20590         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20592 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20593             Alan Hayward  <alan.hayward@arm.com>
20594             David Sherwood  <david.sherwood@arm.com>
20596         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20597         field.
20598         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20599         (aarch64_print_address_internal): Use it to check for a zero offset.
20601 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20602             Alan Hayward  <alan.hayward@arm.com>
20603             David Sherwood  <david.sherwood@arm.com>
20605         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20606         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20607         Return a poly_int64 rather than a HOST_WIDE_INT.
20608         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20609         rather than a HOST_WIDE_INT.
20610         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20611         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20612         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20613         final_offset from HOST_WIDE_INT to poly_int64.
20614         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20615         to_constant when getting the number of units in an Advanced SIMD
20616         mode.
20617         (aarch64_builtin_vectorized_function): Check for a constant number
20618         of units.
20619         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20620         GET_MODE_SIZE.
20621         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20622         attribute instead of GET_MODE_NUNITS.
20623         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20624         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20625         GET_MODE_SIZE for fixed-size registers.
20626         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20627         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20628         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20629         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20630         (aarch64_print_operand, aarch64_print_address_internal)
20631         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20632         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20633         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20634         Handle polynomial GET_MODE_SIZE.
20635         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20636         wider than SImode without modification.
20637         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20638         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20639         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20640         passing and returning SVE modes.
20641         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20642         rather than GEN_INT.
20643         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20644         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20645         (aarch64_allocate_and_probe_stack_space): Likewise.
20646         (aarch64_layout_frame): Cope with polynomial offsets.
20647         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20648         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20649         polynomial offsets.
20650         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20651         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20652         poly_int64 rather than a HOST_WIDE_INT.
20653         (aarch64_get_separate_components, aarch64_process_components)
20654         (aarch64_expand_prologue, aarch64_expand_epilogue)
20655         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20656         (aarch64_anchor_offset): New function, split out from...
20657         (aarch64_legitimize_address): ...here.
20658         (aarch64_builtin_vectorization_cost): Handle polynomial
20659         TYPE_VECTOR_SUBPARTS.
20660         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20661         GET_MODE_NUNITS.
20662         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20663         number of elements from the PARALLEL rather than the mode.
20664         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20665         rather than GET_MODE_BITSIZE.
20666         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20667         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20668         (aarch64_expand_vec_perm_const_1): Handle polynomial
20669         d->perm.length () and d->perm elements.
20670         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20671         Apply to_constant to d->perm elements.
20672         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20673         polynomial CONST_VECTOR_NUNITS.
20674         (aarch64_move_pointer): Take amount as a poly_int64 rather
20675         than an int.
20676         (aarch64_progress_pointer): Avoid temporary variable.
20677         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20678         the mode attribute instead of GET_MODE.
20680 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20681             Alan Hayward  <alan.hayward@arm.com>
20682             David Sherwood  <david.sherwood@arm.com>
20684         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20685         x exists before using it.
20686         (aarch64_add_constant_internal): Rename to...
20687         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20688         src and dest rtxes.  Handle the case in which they're different,
20689         including when the offset is zero.  Replace scratchreg with an rtx.
20690         Use 2 additions if there is no spare register into which we can
20691         move a 16-bit constant.
20692         (aarch64_add_constant): Delete.
20693         (aarch64_add_offset): Replace reg with separate src and dest
20694         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20695         Use aarch64_add_offset_1.
20696         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20697         an rtx rather than an int.  Take the delta as a poly_int64
20698         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20699         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20700         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20701         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20702         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20703         and aarch64_add_sp.
20704         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20705         aarch64_add_constant.
20707 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20709         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20710         Use scalar_float_mode.
20712 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20714         * config/aarch64/aarch64-simd.md
20715         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20716         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20717         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20718         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20719         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20720         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20721         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20722         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20723         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20724         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20726 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20728         PR target/83514
20729         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20730         targ_options->x_arm_arch_string is non NULL.
20732 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20734         * config/aarch64/aarch64.h
20735         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20737 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20739         PR target/82096
20740         * expmed.c (emit_store_flag_force): Swap if const op0
20741         and change VOIDmode to mode of op0.
20743 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20745         PR rtl-optimization/83761
20746         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20747         than bytes to mode_for_size.
20749 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20751         PR middle-end/83189
20752         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20753         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20754         profile.
20756 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20758         PR middle-end/83575
20759         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20760         when in layout mode.
20761         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20762         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20763         partition fixup.
20765 2018-01-10  Michael Collison  <michael.collison@arm.com>
20767         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20768         * config/aarch64/aarch64-option-extension.def: Add
20769         AARCH64_OPT_EXTENSION of 'fp16fml'.
20770         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20771         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20772         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20773         * config/aarch64/constraints.md (Ui7): New constraint.
20774         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20775         (VFMLA_SEL_W): Ditto.
20776         (f16quad): Ditto.
20777         (f16mac1): Ditto.
20778         (VFMLA16_LOW): New int iterator.
20779         (VFMLA16_HIGH): Ditto.
20780         (UNSPEC_FMLAL): New unspec.
20781         (UNSPEC_FMLSL): Ditto.
20782         (UNSPEC_FMLAL2): Ditto.
20783         (UNSPEC_FMLSL2): Ditto.
20784         (f16mac): New code attribute.
20785         * config/aarch64/aarch64-simd-builtins.def
20786         (aarch64_fmlal_lowv2sf): Ditto.
20787         (aarch64_fmlsl_lowv2sf): Ditto.
20788         (aarch64_fmlalq_lowv4sf): Ditto.
20789         (aarch64_fmlslq_lowv4sf): Ditto.
20790         (aarch64_fmlal_highv2sf): Ditto.
20791         (aarch64_fmlsl_highv2sf): Ditto.
20792         (aarch64_fmlalq_highv4sf): Ditto.
20793         (aarch64_fmlslq_highv4sf): Ditto.
20794         (aarch64_fmlal_lane_lowv2sf): Ditto.
20795         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20796         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20797         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20798         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20799         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20800         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20801         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20802         (aarch64_fmlal_lane_highv2sf): Ditto.
20803         (aarch64_fmlsl_lane_highv2sf): Ditto.
20804         (aarch64_fmlal_laneq_highv2sf): Ditto.
20805         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20806         (aarch64_fmlalq_lane_highv4sf): Ditto.
20807         (aarch64_fmlsl_lane_highv4sf): Ditto.
20808         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20809         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20810         * config/aarch64/aarch64-simd.md:
20811         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20812         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20813         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20814         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20815         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20816         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20817         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20818         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20819         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20820         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20821         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20822         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20823         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20824         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20825         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20826         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20827         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20828         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20829         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20830         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20831         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20832         (vfmlsl_low_u32): Ditto.
20833         (vfmlalq_low_u32): Ditto.
20834         (vfmlslq_low_u32): Ditto.
20835         (vfmlal_high_u32): Ditto.
20836         (vfmlsl_high_u32): Ditto.
20837         (vfmlalq_high_u32): Ditto.
20838         (vfmlslq_high_u32): Ditto.
20839         (vfmlal_lane_low_u32): Ditto.
20840         (vfmlsl_lane_low_u32): Ditto.
20841         (vfmlal_laneq_low_u32): Ditto.
20842         (vfmlsl_laneq_low_u32): Ditto.
20843         (vfmlalq_lane_low_u32): Ditto.
20844         (vfmlslq_lane_low_u32): Ditto.
20845         (vfmlalq_laneq_low_u32): Ditto.
20846         (vfmlslq_laneq_low_u32): Ditto.
20847         (vfmlal_lane_high_u32): Ditto.
20848         (vfmlsl_lane_high_u32): Ditto.
20849         (vfmlal_laneq_high_u32): Ditto.
20850         (vfmlsl_laneq_high_u32): Ditto.
20851         (vfmlalq_lane_high_u32): Ditto.
20852         (vfmlslq_lane_high_u32): Ditto.
20853         (vfmlalq_laneq_high_u32): Ditto.
20854         (vfmlslq_laneq_high_u32): Ditto.
20855         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20856         (AARCH64_FL_FOR_ARCH8_4): New.
20857         (AARCH64_ISA_F16FML): New ISA flag.
20858         (TARGET_F16FML): New feature flag for fp16fml.
20859         (doc/invoke.texi): Document new fp16fml option.
20861 2018-01-10  Michael Collison  <michael.collison@arm.com>
20863         * config/aarch64/aarch64-builtins.c:
20864         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20865         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20866         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20867         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20868         (AARCH64_ISA_SHA3): New ISA flag.
20869         (TARGET_SHA3): New feature flag for sha3.
20870         * config/aarch64/iterators.md (sha512_op): New int attribute.
20871         (CRYPTO_SHA512): New int iterator.
20872         (UNSPEC_SHA512H): New unspec.
20873         (UNSPEC_SHA512H2): Ditto.
20874         (UNSPEC_SHA512SU0): Ditto.
20875         (UNSPEC_SHA512SU1): Ditto.
20876         * config/aarch64/aarch64-simd-builtins.def
20877         (aarch64_crypto_sha512hqv2di): New builtin.
20878         (aarch64_crypto_sha512h2qv2di): Ditto.
20879         (aarch64_crypto_sha512su0qv2di): Ditto.
20880         (aarch64_crypto_sha512su1qv2di): Ditto.
20881         (aarch64_eor3qv8hi): Ditto.
20882         (aarch64_rax1qv2di): Ditto.
20883         (aarch64_xarqv2di): Ditto.
20884         (aarch64_bcaxqv8hi): Ditto.
20885         * config/aarch64/aarch64-simd.md:
20886         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20887         (aarch64_crypto_sha512su0qv2di): Ditto.
20888         (aarch64_crypto_sha512su1qv2di): Ditto.
20889         (aarch64_eor3qv8hi): Ditto.
20890         (aarch64_rax1qv2di): Ditto.
20891         (aarch64_xarqv2di): Ditto.
20892         (aarch64_bcaxqv8hi): Ditto.
20893         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20894         (vsha512h2q_u64): Ditto.
20895         (vsha512su0q_u64): Ditto.
20896         (vsha512su1q_u64): Ditto.
20897         (veor3q_u16): Ditto.
20898         (vrax1q_u64): Ditto.
20899         (vxarq_u64): Ditto.
20900         (vbcaxq_u16): Ditto.
20901         * config/arm/types.md (crypto_sha512): New type attribute.
20902         (crypto_sha3): Ditto.
20903         (doc/invoke.texi): Document new sha3 option.
20905 2018-01-10  Michael Collison  <michael.collison@arm.com>
20907         * config/aarch64/aarch64-builtins.c:
20908         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20909         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20910         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20911         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20912         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20913         (AARCH64_ISA_SM4): New ISA flag.
20914         (TARGET_SM4): New feature flag for sm4.
20915         * config/aarch64/aarch64-simd-builtins.def
20916         (aarch64_sm3ss1qv4si): Ditto.
20917         (aarch64_sm3tt1aq4si): Ditto.
20918         (aarch64_sm3tt1bq4si): Ditto.
20919         (aarch64_sm3tt2aq4si): Ditto.
20920         (aarch64_sm3tt2bq4si): Ditto.
20921         (aarch64_sm3partw1qv4si): Ditto.
20922         (aarch64_sm3partw2qv4si): Ditto.
20923         (aarch64_sm4eqv4si): Ditto.
20924         (aarch64_sm4ekeyqv4si): Ditto.
20925         * config/aarch64/aarch64-simd.md:
20926         (aarch64_sm3ss1qv4si): Ditto.
20927         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20928         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20929         (aarch64_sm4eqv4si): Ditto.
20930         (aarch64_sm4ekeyqv4si): Ditto.
20931         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20932         (sm3part_op): Ditto.
20933         (CRYPTO_SM3TT): Ditto.
20934         (CRYPTO_SM3PART): Ditto.
20935         (UNSPEC_SM3SS1): New unspec.
20936         (UNSPEC_SM3TT1A): Ditto.
20937         (UNSPEC_SM3TT1B): Ditto.
20938         (UNSPEC_SM3TT2A): Ditto.
20939         (UNSPEC_SM3TT2B): Ditto.
20940         (UNSPEC_SM3PARTW1): Ditto.
20941         (UNSPEC_SM3PARTW2): Ditto.
20942         (UNSPEC_SM4E): Ditto.
20943         (UNSPEC_SM4EKEY): Ditto.
20944         * config/aarch64/constraints.md (Ui2): New constraint.
20945         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20946         * config/arm/types.md (crypto_sm3): New type attribute.
20947         (crypto_sm4): Ditto.
20948         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20949         (vsm3tt1aq_u32): Ditto.
20950         (vsm3tt1bq_u32): Ditto.
20951         (vsm3tt2aq_u32): Ditto.
20952         (vsm3tt2bq_u32): Ditto.
20953         (vsm3partw1q_u32): Ditto.
20954         (vsm3partw2q_u32): Ditto.
20955         (vsm4eq_u32): Ditto.
20956         (vsm4ekeyq_u32): Ditto.
20957         (doc/invoke.texi): Document new sm4 option.
20959 2018-01-10  Michael Collison  <michael.collison@arm.com>
20961         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20962         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20963         (AARCH64_FL_FOR_ARCH8_4): New.
20964         (AARCH64_FL_V8_4): New flag.
20965         (doc/invoke.texi): Document new armv8.4-a option.
20967 2018-01-10  Michael Collison  <michael.collison@arm.com>
20969         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20970         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20971         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20972         * config/aarch64/aarch64-option-extension.def: Add
20973         AARCH64_OPT_EXTENSION of 'sha2'.
20974         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20975         (crypto): Disable sha2 and aes if crypto disabled.
20976         (crypto): Enable aes and sha2 if enabled.
20977         (simd): Disable sha2 and aes if simd disabled.
20978         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20979         New flags.
20980         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20981         (TARGET_SHA2): New feature flag for sha2.
20982         (TARGET_AES): New feature flag for aes.
20983         * config/aarch64/aarch64-simd.md:
20984         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20985         conditional on TARGET_AES.
20986         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20987         (aarch64_crypto_sha1hsi): Make pattern conditional
20988         on TARGET_SHA2.
20989         (aarch64_crypto_sha1hv4si): Ditto.
20990         (aarch64_be_crypto_sha1hv4si): Ditto.
20991         (aarch64_crypto_sha1su1v4si): Ditto.
20992         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20993         (aarch64_crypto_sha1su0v4si): Ditto.
20994         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20995         (aarch64_crypto_sha256su0v4si): Ditto.
20996         (aarch64_crypto_sha256su1v4si): Ditto.
20997         (doc/invoke.texi): Document new aes and sha2 options.
20999 2018-01-10  Martin Sebor  <msebor@redhat.com>
21001         PR tree-optimization/83781
21002         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21003         as string arrays.
21005 2018-01-11  Martin Sebor  <msebor@gmail.com>
21006             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21008         PR tree-optimization/83501
21009         PR tree-optimization/81703
21011         * tree-ssa-strlen.c (get_string_cst): Rename...
21012         (get_string_len): ...to this.  Handle global constants.
21013         (handle_char_store): Adjust.
21015 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21016             Jim Wilson  <jimw@sifive.com>
21018         * config/riscv/riscv-protos.h (riscv_output_return): New.
21019         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21020         (riscv_attribute_table, riscv_output_return),
21021         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21022         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21023         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21024         function.
21025         (riscv_expand_prologue): Add early return for naked function.
21026         (riscv_expand_epilogue): Likewise.
21027         (riscv_function_ok_for_sibcall): Return false for naked function.
21028         (riscv_set_current_function): New.
21029         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21030         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21031         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21032         * doc/extend.texi (RISC-V Function Attributes): New.
21034 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21036         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21037         check for 128-bit long double before checking TCmode.
21038         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21039         128-bit long doubles before checking TFmode or TCmode.
21040         (FLOAT128_IBM_P): Likewise.
21042 2018-01-10  Martin Sebor  <msebor@redhat.com>
21044         PR tree-optimization/83671
21045         * builtins.c (c_strlen): Unconditionally return zero for the empty
21046         string.
21047         Use -Warray-bounds for warnings.
21048         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21049         for non-constant array indices with COMPONENT_REF, arrays of
21050         arrays, and pointers to arrays.
21051         (gimple_fold_builtin_strlen): Determine and set length range for
21052         non-constant character arrays.
21054 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21056         PR middle-end/81897
21057         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21058         empty blocks.
21060 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21062         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21064 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21066         PR target/83399
21067         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21068         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21069         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21070         indexed_or_indirect_operand predicate.
21071         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21072         (*vsx_le_perm_load_v8hi): Likewise.
21073         (*vsx_le_perm_load_v16qi): Likewise.
21074         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21075         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21076         (*vsx_le_perm_store_v8hi): Likewise.
21077         (*vsx_le_perm_store_v16qi): Likewise.
21078         (eight unnamed splitters): Likewise.
21080 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21082         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21083         * config/rs6000/emmintrin.h: Likewise.
21084         * config/rs6000/mmintrin.h: Likewise.
21085         * config/rs6000/xmmintrin.h: Likewise.
21087 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21089         PR c++/43486
21090         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21091         "public_flag".
21092         * tree.c (tree_nop_conversion): Return true for location wrapper
21093         nodes.
21094         (maybe_wrap_with_location): New function.
21095         (selftest::check_strip_nops): New function.
21096         (selftest::test_location_wrappers): New function.
21097         (selftest::tree_c_tests): Call it.
21098         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21099         (maybe_wrap_with_location): New decl.
21100         (EXPR_LOCATION_WRAPPER_P): New macro.
21101         (location_wrapper_p): New inline function.
21102         (tree_strip_any_location_wrapper): New inline function.
21104 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21106         PR target/83735
21107         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21108         stack_realign_offset for the largest alignment of stack slot
21109         actually used.
21110         (ix86_find_max_used_stack_alignment): New function.
21111         (ix86_finalize_stack_frame_flags): Use it.  Set
21112         max_used_stack_alignment if we don't realign stack.
21113         * config/i386/i386.h (machine_function): Add
21114         max_used_stack_alignment.
21116 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21118         * config/arm/arm.opt (-mbranch-cost): New option.
21119         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21120         account.
21122 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21124         PR target/83629
21125         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21126         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21128 2018-01-10  Richard Biener  <rguenther@suse.de>
21130         PR debug/83765
21131         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21132         early out so it also covers the case where we have a non-NULL
21133         origin.
21135 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21137         PR tree-optimization/83753
21138         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21139         for non-strided grouped accesses if the number of elements is 1.
21141 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21143         PR target/81616
21144         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21145         * i386.h (TARGET_USE_GATHER): Define.
21146         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21148 2018-01-10  Martin Liska  <mliska@suse.cz>
21150         PR bootstrap/82831
21151         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21152         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21153         partitioning.
21154         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21155         CLEANUP_NO_PARTITIONING is not set.
21157 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21159         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21160         for vectors, as a partial revert of r254296.
21161         * rtl.h (const_vec_p): Delete.
21162         (const_vec_duplicate_p): Don't test for vector CONSTs.
21163         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21164         * expmed.c (make_tree): Likewise.
21166         Revert:
21167         * common.md (E, F): Use CONSTANT_P instead of checking for
21168         CONST_VECTOR.
21169         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21170         checking for CONST_VECTOR.
21172 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21174         PR middle-end/83575
21175         * predict.c (force_edge_cold): Handle in more sane way edges
21176         with no prediction.
21178 2018-01-09  Carl Love  <cel@us.ibm.com>
21180         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21181         V4SI, V4SF types.
21182         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21183         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21184         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21185         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21186         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21187         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21188         * config/rs6000/rs6000-protos.h: Add extern defition for
21189         rs6000_generate_float2_double_code.
21190         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21191         function.
21192         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21193         (float2_v2df): Add define_expand.
21195 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21197         PR target/83628
21198         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21199         op_mode in the force_to_mode call.
21201 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21203         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21204         instead of checking each element individually.
21205         (aarch64_evpc_uzp): Likewise.
21206         (aarch64_evpc_zip): Likewise.
21207         (aarch64_evpc_ext): Likewise.
21208         (aarch64_evpc_rev): Likewise.
21209         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21210         instead of checking each element individually.  Return true without
21211         generating rtl if
21212         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21213         whether all selected elements come from the same input, instead of
21214         checking each element individually.  Remove calls to gen_rtx_REG,
21215         start_sequence and end_sequence and instead assert that no rtl is
21216         generated.
21218 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21220         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21221         order of HIGH and CONST checks.
21223 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21225         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21226         if the destination isn't an SSA_NAME.
21228 2018-01-09  Richard Biener  <rguenther@suse.de>
21230         PR tree-optimization/83668
21231         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21232         move prologue...
21233         (canonicalize_loop_form): ... here, renamed from ...
21234         (canonicalize_loop_closed_ssa_form): ... this and amended to
21235         swap successor edges for loop exit blocks to make us use
21236         the RPO order we need for initial schedule generation.
21238 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21240         PR tree-optimization/64811
21241         * match.pd: When optimizing comparisons with Inf, avoid
21242         introducing or losing exceptions from comparisons with NaN.
21244 2018-01-09  Martin Liska  <mliska@suse.cz>
21246         PR sanitizer/82517
21247         * asan.c (shadow_mem_size): Add gcc_assert.
21249 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21251         Don't save registers in main().
21253         PR target/83738
21254         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21255         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21256         * config/avr/avr.c (avr_set_current_function): Don't error if
21257         naked, OS_task or OS_main are specified at the same time.
21258         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21259         OS_main.
21260         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21261         attribute.
21262         * common/config/avr/avr-common.c (avr_option_optimization_table):
21263         Switch on -mmain-is-OS_task for optimizing compilations.
21265 2018-01-09  Richard Biener  <rguenther@suse.de>
21267         PR tree-optimization/83572
21268         * graphite.c: Include cfganal.h.
21269         (graphite_transform_loops): Connect infinite loops to exit
21270         and remove fake edges at the end.
21272 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21274         * ipa-inline.c (edge_badness): Revert accidental checkin.
21276 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21278         PR ipa/80763
21279         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21280         symbols; not inline clones.
21282 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21284         PR target/83507
21285         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21286         hard registers.  Formatting fixes.
21288         PR preprocessor/83722
21289         * gcc.c (try_generate_repro): Pass
21290         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21291         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21292         do_report_bug.
21294 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21295             Kito Cheng  <kito.cheng@gmail.com>
21297         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21298         (riscv_leaf_function_p): Delete.
21299         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21301 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21303         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21304         function.
21305         (do_ifelse): New function.
21306         (do_isel): New function.
21307         (do_sub3): New function.
21308         (do_add3): New function.
21309         (do_load_mask_compare): New function.
21310         (do_overlap_load_compare): New function.
21311         (expand_compare_loop): New function.
21312         (expand_block_compare): Call expand_compare_loop() when appropriate.
21313         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21314         option description.
21315         (-mblock-compare-inline-loop-limit): New option.
21317 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21319         PR target/83677
21320         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21321         Reverse order of second and third operands in first alternative.
21322         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21323         of first and second elements in UNSPEC_VPERMR vector.
21324         (altivec_expand_vec_perm_le): Likewise.
21326 2018-01-08  Jeff Law  <law@redhat.com>
21328         PR rtl-optimizatin/81308
21329         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21330         (process_switch): If group_case_labels makes a change, then set
21331         cfg_altered.
21332         (pass_convert_switch::execute): If a switch is converted, then
21333         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21335         PR rtl-optimization/81308
21336         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21337         splitting insns.
21339 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21341         PR target/83663 - Revert r255946
21342         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21343         generation for cases where splatting a value is not useful.
21344         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21345         across a vec_duplicate and a paradoxical subreg forming a vector
21346         mode to a vec_concat.
21348 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21350         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21351         -march=armv8.3-a variants.
21352         * config/arm/t-multilib: Likewise.
21353         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21355 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21357         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21358         to generate rtl.
21359         (cceq_ior_compare_complement): Give it a name so I can use it, and
21360         change boolean_or_operator predicate to boolean_operator so it can
21361         be used to generate a crand.
21362         (eqne): New code iterator.
21363         (bd/bd_neg): New code_attrs.
21364         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21365         a single define_insn.
21366         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21367         decrement (bdnzt/bdnzf/bdzt/bdzf).
21368         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21369         with the new names of the branch decrement patterns, and added the
21370         names of the branch decrement conditional patterns.
21372 2018-01-08  Richard Biener  <rguenther@suse.de>
21374         PR tree-optimization/83563
21375         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21376         cache.
21378 2018-01-08  Richard Biener  <rguenther@suse.de>
21380         PR middle-end/83713
21381         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21383 2018-01-08  Richard Biener  <rguenther@suse.de>
21385         PR tree-optimization/83685
21386         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21387         references to abnormals.
21389 2018-01-08  Richard Biener  <rguenther@suse.de>
21391         PR lto/83719
21392         * dwarf2out.c (output_indirect_strings): Handle empty
21393         skeleton_debug_str_hash.
21394         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21396 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21398         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21399         (emit_store_direct): Likewise.
21400         (arc_trampoline_adjust_address): Likewise.
21401         (arc_asm_trampoline_template): New function.
21402         (arc_initialize_trampoline): Use asm_trampoline_template.
21403         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21404         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21405         * config/arc/arc.md (flush_icache): Delete pattern.
21407 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21409         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21410         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21411         munaligned-access.
21413 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21415         PR target/83681
21416         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21417         by not USED_FOR_TARGET.
21418         (make_pass_resolve_sw_modes): Likewise.
21420 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21422         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21423         USED_FOR_TARGET.
21425 2018-01-08  Richard Biener  <rguenther@suse.de>
21427         PR middle-end/83580
21428         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21430 2018-01-08  Richard Biener  <rguenther@suse.de>
21432         PR middle-end/83517
21433         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21435 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21437         PR middle-end/81897
21438         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21439         basic blocks with a small number of successors.
21440         (convert_control_dep_chain_into_preds): Improve handling of
21441         forwarder blocks.
21442         (dump_predicates): Split apart into...
21443         (dump_pred_chain): ...here...
21444         (dump_pred_info): ...and here.
21445         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21446         (can_chain_union_be_invalidated_p): Improve check for invalidation
21447         of paths.
21448         (uninit_uses_cannot_happen): Avoid unnecessary if
21449         convert_control_dep_chain_into_preds yielded nothing.
21451 2018-01-06  Martin Sebor  <msebor@redhat.com>
21453         PR tree-optimization/83640
21454         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21455         subtracting negative offset from size.
21456         (builtin_access::overlap): Adjust offset bounds of the access to fall
21457         within the size of the object if possible.
21459 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21461         PR rtl-optimization/83699
21462         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21463         extract_bit_field_as_subreg to cases in which the extracted
21464         value is also a vector.
21466         * lra-constraints.c (process_alt_operands): Test for the equivalence
21467         substitutions when detecting a possible reload cycle.
21469 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21471         PR debug/83480
21472         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21473         by default if flag_selective_schedling{,2}.  Formatting fixes.
21475         PR rtl-optimization/83682
21476         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21477         if it has non-VECTOR_MODE element mode.
21478         (vec_duplicate_p): Likewise.
21480         PR middle-end/83694
21481         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21482         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21484 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21486         PR target/83604
21487         * config/i386/i386-builtin.def
21488         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21489         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21490         Require also OPTION_MASK_ISA_AVX512F in addition to
21491         OPTION_MASK_ISA_GFNI.
21492         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21493         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21494         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21495         to OPTION_MASK_ISA_GFNI.
21496         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21497         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21498         OPTION_MASK_ISA_AVX512BW.
21499         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21500         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21501         addition to OPTION_MASK_ISA_GFNI.
21502         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21503         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21504         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21505         to OPTION_MASK_ISA_GFNI.
21506         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21507         a requirement for all ISAs rather than any of them with a few
21508         exceptions.
21509         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21510         processing.
21511         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21512         bitmasks to be enabled with 3 exceptions, instead of requiring any
21513         enabled ISA with lots of exceptions.
21514         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21515         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21516         Change avx512bw in isa attribute to avx512f.
21517         * config/i386/sgxintrin.h: Add license boilerplate.
21518         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21519         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21520         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21521         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21522         defined.
21523         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21524         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21525         temporarily sse2 rather than sse if not enabled already.
21527         PR target/83604
21528         * config/i386/sse.md (VI248_VLBW): Rename to ...
21529         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21530         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21531         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21532         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21533         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21534         mode iterator instead of VI248_VLBW.
21536 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21538         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21539         (record_modified): Skip clobbers; add debug output.
21540         (param_change_prob): Use sreal frequencies.
21542 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21544         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21545         punt for user-aligned variables.
21547 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21549         * tree-chrec.c (chrec_contains_symbols): Return true for
21550         POLY_INT_CST.
21552 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21554         PR target/82439
21555         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21556         of (x|y) == x for BICS pattern.
21558 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21560         PR tree-optimization/83605
21561         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21562         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21563         can throw.
21565 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21567         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21568         * config/epiphany/rtems.h: New file.
21570 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21571             Uros Bizjak  <ubizjak@gmail.com>
21573         PR target/83554
21574         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21575         QIreg_operand instead of register_operand predicate.
21576         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21577         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21578         comments instead of -fmitigate[-_]rop.
21580 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21582         PR bootstrap/81926
21583         * cgraphunit.c (symbol_table::compile): Switch to text_section
21584         before calling assembly_start debug hook.
21585         * run-rtl-passes.c (run_rtl_passes): Likewise.
21586         Include output.h.
21588 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21590         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21591         range_int_cst_p rather than !symbolic_range_p before calling
21592         extract_range_from_multiplicative_op_1.
21594 2018-01-04  Jeff Law  <law@redhat.com>
21596         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21597         redundant test in assertion.
21599 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21601         * doc/rtl.texi: Document machine_mode wrapper classes.
21603 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21605         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21606         using tree_to_uhwi.
21608 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21610         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21611         the VEC_PERM_EXPR fold to fail.
21613 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21615         PR debug/83585
21616         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21617         to switched_sections.
21619 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21621         PR target/83680
21622         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21623         test for d.testing.
21625 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21627         PR target/83387
21628         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21629         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21631 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21633         PR debug/83666
21634         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21635         is BLKmode and bitpos not zero or mode change is needed.
21637 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21639         PR target/83675
21640         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21641         TARGET_VIS2.
21643 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21645         PR target/83628
21646         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21647         instead of MULT rtx.  Update all corresponding splitters.
21648         (*saddl_se): Ditto.
21649         (*ssub<modesuffix>): Ditto.
21650         (*ssubl_se): Ditto.
21651         (*cmp_sadd_di): Update split patterns.
21652         (*cmp_sadd_si): Ditto.
21653         (*cmp_sadd_sidi): Ditto.
21654         (*cmp_ssub_di): Ditto.
21655         (*cmp_ssub_si): Ditto.
21656         (*cmp_ssub_sidi): Ditto.
21657         * config/alpha/predicates.md (const23_operand): New predicate.
21658         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21659         Look for ASHIFT, not MULT inner operand.
21660         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21662 2018-01-04  Martin Liska  <mliska@suse.cz>
21664         PR gcov-profile/83669
21665         * gcov.c (output_intermediate_file): Add version to intermediate
21666         gcov file.
21667         * doc/gcov.texi: Document new field 'version' in intermediate
21668         file format. Fix location of '-k' option of gcov command.
21670 2018-01-04  Martin Liska  <mliska@suse.cz>
21672         PR ipa/82352
21673         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21675 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21677         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21679 2018-01-03  Martin Sebor  <msebor@redhat.com>
21681         PR tree-optimization/83655
21682         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21683         checking calls with invalid arguments.
21685 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21687         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21688         (vectorizable_mask_load_store): Delete.
21689         (vectorizable_call): Return false for masked loads and stores.
21690         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21691         instead of gimple_assign_rhs1.
21692         (vectorizable_load): Handle IFN_MASK_LOAD.
21693         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21697         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21698         split out from..,
21699         (vectorizable_mask_load_store): ...here.
21700         (vectorizable_load): ...and here.
21702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21704         * tree-vect-stmts.c (vect_build_all_ones_mask)
21705         (vect_build_zero_merge_argument): New functions, split out from...
21706         (vectorizable_load): ...here.
21708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21710         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21711         split out from...
21712         (vectorizable_mask_load_store): ...here.
21713         (vectorizable_store): ...and here.
21715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21717         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21718         split out from...
21719         (vectorizable_mask_load_store): ...here.
21721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21723         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21724         (vect_model_store_cost): Take a vec_load_store_type instead of a
21725         vect_def_type.
21726         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21727         (vect_model_store_cost): Take a vec_load_store_type instead of a
21728         vect_def_type.
21729         (vectorizable_mask_load_store): Update accordingly.
21730         (vectorizable_store): Likewise.
21731         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21735         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21736         IFN_MASK_LOAD calls here rather than...
21737         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21739 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21740             Alan Hayward  <alan.hayward@arm.com>
21741             David Sherwood  <david.sherwood@arm.com>
21743         * expmed.c (extract_bit_field_1): For vector extracts,
21744         fall back to extract_bit_field_as_subreg if vec_extract
21745         isn't available.
21747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21748             Alan Hayward  <alan.hayward@arm.com>
21749             David Sherwood  <david.sherwood@arm.com>
21751         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21752         they are variable or constant sized.
21753         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21754         slots for constant-sized data.
21756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21757             Alan Hayward  <alan.hayward@arm.com>
21758             David Sherwood  <david.sherwood@arm.com>
21760         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21761         handling COND_EXPRs with boolean comparisons, try to find a better
21762         basis for the mask type than the boolean itself.
21764 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21766         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21767         is calculated and how it can be overridden.
21768         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21769         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21770         if defined.
21771         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21772         if nonzero.
21774 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21775             Alan Hayward  <alan.hayward@arm.com>
21776             David Sherwood  <david.sherwood@arm.com>
21778         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21779         Remove the mode argument.
21780         (aarch64_simd_valid_immediate): Remove the mode and inverse
21781         arguments.
21782         * config/aarch64/iterators.md (bitsize): New iterator.
21783         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21784         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21785         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21786         aarch64_simd_valid_immediate.
21787         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21788         (aarch64_reg_or_bic_imm): Likewise.
21789         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21790         with an insn_type enum and msl with a modifier_type enum.
21791         Replace element_width with a scalar_mode.  Change the shift
21792         to unsigned int.  Add constructors for scalar_float_mode and
21793         scalar_int_mode elements.
21794         (aarch64_vect_float_const_representable_p): Delete.
21795         (aarch64_can_const_movi_rtx_p)
21796         (aarch64_simd_scalar_immediate_valid_for_move)
21797         (aarch64_simd_make_constant): Update call to
21798         aarch64_simd_valid_immediate.
21799         (aarch64_advsimd_valid_immediate_hs): New function.
21800         (aarch64_advsimd_valid_immediate): Likewise.
21801         (aarch64_simd_valid_immediate): Remove mode and inverse
21802         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21803         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21804         and aarch64_float_const_representable_p on the result.
21805         (aarch64_output_simd_mov_immediate): Remove mode argument.
21806         Update call to aarch64_simd_valid_immediate and use of
21807         simd_immediate_info.
21808         (aarch64_output_scalar_simd_mov_immediate): Update call
21809         accordingly.
21811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21812             Alan Hayward  <alan.hayward@arm.com>
21813             David Sherwood  <david.sherwood@arm.com>
21815         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21816         (mode_nunits): Likewise CONST_MODE_NUNITS.
21817         * machmode.def (ADJUST_NUNITS): Document.
21818         * genmodes.c (mode_data::need_nunits_adj): New field.
21819         (blank_mode): Update accordingly.
21820         (adj_nunits): New variable.
21821         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21822         parameter.
21823         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21824         listed in adj_nunits.
21825         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21826         listed in adj_nunits.  Don't emit case statements for such modes.
21827         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21828         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21829         nothing if adj_nunits is nonnull.
21830         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21831         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21832         (emit_mode_fbit): Update use of print_maybe_const_decl.
21833         (emit_move_size): Likewise.  Treat the array as non-const
21834         if adj_nunits.
21835         (emit_mode_adjustments): Handle adj_nunits.
21837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21839         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21840         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21841         (VECTOR_MODES): Use it.
21842         (make_vector_modes): Take the prefix as an argument.
21844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21845             Alan Hayward  <alan.hayward@arm.com>
21846             David Sherwood  <david.sherwood@arm.com>
21848         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21849         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21850         for MODE_VECTOR_BOOL.
21851         * machmode.def (VECTOR_BOOL_MODE): Document.
21852         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21853         (make_vector_bool_mode): New function.
21854         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21855         MODE_VECTOR_BOOL.
21856         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21857         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21858         Likewise.
21859         * stor-layout.c (int_mode_for_mode): Likewise.
21860         * tree.c (build_vector_type_for_mode): Likewise.
21861         * varasm.c (output_constant_pool_2): Likewise.
21862         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21863         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21864         for MODE_VECTOR_BOOL.
21865         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21866         of mode class checks.
21867         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21868         instead of a list of mode class checks.
21869         (expand_vector_scalar_condition): Likewise.
21870         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21873             Alan Hayward  <alan.hayward@arm.com>
21874             David Sherwood  <david.sherwood@arm.com>
21876         * machmode.h (mode_size): Change from unsigned short to
21877         poly_uint16_pod.
21878         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21879         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21880         or if measurement_type is not polynomial.
21881         (fixed_size_mode::includes_p): Check for constant-sized modes.
21882         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21883         return a poly_uint16 rather than an unsigned short.
21884         (emit_mode_size): Change the type of mode_size from unsigned short
21885         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21886         (emit_mode_adjustments): Cope with polynomial vector sizes.
21887         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21888         for GET_MODE_SIZE.
21889         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21890         for GET_MODE_SIZE.
21891         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21892         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21893         * caller-save.c (setup_save_areas): Likewise.
21894         (replace_reg_with_saved_mem): Likewise.
21895         * calls.c (emit_library_call_value_1): Likewise.
21896         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21897         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21898         (gen_lowpart_for_combine): Likewise.
21899         * convert.c (convert_to_integer_1): Likewise.
21900         * cse.c (equiv_constant, cse_insn): Likewise.
21901         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21902         (cselib_subst_to_values): Likewise.
21903         * dce.c (word_dce_process_block): Likewise.
21904         * df-problems.c (df_word_lr_mark_ref): Likewise.
21905         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21906         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21907         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21908         (rtl_for_decl_location): Likewise.
21909         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21910         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21911         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21912         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21913         (expand_expr_real_1): Likewise.
21914         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21915         (pad_below): Likewise.
21916         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21917         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21918         * ira.c (get_subreg_tracking_sizes): Likewise.
21919         * ira-build.c (ira_create_allocno_objects): Likewise.
21920         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21921         (ira_sort_regnos_for_alter_reg): Likewise.
21922         * ira-costs.c (record_operand_costs): Likewise.
21923         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21924         (resolve_simple_move): Likewise.
21925         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21926         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21927         (lra_constraints): Likewise.
21928         (CONST_POOL_OK_P): Reject variable-sized modes.
21929         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21930         (add_pseudo_to_slot, lra_spill): Likewise.
21931         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21932         * optabs-query.c (get_best_extraction_insn): Likewise.
21933         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21934         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21935         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21936         * recog.c (offsettable_address_addr_space_p): Likewise.
21937         * regcprop.c (maybe_mode_change): Likewise.
21938         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21939         * regrename.c (build_def_use): Likewise.
21940         * regstat.c (dump_reg_info): Likewise.
21941         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21942         (find_reloads, find_reloads_subreg_address): Likewise.
21943         * reload1.c (eliminate_regs_1): Likewise.
21944         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21945         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21946         (simplify_binary_operation_1, simplify_subreg): Likewise.
21947         * targhooks.c (default_function_arg_padding): Likewise.
21948         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21949         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21950         (verify_gimple_assign_ternary): Likewise.
21951         * tree-inline.c (estimate_move_cost): Likewise.
21952         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21953         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21954         (get_address_cost_ainc): Likewise.
21955         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21956         (vect_supportable_dr_alignment): Likewise.
21957         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21958         (vectorizable_reduction): Likewise.
21959         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21960         (vectorizable_operation, vectorizable_load): Likewise.
21961         * tree.c (build_same_sized_truth_vector_type): Likewise.
21962         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21963         * var-tracking.c (emit_note_insn_var_location): Likewise.
21964         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21965         (ADDR_VEC_ALIGN): Likewise.
21967 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21968             Alan Hayward  <alan.hayward@arm.com>
21969             David Sherwood  <david.sherwood@arm.com>
21971         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21972         unsigned short.
21973         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21974         or if measurement_type is polynomial.
21975         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21976         * combine.c (make_extraction): Likewise.
21977         * dse.c (find_shift_sequence): Likewise.
21978         * dwarf2out.c (mem_loc_descriptor): Likewise.
21979         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21980         (extract_bit_field, extract_low_bits): Likewise.
21981         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21982         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21983         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21984         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21985         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21986         * reload.c (find_reloads): Likewise.
21987         * reload1.c (alter_reg): Likewise.
21988         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21989         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21990         * tree-if-conv.c (predicate_mem_writes): Likewise.
21991         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21992         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21993         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21994         * valtrack.c (dead_debug_insert_temp): Likewise.
21995         * varasm.c (mergeable_constant_section): Likewise.
21996         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21998 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21999             Alan Hayward  <alan.hayward@arm.com>
22000             David Sherwood  <david.sherwood@arm.com>
22002         * expr.c (expand_assignment): Cope with polynomial mode sizes
22003         when assigning to a CONCAT.
22005 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22006             Alan Hayward  <alan.hayward@arm.com>
22007             David Sherwood  <david.sherwood@arm.com>
22009         * machmode.h (mode_precision): Change from unsigned short to
22010         poly_uint16_pod.
22011         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22012         short.
22013         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22014         or if measurement_type is not polynomial.
22015         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22016         in which the mode is already known to be a scalar_int_mode.
22017         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22018         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22019         initializer.
22020         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22021         for GET_MODE_PRECISION.
22022         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22023         for GET_MODE_PRECISION.
22024         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22025         as polynomial.
22026         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22027         (expand_field_assignment, make_extraction): Likewise.
22028         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22029         (get_last_value): Likewise.
22030         * convert.c (convert_to_integer_1): Likewise.
22031         * cse.c (cse_insn): Likewise.
22032         * expr.c (expand_expr_real_1): Likewise.
22033         * lra-constraints.c (simplify_operand_subreg): Likewise.
22034         * optabs-query.c (can_atomic_load_p): Likewise.
22035         * optabs.c (expand_atomic_load): Likewise.
22036         (expand_atomic_store): Likewise.
22037         * ree.c (combine_reaching_defs): Likewise.
22038         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22039         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22040         * tree.h (type_has_mode_precision_p): Likewise.
22041         * ubsan.c (instrument_si_overflow): Likewise.
22043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22044             Alan Hayward  <alan.hayward@arm.com>
22045             David Sherwood  <david.sherwood@arm.com>
22047         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22048         polynomial numbers of units.
22049         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22050         (valid_vector_subparts_p): New function.
22051         (build_vector_type): Remove temporary shim and take the number
22052         of units as a poly_uint64 rather than an int.
22053         (build_opaque_vector_type): Take the number of units as a
22054         poly_uint64 rather than an int.
22055         * tree.c (build_vector_from_ctor): Handle polynomial
22056         TYPE_VECTOR_SUBPARTS.
22057         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22058         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22059         (build_vector_from_val): If the number of units is variable,
22060         use build_vec_duplicate_cst for constant operands and
22061         VEC_DUPLICATE_EXPR otherwise.
22062         (make_vector_type): Remove temporary is_constant ().
22063         (build_vector_type, build_opaque_vector_type): Take the number of
22064         units as a poly_uint64 rather than an int.
22065         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22066         VECTOR_CST_NELTS.
22067         * cfgexpand.c (expand_debug_expr): Likewise.
22068         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22069         (store_constructor, expand_expr_real_1): Likewise.
22070         (const_scalar_mask_from_tree): Likewise.
22071         * fold-const-call.c (fold_const_reduction): Likewise.
22072         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22073         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22074         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22075         (fold_relational_const): Likewise.
22076         (native_interpret_vector): Likewise.  Change the size from an
22077         int to an unsigned int.
22078         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22079         TYPE_VECTOR_SUBPARTS.
22080         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22081         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22082         duplicating a non-constant operand into a variable-length vector.
22083         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22084         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22085         * ipa-icf.c (sem_variable::equals): Likewise.
22086         * match.pd: Likewise.
22087         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22088         * print-tree.c (print_node): Likewise.
22089         * stor-layout.c (layout_type): Likewise.
22090         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22091         * tree-cfg.c (verify_gimple_comparison): Likewise.
22092         (verify_gimple_assign_binary): Likewise.
22093         (verify_gimple_assign_ternary): Likewise.
22094         (verify_gimple_assign_single): Likewise.
22095         * tree-pretty-print.c (dump_generic_node): Likewise.
22096         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22097         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22098         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22099         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22100         (vect_shift_permute_load_chain): Likewise.
22101         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22102         (expand_vector_condition, optimize_vector_constructor): Likewise.
22103         (lower_vec_perm, get_compute_type): Likewise.
22104         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22105         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22106         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22107         (vect_recog_mask_conversion_pattern): Likewise.
22108         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22109         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22110         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22111         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22112         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22113         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22114         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22115         (supportable_widening_operation): Likewise.
22116         (supportable_narrowing_operation): Likewise.
22117         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22118         Likewise.
22119         * varasm.c (output_constant): Likewise.
22121 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22122             Alan Hayward  <alan.hayward@arm.com>
22123             David Sherwood  <david.sherwood@arm.com>
22125         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22126         so that both the length == 3 and length != 3 cases set up their
22127         own permute vectors.  Add comments explaining why we know the
22128         number of elements is constant.
22129         (vect_permute_load_chain): Likewise.
22131 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22132             Alan Hayward  <alan.hayward@arm.com>
22133             David Sherwood  <david.sherwood@arm.com>
22135         * machmode.h (mode_nunits): Change from unsigned char to
22136         poly_uint16_pod.
22137         (ONLY_FIXED_SIZE_MODES): New macro.
22138         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22139         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22140         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22141         New typedefs.
22142         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22143         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22144         or if measurement_type is not polynomial.
22145         * genmodes.c (ZERO_COEFFS): New macro.
22146         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22147         poly_uint16.
22148         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22149         Use ZERO_COEFFS when emitting initializers.
22150         * data-streamer.h (bp_pack_poly_value): New function.
22151         (bp_unpack_poly_value): Likewise.
22152         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22153         for GET_MODE_NUNITS.
22154         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22155         for GET_MODE_NUNITS.
22156         * tree.c (make_vector_type): Remove temporary shim and make
22157         the real function take the number of units as a poly_uint64
22158         rather than an int.
22159         (build_vector_type_for_mode): Handle polynomial nunits.
22160         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22161         * emit-rtl.c (const_vec_series_p_1): Likewise.
22162         (gen_rtx_CONST_VECTOR): Likewise.
22163         * fold-const.c (test_vec_duplicate_folding): Likewise.
22164         * genrecog.c (validate_pattern): Likewise.
22165         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22166         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22167         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22168         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22169         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22170         * rtlanal.c (subreg_get_info): Likewise.
22171         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22172         (vect_grouped_load_supported): Likewise.
22173         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22174         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22175         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22176         (simplify_const_unary_operation, simplify_binary_operation_1)
22177         (simplify_const_binary_operation, simplify_ternary_operation)
22178         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22179         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22180         instead of CONST_VECTOR_NUNITS.
22181         * varasm.c (output_constant_pool_2): Likewise.
22182         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22183         explicit-encoded elements in the XVEC for variable-length vectors.
22185 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22187         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22190             Alan Hayward  <alan.hayward@arm.com>
22191             David Sherwood  <david.sherwood@arm.com>
22193         * coretypes.h (fixed_size_mode): Declare.
22194         (fixed_size_mode_pod): New typedef.
22195         * builtins.h (target_builtins::x_apply_args_mode)
22196         (target_builtins::x_apply_result_mode): Change type to
22197         fixed_size_mode_pod.
22198         * builtins.c (apply_args_size, apply_result_size, result_vector)
22199         (expand_builtin_apply_args_1, expand_builtin_apply)
22200         (expand_builtin_return): Update accordingly.
22202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22204         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22205         * cselib.c (cselib_hash_rtx): Likewise.
22206         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22207         CONST_VECTOR encoding.
22209 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22210             Jeff Law  <law@redhat.com>
22212         PR target/83641
22213         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22214         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22215         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22216         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22218         PR target/83641
22219         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22220         explicitly probe *sp in a noreturn function if there were any callee
22221         register saves or frame pointer is needed.
22223 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22225         PR debug/83621
22226         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22227         BLKmode for ternary, binary or unary expressions.
22229         PR debug/83645
22230         * var-tracking.c (delete_vta_debug_insn): New inline function.
22231         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22232         insns from get_insns () to NULL instead of each bb separately.
22233         Use delete_vta_debug_insn.  No longer static.
22234         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22235         delete_vta_debug_insns callers.
22236         * rtl.h (delete_vta_debug_insns): Declare.
22237         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22238         instead of variable_tracking_main.
22240 2018-01-03  Martin Sebor  <msebor@redhat.com>
22242         PR tree-optimization/83603
22243         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22244         arguments past the endof the argument list in functions declared
22245         without a prototype.
22246         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22247         Avoid checking when arguments are null.
22249 2018-01-03  Martin Sebor  <msebor@redhat.com>
22251         PR c/83559
22252         * doc/extend.texi (attribute const): Fix a typo.
22253         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22254         issuing -Wsuggest-attribute for void functions.
22256 2018-01-03  Martin Sebor  <msebor@redhat.com>
22258         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22259         offset_int::from instead of wide_int::to_shwi.
22260         (maybe_diag_overlap): Remove assertion.
22261         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22262         * gimple-ssa-sprintf.c (format_directive): Same.
22263         (parse_directive): Same.
22264         (sprintf_dom_walker::compute_format_length): Same.
22265         (try_substitute_return_value): Same.
22267 2018-01-03  Jeff Law  <law@redhat.com>
22269         PR middle-end/83654
22270         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22271         non-constant residual for zero at runtime and avoid probing in
22272         that case.  Reorganize code for trailing problem to mirror handling
22273         of the residual.
22275 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22277         PR tree-optimization/83501
22278         * tree-ssa-strlen.c (get_string_cst): New.
22279         (handle_char_store): Call get_string_cst.
22281 2018-01-03  Martin Liska  <mliska@suse.cz>
22283         PR tree-optimization/83593
22284         * tree-ssa-strlen.c: Include tree-cfg.h.
22285         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22286         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22287         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22288         to false.
22289         (strlen_dom_walker::before_dom_children): Call
22290         gimple_purge_dead_eh_edges. Dump tranformation with details
22291         dump flags.
22292         (strlen_dom_walker::before_dom_children): Update call by adding
22293         new argument cleanup_eh.
22294         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22296 2018-01-03  Martin Liska  <mliska@suse.cz>
22298         PR ipa/83549
22299         * cif-code.def (VARIADIC_THUNK): New enum value.
22300         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22301         thunks.
22303 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22305         * sse.md (mov<mode>_internal): Tighten condition for when to use
22306         vmovdqu<ssescalarsize> for TI and OI modes.
22308 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22310         Update copyright years.
22312 2018-01-03  Martin Liska  <mliska@suse.cz>
22314         PR ipa/83594
22315         * ipa-visibility.c (function_and_variable_visibility): Skip
22316         functions with noipa attribure.
22318 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22320         * gcc.c (process_command): Update copyright notice dates.
22321         * gcov-dump.c (print_version): Ditto.
22322         * gcov.c (print_version): Ditto.
22323         * gcov-tool.c (print_version): Ditto.
22324         * gengtype.c (create_file): Ditto.
22325         * doc/cpp.texi: Bump @copying's copyright year.
22326         * doc/cppinternals.texi: Ditto.
22327         * doc/gcc.texi: Ditto.
22328         * doc/gccint.texi: Ditto.
22329         * doc/gcov.texi: Ditto.
22330         * doc/install.texi: Ditto.
22331         * doc/invoke.texi: Ditto.
22333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22335         * vector-builder.h (vector_builder::m_full_nelts): Change from
22336         unsigned int to poly_uint64.
22337         (vector_builder::full_nelts): Update prototype accordingly.
22338         (vector_builder::new_vector): Likewise.
22339         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22340         (vector_builder::operator ==): Likewise.
22341         (vector_builder::finalize): Likewise.
22342         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22343         Take the number of elements as a poly_uint64 rather than an
22344         unsigned int.
22345         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22346         from unsigned int to poly_uint64.
22347         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22348         (vec_perm_indices::new_vector): Likewise.
22349         (vec_perm_indices::length): Likewise.
22350         (vec_perm_indices::nelts_per_input): Likewise.
22351         (vec_perm_indices::input_nelts): Likewise.
22352         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22353         number of elements per input as a poly_uint64 rather than an
22354         unsigned int.  Use the original encoding for variable-length
22355         vectors, rather than clamping each individual element.
22356         For the second and subsequent elements in each pattern,
22357         clamp the step and base before clamping their sum.
22358         (vec_perm_indices::series_p): Handle polynomial element counts.
22359         (vec_perm_indices::all_in_range_p): Likewise.
22360         (vec_perm_indices_to_tree): Likewise.
22361         (vec_perm_indices_to_rtx): Likewise.
22362         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22363         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22364         (tree_vector_builder::new_binary_operation): Handle polynomial
22365         element counts.  Return false if we need to know the number
22366         of elements at compile time.
22367         * fold-const.c (fold_vec_perm): Punt if the number of elements
22368         isn't known at compile time.
22370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22372         * vec-perm-indices.h (vec_perm_builder): Change element type
22373         from HOST_WIDE_INT to poly_int64.
22374         (vec_perm_indices::element_type): Update accordingly.
22375         (vec_perm_indices::clamp): Handle polynomial element_types.
22376         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22377         (vec_perm_indices::all_in_range_p): Likewise.
22378         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22379         than shwi trees.
22380         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22381         polynomial vec_perm_indices element types.
22382         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22383         * fold-const.c (fold_vec_perm): Likewise.
22384         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22385         * tree-vect-generic.c (lower_vec_perm): Likewise.
22386         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22387         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22388         element type to HOST_WIDE_INT.
22390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22391             Alan Hayward  <alan.hayward@arm.com>
22392             David Sherwood  <david.sherwood@arm.com>
22394         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22395         rather than an int.  Use plus_constant.
22396         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22397         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22400             Alan Hayward  <alan.hayward@arm.com>
22401             David Sherwood  <david.sherwood@arm.com>
22403         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22404         a HOST_WIDE_INT to a poly_int64.
22406 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22407             Alan Hayward  <alan.hayward@arm.com>
22408             David Sherwood  <david.sherwood@arm.com>
22410         * calls.c (load_register_parameters): Cope with polynomial
22411         mode sizes.  Require a constant size for BLKmode parameters
22412         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22413         forces a parameter to be padded at the lsb end in order to
22414         fill a complete number of words, require the parameter size
22415         to be ordered wrt UNITS_PER_WORD.
22417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22418             Alan Hayward  <alan.hayward@arm.com>
22419             David Sherwood  <david.sherwood@arm.com>
22421         * reload1.c (spill_stack_slot_width): Change element type
22422         from unsigned int to poly_uint64_pod.
22423         (alter_reg): Treat mode sizes as polynomial.
22425 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22426             Alan Hayward  <alan.hayward@arm.com>
22427             David Sherwood  <david.sherwood@arm.com>
22429         * reload.c (complex_word_subreg_p): New function.
22430         (reload_inner_reg_of_subreg, push_reload): Use it.
22432 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22433             Alan Hayward  <alan.hayward@arm.com>
22434             David Sherwood  <david.sherwood@arm.com>
22436         * lra-constraints.c (process_alt_operands): Reject matched
22437         operands whose sizes aren't ordered.
22438         (match_reload): Refer to this check here.
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         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22445         that the mode size is in the set {1, 2, 4, 8, 16}.
22447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22448             Alan Hayward  <alan.hayward@arm.com>
22449             David Sherwood  <david.sherwood@arm.com>
22451         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22452         Use plus_constant instead of gen_rtx_PLUS.
22454 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22455             Alan Hayward  <alan.hayward@arm.com>
22456             David Sherwood  <david.sherwood@arm.com>
22458         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22459         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22460         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22461         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22462         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22463         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22464         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22465         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22466         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22467         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22468         a poly_int64.
22469         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22470         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22471         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22472         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22473         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22474         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22475         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22476         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22477         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22478         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22479         function.
22480         * expr.c (emit_move_resolve_push): Treat the input and result
22481         of PUSH_ROUNDING as a poly_int64.
22482         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22483         (emit_push_insn): Likewise.
22484         * lra-eliminations.c (mark_not_eliminable): Likewise.
22485         * recog.c (push_operand): Likewise.
22486         * reload1.c (elimination_effects): Likewise.
22487         * rtlanal.c (nonzero_bits1): Likewise.
22488         * calls.c (store_one_arg): Likewise.  Require the padding to be
22489         known at compile time.
22491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22492             Alan Hayward  <alan.hayward@arm.com>
22493             David Sherwood  <david.sherwood@arm.com>
22495         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22496         Use plus_constant instead of gen_rtx_PLUS.
22498 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22499             Alan Hayward  <alan.hayward@arm.com>
22500             David Sherwood  <david.sherwood@arm.com>
22502         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22503         rather than an int.
22505 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22506             Alan Hayward  <alan.hayward@arm.com>
22507             David Sherwood  <david.sherwood@arm.com>
22509         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22510         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22511         via stack temporaries.  Treat the mode size as polynomial too.
22513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22514             Alan Hayward  <alan.hayward@arm.com>
22515             David Sherwood  <david.sherwood@arm.com>
22517         * expr.c (expand_expr_real_2): When handling conversions involving
22518         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22519         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22520         as a poly_uint64 too.
22522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22523             Alan Hayward  <alan.hayward@arm.com>
22524             David Sherwood  <david.sherwood@arm.com>
22526         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22529             Alan Hayward  <alan.hayward@arm.com>
22530             David Sherwood  <david.sherwood@arm.com>
22532         * combine.c (can_change_dest_mode): Handle polynomial
22533         REGMODE_NATURAL_SIZE.
22534         * expmed.c (store_bit_field_1): Likewise.
22535         * expr.c (store_constructor): Likewise.
22536         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22537         and polynomial REGMODE_NATURAL_SIZE.
22538         (gen_lowpart_common): Likewise.
22539         * reginfo.c (record_subregs_of_mode): Likewise.
22540         * rtlanal.c (read_modify_subreg_p): Likewise.
22542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22543             Alan Hayward  <alan.hayward@arm.com>
22544             David Sherwood  <david.sherwood@arm.com>
22546         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22547         numbers of elements.
22549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22550             Alan Hayward  <alan.hayward@arm.com>
22551             David Sherwood  <david.sherwood@arm.com>
22553         * match.pd: Cope with polynomial numbers of vector elements.
22555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22556             Alan Hayward  <alan.hayward@arm.com>
22557             David Sherwood  <david.sherwood@arm.com>
22559         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22560         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
22567         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22568         (ipa_simd_modify_function_body): Likewise.
22570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22571             Alan Hayward  <alan.hayward@arm.com>
22572             David Sherwood  <david.sherwood@arm.com>
22574         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22575         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22576         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22577         (expand_vector_condition, vector_element): Likewise.
22578         (subparts_gt): New function.
22579         (get_compute_type): Use subparts_gt.
22580         (count_type_subparts): Delete.
22581         (expand_vector_operations_1): Use subparts_gt instead of
22582         count_type_subparts.
22584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22585             Alan Hayward  <alan.hayward@arm.com>
22586             David Sherwood  <david.sherwood@arm.com>
22588         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22589         (vect_compile_time_alias): ...this new function.  Do the calculation
22590         on poly_ints rather than trees.
22591         (vect_prune_runtime_alias_test_list): Update call accordingly.
22593 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22594             Alan Hayward  <alan.hayward@arm.com>
22595             David Sherwood  <david.sherwood@arm.com>
22597         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22598         numbers of units.
22599         (vect_schedule_slp_instance): Likewise.
22601 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22602             Alan Hayward  <alan.hayward@arm.com>
22603             David Sherwood  <david.sherwood@arm.com>
22605         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22606         constant and extern definitions for variable-length vectors.
22607         (vect_get_constant_vectors): Note that the number of units
22608         is known to be constant.
22610 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22611             Alan Hayward  <alan.hayward@arm.com>
22612             David Sherwood  <david.sherwood@arm.com>
22614         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22615         of units as polynomial.  Choose between WIDE and NARROW based
22616         on multiple_p.
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-stmts.c (simd_clone_subparts): New function.
22623         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22626             Alan Hayward  <alan.hayward@arm.com>
22627             David Sherwood  <david.sherwood@arm.com>
22629         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22630         vectors as polynomial.  Use build_index_vector for
22631         IFN_GOMP_SIMD_LANE.
22633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22634             Alan Hayward  <alan.hayward@arm.com>
22635             David Sherwood  <david.sherwood@arm.com>
22637         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22638         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22639         for variable-length vectors.
22640         (vectorizable_mask_load_store): Treat the number of units as
22641         polynomial, asserting that it is constant if the condition has
22642         already been enforced.
22643         (vectorizable_store, vectorizable_load): Likewise.
22645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22646             Alan Hayward  <alan.hayward@arm.com>
22647             David Sherwood  <david.sherwood@arm.com>
22649         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22650         of units as polynomial.  Punt if we can't tell at compile time
22651         which vector contains the final result.
22653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22654             Alan Hayward  <alan.hayward@arm.com>
22655             David Sherwood  <david.sherwood@arm.com>
22657         * tree-vect-loop.c (vectorizable_induction): Treat the number
22658         of units as polynomial.  Punt on SLP inductions.  Use an integer
22659         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22660         cast of such a series for variable-length floating-point
22661         reductions.
22663 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22664             Alan Hayward  <alan.hayward@arm.com>
22665             David Sherwood  <david.sherwood@arm.com>
22667         * tree.h (build_index_vector): Declare.
22668         * tree.c (build_index_vector): New function.
22669         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22670         of units as polynomial, forcibly converting it to a constant if
22671         vectorizable_reduction has already enforced the condition.
22672         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22673         to create a {1,2,3,...} vector.
22674         (vectorizable_reduction): Treat the number of units as polynomial.
22675         Choose vectype_in based on the largest scalar element size rather
22676         than the smallest number of units.  Enforce the restrictions
22677         relied on above.
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-data-refs.c (vector_alignment_reachable_p): Treat the
22684         number of units as polynomial.
22686 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22687             Alan Hayward  <alan.hayward@arm.com>
22688             David Sherwood  <david.sherwood@arm.com>
22690         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22691         * target.def (autovectorize_vector_sizes): Return the vector sizes
22692         by pointer, using vector_sizes rather than a bitmask.
22693         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22694         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22695         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22696         Likewise.
22697         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22698         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22699         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22700         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22701         * omp-general.c (omp_max_vf): Likewise.
22702         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22703         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22704         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22705         * tree-vect-slp.c (vect_slp_bb): Likewise.
22706         * doc/tm.texi: Regenerate.
22707         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22708         to a poly_uint64.
22709         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22710         the vector size as a poly_uint64 rather than an unsigned int.
22711         (current_vector_size): Change from an unsigned int to a poly_uint64.
22712         (get_vectype_for_scalar_type): Update accordingly.
22713         * tree.h (build_truth_vector_type): Take the size and number of
22714         units as a poly_uint64 rather than an unsigned int.
22715         (build_vector_type): Add a temporary overload that takes
22716         the number of units as a poly_uint64 rather than an unsigned int.
22717         * tree.c (make_vector_type): Likewise.
22718         (build_truth_vector_type): Take the number of units as a poly_uint64
22719         rather than an unsigned int.
22721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22722             Alan Hayward  <alan.hayward@arm.com>
22723             David Sherwood  <david.sherwood@arm.com>
22725         * target.def (get_mask_mode): Take the number of units and length
22726         as poly_uint64s rather than unsigned ints.
22727         * targhooks.h (default_get_mask_mode): Update accordingly.
22728         * targhooks.c (default_get_mask_mode): Likewise.
22729         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22730         * doc/tm.texi: Regenerate.
22732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22733             Alan Hayward  <alan.hayward@arm.com>
22734             David Sherwood  <david.sherwood@arm.com>
22736         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22737         * omp-general.c (omp_max_vf): Likewise.
22738         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22739         (expand_omp_simd): Handle polynomial safelen.
22740         * omp-low.c (omplow_simd_context): Add a default constructor.
22741         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22742         (lower_rec_simd_input_clauses): Update accordingly.
22743         (lower_rec_input_clauses): Likewise.
22745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22746             Alan Hayward  <alan.hayward@arm.com>
22747             David Sherwood  <david.sherwood@arm.com>
22749         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22750         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22751         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22752         (vect_analyze_slp_cost): Likewise.
22753         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22754         (vect_model_load_cost): Likewise.
22756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22757             Alan Hayward  <alan.hayward@arm.com>
22758             David Sherwood  <david.sherwood@arm.com>
22760         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22761         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22762         from an unsigned int * to a poly_uint64_pod *.
22763         (calculate_unrolling_factor): New function.
22764         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22766 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22767             Alan Hayward  <alan.hayward@arm.com>
22768             David Sherwood  <david.sherwood@arm.com>
22770         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22771         from an unsigned int to a poly_uint64.
22772         (_loop_vec_info::slp_unrolling_factor): Likewise.
22773         (_loop_vec_info::vectorization_factor): Change from an int
22774         to a poly_uint64.
22775         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22776         (vect_get_num_vectors): New function.
22777         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22778         (vect_get_num_copies): Use vect_get_num_vectors.
22779         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22780         to an unsigned int *.
22781         (vect_analyze_data_refs): Change min_vf from an int * to a
22782         poly_uint64 *.
22783         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22784         than an unsigned HOST_WIDE_INT.
22785         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22786         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22787         to an unsigned int *.
22788         (vect_analyze_data_ref_dependences): Likewise.
22789         (vect_compute_data_ref_alignment): Handle polynomial vf.
22790         (vect_enhance_data_refs_alignment): Likewise.
22791         (vect_prune_runtime_alias_test_list): Likewise.
22792         (vect_shift_permute_load_chain): Likewise.
22793         (vect_supportable_dr_alignment): Likewise.
22794         (dependence_distance_ge_vf): Take the vectorization factor as a
22795         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22796         (vect_analyze_data_refs): Change min_vf from an int * to a
22797         poly_uint64 *.
22798         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22799         vfm1 as a poly_uint64 rather than an int.  Make the same change
22800         for the returned bound_scalar.
22801         (vect_gen_vector_loop_niters): Handle polynomial vf.
22802         (vect_do_peeling): Likewise.  Update call to
22803         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22804         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22805         be constant.
22806         * tree-vect-loop.c (vect_determine_vectorization_factor)
22807         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22808         (vect_get_known_peeling_cost): Likewise.
22809         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22810         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22811         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22812         updating the upper bounds of the loop.
22813         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22814         rather than an int.
22815         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22816         polynomial unroll factors.
22817         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22818         (vect_make_slp_decision): Likewise.
22819         (vect_supported_load_permutation_p): Likewise, and polynomial
22820         vf too.
22821         (vect_analyze_slp_cost): Handle polynomial vf.
22822         (vect_slp_analyze_node_operations): Likewise.
22823         (vect_slp_analyze_bb_1): Likewise.
22824         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22825         than an unsigned HOST_WIDE_INT.
22826         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22827         (vectorizable_load): Handle polynomial vf.
22828         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22829         a poly_uint64.
22830         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22833             Alan Hayward  <alan.hayward@arm.com>
22834             David Sherwood  <david.sherwood@arm.com>
22836         * match.pd: Handle bit operations involving three constants
22837         and try to fold one pair.
22839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22841         * tree-vect-loop-manip.c: Include gimple-fold.h.
22842         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22843         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22844         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22845         Add a path that uses a step of VF instead of 1, but disable it
22846         for now.
22847         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22848         and niters_no_overflow parameters.  Update calls to
22849         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22850         Create a new SSA name if the latter choses to use a ste other
22851         than zero, and return it via niters_vector_mult_vf_var.
22852         * tree-vect-loop.c (vect_transform_loop): Update calls to
22853         vect_do_peeling, vect_gen_vector_loop_niters and
22854         slpeel_make_loop_iterate_ntimes.
22855         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22856         (vect_gen_vector_loop_niters): Update declarations after above changes.
22858 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22860         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22861         128-bit round to integer instructions.
22862         (ceil<mode>2): Likewise.
22863         (btrunc<mode>2): Likewise.
22864         (round<mode>2): Likewise.
22866 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22868         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22869         unaligned VSX load/store on P8/P9.
22870         (expand_block_clear): Allow the use of unaligned VSX
22871         load/store on P8/P9.
22873 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22875         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22876         New function.
22877         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22878         swap associated with both a load and a store.
22880 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22882         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22883         * config/riscv/riscv.md (clear_cache): Use it.
22885 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22887         * web.c: Remove out-of-date comment.
22889 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22891         * expr.c (fixup_args_size_notes): Check that any existing
22892         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22893         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22894         (emit_single_push_insn): ...here.
22896 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22898         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22899         (const_vector_encoded_nelts): New function.
22900         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22901         (const_vector_int_elt, const_vector_elt): Declare.
22902         * emit-rtl.c (const_vector_int_elt_1): New function.
22903         (const_vector_elt): Likewise.
22904         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22905         of CONST_VECTOR_ELT.
22907 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22909         * expr.c: Include rtx-vector-builder.h.
22910         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22911         directly on the tree encoding.
22912         (const_vector_from_tree): Likewise.
22913         * optabs.c: Include rtx-vector-builder.h.
22914         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22915         sequence of "u" values.
22916         * vec-perm-indices.c: Include rtx-vector-builder.h.
22917         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22918         directly on the vec_perm_indices encoding.
22920 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22922         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22923         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22924         * rtx-vector-builder.h: New file.
22925         * rtx-vector-builder.c: Likewise.
22926         * rtl.h (rtx_def::u2): Add a const_vector field.
22927         (CONST_VECTOR_NPATTERNS): New macro.
22928         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22929         (CONST_VECTOR_DUPLICATE_P): Likewise.
22930         (CONST_VECTOR_STEPPED_P): Likewise.
22931         (CONST_VECTOR_ENCODED_ELT): Likewise.
22932         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22933         (unwrap_const_vec_duplicate): Likewise.
22934         (const_vec_series_p): Check for a non-duplicated vector encoding.
22935         Say that the function only returns true for integer vectors.
22936         * emit-rtl.c: Include rtx-vector-builder.h.
22937         (gen_const_vec_duplicate_1): Delete.
22938         (gen_const_vector): Call gen_const_vec_duplicate instead of
22939         gen_const_vec_duplicate_1.
22940         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22941         (gen_const_vec_duplicate): Use rtx_vector_builder.
22942         (gen_const_vec_series): Likewise.
22943         (gen_rtx_CONST_VECTOR): Likewise.
22944         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22945         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22946         Build a new vector rather than modifying a CONST_VECTOR in-place.
22947         (handle_special_swappables): Update call accordingly.
22948         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22949         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22950         Build a new vector rather than modifying a CONST_VECTOR in-place.
22951         (handle_special_swappables): Update call accordingly.
22953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22955         * simplify-rtx.c (simplify_const_binary_operation): Use
22956         CONST_VECTOR_ELT instead of XVECEXP.
22958 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22960         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22961         the selector elements to be different from the data elements
22962         if the selector is a VECTOR_CST.
22963         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22964         ssizetype for the selector.
22966 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22968         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22969         before testing each element individually.
22970         * tree-vect-generic.c (lower_vec_perm): Likewise.
22972 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22974         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22975         * selftest-run-tests.c (selftest::run_tests): Call it.
22976         * vector-builder.h (vector_builder::operator ==): New function.
22977         (vector_builder::operator !=): Likewise.
22978         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22979         (vec_perm_indices::all_from_input_p): New function.
22980         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22981         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22982         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22983         instead of reading the VECTOR_CST directly.  Detect whether both
22984         vector inputs are the same before constructing the vec_perm_indices,
22985         and update the number of inputs argument accordingly.  Use the
22986         utility functions added above.  Only construct sel2 if we need to.
22988 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22990         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22991         the broadcast of the low byte.
22992         (expand_mult_highpart): Use an explicit encoding for the permutes.
22993         * optabs-query.c (can_mult_highpart_p): Likewise.
22994         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22995         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22996         (vectorizable_bswap): Likewise.
22997         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22998         explicit encoding for the power-of-2 permutes.
22999         (vect_permute_store_chain): Likewise.
23000         (vect_grouped_load_supported): Likewise.
23001         (vect_permute_load_chain): Likewise.
23003 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23005         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23006         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23007         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23008         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23009         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23010         (vect_gen_perm_mask_any): Likewise.
23012 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23014         * int-vector-builder.h: New file.
23015         * vec-perm-indices.h: Include int-vector-builder.h.
23016         (vec_perm_indices): Redefine as an int_vector_builder.
23017         (auto_vec_perm_indices): Delete.
23018         (vec_perm_builder): Redefine as a stand-alone class.
23019         (vec_perm_indices::vec_perm_indices): New function.
23020         (vec_perm_indices::clamp): Likewise.
23021         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23022         (vec_perm_indices::new_vector): New function.
23023         (vec_perm_indices::new_expanded_vector): Update for new
23024         vec_perm_indices class.
23025         (vec_perm_indices::rotate_inputs): New function.
23026         (vec_perm_indices::all_in_range_p): Operate directly on the
23027         encoded form, without computing elided elements.
23028         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23029         encoding.  Update for new vec_perm_indices class.
23030         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23031         the given vec_perm_builder.
23032         (expand_vec_perm_var): Update vec_perm_builder constructor.
23033         (expand_mult_highpart): Use vec_perm_builder instead of
23034         auto_vec_perm_indices.
23035         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23036         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23037         or double series encoding as appropriate.
23038         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23039         vec_perm_indices instead of auto_vec_perm_indices.
23040         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23041         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23042         (vect_permute_store_chain): Likewise.
23043         (vect_grouped_load_supported): Likewise.
23044         (vect_permute_load_chain): Likewise.
23045         (vect_shift_permute_load_chain): Likewise.
23046         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23047         (vect_transform_slp_perm_load): Likewise.
23048         (vect_schedule_slp_instance): Likewise.
23049         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23050         (vectorizable_mask_load_store): Likewise.
23051         (vectorizable_bswap): Likewise.
23052         (vectorizable_store): Likewise.
23053         (vectorizable_load): Likewise.
23054         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23055         vec_perm_indices instead of auto_vec_perm_indices.  Use
23056         tree_to_vec_perm_builder to read the vector from a tree.
23057         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23058         vec_perm_builder instead of a vec_perm_indices.
23059         (have_whole_vector_shift): Use vec_perm_builder and
23060         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23061         truncation to calc_vec_perm_mask_for_shift.
23062         (vect_create_epilog_for_reduction): Likewise.
23063         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23064         from auto_vec_perm_indices to vec_perm_indices.
23065         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23066         instead of changing individual elements.
23067         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23068         the vector in d.perm.
23069         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23070         from auto_vec_perm_indices to vec_perm_indices.
23071         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23072         instead of changing individual elements.
23073         (arm_vectorize_vec_perm_const): Use new_vector to install
23074         the vector in d.perm.
23075         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23076         Update vec_perm_builder constructor.
23077         (rs6000_expand_interleave): Likewise.
23078         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23079         (rs6000_expand_interleave): Likewise.
23081 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23083         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23084         to qimode could truncate the indices.
23085         * optabs.c (expand_vec_perm_var): Likewise.
23087 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23089         * Makefile.in (OBJS): Add vec-perm-indices.o.
23090         * vec-perm-indices.h: New file.
23091         * vec-perm-indices.c: Likewise.
23092         * target.h (vec_perm_indices): Replace with a forward class
23093         declaration.
23094         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23095         * optabs.h: Include vec-perm-indices.h.
23096         (expand_vec_perm): Delete.
23097         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23098         (expand_vec_perm_const): Declare.
23099         * target.def (vec_perm_const_ok): Replace with...
23100         (vec_perm_const): ...this new hook.
23101         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23102         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23103         * doc/tm.texi: Regenerate.
23104         * optabs.def (vec_perm_const): Delete.
23105         * doc/md.texi (vec_perm_const): Likewise.
23106         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23107         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23108         expand_vec_perm for constant permutation vectors.  Assert that
23109         the mode of variable permutation vectors is the integer equivalent
23110         of the mode that is being permuted.
23111         * optabs-query.h (selector_fits_mode_p): Declare.
23112         * optabs-query.c: Include vec-perm-indices.h.
23113         (selector_fits_mode_p): New function.
23114         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23115         is defined, instead of checking whether the vec_perm_const_optab
23116         exists.  Use targetm.vectorize.vec_perm_const instead of
23117         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23118         fit in the vector mode before using a variable permute.
23119         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23120         vec_perm_indices instead of an rtx.
23121         (expand_vec_perm): Replace with...
23122         (expand_vec_perm_const): ...this new function.  Take the selector
23123         as a vec_perm_indices rather than an rtx.  Also take the mode of
23124         the selector.  Update call to shift_amt_for_vec_perm_mask.
23125         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23126         Use vec_perm_indices::new_expanded_vector to expand the original
23127         selector into bytes.  Check whether the indices fit in the vector
23128         mode before using a variable permute.
23129         (expand_vec_perm_var): Make global.
23130         (expand_mult_highpart): Use expand_vec_perm_const.
23131         * fold-const.c: Includes vec-perm-indices.h.
23132         * tree-ssa-forwprop.c: Likewise.
23133         * tree-vect-data-refs.c: Likewise.
23134         * tree-vect-generic.c: Likewise.
23135         * tree-vect-loop.c: Likewise.
23136         * tree-vect-slp.c: Likewise.
23137         * tree-vect-stmts.c: Likewise.
23138         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23139         Delete.
23140         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23141         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23142         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23143         (aarch64_vectorize_vec_perm_const): ...this new function.
23144         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23145         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23146         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23147         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23148         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23149         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23150         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23151         into...
23152         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23153         check for NEON modes.
23154         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23155         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23156         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23157         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23158         into...
23159         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23160         the old VEC_PERM_CONST conditions.
23161         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23162         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23163         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23164         (ia64_vectorize_vec_perm_const_ok): Merge into...
23165         (ia64_vectorize_vec_perm_const): ...this new function.
23166         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23167         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23168         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23169         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23170         * config/mips/mips.c (mips_expand_vec_perm_const)
23171         (mips_vectorize_vec_perm_const_ok): Merge into...
23172         (mips_vectorize_vec_perm_const): ...this new function.
23173         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23174         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23175         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23176         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23177         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23178         (rs6000_expand_vec_perm_const): Delete.
23179         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23180         Delete.
23181         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23182         (altivec_expand_vec_perm_const_le): Take each operand individually.
23183         Operate on constant selectors rather than rtxes.
23184         (altivec_expand_vec_perm_const): Likewise.  Update call to
23185         altivec_expand_vec_perm_const_le.
23186         (rs6000_expand_vec_perm_const): Delete.
23187         (rs6000_vectorize_vec_perm_const_ok): Delete.
23188         (rs6000_vectorize_vec_perm_const): New function.
23189         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23190         an element count and rtx array.
23191         (rs6000_expand_extract_even): Update call accordingly.
23192         (rs6000_expand_interleave): Likewise.
23193         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23194         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23195         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23196         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23197         (rs6000_expand_vec_perm_const): Delete.
23198         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23199         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23200         (altivec_expand_vec_perm_const_le): Take each operand individually.
23201         Operate on constant selectors rather than rtxes.
23202         (altivec_expand_vec_perm_const): Likewise.  Update call to
23203         altivec_expand_vec_perm_const_le.
23204         (rs6000_expand_vec_perm_const): Delete.
23205         (rs6000_vectorize_vec_perm_const_ok): Delete.
23206         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23207         reference to the SPE evmerge intructions.
23208         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23209         an element count and rtx array.
23210         (rs6000_expand_extract_even): Update call accordingly.
23211         (rs6000_expand_interleave): Likewise.
23212         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23213         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23214         new function.
23215         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23217 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23219         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23220         vector mode and that that mode matches the mode of the data
23221         being permuted.
23222         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23223         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23224         directly using expand_vec_perm_1 when forcing selectors into
23225         registers.
23226         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23228 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23230         * optabs-query.h (can_vec_perm_p): Delete.
23231         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23232         * optabs-query.c (can_vec_perm_p): Split into...
23233         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23234         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23235         particular selector is valid.
23236         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23237         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23238         (vect_grouped_load_supported): Likewise.
23239         (vect_shift_permute_load_chain): Likewise.
23240         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23241         (vect_transform_slp_perm_load): Likewise.
23242         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23243         (vectorizable_bswap): Likewise.
23244         (vect_gen_perm_mask_checked): Likewise.
23245         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23246         implementations of variable permutation vectors into account
23247         when deciding which selector to use.
23248         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23249         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23250         with a false third argument.
23251         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23252         to test whether the constant selector is valid and can_vec_perm_var_p
23253         to test whether a variable selector is valid.
23255 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23257         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23258         * optabs-query.c (can_vec_perm_p): Likewise.
23259         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23260         instead of vec_perm_indices.
23261         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23262         (vect_gen_perm_mask_checked): Likewise,
23263         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23264         (vect_gen_perm_mask_checked): Likewise,
23266 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23268         * optabs-query.h (qimode_for_vec_perm): Declare.
23269         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23270         (qimode_for_vec_perm): ...this new function.
23271         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23273 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23275         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23276         does not have a conditional at the top.
23278 2018-01-02  Richard Biener  <rguenther@suse.de>
23280         * ipa-inline.c (big_speedup_p): Fix expression.
23282 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23284         PR target/81616
23285         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23286         for generic 4->6.
23288 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23290         PR target/81616
23291         Generic tuning.
23292         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23293         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23294         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23295         cond_taken_branch_cost 3->4.
23297 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23299         PR tree-optimization/83581
23300         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23301         TODO_cleanup_cfg if any changes have been made.
23303         PR middle-end/83608
23304         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23305         convert_modes if target mode has the right side, but different mode
23306         class.
23308         PR middle-end/83609
23309         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23310         last argument when extracting from CONCAT.  If either from_real or
23311         from_imag is NULL, use expansion through memory.  If result is not
23312         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23313         the parts directly to inner mode, if even that fails, use expansion
23314         through memory.
23316         PR middle-end/83623
23317         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23318         check for bswap in mode rather than HImode and use that in expand_unop
23319         too.
23321 Copyright (C) 2018 Free Software Foundation, Inc.
23323 Copying and distribution of this file, with or without modification,
23324 are permitted in any medium without royalty provided the copyright
23325 notice and this notice are preserved.