Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / ChangeLog
blob62969666e092a783d8e5415b2dea911df4658ce5
1 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
7         * doc/rtl.texi: Replace old RTX class names with new names.
10 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
12         * expmed.h (canonicalize_comparison): New declaration.
13         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
14         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
15         * optabs.c (prepare_cmp_insn): Likewise.
16         * rtl.h (unsigned_condition_p): New function which checks if a
17         comparison operator is unsigned.
19 2018-08-16  Nathan Sidwell  <nathan@acm.org>
21         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
22         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
24 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
26         PR target/84711
27         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
28         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
29         (mov<mov>): ..this and enable unconditionally.
31 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
33         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
35 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
37         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
38         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
39         "Common" with "Target".
41 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
43         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
44         * doc/invoke.texi (mmitigate-rop): Remove.
45         * config/i386/i386.c: Do not include "regrename.h".
46         (ix86_rop_should_change_byte_p, reg_encoded_number)
47         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
48         Remove.
49         (ix86_reorg): Remove call to ix86_mitigate_rop.
50         * config/i386/i386.md (attr "modrm_class"): Remove.
51         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
52         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
53         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
55 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
57         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
58         allow folding of mergeh() and mergel() for the float and double types.
59         (fold_mergehl_helper): Rework to handle building a permute tree
60         for float vectors.
62 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
64         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
65         for TARGET_SSE.
67 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
69         * common.opt (fdiagnostics-show-labels): New option.
70         * diagnostic-show-locus.c (class layout_range): Add field
71         "m_label".
72         (class layout): Add field "m_show_labels_p".
73         (layout_range::layout_range): Add param "label" and use it to
74         initialize m_label.
75         (make_range): Pass in NULL for new "label" param of layout_range's
76         ctor.
77         (layout::layout): Initialize m_show_labels_p.
78         (layout::maybe_add_location_range): Pass in loc_range->m_label
79         when constructing layout_range instances.
80         (struct line_label): New struct.
81         (layout::print_any_labels): New member function.
82         (layout::print_line): Call it if label-printing is enabled.
83         (selftest::test_one_liner_labels): New test.
84         (selftest::test_diagnostic_show_locus_one_liner): Call it.
85         * diagnostic.c (diagnostic_initialize): Initialize
86         context->show_labels_p.
87         * diagnostic.h (struct diagnostic_context): Add field
88         "show_labels_p".
89         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
90         -fno-diagnostics-show-labels.
91         * dwarf2out.c (gen_producer_string): Add
92         OPT_fdiagnostics_show_labels to the ignored options.
93         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
94         param.
95         (gcc_rich_location::maybe_add_expr): Likewise.
96         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
97         label" param, defaulting to NULL.
98         (gcc_rich_location::add_expr): Add "label" param.
99         (gcc_rich_location::maybe_add_expr): Likewise.
100         (class text_range_label): New class.
101         (class range_label_for_type_mismatch): New class.
102         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
103         of format_warning_va.
104         (fmtwarn_n): Likewise for new params of format_warning_n_va.
105         * lto-wrapper.c (merge_and_complain): Add
106         OPT_fdiagnostics_show_labels to the "pick one setting" options.
107         (append_compiler_options): Likewise to the dropped options.
108         (append_diag_options): Likewise to the passed-on options.
109         * opts.c (common_handle_option): Handle the new option.
110         * selftest-diagnostic.c
111         (test_diagnostic_context::test_diagnostic_context): Enable
112         show_labels_p.
113         * substring-locations.c: Include "gcc-rich-location.h".
114         (format_warning_n_va): Add "fmt_label" and "param_label" params
115         and use them as appropriate.
116         (format_warning_va): Add "fmt_label" and "param_label" params,
117         passing them on to format_warning_n_va.
118         (format_warning_at_substring): Likewise.
119         (format_warning_at_substring_n): Likewise.
120         * substring-locations.h (format_warning_va): Add "fmt_label" and
121         "param_label" params.
122         (format_warning_n_va): Likewise.
123         (format_warning_at_substring): Likewise.
124         (format_warning_at_substring_n): Likewise.
125         * toplev.c (general_init): Initialize global_dc->show_labels_p.
127 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
129         PR testsuite/86519
130         * builtins.c (expand_builtin_memcmp): Do not expand the call
131         when overflow is detected.
133 2018-08-15  Martin Sebor  <msebor@redhat.com>
135         PR tree-optimization/71625
136         * config/aarch64/aarch64-builtins.c
137         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
139 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
141         * config/s390/s390.c (s390_reorg): Remove loop.
143 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
145         * config/darwin.c
146          (darwin_function_switched_text_sections): Delete.
147         * gcc/config/darwin.h
148          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
150 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
152         PR target/81685
153         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
154         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
155         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
157 2018-08-15  Martin Liska  <mliska@suse.cz>
159         PR tree-optimization/86925
160         * predict.c (expr_expected_value_1): When taking
161         later predictor, assign also probability.
162         Use fold_build2_initializer_loc in order to fold
163         the expression in -frounding-math.
165 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
167         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
168         patterns.
169         (expand_vec_perm_1): Try the new method.
171 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
173         PR target/86547
174         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
175         Check whether lra_live_max_point is 0 before dividing.
177 2018-08-14  Martin Sebor  <msebor@redhat.com>
179         PR tree-optimization/86650
180         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
181         (vrp_prop::check_mem_ref): Same.
183 2018-08-13  Liu Hao <lh_mouse@126.com>
185         * pretty-print.c (eat_esc_sequence): Swap the foreground and
186         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
187         and clear it thereafter, as it only works for DBCS.
189 2018-08-13  Liu Hao <lh_mouse@126.com>
191         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
192         handle returned by _get_osf_handle().
194 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
196         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
197         for folding vec_perm.
199 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
201         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
202         Add support for gimple-folding of vec_pack() and vec_unpack()
203         intrinsics.
205 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
207         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
208         vec_xst variants to the list.
209         (rs6000_gimple_fold_builtin): Add support for folding unaligned
210         vector loads and stores.
212 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
214         * config.gcc (rs6000-ibm-aix4.x): Delete.
215         (rs6000-ibm-aix5.1): Delete.
216         (rs6000-ibm-aix5.2): Delete.
217         (rs6000-ibm-aix5.3): Delete.
218         * config/rs6000/aix43.h: Delete.
219         * config/rs6000/aix51.h: Delete.
220         * config/rs6000/aix52.h: Delete.
221         * config/rs6000/t-aix43: Delete.
223 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
225         * config/s390/s390.c (s390_decompose_constant_pool_ref):
226         New function.
227         (s390_decompose_address): Factor out constant pool ref
228         decomposition.
230 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
232         * config/nds32/nds32-predicates.c
233         (nds32_can_use_bclr_p): Change return type as bool.
234         (nds32_can_use_bset_p): Ditto.
235         (nds32_can_use_btgl_p): Ditto.
236         (nds32_can_use_bitci_p): Ditto.
237         * config/nds32/nds32-protos.h
238         (nds32_can_use_bclr_p): Change declaration.
239         (nds32_can_use_bset_p): Ditto.
240         (nds32_can_use_btgl_p): Ditto.
241         (nds32_can_use_bitci_p): Ditto.
243 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
245         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
246         Support -msched-prolog-epilog option.
247         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
249 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
251         * common/config/nds32/nds32-common.c
252         (nds32_option_optimization_table): Enalbe -malways-align.
254 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
256         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
257         extra_headers.
258         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
259         OPT_misr_secure_ case.
260         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
261         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
262         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
263         secure attribute.
264         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
265         (nds32_isr_info): New field security_level.
266         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
267         * config/nds32/nds32.md (return_internal): Consider critical attribute.
268         * config/nds32/nds32.opt (misr-secure): New option.
269         * config/nds32/nds32_init.inc: New file.
270         * config/nds32/nds32_isr.h: New file.
272 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
274         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
275         Update comment for atomic instructions.
276         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
277         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
278         Remove.
279         (atomic_loaddi): Revise fence expansion to only emit fence prior to
280         load for __ATOMIC_SEQ_CST model.
281         (atomic_loaddi_1): Remove float register target.
282         (atomic_storedi): Handle CONST_INT values.
283         (atomic_storedi_1): Remove float register source.  Add special case
284         for zero value.
285         (memory_barrier): New expander and insn.
287 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
289         PR tree-optimization/86835
290         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
291         new_stmt after def_gsi, make sure to insert new_square_stmt after
292         that stmt, not 2 stmts before it.
294 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
296         PR target/82418
297         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
298         instead of SWI48.
300 2018-08-10  Martin Liska  <mliska@suse.cz>
302         PR target/83610
303         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
304         function type.
305         * builtins.c (expand_builtin_expect_with_probability):
306         New function.
307         (expand_builtin_expect_with_probability): New function.
308         (build_builtin_expect_predicate): Add new argumnet probability
309         for BUILT_IN_EXPECT_WITH_PROBABILITY.
310         (fold_builtin_expect):
311         (fold_builtin_2):
312         (fold_builtin_3):
313         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
314         * builtins.h (fold_builtin_expect): Set new argument.
315         * doc/extend.texi: Document __builtin_expect_with_probability.
316         * doc/invoke.texi: Likewise.
317         * gimple-fold.c (gimple_fold_call): Pass new argument.
318         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
319         also BUILT_IN_EXPECT_WITH_PROBABILITY.
320         * predict.c (get_predictor_value): New function.
321         (expr_expected_value): Add new argument probability. Assume
322         that predictor and probability are always non-null.
323         (expr_expected_value_1): Likewise.  For __builtin_expect and
324         __builtin_expect_with_probability set probability.  Handle
325         combination in binary expressions.
326         (tree_predict_by_opcode): Simplify code by simply calling
327         get_predictor_value.
328         (pass_strip_predict_hints::execute): Add handling of
329         BUILT_IN_EXPECT_WITH_PROBABILITY.
330         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
331         new predictor.
332         * tree.h (DECL_BUILT_IN_P): New function.
334 2018-08-10  Martin Liska  <mliska@suse.cz>
336         PR tree-optimization/85799
337         * passes.def: Add argument for pass_strip_predict_hints.
338         * predict.c (class pass_strip_predict_hints): Add new argument
339         early_p.
340         (strip_predictor_early): New function.
341         (pass_strip_predict_hints::execute): Call the function to
342         strip predictors.
343         (strip_predict_hints): New function.
344         * predict.def: Fix comment.
346 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
348         * Makefile.in: Clarify which tm.texi to copy over to assert the
349         right to grant a GFDL license for all.
351 2018-08-09  Jeff Law  <law@redhat.com>
353         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
354         unused variable.
356 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
358         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
359         prototype.
361 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
363         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
364         reductions for variable-length vectors.
366 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
368         PR other/84889
369         * common.opt (fdiagnostics-show-line-numbers): New option.
370         * diagnostic-show-locus.c (class layout): Add fields
371         "m_show_line_numbers_p" and "m_linenum_width";
372         (num_digits): New function.
373         (test_num_digits): New function.
374         (layout::layout): Initialize new fields.  Update m_x_offset
375         logic to handle any left margin.
376         (layout::print_source_line): Print line number when requested.
377         (layout::start_annotation_line): New member function.
378         (layout::print_annotation_line): Call it.
379         (layout::print_leading_fixits): Likewise.
380         (layout::print_trailing_fixits): Likewise.  Update calls to
381         move_to_column for new parameter.
382         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
383         it to potentially call start_annotation_line.
384         (layout::show_ruler): Call start_annotation_line.
385         (selftest::test_line_numbers_multiline_range): New selftest.
386         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
387         and selftest::test_line_numbers_multiline_range.
388         * diagnostic.c (diagnostic_initialize): Initialize
389         show_line_numbers_p.
390         * diagnostic.h (struct diagnostic_context): Add field
391         "show_line_numbers_p".
392         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
393         -fno-diagnostics-show-line-numbers.
394         * dwarf2out.c (gen_producer_string): Add
395         OPT_fdiagnostics_show_line_numbers to the ignored options.
396         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
397         one setting" options.
398         (append_compiler_options): Likewise to the dropped options.
399         (append_diag_options): Likewise to the passed-on options.
400         * opts.c (common_handle_option): Handle the new option.
401         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
403 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
405         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
406         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
407         third argument of type "const signed char" to descriptions of
408         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
409         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
410         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
411         __builtin_bcdsub_ov functions.
413 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
415         PR tree-optimization/86858
416         * tree-vect-loop.c (vect_is_simple_reduction): Restore
417         flow_bb_inside_loop_p calls.
419 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
421         PR tree-optimization/86871
422         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
423         instead of gimple_assign_lhs.
425 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
427         PR target/86887
428         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
429         register constraint to operand 0.
430         (add<mode>3_carryinC): Likewise.
431         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
433 2018-08-09  Martin Liska  <mliska@suse.cz>
435         PR c/86895
436         * common.opt: Remove extra line.
438 2018-08-09  Martin Liska  <mliska@suse.cz>
440         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
441         at the end of a line, make first letter capital and end up
442         a sentence with a dot.
443         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
444         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
445         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
446         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
447         (PARAM_MAX_ISL_OPERATIONS): Likewise.
448         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
449         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
450         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
451         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
452         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
453         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
454         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
455         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
456         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
457         (PARAM_TREE_REASSOC_WIDTH): Likewise.
458         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
459         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
460         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
462 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
464         PR target/84332
465         * config/s390/s390.c (s390_option_override_internal): Reduce the
466         stack-clash-protection-probe-interval param if it would be too big
467         for z900.
469 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
471         PR target/46179
472         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
473         * config/m68k/m68k.c (handle_move_double): Don't call
474         m68k_final_prescan_insn.
475         (m68k_adjust_decorated_operand): Renamed from
476         m68k_final_prescan_insn, remove first and third operand and
477         simplify.
478         (print_operand): Call it.
479         (print_operand_address): Call it.
481 2018-08-08  Nathan Sidwell  <nathan@acm.org>
483         * diagnostic.c (diagnostic_report_current_module): Use
484         linemap_included_from & linemap_included_from_linemap.
486 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
488         * config/aarch64/aarch64-cores.def: Add phecda core.
489         * config/aarch64/aarch64-tune.md: Regenerate.
490         * doc/invoke.texi: Add phecda core.
492 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
494         PR target/85295
495         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
496         definitions.
497         * config/s390/s390.md ("movti"): Add more alternatives for
498         constant to GPR copies.
500 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
502         * config/s390/s390.c: Fix whitespace damage throughout the file.
503         * config/s390/s390.h: Likewise.
504         * config/s390/tpf.h: Likewise.
506 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
508         * config/s390/s390.c (s390_loadrelative_operand_p):
509         Remove TARGET_CPU_ZARCH usages.
510         (s390_rtx_costs): Likewise.
511         (s390_legitimate_constant_p): Likewise.
512         (s390_cannot_force_const_mem): Likewise.
513         (legitimate_reload_constant_p): Likewise.
514         (s390_preferred_reload_class): Likewise.
515         (legitimize_pic_address): Likewise.
516         (legitimize_tls_address): Likewise.
517         (s390_split_branches): Removed.
518         (s390_add_execute): Removed.
519         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
520         (s390_mainpool_start): Likewise.
521         (s390_mainpool_finish): Likewise.
522         (s390_mainpool_cancel): Removed.
523         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
524         (s390_chunkify_cancel): Likewise.
525         (s390_return_addr_rtx): Likewise.
526         (s390_register_info): Remove split_branches_pending_p uages.
527         (s390_optimize_register_info): Likewise.
528         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
529         split_branches_pending_p usages.
530         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
531         (s390_load_got): Likewise.
532         (s390_expand_split_stack_prologue): Likewise.
533         (output_asm_nops): Likewise.
534         (s390_function_profiler): Likewise.
535         (s390_emit_call): Likewise.
536         (s390_conditional_register_usage): Likewise.
537         (s390_optimize_prologue): Likewise.
538         (s390_reorg): Remove TARGET_CPU_ZARCH and
539         split_branches_pending_p usages.
540         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
541         usages.
542         (s390_output_indirect_thunk_function): Likewise.
543         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
544         (TARGET_CPU_ZARCH_P): Removed.
545         (struct machine_function): Remove split_branches_pending_p.
546         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
548 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
550         * common/config/s390/s390-common.c (processor_flags_table):
551         Remove flags.
552         * config.gcc: Remove with_arch/with_tune support.
553         * config/s390/2064.md: Remove cpu attribute comparisons.
554         * config/s390/driver-native.c (s390_host_detect_local_cpu):
555         Remove MTN.
556         * config/s390/linux.h (ASM_SPEC):
557         Remove -march support.
558         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
559         Use a table to get an arch level.
560         * config/s390/s390-opts.h (enum processor_type):
561         Remove enum values.
562         * config/s390/s390.c
563         (processor_table): Remove entries, add arch_level values.
564         (s390_issue_rate): Remove cases.
565         (s390_option_override): Adjust
566         s390_option_override_internal() call.
567         (s390_option_override_internal): Remove deprecation warning.
568         (s390_valid_target_attribute_tree): Adjust
569         s390_option_override_internal() call.
570         * config/s390/s390.h (struct s390_processor):
571         Share with s390-c.c, add arch_level field.
572         * config/s390/s390.md:
573         Remove occurrences in cpu attribute.
574         * config/s390/s390.opt: Remove -march/-mtune support.
575         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
576         * doc/invoke.texi: Remove deprecation warning.
578 2018-08-08  Luis Machado  <luis.machado@linaro.org>
580         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
581         global.
582         (qdf24xx_tunings): Set vector cost structure to
583         qdf24xx_vector_cost.
585         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
586         <register_sextend>: Set to 3.
588 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
590         PR target/86838
591         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
592         * config/aarch64/aarch64-simd.md
593         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
594         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
595         (aarch64_frecpx<mode>): ...this new pattern.
596         * config/aarch64/aarch64-simd-builtins.def: Remove comment
597         about aarch64_frecp<FRECP:frecp_suffix><mode>.
599 2018-08-07  Martin Liska  <mliska@suse.cz>
601         PR middle-end/83023
602         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
603         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
604         * predict.def (PRED_MALLOC_NONNULL): New predictor.
605         * doc/extend.texi: Document that malloc attribute adds
606         hit to compiler.
608 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
610         PR target/86785
611         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
612         Define to speculation_safe_value_not_needed.
614 2018-08-06  Jeff Law  <law@redhat.com>
616         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
617         the vr_values instance to cprop_into_stmt.
618         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
619         (cprop_operand): Also query EVRP to determine if OP is a constant.
621 2018-08-06  Nathan Sidwell  <nathan@acm.org>
623         * diagnostic.c (diagnostic_report_current_module): Reroll
624         included-at loop.  Translate text.
626 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
628         * function-tests.c (selftest::test_expansion_to_rtl): Call
629         free_after_compilation.
631 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
633         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
635 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
637         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
638         loops with memory block operations from getting unrolled.
640 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
642         PR target/86807
643         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
644         Define to speculation_safe_value_not_needed.
646 2018-08-06  Jeff Law  <law@redhat.com>
648         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
649         assert.
651 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
653         PR target/86662
654         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
655         with all enabled __intN types.
657         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
659 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
661         * alias.c (record_set): Check for clobber high.
662         * cfgexpand.c (expand_gimple_stmt): Likewise.
663         * combine-stack-adj.c (single_set_for_csa): Likewise.
664         * combine.c (find_single_use_1): Likewise.
665         (set_nonzero_bits_and_sign_copies): Likewise.
666         (get_combine_src_dest): Likewise.
667         (is_parallel_of_n_reg_sets): Likewise.
668         (try_combine): Likewise.
669         (record_dead_and_set_regs_1): Likewise.
670         (reg_dead_at_p_1): Likewise.
671         (reg_dead_at_p): Likewise.
672         * dce.c (deletable_insn_p): Likewise.
673         (mark_nonreg_stores_1): Likewise.
674         (mark_nonreg_stores_2): Likewise.
675         * df-scan.c (df_find_hard_reg_defs): Likewise.
676         (df_uses_record): Likewise.
677         (df_get_call_refs): Likewise.
678         * dwarf2out.c (mem_loc_descriptor): Likewise.
679         * haifa-sched.c (haifa_classify_rtx): Likewise.
680         * ira-build.c (create_insn_allocnos): Likewise.
681         * ira-costs.c (scan_one_insn): Likewise.
682         * ira.c (equiv_init_movable_p): Likewise.
683         (rtx_moveable_p): Likewise.
684         (interesting_dest_for_shprep): Likewise.
685         * jump.c (mark_jump_label_1): Likewise.
686         * postreload-gcse.c (record_opr_changes): Likewise.
687         * postreload.c (reload_cse_simplify): Likewise.
688         (struct reg_use): Add source expr.
689         (reload_combine): Check for clobber high.
690         (reload_combine_note_use): Likewise.
691         (reload_cse_move2add): Likewise.
692         (move2add_note_store): Likewise.
693         * print-rtl.c (print_pattern): Likewise.
694         * recog.c (decode_asm_operands): Likewise.
695         (store_data_bypass_p): Likewise.
696         (if_test_bypass_p): Likewise.
697         * regcprop.c (kill_clobbered_value): Likewise.
698         (kill_set_value): Likewise.
699         * reginfo.c (reg_scan_mark_refs): Likewise.
700         * reload1.c (maybe_fix_stack_asms): Likewise.
701         (eliminate_regs_1): Likewise.
702         (elimination_effects): Likewise.
703         (mark_not_eliminable): Likewise.
704         (scan_paradoxical_subregs): Likewise.
705         (forget_old_reloads_1): Likewise.
706         * reorg.c (find_end_label): Likewise.
707         (try_merge_delay_insns): Likewise.
708         (redundant_insn): Likewise.
709         (own_thread_p): Likewise.
710         (fill_simple_delay_slots): Likewise.
711         (fill_slots_from_thread): Likewise.
712         (dbr_schedule): Likewise.
713         * resource.c (update_live_status): Likewise.
714         (mark_referenced_resources): Likewise.
715         (mark_set_resources): Likewise.
716         * rtl.c (copy_rtx): Likewise.
717         * rtlanal.c (reg_referenced_p): Likewise.
718         (single_set_2): Likewise.
719         (noop_move_p): Likewise.
720         (note_stores): Likewise.
721         * sched-deps.c (sched_analyze_reg): Likewise.
722         (sched_analyze_insn): Likewise.
724 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
726         * cse.c (invalidate_reg): New function extracted from...
727         (invalidate): ...here.
728         (canonicalize_insn): Check for clobber high.
729         (invalidate_from_clobbers): invalidate clobber highs.
730         (invalidate_from_sets_and_clobbers): Likewise.
731         (count_reg_usage): Check for clobber high.
732         (insn_live_p): Likewise.
733         * cselib.c (cselib_expand_value_rtx_1):Likewise.
734         (cselib_invalidate_regno): Check for clobber in setter.
735         (cselib_invalidate_rtx): Pass through setter.
736         (cselib_invalidate_rtx_note_stores):
737         (cselib_process_insn): Check for clobber high.
738         * cselib.h (cselib_invalidate_rtx): Add operand.
740 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
742         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
743         (mark_not_eliminable): Likewise.
744         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
745         * lra-lives.c (process_bb_lives): Check for clobber high.
746         * lra.c (new_insn_reg): Remember clobber highs.
747         (collect_non_operand_hard_regs): Check for clobber high.
748         (lra_set_insn_recog_data): Likewise.
749         (add_regs_to_insn_regno_info): Likewise.
750         (lra_update_insn_regno_info): Likewise.
752 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
754         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
755         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
757 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
759         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
760         (copy_insn_1): Likewise.
761         (gen_hard_reg_clobber_high): New gen function.
762         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
763         * genemit.c (gen_exp): Likewise.
764         (gen_emit_seq): Pass through info.
765         (gen_insn): Check for CLOBBER_HIGH.
766         (gen_expand): Pass through info.
767         (gen_split): Likewise.
768         (output_add_clobbers): Likewise.
769         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
770         (remove_clobbers): Likewise.
771         * rtl.h (gen_hard_reg_clobber_high): New declaration.
773 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
775         * doc/rtl.texi (clobber_high): Add.
776         (parallel): Add in clobber high
777         * rtl.c (rtl_check_failed_code3): Add function.
778         * rtl.def (CLOBBER_HIGH): Add expression.
779         * rtl.h (RTL_CHECKC3): Add macro.
780         (rtl_check_failed_code3): Add declaration.
781         (XC3EXP): Add macro.
783 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
785         PR target/86386
786         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
787         cfun->machine->max_used_stack_alignment if needed.
789 2018-08-04  Martin Sebor  <msebor@redhat.com>
791         PR tree-optimization/86571
792         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
793         NaN output to 4.
795 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
797         PR target/86799
798         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
799         Define.
801 2018-08-03  Jeff Law  <law@redhat.com>
803         PR target/86795
804         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
805         Define to speculation_safe_value_not_needed.
807 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
809         * doc/gcov.texi (-x): Remove duplicate "to".
810         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
811         (-Wif-not-aligned): Remove duplicate "is".
812         (-flto): Remove duplicate "the".
813         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
814         duplicate "v5.00.b".
815         (MSP430 Options): Remove duplicate "and" from the description
816         of "-mgprel-sec=regexp".
817         (x86 Options): Remove duplicate copies of "vmldLog102" and
818         vmlsLog104 from description of "-mveclibabi=type".
820 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
822         * internal-fn.h (first_commutative_argument): Declare.
823         * internal-fn.c (first_commutative_argument): New function.
824         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
825         restrictions for pattern statements.  Use first_commutative_argument
826         to look for commutative operands in calls to internal functions.
828 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
830         * Makefile.in (wide-int-range.o): New.
831         * tree-vrp.c: Move all the wide_int_* functions to...
832         * wide-int-range.cc: ...here.
833         * tree-vrp.h: Move all the wide_int_* prototypes to...
834         * wide-int-range.h: ...here.
836 2018-08-03  Tom de Vries  <tdevries@suse.de>
838         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
839         UI_NONE.
840         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
841         * except.c (output_function_exception_table): Do early exit if
842         targetm_common.except_unwind_info (&global_options) == UI_NONE.
844 2018-08-03  Martin Liska  <mliska@suse.cz>
846         * predict.c (dump_prediction): Change to 2 digits
847         in fraction part.
849 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
851         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
852         neon_dup_q to...
853         (falkor_am_1_gtov_gtov): ... a new insn reservation.
855 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
857         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
858         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
859         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
860         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
861         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
863 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
865         * diagnostic-show-locus.c (diagnostic_show_locus): Use
866         pp_take_prefix when saving the existing prefix.
867         * diagnostic.c (diagnostic_append_note): Likewise.
868         * langhooks.c (lhd_print_error_function): Likewise.
869         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
870         param's type.  Free the existing prefix.
871         (pp_take_prefix): New function.
872         (pretty_printer::pretty_printer): Drop the prefix parameter.
873         Rename the length parameter to match the comment.
874         (pretty_printer::~pretty_printer): Free the prefix.
875         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
876         parameter.
877         (struct pretty_printer): Drop the "const" from "prefix" field's
878         type and clarify memory management.
879         (pp_set_prefix): Drop the "const" from the 2nd param.
880         (pp_take_prefix): New decl.
882 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
884         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
885         for word_mode_ok here instead of passing as argument.
886         (expand_block_compare): Change select_block_compare_mode() call.
887         (expand_strncmp_gpr_sequence): New function.
888         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
890 2018-08-02  Jeff Law  <law@redhat.com>
892         PR target/86790
893         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
894         Define to speculation_safe_value_not_needed.
896         PR target/86784
897         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
898         Define to speculation_safe_value_not_needed.
900 2018-08-02  Tom de Vries  <tdevries@suse.de>
902         PR target/86660
903         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
904         function.  Return UI_TARGET unconditionally.
905         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
906         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
908 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
910         * genemit.c (print_overload_test): Fix typo.
912 2018-08-02  Richard Biener  <rguenther@suse.de>
914         PR tree-optimization/86816
915         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
916         which checks for value availability before querying it.
917         (gvn_uses_equal): Use it.
918         (same_succ_hash): Likewise.
919         (gimple_equal_p): Likewise.
921 2018-08-02  Nick Clifton  <nickc@redhat.com>
923         PR target/86813
924         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
925         Define to speculation_safe_value_not_needed.
927         PR target/86810
928         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
929         Define to speculation_safe_value_not_needed.
931         PR target/86810
932         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
933         Define to speculation_safe_value_not_needed.
935         PR target/86803
936         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
937         Define to speculation_safe_value_not_needed.
939         PR target/86797
940         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
941         Define to speculation_safe_value_not_needed.
943         PR target/86791
944         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
945         Define to speculation_safe_value_not_needed.
947         PR target/86789
948         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
949         Define to speculation_safe_value_not_needed.
951         PR target/86787
952         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
953         Define to speculation_safe_value_not_needed.
955         PR target/86782
956         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
957         speculation_safe_value_not_needed.
959         PR target/86781
960         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
961         to speculation_safe_value_not_needed.
963 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
965         * doc/md.texi: Expand the documentation of instruction names
966         to mention port-local uses.  Document '@' in pattern names.
967         * read-md.h (overloaded_instance, overloaded_name): New structs.
968         (mapping): Declare.
969         (md_reader::handle_overloaded_name): New member function.
970         (md_reader::get_overloads): Likewise.
971         (md_reader::m_first_overload): New member variable.
972         (md_reader::m_next_overload_ptr): Likewise.
973         (md_reader::m_overloads_htab): Likewise.
974         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
975         m_next_overload_ptr and m_overloads_htab.
976         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
977         (get_mode_token, get_code_token, get_int_token): New functions.
978         (map_attr_string): Add an optional argument that passes back
979         the associated iterator.
980         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
981         (md_reader::handle_overloaded_name, add_overload_instance): New
982         functions.
983         (apply_iterators): Handle '@' names.  Report an error if '@'
984         is used without iterators.
985         (initialize_iterators): Initialize the new iterator_group fields.
986         * genopinit.c (handle_overloaded_code_for)
987         (handle_overloaded_gen): New functions.
988         (main): Use them to print declarations of maybe_code_for_* and
989         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
990         * genemit.c (print_overload_arguments, print_overload_test)
991         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
992         (main): Use it to print definitions of maybe_code_for_* and
993         maybe_gen_* functions.
994         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
995         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
996         instead of explicit mode checks.
997         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
998         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
999         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1000         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1001         (aarch64_expand_compare_and_swap): Likewise
1002         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1003         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1004         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1005         (aarch64_constant_pool_reload_icode): Delete.
1006         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1007         instead of aarch64_constant_pool_reload_icode.  Use
1008         code_for_aarch64_reload_mov instead of explicit mode checks.
1009         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1010         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1011         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1012         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1013         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1014         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1015         (aarch64_atomic_load_op_code): Delete.
1016         (aarch64_emit_atomic_load_op): Likewise.
1017         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1018         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1019         instead of aarch64_emit_atomic_load_op.
1020         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1021         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1022         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1023         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1024         character before the pattern name.
1025         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1026         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1027         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1028         (aarch64_frecps<mode>): Likewise.
1029         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1030         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1031         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1032         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1033         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1035 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1037         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1038         Allow HFmode constants if TARGET_FP_F16INST.
1040 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1042         PR target/86014
1043         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1044         No longer check last store for clobber of address register.
1046 2018-08-02  Martin Liska  <mliska@suse.cz>
1048         PR gcov-profile/86817
1049         * gcov.c (process_all_functions): New function.
1050         (main): Call it.
1051         (process_file): Move functions processing to
1052         process_all_functions.
1054 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1056         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1057         "const" to the "gimple *" and "rtx_insn *" parameters.
1058         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1059         Likewise.
1060         (dump_location_t::dump_location_t): Likewise.
1062 2018-08-01  Martin Sebor  <msebor@redhat.com>
1064         PR tree-optimization/86650
1065         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1066         rather than a "gcall *".  Directly pass the data of interest
1067         to percent_K_format, rather than building a temporary CALL_EXPR
1068         to hold it.
1069         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1070         (gimple_fold_builtin_strncat): Adjust.
1071         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1072         gcall* argument with gimple*.
1073         * gimple-ssa-warn-restrict.c (check_call): Same.
1074         (wrestrict_dom_walker::before_dom_children): Same.
1075         (builtin_access::builtin_access): Same.
1076         (check_bounds_or_overlap): Same
1077         (maybe_diag_overlap): Same.
1078         (maybe_diag_offset_bounds): Same.
1079         * tree-diagnostic.c (default_tree_printer): Move usage of
1080         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1081         to this callsite.
1082         * tree-pretty-print.c (percent_K_format): Add argument.
1083         * tree-pretty-print.h: Add argument.
1084         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1085         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1086         (maybe_diag_stxncpy_trunc): Same.
1087         (handle_builtin_stxncpy): Same.
1088         (handle_builtin_strcat): Same.
1090 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1092         * match.pd: Optimise pointer range checks.
1094 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1096         PR tree-optimization/86758
1097         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1098         to remove pattern statements.
1100 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1102         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1103         result of dfs_enumerate_from when constructing stmt_vec_infos,
1104         instead of additionally calling get_loop_body.
1106 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1108         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1109         parameter.
1110         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1111         When creating an iv, assert that the step is not known to be zero.
1112         (vect_setup_realignment): Update call accordingly.
1113         * tree-vect-stmts.c (vectorizable_store): Likewise.
1114         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1116 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1118         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1119         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1120         (vectorizable_reduction): Likewise.
1121         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1122         (vect_detect_hybrid_slp_stmts): Likewise.
1123         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1125 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1127         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1128         (wide_int_set_zero_nonzero_bits): ...this.
1129         (zero_nonzero_bits_from_vr): Rename to...
1130         (vrp_set_zero_nonzero_bits): ...this.
1131         (extract_range_from_multiplicative_op_1): Abstract wide int
1132         code...
1133         (wide_int_range_multiplicative_op): ...here.
1134         (extract_range_from_binary_expr_1): Extract wide int binary
1135         operations into their own functions.
1136         (wide_int_range_lshift): New.
1137         (wide_int_range_can_optimize_bit_op): New.
1138         (wide_int_range_shift_undefined_p): New.
1139         (wide_int_range_bit_xor): New.
1140         (wide_int_range_bit_ior): New.
1141         (wide_int_range_bit_and): New.
1142         (wide_int_range_trunc_mod): New.
1143         (extract_range_into_wide_ints): New.
1144         (vrp_shift_undefined_p): New.
1145         (extract_range_from_multiplicative_op): New.
1146         (vrp_can_optimize_bit_op): New.
1147         * tree-vrp.h (value_range::dump): New.
1148         (wide_int_range_multiplicative_op): New.
1149         (wide_int_range_lshift):New.
1150         (wide_int_range_shift_undefined_p): New.
1151         (wide_int_range_bit_xor): New.
1152         (wide_int_range_bit_ior): New.
1153         (wide_int_range_bit_and): New.
1154         (wide_int_range_trunc_mod): New.
1155         (zero_nonzero_bits_from_bounds): Rename to...
1156         (wide_int_set_zero_nonzero_bits): ...this.
1157         (zero_nonzero_bits_from_vr): Rename to...
1158         (vrp_set_zero_nonzero_bits): ...this.
1159         (range_easy_mask_min_max): Rename to...
1160         (wide_int_range_can_optimize_bit_op): this.
1161         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1162         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1164 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1166         * tree-vectorizer.h (vect_orig_stmt): New function.
1167         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1168         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1169         (vect_create_epilog_for_reduction): Likewise.
1170         (vectorizable_live_operation): Likewise.
1171         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1172         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1173         * tree-vect-stmts.c (vectorizable_call): Likewise.
1174         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1176 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1178         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1179         argument.
1180         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1181         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1182         (vect_transform_loop): Likewise.
1183         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1185 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1187         * tree-vectorizer.h (vect_schedule_slp): Return void.
1188         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1189         (vect_schedule_slp): Likewise.
1191 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1193         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1194         argument.
1195         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1196         instances before the main loop, if any exist.
1198 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1200         PR tree-optimization/86749
1201         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1202         If the lhs is used in a COND_EXPR, check that it is being used
1203         as the "then" or "else" value.
1205 2018-08-01  Tom de Vries  <tdevries@suse.de>
1207         PR target/86800
1208         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1209         speculation_safe_value_not_needed.
1211 2018-08-01  Richard Biener  <rguenther@suse.de>
1213         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1214         as base and offset.
1216 2018-08-01  Martin Liska  <mliska@suse.cz>
1218         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1219         format how successful transformation is dumped.
1220         (gimple_mod_pow2_value_transform): Likewise.
1221         (gimple_mod_subtract_transform): Likewise.
1222         (gimple_stringops_transform): Likewise.
1224 2018-08-01  Martin Liska  <mliska@suse.cz>
1226         PR value-prof/35543
1227         * value-prof.c (interesting_stringop_to_profile_p):
1228         Simplify the code and add BUILT_IN_MEMMOVE.
1229         (gimple_stringops_transform): Likewise.
1231 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1233         * config/aarch64/aarch64-simd.md
1234         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1235         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1236         use GPI iterator instead of SI mode.
1238 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1240         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1241         rs6000_speculation_barrier.
1242         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1243         new barrier pattern name.
1245 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1247         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1248         (speculation_barrier): New insn.
1250 2018-08-01  Richard Biener  <rguenther@suse.de>
1252         PR bootstrap/86724
1253         * graphite.h: Include isl/id.h and isl/space.h to allow build
1254         with ISL 0.20.
1256 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1258         PR target/86651
1259         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1260         mode for COFF targets.
1261         * defaults.h (TARGET_COFF): Define.
1262         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1263         TARGET_COFF): Define.
1264         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1265         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1266         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1268 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1270         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1271         * gimple-streamer-out.c (output_bb): Save it.
1272         * lto-streamer-in.c (input_struct_function_base): Restore
1273         instance discriminator if available.  Create map on demand.
1274         * lto-streamer-out.c (output_struct_function_base): Save it if
1275         available.
1276         * final.c (decl_to_instance_map): Document LTO strategy.
1278 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1279             Olivier Hainque  <hainque@adacore.com>
1281         * debug.h (decl_to_instance_map_t): New type.
1282         (decl_to_instance_map): Declare.
1283         (maybe_create_decl_to_instance_map): New inline function.
1284         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1285         to track basic block discriminators.
1286         (final_start_function_1): Initialize them.
1287         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1288         bb_discriminator.
1289         (decl_to_instance_map): New variable.
1290         (map_decl_to_instance, maybe_set_discriminator): New functions.
1291         (notice_source_line): Set discriminator.
1293 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1295         * targhooks.c (default_have_speculation_safe_value): Add
1296         ATTRIBUTE_UNUSED.
1298 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1300         * dump-context.h: Include "pretty-print.h".
1301         (dump_context::refresh_dumps_are_enabled): New decl.
1302         (dump_context::emit_item): New decl.
1303         (class dump_context): Add fields "m_test_pp" and
1304         "m_test_pp_flags".
1305         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1306         (temp_dump_context::get_dumped_text): New decl.
1307         (class temp_dump_context): Add field "m_pp".
1308         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1309         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1310         m_test_pp.
1311         (set_dump_file): Update for above change.
1312         (set_alt_dump_file): Likewise.
1313         (dump_loc): New overload, taking a pretty_printer *.
1314         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1315         to any test pretty-printer.
1316         (make_item_for_dump_gimple_stmt): New function, adapted from
1317         optinfo::add_gimple_stmt.
1318         (dump_context::dump_gimple_stmt): Call it, and use the result,
1319         eliminating the direct usage of dump_file and alt_dump_file in
1320         favor of indirectly using them via emit_item.
1321         (make_item_for_dump_gimple_expr): New function, adapted from
1322         optinfo::add_gimple_expr.
1323         (dump_context::dump_gimple_expr): Call it, and use the result,
1324         eliminating the direct usage of dump_file and alt_dump_file in
1325         favor of indirectly using them via emit_item.
1326         (make_item_for_dump_generic_expr): New function, adapted from
1327         optinfo::add_tree.
1328         (dump_context::dump_generic_expr): Call it, and use the result,
1329         eliminating the direct usage of dump_file and alt_dump_file in
1330         favor of indirectly using them via emit_item.
1331         (make_item_for_dump_printf_va): New function, adapted from
1332         optinfo::add_printf_va.
1333         (make_item_for_dump_printf): New function.
1334         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1335         and use the result, eliminating the direct usage of dump_file and
1336         alt_dump_file in favor of indirectly using them via emit_item.
1337         (make_item_for_dump_dec): New function.
1338         (dump_context::dump_dec): Call it, and use the result,
1339         eliminating the direct usage of dump_file and alt_dump_file in
1340         favor of indirectly using them via emit_item.
1341         (make_item_for_dump_symtab_node): New function, adapted from
1342         optinfo::add_symtab_node.
1343         (dump_context::dump_symtab_node): Call it, and use the result,
1344         eliminating the direct usage of dump_file and alt_dump_file in
1345         favor of indirectly using them via emit_item.
1346         (dump_context::begin_scope): Reimplement, avoiding direct usage
1347         of dump_file and alt_dump_file in favor of indirectly using them
1348         via emit_item.
1349         (dump_context::emit_item): New member function.
1350         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1351         Set up test pretty-printer on the underlying context.  Call
1352         refresh_dumps_are_enabled.
1353         (temp_dump_context::~temp_dump_context): Call
1354         refresh_dumps_are_enabled.
1355         (temp_dump_context::get_dumped_text): New member function.
1356         (selftest::verify_dumped_text): New function.
1357         (ASSERT_DUMPED_TEXT_EQ): New macro.
1358         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1359         and then without optinfo enabled.  Add uses of
1360         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1361         * dumpfile.h: Update comment for the dump_* API.
1362         * optinfo-emit-json.cc
1363         (selftest::test_building_json_from_dump_calls): Update for new
1364         param for temp_dump_context ctor.
1365         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1366         and "m_owned" field.
1367         (optinfo_item::~optinfo_item): Likewise.
1368         (optinfo::add_item): New member function.
1369         (optinfo::emit): Update comment.
1370         (optinfo::add_string): Delete.
1371         (optinfo::add_printf): Delete.
1372         (optinfo::add_printf_va): Delete.
1373         (optinfo::add_gimple_stmt): Delete.
1374         (optinfo::add_gimple_expr): Delete.
1375         (optinfo::add_tree): Delete.
1376         (optinfo::add_symtab_node): Delete.
1377         (optinfo::add_dec): Delete.
1378         * optinfo.h (class dump_context): New forward decl.
1379         (optinfo::add_item): New decl.
1380         (optinfo::add_string): Delete.
1381         (optinfo::add_printf): Delete.
1382         (optinfo::add_printf_va): Delete.
1383         (optinfo::add_gimple_stmt): Delete.
1384         (optinfo::add_gimple_expr): Delete.
1385         (optinfo::add_tree): Delete.
1386         (optinfo::add_symtab_node): Delete.
1387         (optinfo::add_dec): Delete.
1388         (optinfo::add_poly_int): Delete.
1389         (optinfo_item::optinfo_item): Remove "owned" param.
1390         (class optinfo_item): Remove field "m_owned".
1392 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1394         PR middle-end/86705
1395         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1396         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1397         requested variable alignment.
1398         (expand_one_ssa_partition): Likewise.
1399         (expand_one_var): Likewise.
1401 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1403         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1404         to speculation_safe_value_not_needed.
1406 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1408         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1409         * targhooks.c (speculation_safe_value_not_needed): New function.
1410         * target.def (have_speculation_safe_value): Update documentation.
1411         * doc/tm.texi: Regenerated.
1413 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1415         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1416         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1417         expand.
1418         (despeculate_copy<ALLI:mode>_insn): New insn.
1419         (despeculate_copyti_insn): New insn.
1420         (despeculate_simple<ALLI:mode>): New insn
1421         (despeculate_simpleti): New insn.
1422         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1423         function.
1424         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1425         aarch64_speculation_safe_value.
1426         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1428 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1430         * config/aarch64/aarch64-speculation.cc: New file.
1431         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1432         before pass_reorder_blocks.
1433         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1434         prototype.
1435         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1436         X14 and X15 when tracking speculation.
1437         * config/aarch64/aarch64.md (register name constants): Add
1438         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1439         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1440         (speculation_barrier): New insn attribute.
1441         (cmp<mode>): Allow SP in comparisons.
1442         (speculation_tracker): New insn.
1443         (speculation_barrier): Add speculation_barrier attribute.
1444         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1445         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1446         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1448 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1450         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1451         aarch64_track_speculation is true.
1452         (tb<optab><mode>1): Likewise.
1453         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1454         generate CB[N]Z when tracking speculation.
1455         (aarch64_split_compare_and_swap): Likewise.
1456         (aarch64_split_atomic_op): Likewise.
1458 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1460         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1462 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1464         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1465         (speculation_barrier): New insn.
1467 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1469         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1470         * config/arm/arm.md (speculation_barrier): New expand.
1471         (speculation_barrier_insn): New pattern.
1473 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1475         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1476         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1477         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1478         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1479         list.
1480         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1481         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1482         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1483         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1484         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1485         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1486         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1487         * builtins.c (expand_speculation_safe_value): New function.
1488         (expand_builtin): Call it.
1489         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1490         * doc/extend.texi: Document __builtin_speculation_safe_value.
1491         * doc/md.texi: Document "speculation_barrier" pattern.
1492         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1493         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1494         * doc/tm.texi: Regenerated.
1495         * target.def (have_speculation_safe_value, speculation_safe_value): New
1496         hooks.
1497         * targhooks.c (default_have_speculation_safe_value): New function.
1498         (default_speculation_safe_value): New function.
1499         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1500         (default_speculation_safe_value): Add prototype.
1502 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1504         * dump-context.h (dump_context::dump_loc): New decl.
1505         * dumpfile.c (dump_context::dump_loc): New member function.
1506         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1507         and dump_gimple_stmt.
1508         (dump_context::dump_gimple_expr_loc): Likewise, using
1509         dump_gimple_expr.
1510         (dump_context::dump_generic_expr_loc): Likewise, using
1511         dump_generic_expr.
1512         (dump_context::dump_printf_loc_va): Likewise, using
1513         dump_printf_va.
1514         (dump_context::begin_scope): Explicitly using the global function
1515         "dump_loc", rather than the member function.
1517 2018-07-31  Martin Sebor  <msebor@redhat.com>
1519         PR tree-optimization/86741
1520         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1522 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1524         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1525         depend on whether prefetch instructions will be emitted or not.
1526         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1527         will be emitted or not.
1528         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1529         (TARGET_SETMEM_PFD): New macros.
1531 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1533         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1534         (NULL_STMT_VEC_INFO): Delete.
1535         (stmt_vec_info::operator*): Likewise.
1536         (stmt_vec_info::operator gimple *): Likewise.
1537         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1538         of NULL_STMT_VEC_INFO.
1539         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1540         (vect_reassociating_reduction_p): Likewise.
1541         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1542         (vectorizable_store): Likewise.
1543         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1544         (vec_info::free_stmt_vec_infos): Likewise.
1546 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1548         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1549         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1551 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1553         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1554         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1555         (vec_info::free_stmt_vec_info): New private member functions.
1556         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1557         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1558         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1559         set_stmt_vec_info_vec and free_stmt_vec_infos.
1560         * tree-vect-loop.c (_loop_vec_info): Remove call to
1561         set_stmt_vec_info_vec.
1562         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1563         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1564         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1565         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1566         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1567         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1568         with the clearing in the xcalloc.
1569         (stmt_vec_info_vec): Delete.
1570         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1571         (vectorize_loops): Likewise.
1572         (vec_info::~vec_info): Remove argument from call to
1573         free_stmt_vec_infos.
1574         (vec_info::add_stmt): Remove vinfo argument from call to
1575         new_stmt_vec_info.
1577 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1579         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1580         rather than a gimple stmt.
1581         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1582         information for pattern statements when passed the original
1583         statement; instead wait to be passed the pattern statement itself.
1584         Don't call set_vinfo_for_stmt here.
1585         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1586         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1587         stmt_vec_infos here.
1588         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1589         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1590         stmt_vec_infos entry.
1592 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1594         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1595         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1596         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1597         * tree-vect-stmts.c (vectorizable_call): Likewise.
1598         (vectorizable_simd_clone_call): Likewise.
1600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1602         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1603         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1604         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1605         * tree-vect-loop.c (vect_transform_loop): Likewise.
1606         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1607         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1609 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1611         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1612         (vect_dr_stmt): Delete.
1613         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1614         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1615         of DR_VECT_AUX.
1616         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1617         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1618         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1619         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1620         (vect_analyze_data_refs): Likewise.
1621         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1622         argument.
1623         (vect_find_same_alignment_drs): Likewise.
1624         (vect_slp_analyze_node_dependences): Update calls accordingly.
1625         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1626         instead of DR_VECT_AUX.
1627         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1628         of a vector data references.  Use vec_info::lookup_dr instead of
1629         DR_VECT_AUX.
1630         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1631         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1632         instead of DR_VECT_AUX.
1634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1636         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1637         dr_vec_info.
1638         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1639         accordingly.
1640         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1641         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1642         (vect_gen_prolog_loop_niters): Likewise.
1644 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1646         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1647         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1648         (vect_known_alignment_in_bytes, vect_dr_behavior)
1649         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1650         instead of data_references.  Update calls to other routines for
1651         which the same change has been made.
1652         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1653         dr_vec_infos instead of stmt_vec_infos.
1654         (vect_analyze_data_ref_dependence): Update call accordingly.
1655         (vect_slp_analyze_data_ref_dependence)
1656         (vect_record_base_alignments): Use DR_VECT_AUX.
1657         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1658         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1659         (vector_alignment_reachable_p, vect_get_data_access_cost)
1660         (vect_peeling_supportable, vect_analyze_group_access_1)
1661         (vect_analyze_group_access, vect_analyze_data_ref_access)
1662         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1663         (vect_compile_time_alias, vect_small_gap_p)
1664         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1665         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1666         instead of data_references.  Update calls to other routines for
1667         which the same change has been made.
1668         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1669         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1670         (vect_slp_analyze_and_verify_node_alignment)
1671         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1672         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1673         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1674         above changes.
1675         (_vect_peel_info::dr): Replace with...
1676         (_vect_peel_info::dr_info): ...this new field.
1677         (vect_peeling_hash_get_most_frequent)
1678         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1679         (vect_peeling_hash_get_lowest_cost):
1680         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1681         routines for which the same change has been made.
1682         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1683         data_reference.
1684         * tree-vect-loop-manip.c (get_misalign_in_elems)
1685         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1686         above changes.
1687         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1688         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1689         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1690         (get_group_load_store_type, get_negative_load_store_type)
1691         (vect_get_data_ptr_increment, vectorizable_store)
1692         (vectorizable_load): Likewise.
1693         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1694         Update calls to other routines for which the same change has been made.
1696 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1698         * tree-vectorizer.h (vec_info::move_dr): New member function.
1699         (dataref_aux): Rename to...
1700         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1701         (_stmt_vec_info::dr_aux): Update accordingly.
1702         (_stmt_vec_info::data_ref_info): Delete.
1703         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1704         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1705         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1706         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1707         of data_ref.
1708         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1709         (STMT_VINFO_DR_INFO): New macro.
1710         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1711         (set_dr_misalignment): Update after rename of dataref_aux.
1712         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1713         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1714         initialization of STMT_VINFO_DATA_REF.
1715         * tree-vectorizer.c (vec_info::move_dr): New function.
1716         * tree-vect-patterns.c (vect_recog_bool_pattern)
1717         (vect_recog_mask_conversion_pattern)
1718         (vect_recog_gather_scatter_pattern): Use it.
1719         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1720         the "dr" and "stmt" fields of dr_vec_info instead of
1721         STMT_VINFO_DATA_REF.
1723 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1725         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1726         (is_pattern_stmt_p): Use it.
1727         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1728         on pattern statements.
1730 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1732         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1733         original stmt as a stmt_vec_info rather than a gimple stmt.
1734         (vect_pattern_recog_1): Take the statement directly as a
1735         stmt_vec_info, rather than via a gimple_stmt_iterator.
1736         Update call to vect_mark_pattern_stmts.
1737         (vect_pattern_recog): Update calls accordingly.
1739 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1741         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1742         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1743         a vect_def_type for the first argument.
1744         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1745         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1746         operand if it isn't defined by a vectorized statement.
1747         (vect_build_gather_load_calls): Remove the mask_dt argument and
1748         update calls to vect_get_vec_def_for_stmt_copy.
1749         (vectorizable_bswap): Likewise the dt argument.
1750         (vectorizable_call): Update calls to vectorizable_bswap and
1751         vect_get_vec_def_for_stmt_copy.
1752         (vectorizable_simd_clone_call, vectorizable_assignment)
1753         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1754         (vectorizable_comparison): Update calls to
1755         vect_get_vec_def_for_stmt_copy.
1756         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1757         vect_is_simple_use.
1758         (vect_get_loop_based_defs): Remove dt argument and update call
1759         to vect_get_vec_def_for_stmt_copy.
1760         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1761         and vect_get_vec_def_for_stmt_copy.
1762         (vectorizable_load): Update calls to vect_build_gather_load_calls
1763         and vect_get_vec_def_for_stmt_copy.
1764         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1765         (vectorizable_reduction, vectorizable_live_operation): Update calls
1766         to vect_get_vec_def_for_stmt_copy.
1768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1770         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1771         and gimple stmt arguments with a stmt_vec_info.
1772         (vect_record_base_alignments): Update calls accordingly.
1773         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1774         and gimple stmt arguments with a stmt_vec_info.
1775         (vect_build_slp_tree_1): Remove vinfo argument and update call
1776         to vect_record_max_nunits.
1777         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1778         and vect_record_max_nunits.
1780 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1782         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1783         file and take a stmt_vec_info instead of a gimple stmt.
1784         (supportable_widening_operation, vect_finish_replace_stmt)
1785         (vect_finish_stmt_generation, vect_get_store_rhs)
1786         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1787         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1788         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1789         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1790         (vect_create_data_ref_ptr, bump_vector_ptr)
1791         (vect_permute_store_chain, vect_setup_realignment)
1792         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1793         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1794         (vectorizable_reduction, vectorizable_induction)
1795         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1796         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1797         than gimple stmts as arguments.
1798         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1799         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1800         (can_group_stmts_p, vect_check_gather_scatter)
1801         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1802         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1803         (vect_permute_load_chain, vect_shift_permute_load_chain)
1804         (vect_transform_grouped_load)
1805         (vect_record_grouped_load_vectors): Likewise.
1806         * tree-vect-loop.c (vect_fixup_reduc_chain)
1807         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1808         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1809         (vectorizable_reduction, vectorizable_induction)
1810         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1811         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1812         (vect_get_load_store_mask): Likewise.
1813         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1814         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1815         * tree-vect-stmts.c (vect_mark_relevant)
1816         (is_simple_and_all_uses_invariant)
1817         (exist_non_indexing_operands_for_use_p, process_use)
1818         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1819         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1820         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1821         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1822         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1823         (get_negative_load_store_type, get_load_store_type)
1824         (vect_check_load_store_mask, vect_check_store_rhs)
1825         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1826         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1827         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1828         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1829         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1830         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1831         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1832         (supportable_widening_operation): Likewise.
1834 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1836         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1837         a stmt_vec_info instead of a gcall.
1838         (vect_check_gather_scatter): Update call accordingly.
1839         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1840         of a gphi.
1841         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1842         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1843         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1844         instead of a gimple stmt.
1845         (vect_transform_loop): Update calls accordingly.
1846         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1847         stmt_vec_infos instead of gimple stmts.
1848         (vect_analyze_slp_instance): Update use accordingly.
1849         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1850         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1851         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1852         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1853         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1854         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1855         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1856         down to subroutines.
1858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1860         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1861         of the worklist from a vector of gimple stmts to a vector of
1862         stmt_vec_infos.
1863         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1864         (vect_mark_stmts_to_be_vectorized): Likewise
1866 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1868         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1869         statement before passing it to vect_analyze_stmt.
1870         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1871         the chain of phi vector definitions.  Track the exit phi via its
1872         stmt_vec_info.
1873         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1874         STMT_VINFO_REDUC_DEF.
1875         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1876         stmt_vec_infos to handle the statement chains.
1877         (vect_get_slp_defs): Record the first statement in the node
1878         using a stmt_vec_info.
1879         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1880         statements here and pass their stmt_vec_info down to subroutines.
1881         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1882         down to vect_finish_stmt_generation.
1883         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1884         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1885         stmt_vec_infos to subroutines.
1886         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1887         chains.
1889 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1891         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1892         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1893         (vect_permute_store_chain, vect_setup_realignment)
1894         (vect_permute_load_chain, vect_shift_permute_load_chain)
1895         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1896         stmts internally, and when passing values to other vectorizer routines.
1897         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1898         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1899         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1900         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1901         (vectorizable_reduction, vectorizable_induction)
1902         (vectorizable_live_operation, vect_transform_loop_stmt)
1903         (vect_transform_loop): Likewise.
1904         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1905         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1906         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1907         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1908         (vect_slp_analyze_node_operations_1): Likewise.
1909         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1910         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1911         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1912         (vect_finish_stmt_generation_1, get_group_load_store_type)
1913         (get_load_store_type, vect_build_gather_load_calls)
1914         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1915         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1916         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1917         (vectorizable_store, vectorizable_load, vectorizable_condition)
1918         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1919         (supportable_widening_operation): Likewise.
1920         (vect_get_vector_types_for_stmt): Likewise.
1921         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1923 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1925         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1926         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1927         (vect_permute_store_chain, vect_permute_load_chain)
1928         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1929         repeated stmt_vec_info lookups.
1930         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1931         (vect_update_ivs_after_vectorizer): Likewise.
1932         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1933         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1934         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1935         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1936         (vect_bb_slp_scalar_cost): Likewise.
1937         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1939 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1941         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1942         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1943         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1944         to get gassigns and gcalls, rather than operating on generc gimple
1945         stmts.
1946         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1947         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1948         (vectorizable_load, vect_analyze_stmt): Likewise.
1949         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1951 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1953         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1954         return stmt_vec_infos rather than gimple stmts.  Do not accept
1955         null arguments.
1956         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1957         of a gimple stmt.
1958         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1959         Update use of get_later_stmt.
1960         (vect_get_constant_vectors): Update call accordingly.
1961         (vect_schedule_slp_instance): Likewise
1962         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1963         (vect_slp_analyze_instance_dependence): Likewise.
1964         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1966 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1968         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1969         (stmt_info_for_cost::stmt_info): ...this new field.
1970         (add_stmt_costs): Update accordingly.
1971         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1972         (vect_get_known_peeling_cost): Likewise.
1973         (vect_estimate_min_profitable_iters): Likewise.
1974         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1976 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1978         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1979         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1980         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1981         accordingly.
1982         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1984 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1986         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1987         a gimple stmt to a stmt_vec_info.
1988         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1990 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1992         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1993         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1994         (_loop_vec_info::reduction_chains): Likewise.
1995         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1996         accordingly.
1997         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1999 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2001         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2002         a gimple stmt to a stmt_vec_info.
2003         (_stmt_vec_info::next_element): Likewise.
2004         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2005         (vect_slp_analyze_and_verify_node_alignment)
2006         (vect_analyze_group_access_1, vect_analyze_group_access)
2007         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2008         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2009         (vect_supportable_dr_alignment): Update accordingly.
2010         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2011         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2012         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2013         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2014         * tree-vect-slp.c (vect_build_slp_tree_1)
2015         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2016         (vect_split_slp_store_group, vect_analyze_slp_instance)
2017         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2018         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2019         (get_group_load_store_type, get_load_store_type)
2020         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2021         (vect_transform_stmt, vect_remove_stores): Likewise.
2023 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2025         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2026         than a gimple stmt.
2027         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2028         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2029         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2030         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2031         (vector_alignment_reachable_p, vect_get_data_access_cost)
2032         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2033         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2034         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2035         (vect_analyze_group_access_1, vect_analyze_group_access)
2036         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2037         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2038         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2039         result of vect_dr_stmt and use the stmt_vec_info instead of
2040         the associated gimple stmt.
2041         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2042         (vect_gen_prolog_loop_niters): Likewise.
2043         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2045 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2047         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2048         to a vec<stmt_vec_info>.
2049         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2050         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2051         vec<stmt_vec_info>.
2052         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2053         to a vec<stmt_vec_info>.
2054         (bst_traits::value_type, bst_traits::value_type): Likewise.
2055         (bst_traits::hash): Update accordingly.
2056         (vect_get_and_check_slp_defs): Change the stmts parameter from
2057         a vec<gimple *> to a vec<stmt_vec_info>.
2058         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2059         (vect_build_slp_tree): Likewise.
2060         (vect_build_slp_tree_2): Likewise.  Update uses of
2061         SLP_TREE_SCALAR_STMTS.
2062         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2063         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2064         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2065         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2066         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2067         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2068         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2069         (vect_get_constant_vectors, vect_get_slp_defs)
2070         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2071         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2072         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2073         instead of gimple stmts.
2074         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2075         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2076         (vect_slp_analyze_instance_dependence): Update uses of
2077         SLP_TREE_SCALAR_STMTS.
2078         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2079         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2080         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2081         (get_initial_defs_for_reduction): Likewise.
2082         (vect_create_epilog_for_reduction): Likewise.
2083         (vectorize_fold_left_reduction): Likewise.
2084         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2085         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2086         (can_vectorize_live_stmts): Likewise.
2088 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2090         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2091         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2092         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2093         than gimple stmts.
2094         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2095         of a gimple stmt.
2096         (gather_scalar_reductions): Update after above interface changes.
2097         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2098         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2099         than gimple stmts.
2100         (vect_force_simple_reduction): Likewise.
2101         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2102         LOOP_VINFO_REDUCTIONS.
2103         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2105 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2107         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2108         a gimple stmt to a stmt_vec_info.
2109         * tree-vect-loop.c (vect_active_double_reduction_p)
2110         (vect_force_simple_reduction, vectorizable_reduction): Update
2111         accordingly.
2113 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2115         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2116         vec<gimple *> to a vec<stmt_vec_info>.
2117         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2118         the reduction_phis argument from a vec<gimple *> to a
2119         vec<stmt_vec_info>.
2120         (vectorizable_reduction): Likewise the phis local variable that
2121         is passed to vect_create_epilog_for_reduction.  Update for new type
2122         of SLP_TREE_VEC_STMTS.
2123         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2124         (vectorizable_live_operation): Likewise.
2125         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2126         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2128 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2130         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2131         a gimple stmt to a stmt_vec_info.
2132         (vectorizable_condition, vectorizable_live_operation)
2133         (vectorizable_reduction, vectorizable_induction): Pass back the
2134         vectorized statement as a stmt_vec_info.
2135         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2136         use of STMT_VINFO_VEC_STMT.
2137         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2138         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2139         as stmt_vec_infos rather than gimple stmts.
2140         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2141         to a stmt_vec_info.
2142         (vectorizable_live_operation): Likewise.
2143         (vectorizable_reduction, vectorizable_induction): Likewise,
2144         updating use of STMT_VINFO_VEC_STMT.
2145         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2146         of STMT_VINFO_VEC_STMT.
2147         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2148         (vectorizable_simd_clone_call, vectorizable_conversion)
2149         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2150         (vectorizable_store, vectorizable_load, vectorizable_condition)
2151         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2152         from a gimple stmt to a stmt_vec_info.
2153         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2154         pointer to a stmt_vec_info to the vectorizable_* routines.
2156 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2158         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2159         a gimple stmt to a stmt_vec_info.
2160         (is_pattern_stmt_p): Update accordingly.
2161         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2162         (vect_record_grouped_load_vectors): Likewise.
2163         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2164         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2165         (vect_model_reduction_cost): Likewise.
2166         (vect_create_epilog_for_reduction): Likewise.
2167         (vectorizable_reduction, vectorizable_induction): Likewise.
2168         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2169         Return the stmt_vec_info for the pattern statement.
2170         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2171         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2172         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2173         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2174         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2175         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2176         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2177         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2179 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2181         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2182         (vect_finish_stmt_generation): Likewise.
2183         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2184         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2185         (vect_build_gather_load_calls): Use the return value of the above
2186         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2187         scopes for the input gimple stmt and wider scopes for the associated
2188         stmt_vec_info.  Use vec_info::lookup_def when setting these
2189         stmt_vec_infos from an SSA_NAME definition.
2190         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2191         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2192         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2193         (vectorizable_store, vectorizable_load, vectorizable_condition)
2194         (vectorizable_comparison): Likewise.
2195         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2196         (vectorizable_reduction): Likewise.
2198 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2200         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2201         stmt_vec_info * parameter before the optional gimple **.
2202         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2203         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2204         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2205         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2206         (vectorizable_live_operation): Likewise.
2207         * tree-vect-patterns.c (type_conversion_p): Likewise.
2208         (vect_look_through_possible_promotion): Likewise.
2209         (vect_recog_rotate_pattern): Likewise.
2210         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2212 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2214         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2215         a typedef to a wrapper class.
2216         (NULL_STMT_VEC_INFO): New macro.
2217         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2218         (stmt_vec_info::operator*): New function.
2219         (stmt_vec_info::operator gimple *): Likewise.
2220         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2221         (add_stmt_costs): Likewise.
2222         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2223         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2224         (vect_get_known_peeling_cost): Likewise.
2225         (vect_estimate_min_profitable_iters): Likewise.
2226         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2227         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2228         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2229         (vectorizable_store, free_stmt_vec_infos): Likewise.
2230         (new_stmt_vec_info): Change return type of xcalloc to
2231         _stmt_vec_info *.
2233 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2235         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2236         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2237         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2238         a single_imm_use-based sequence.
2239         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2241 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2243         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2244         * tree-vectorizer.c (vec_info::lookup_def): New function.
2245         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2246         (vect_widened_op_tree): Likewise.
2247         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2248         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2249         (vectorizable_reduction): Likewise.
2250         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2251         of a gimple *.
2252         (vect_is_slp_reduction): Update calls accordingly.  Use
2253         vec_info::lookup_def.
2254         (vect_is_simple_reduction): Likewise
2255         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2257 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2259         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2260         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2261         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2262         of vinfo_for_stmt.
2263         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2264         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2265         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2266         (vect_is_slp_reduction, vectorizable_induction)
2267         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2268         * tree-vect-patterns.c (vect_init_pattern_stmt):
2269         (vect_determine_min_output_precision_1, vect_determine_precisions)
2270         (vect_pattern_recog): Likewise.
2271         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2272         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2273         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2274         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2275         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2276         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2277         info field from a loop to a loop_vec_info.
2279 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2281         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2282         (vec_info::add_stmt): Declare.
2283         * tree-vectorizer.c (vec_info::add_stmt): New function.
2284         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2285         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2286         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2287         (vectorizable_induction): Likewise.
2288         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2289         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2290         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2291         (vectorizable_load): Likewise.
2292         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2293         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2294         (vect_recog_gather_scatter_pattern): Likewise.
2295         (append_pattern_def_seq): Likewise.  Remove a check that is
2296         performed by add_stmt itself.
2298 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2300         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2301         which make_ssa_name was called with new_stmt before new_stmt
2302         had been created.
2304 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2306         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2307         split out from...
2308         (vect_is_slp_reduction): ...here...
2309         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2310         that are already known to be false.
2312 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2314         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2315         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2316         STMT_VINFO_NUM_SLP_USES when it's true.
2317         (vect_free_slp_instance): Add a final_p parameter and pass it to
2318         vect_free_slp_tree.
2319         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2320         (vect_analyze_slp_instance): Likewise.
2321         (vect_slp_analyze_operations): Likewise.
2322         (vect_slp_analyze_bb_1): Likewise.
2323         * tree-vectorizer.c (vec_info): Likewise.
2324         * tree-vect-loop.c (vect_transform_loop): Likewise.
2326 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2328         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2329         function is not called for second and subsequent members of
2330         a reduction group.
2332 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2334         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2335         cases for nested loops from here to ...
2336         (vect_create_epilog_for_reduction): ...here.  Only call
2337         vect_is_simple_use for inner-loop reductions.
2339 2018-07-31  Martin Liska  <mliska@suse.cz>
2341         PR gcov-profile/85338
2342         PR gcov-profile/85350
2343         PR gcov-profile/85372
2344         * profile.c (struct location_triplet): New.
2345         (struct location_triplet_hash): Likewise.
2346         (output_location): Do not output a BB that
2347         is already recorded for a line.
2348         (branch_prob): Use streamed_locations.
2350 2018-07-31  Martin Liska  <mliska@suse.cz>
2352         PR gcov-profile/85370
2353         * coverage.c (coverage_begin_function): Do not mark target
2354         clones as artificial functions.
2356 2018-07-31  Martin Liska  <mliska@suse.cz>
2358         PR gcov-profile/83813
2359         PR gcov-profile/84758
2360         PR gcov-profile/85217
2361         PR gcov-profile/85332
2362         * profile.c (branch_prob): Do not record GOTO expressions
2363         for GIMPLE statements which locations are already streamed.
2365 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2367         * gcc.c (handle_spec_function): Accept a soft_matched_part
2368         argument, as do_spec_1.  Pass it down to ...
2369         (eval_spec_function): Accept a soft_matched_part argument,
2370         and pass it down to ...
2371         (do_spec_2): Accept a soft_matched_part argument, and pass
2372         it down to do_spec_1.
2373         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2374         (handle_braces): Update call to handle_spec_function.
2375         (driver::set_up_specs): Update calls to do_spec_2.
2376         (compare_debug_dump_opt_spec_function): Likewise.
2377         (compare_debug_self_opt_spec_function): Likewise.
2379 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2381         * common.opt (nolibc): New option.
2382         * doc/invoke.texi (Link Options): Document it.
2383         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2384         * config/alpha/linux.h: Likewise.
2385         * config/arc/elf.h: Likewise.
2386         * config/arm/uclinux-elf.h: Likewise.
2387         * config/arm/unknown-elf.h: Likewise.
2388         * config/avr/avrlibc.h: Likewise.
2389         * config/bfin/bfin.h: Likewise.
2390         * config/bfin/linux.h: Likewise.
2391         * config/bfin/uclinux.h: Likewise.
2392         * config/darwin.h: Likewise.
2393         * config/darwin10.h: Likewise.
2394         * config/darwin12.h: Likewise.
2395         * config/gnu-user.h: Likewise.
2396         * config/lm32/uclinux-elf.h: Likewise.
2397         * config/pa/pa-hpux11.h: Likewise.
2398         * config/pa/pa64-hpux.h: Likewise.
2399         * config/sparc/sparc.h: Likewise.
2401 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2403         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2404         undefined variables.
2406 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2408         PR target/86640
2409         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2410         instead of GEN_INT.
2412 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2414         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2415         terminated string literal.
2417 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2419         PR rtl-optimization/85160
2420         * combine.c (is_just_move): New function.
2421         (try_combine): Allow combining two instructions into two if neither of
2422         the original instructions was a move.
2424 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2426         PR target/86673
2427         * doc/extend.texi (Global Register Variables): Discourage use of type
2428         qualifiers.
2429         (Local Register Variables): Likewise.
2431 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2433         PR tree-optimization/86506
2434         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2436 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2438         PR target/86547
2439         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2440         hard_regno, make sure no insn between `from` and `to` clobbers it.
2442 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2443             Tom de Vries  <tdevries@suse.de>
2445         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2446         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2447         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2448         PTX_DEFAULT_RUNTIME_DIM.
2449         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2451 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2453         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2454         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2455         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2457 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2459         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2460         used.
2461         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2462         predicate to reflect toc fusion has been deleted.
2463         (toc_fusion_mem_raw): Delete, no longer used.
2464         (toc_fusion_mem_wrapped): Likewise.
2465         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2466         fusion mask bit.
2467         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2468         Delete, no longer used.
2469         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2470         meant to be used for toc fusion.
2471         (rs6000_debug_print_mode): Delete toc fusion debugging.
2472         (rs6000_debug_reg_global): Likewise.
2473         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2474         fusion and secondary reload support that were never used.
2475         (rs6000_option_override_internal): Delete TOC fusion, that was only
2476         partially defined, and it did not work unless you also used the
2477         -mcmodel= switch.
2478         (rs6000_legitimate_address_p): Delete TOC fusion support.
2479         (rs6000_opt_masks): Likewise.
2480         (fusion_wrap_memory_address): Delete function, no longer used.
2481         (fusion_split_address); Delete TOC fusion support.
2482         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2483         longer used with toc fusion being deleted.
2484         (TARGET_TOC_FUSION_FP): Likewise.
2485         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2486         UNSPEC.
2487         (toc fusion spliter): Delete TOC fusion support.
2488         (toc_fusionload_<mode>): Likewise.
2489         (toc_fusionload_di): Likewise.
2490         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2491         longer needs to be named.  Rename predicate to delete TOC fusion.
2492         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2493         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2494         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2495         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2496         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2498 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2500         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2501         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2502         __int128 in built-in function prototypes.
2503         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2504         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2506 2018-07-27  Martin Sebor  <msebor@redhat.com>
2508         PR tree-optimization/86696
2509         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2510         types, including enums.
2511         (handle_char_store): Be prepared for the above function to fail.
2513 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2515         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2516         when optimization level is lower than 2 or optimize for size.
2518 2018-07-26  Martin Sebor  <msebor@redhat.com>
2520         PR tree-optimization/86043
2521         PR tree-optimization/86042
2522         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2523         (get_string_cst_length): Rename...
2524         (get_min_string_length): ...to this.  Add argument.
2525         (handle_char_store): Extend to handle multi-character stores by
2526         MEM_REF.
2527         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2528         * tree.h (initializer_zerop): Add argument.
2530 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2532         PR middle-end/86660
2533         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2534         declare target to variables if they have always,{to,from,tofrom} map
2535         kinds.
2537 2018-07-26  Martin Liska  <mliska@suse.cz>
2539         PR lto/86548
2540         * lto-wrapper.c: Add linker_output as prefix
2541         for ltrans_output_file.
2543 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2545         PR rtl-optimization/85805
2546         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2547         value for hard registers if that was written in the same mode.
2549 2018-07-26  Martin Liska  <mliska@suse.cz>
2551         PR gcov-profile/86536
2552         * gcov.c (format_gcov): Use printf format %.*f directly
2553         and do not handle special values.
2555 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2557         * common/config/arc/arc-common.c (arc_option_optimization_table):
2558         Update default optimizations for size.
2560 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2562         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2563         * config/arc/constraints.md (CfZ): New constraint.
2564         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2565         (subsf3_fpu): Likewise.
2566         (cmpsf_fpu): Likewise.
2567         (cmpsf_fpu_uneq): Likewise.
2569 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2571         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2572         accesses as well.
2573         (arc_is_uncached_mem_p): uncached applies to both the variable and
2574         the pointer.
2576 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2578         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2579         register names.
2581 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2583         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2584         field "m_scopes" from vec to auto_vec.
2586 2018-07-25  Martin Liska  <mliska@suse.cz>
2588         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2589         return type.
2591 2018-07-25  Richard Biener  <rguenther@suse.de>
2593         PR debug/86654
2594         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2595         special wrt context_die late.
2596         (gen_subprogram_die): Re-use DIEs in local scope.
2598 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2600         PR tree-optimization/86644
2601         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2603 2018-07-25  Martin Liska  <mliska@suse.cz>
2605         PR middle-end/86645
2606         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2607         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2609 2018-07-25  Martin Liska  <mliska@suse.cz>
2611         PR sanitizer/79635
2612         * params.def: Explain ASan abbreviation and provide
2613         a documentation link.
2615 2018-07-24  Martin Sebor  <msebor@redhat.com>
2617         PR tree-optimization/86622
2618         PR tree-optimization/86532
2619         * builtins.h (string_length): Declare.
2620         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2621         (check_access): Be prepared for non-constant length ranges.
2622         (string_length): Make extern.
2623         * expr.c (string_constant): Only handle the minor non-constant
2624         array index.  Use string_constant to compute the length of
2625         a generic string constant.
2627 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2629         PR tree-optimization/86618
2630         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2631         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2633 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2635         PR tree-optimization/86636
2636         * json.cc (json::object::set): Fix comment.  Add assertions.
2637         (json::array::append): Move here from json.h.  Add comment and an
2638         assertion.
2639         (json::string::string): Likewise.
2640         * json.h (json::array::append): Move to json.cc.
2641         (json::string::string): Likewise.
2642         * optinfo-emit-json.cc
2643         (optrecord_json_writer::impl_location_to_json): Assert that we
2644         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2645         wrapper around it.  Expand the location once, rather than three
2646         times.
2647         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2648         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2649         wrappers.
2650         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2651         places.  Fix some overlong lines.
2653 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2655         * config/aarch64/aarch64-simd.md
2656         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2657         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2658         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2659         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2660         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2661         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2662         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2663         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2664         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2666 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2668         PR middle-end/86627
2669         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2670         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2671         and abs_d == d, do the power of two handling if profitable.
2673 2018-07-24  Richard Biener  <rguenther@suse.de>
2675         * match.pd: Add BIT_FIELD_REF canonicalizations.
2677 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2679         PR c/86617
2680         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2682 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2684         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2685         terminated STRING_CST object.
2687 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2689         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2691 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2693         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2694         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2695         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2696         the elements into a register.
2697         (rs6000_split_v4si_init_di_reg): Delete.
2698         (rs6000_split_v4si_init): Delete.
2699         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2700         (vsx_init_v4si): Rewrite as a define_expand.
2702 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2704         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2705         zero_extend argument from memory): New.
2707 2018-07-22  Martin Sebor  <msebor@redhat.com>
2709         PR bootstrap/86621
2710         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2711         diagnosing calls with unknown arguments unless -Walloca-larger-than
2712         is restricted to less than PTRDIFF_MAX bytes.
2714 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2716         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2718 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2720         * pretty-print.c (text_info::set_location): Remove redundant
2721         "line_table" parameter from call to rich_location::set_range.
2723 2018-07-20  Martin Sebor  <msebor@redhat.com>
2725         PR middle-end/82063
2726         * builtins.c (expand_builtin_alloca): Adjust.
2727         * calls.c (alloc_max_size): Simplify.
2728         * cgraphunit.c (cgraph_node::expand): Adjust.
2729         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2730         variables.
2731         (frame_larger_than_size): Same.
2732         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2733         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2734         Initialize.
2735         * doc/invoke.texi (GCC Command Options): Document option arguments.
2736         Explain byte-size arguments and suffixes.
2737         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2738         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2739         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2740         * doc/options.texi (UInteger): Expand.
2741         (Host_Wide_Int, ByteSize): Document new properties.
2742         * final.c (final_start_function_1): Include sizes in an error message.
2743         * function.c (frame_offset_overflow): Same.
2744         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2745         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2746         Diagnose unbounded alloca calls only for limits of less than
2747         PTRDIFF_MAX.
2748         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2749         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2750         for alloca(0).
2751         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2752         only for limits of less than PTRDIFF_MAX.
2753         * langhooks-def.h (lhd_handle_option): Change function argument
2754         to HOST_WIDE_INT.
2755         * langhooks.c (lhd_handle_option): Same.
2756         * langhooks.h (handle_option): Same.
2757         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2758         ByteSize flags.
2759         (var_type, var_type_struct): Same.
2760         (var_set): Handle ByteSize flag.
2761         * optc-gen.awk: Add comments to output to ease debugging.  Make
2762         use of HOST_WIDE_INT where appropriate.
2763         * opts-gen-save.awk:  Use %lx to format unsigned long.
2764         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2765         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2766         arguments.  Parse bytes-size suffixes.
2767         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2768         (enum_value_to_arg): Same.
2769         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2770         (handle_option): Adjust.
2771         (generate_option): Change function argument to HOST_WIDE_INT.
2772         (cmdline_handle_error): Adjust.
2773         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2774         (set_option): Change function argument to HOST_WIDE_INT.
2775         (option_enabled): Handle cl_host_wide_int.
2776         (get_option_state): Handle CLVC_SIZE.
2777         (control_warning_option): Same.
2778         * opts.c (common_handle_option): Change function argument to
2779         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2780         OPT_Wvla_larger_than_.
2781         * opts.h (enum cl_var_type): Add an enumerator.
2782         * stor-layout.c (layout_decl): Print a more meaningful warning.
2783         * toplev.c (output_stack_usage): Adjust.
2785 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2787         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2788         call to inline_expand_builtin_string_cmp.
2789         (expand_builtin_strcmp): Likewise.
2790         (expand_builtin_strncmp): Likewise.
2791         (inline_string_cmp): Delete the last parameter, change char_type_node
2792         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2793         two operands.
2794         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2795         the inlining expansion on target where the type of the call has same or
2796         narrower precision than unsigned char.
2798 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2800         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2801         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2802         * common.opt (fsave-optimization-record): New option.
2803         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2804         * doc/invoke.texi (-fsave-optimization-record): New option.
2805         * dumpfile.c: Include "optinfo-emit-json.h".
2806         (struct kv_pair): Move to coretypes.h.
2807         (optgroup_options): Make non-static.
2808         (dump_context::end_scope): Call
2809         optimization_records_maybe_pop_dump_scope.
2810         * dumpfile.h (optgroup_options): New decl.
2811         * json.cc: New file.
2812         * json.h: New file.
2813         * optinfo-emit-json.cc: New file.
2814         * optinfo-emit-json.h: New file.
2815         * optinfo.cc: Include "optinfo-emit-json.h".
2816         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2817         (optinfo_enabled_p): Check optimization_records_enabled_p.
2818         (optinfo_wants_inlining_info_p): Likewise.
2819         * optinfo.h: Update comment.
2820         * profile-count.c (profile_quality_as_string): New function.
2821         * profile-count.h (profile_quality_as_string): New decl.
2822         (profile_count::quality): New accessor.
2823         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2824         and optinfo_emit_json_cc_tests.
2825         * selftest.h (selftest::json_cc_tests): New decl.
2826         (selftest::optinfo_emit_json_cc_tests): New decl.
2827         * toplev.c: Include "optinfo-emit-json.h".
2828         (compile_file): Call optimization_records_finish.
2829         (do_compile): Call optimization_records_start.
2830         * tree-ssa-live.c: Include optinfo.h.
2831         (remove_unused_scope_block_p): Retain inlining information if
2832         optinfo_wants_inlining_info_p returns true.
2834 2018-07-20  Richard Biener  <rguenther@suse.de>
2836         PR debug/86585
2837         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2838         to cover -flto-partition=none.
2840 2018-07-20  Martin Liska  <mliska@suse.cz>
2842         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2843         (get_decl_source_range): Remove unused function.
2845 2018-07-20  Richard Biener  <rguenther@suse.de>
2847         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2848         (struct vn_phi_s): Likewise.
2849         (struct vn_reference_s): Likewise.
2850         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2851         for searching the slot of an entry known to be in the hash itself.
2852         (vn_phi_hasher::equal): Likewise.
2853         (vn_reference_hasher::equal): Likewise.
2854         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2855         globals.
2856         (optimistic_info, current_info): Remove, keeping only valid_info.
2857         (vn_reference_lookup_1): Remove fallback lookup.
2858         (vn_reference_lookup_2): Likewise.
2859         (vn_nary_op_lookup_1): Likewise.
2860         (vn_phi_lookup): Likewise.
2861         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2862         hash element.
2863         (vn_reference_insert): Adjust, chain the inserted hash element
2864         at last_inserted_ref.
2865         (vn_reference_insert_pieces): Likewise.
2866         (visit_reference_op_call): Likewise.
2867         (vn_nary_op_insert_into): Chain the inserted hash element at
2868         last_inserted_nary.
2869         (vn_nary_op_insert_pieces): Adjust.
2870         (vn_nary_op_insert): Likewise.
2871         (vn_nary_op_insert_stmt): Likewise.
2872         (vn_phi_insert): Adjust, chain the inserted hash element at
2873         last_inserted_phi.
2874         (process_scc): Remove clearing and copying the optimistic
2875         table.  Instead remove elements inserted during an optimistic
2876         iteration from the single table we maintain.
2877         (init_scc_vn): Adjust.
2878         (free_scc_vn): Likewise.
2879         (sccvn_dom_walker::record_cond): Likewise.
2880         (sccvn_dom_walker::after_dom_children): Likewise.
2882 2018-07-19  Martin Sebor  <msebor@redhat.com>
2884         PR tree-optimization/84047
2885         PR tree-optimization/83776
2886         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2887         (check_array_bounds): Call it.
2889 2018-07-19  Martin Sebor  <msebor@redhat.com>
2891         * align.h (align_flags): Use member initialization.
2893 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2895         * Makefile.in (OBJS): Add optinfo.o.
2896         * coretypes.h (class symtab_node): New forward decl.
2897         (struct cgraph_node): New forward decl.
2898         (class varpool_node): New forward decl.
2899         * dump-context.h: New file.
2900         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2901         "tree-pass.h".
2902         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2903         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2904         (set_alt_dump_file): Likewise.
2905         (dump_context::~dump_context): New dtor.
2906         (dump_gimple_stmt): Move implementation to...
2907         (dump_context::dump_gimple_stmt): ...this new member function.
2908         Add the stmt to any pending optinfo, creating one if need be.
2909         (dump_gimple_stmt_loc): Move implementation to...
2910         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2911         Start a new optinfo and add the stmt to it.
2912         (dump_gimple_expr): Move implementation to...
2913         (dump_context::dump_gimple_expr): ...this new member function.
2914         Add the stmt to any pending optinfo, creating one if need be.
2915         (dump_gimple_expr_loc): Move implementation to...
2916         (dump_context::dump_gimple_expr_loc): ...this new member function.
2917         Start a new optinfo and add the stmt to it.
2918         (dump_generic_expr): Move implementation to...
2919         (dump_context::dump_generic_expr): ...this new member function.
2920         Add the tree to any pending optinfo, creating one if need be.
2921         (dump_generic_expr_loc): Move implementation to...
2922         (dump_context::dump_generic_expr_loc): ...this new member
2923         function.  Add the tree to any pending optinfo, creating one if
2924         need be.
2925         (dump_printf): Move implementation to...
2926         (dump_context::dump_printf_va): ...this new member function.  Add
2927         the text to any pending optinfo, creating one if need be.
2928         (dump_printf_loc): Move implementation to...
2929         (dump_context::dump_printf_loc_va): ...this new member function.
2930         Start a new optinfo and add the stmt to it.
2931         (dump_dec): Move implementation to...
2932         (dump_context::dump_dec): ...this new member function.  Add the
2933         value to any pending optinfo, creating one if need be.
2934         (dump_context::dump_symtab_node): New member function.
2935         (dump_context::get_scope_depth): New member function.
2936         (dump_context::begin_scope): New member function.
2937         (dump_context::end_scope): New member function.
2938         (dump_context::ensure_pending_optinfo): New member function.
2939         (dump_context::begin_next_optinfo): New member function.
2940         (dump_context::end_any_optinfo): New member function.
2941         (dump_context::s_current): New global.
2942         (dump_context::s_default): New global.
2943         (dump_scope_depth): Delete global.
2944         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2945         (dump_symtab_node): New function.
2946         (get_dump_scope_depth): Reimplement in terms of dump_context.
2947         (dump_begin_scope): Likewise.
2948         (dump_end_scope): Likewise.
2949         (selftest::temp_dump_context::temp_dump_context): New ctor.
2950         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2951         (selftest::verify_item): New function.
2952         (ASSERT_IS_TEXT): New macro.
2953         (ASSERT_IS_TREE): New macro.
2954         (ASSERT_IS_GIMPLE): New macro.
2955         (selftest::test_capture_of_dump_calls): New test.
2956         (selftest::dumpfile_c_tests): Call it.
2957         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2958         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2959         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2960         descriptive comment.
2961         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2962         (dump_node, dump_bb): Move these unrelated decls.
2963         (class dump_manager): Add leading comment.
2964         * optinfo.cc: New file.
2965         * optinfo.h: New file.
2967 2018-07-19  Michael Collison  <michael.collison@arm.com>
2968             Richard Henderson <rth@redhat.com>
2970         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2971         (subti): Handle op1 zero.
2972         (subvti4, usub4ti4): New.
2973         (*sub<GPI>3_compare1_imm): New.
2974         (sub<GPI>3_carryinCV): New.
2975         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2976         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2978 2018-07-19  Michael Collison  <michael.collison@arm.com>
2979             Richard Henderson <rth@redhat.com>
2981         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2982         (addti3): Create simpler code if low part is already known to be 0.
2983         (addvti4, uaddvti4): New.
2984         (*add<GPI>3_compareC_cconly_imm): New.
2985         (*add<GPI>3_compareC_cconly): New.
2986         (*add<GPI>3_compareC_imm): New.
2987         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2988         handle constants within this pattern..
2989         (*add<GPI>3_compareV_cconly_imm): New.
2990         (*add<GPI>3_compareV_cconly): New.
2991         (*add<GPI>3_compareV_imm): New.
2992         (add<GPI>3_compareV): New.
2993         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2994         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2995         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2996         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2997         with 'comparison' operator.
2998         (*add<GPI>3_compareV_cconly_imm): Ditto.
2999         (*add<GPI>3_compareV_cconly): Ditto.
3000         (*add<GPI>3_compareV_imm): Ditto.
3001         (add<GPI>3_compareV): Ditto.
3002         (add<mode>3_carryinC): Ditto.
3003         (*add<mode>3_carryinC_zero): Ditto.
3004         (*add<mode>3_carryinC): Ditto.
3005         (add<mode>3_carryinV): Ditto.
3006         (*add<mode>3_carryinV_zero): Ditto.
3007         (*add<mode>3_carryinV): Ditto.
3009 2018-07-19  Michael Collison  <michael.collison@arm.com>
3010             Richard Henderson <rth@redhat.com>
3012         * config/aarch64/aarch64-modes.def (CC_V): New.
3013         * config/aarch64/aarch64-protos.h
3014         (aarch64_addti_scratch_regs): Declare
3015         (aarch64_subvti_scratch_regs): Declare.
3016         (aarch64_expand_subvti): Declare.
3017         (aarch64_gen_unlikely_cbranch): Declare
3018         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3019         for signed overflow using CC_Vmode.
3020         (aarch64_get_condition_code_1): Handle CC_Vmode.
3021         (aarch64_gen_unlikely_cbranch): New function.
3022         (aarch64_addti_scratch_regs): New function.
3023         (aarch64_subvti_scratch_regs): New function.
3024         (aarch64_expand_subvti): New function.
3026 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3028         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3029         extension.
3030         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3031         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3032         extension.
3034 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3036         PR target/83009
3037         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3038         address check not strict.
3040 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3042         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3043         Umq with Umn.
3044         (store_pair_lanes<mode>): Likewise.
3045         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3046         enum value 'ADDR_QUERY_LDP_STP_N'.
3047         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3048         (aarch64_print_address_internal): Add declaration.
3049         (aarch64_print_ldpstp_address): Remove.
3050         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3051         (aarch64_print_operand): Change printing of 'y'.
3052         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3053         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3054         'true' rather than '1'.
3055         * config/aarch64/constraints.md (Uml): Likewise.
3056         (Uml): Rename to Umn.
3057         (Umq): Remove.
3059 2018-07-19  Richard Biener  <rguenther@suse.de>
3061         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3062         a trailing array.
3063         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3064         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3065         (vn_reference_hasher): Likewise.
3066         (struct vn_tables_s): Remove obstack and alloc-pool members.
3067         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3068         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3069         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3070         (vn_reference_insert_pieces): Likewise.
3071         (alloc_vn_nary_op_noinit): Adjust.
3072         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3073         (vn_phi_eq): Adjust.
3074         (shared_lookup_phiargs): Remove.
3075         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3076         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3077         (visit_reference_op_call): Likewise.
3078         (copy_nary, copy_phi, copy_reference): Remove.
3079         (process_scc): Rewind the obstack when iterating.  Do not
3080         copy the elements to valid_info but just move them from one
3081         hashtable to the other.
3082         (allocate_vn_table): Adjust.
3083         (free_vn_table): Likewise.
3084         (init_scc_vn): Likewise.
3085         (free_scc_vn): Likewise.
3087 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3089         PR target/86560
3090         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3091         indirect_return as function type attribute.
3092         (ix86_attribute_table): Change indirect_return to function
3093         type attribute.
3094         * doc/extend.texi: Update indirect_return attribute.
3096 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3098         * wide-int.h (widest2_int): New.
3099         * gimple-fold.c (arith_overflowed_p): Use it.
3100         * tree.h (widest2_int_cst): New.
3101         * tree-vrp.c (wide_int_binop_overflow): Rename from
3102         vrp_int_const_binop.
3103         Rewrite to work on trees.
3104         (extract_range_from_multiplicative_op_1): Abstract code to...
3105         (wide_int_range_min_max): ...here.
3106         (wide_int_range_cross_product): ...and here.
3107         (extract_range_from_binary_expr_1): Abstract overflow code to...
3108         (wide_int_range_mult_wrapping): ...here.
3109         * tree-vrp.h (wide_int_range_cross_product): New.
3110         (wide_int_range_mult_wrapping): New.
3112 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3113             Julia Koval  <julia.koval@intel.com>
3115         * config/i386/x86-tune-costs.h (skylake_memcpy,
3116         skylake_memset): Replace rep_prefix with unrolling for size 512.
3118 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3120         PR middle-end/86544
3121         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3122         comparision with EQ_EXPR in last stmt.
3124 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3126         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3127         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3128         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3129         previously known as "PowerPC AltiVec Built-in Functions".  Move
3130         some material to new subsubsections "PowerPC AltiVec Built-in
3131         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3132         ISA 2.07".
3133         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3134         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3135         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3136         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3138 2018-07-18  Richard Biener  <rguenther@suse.de>
3140         PR tree-optimization/86557
3141         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3142         EXACT_DIV_EXPR.
3144 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3146         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3148 2018-07-17  Jeff Law  <law@redhat.com>
3150         * config/arm/arm.c (get_label_padding): Update for recent
3151         changes to label_to_alignment.
3153         PR tree-optimization/86010
3154         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3156         * config/mips/mips.c (vr4130_align_insns): Update for recent
3157         changes to label_to_alignment.
3159         * config/frv/frv.c (frv_label_align): Update for recent changes
3160         to label_to_alignment.
3162         * config/nios2/nios2.c (nios2_label_align): Update for recent
3163         changes which dropped ALIGN_LABELS_LOG.
3165 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3167         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3168         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3170 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3172         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3173         deprecated align_labels_log.
3175 2018-07-17  Richard Biener  <rguenther@suse.de>
3177         PR lto/86456
3178         * dwarf2out.c (init_sections_and_labels): Always generate
3179         a debug_line_str_section for early LTO debug.
3180         (dwarf2out_finish): Reset debug_line_str_hash output early.
3181         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3182         with fat LTO part.
3183         (dwarf2out_early_finish): Output debug_line_str.
3185 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3187         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3188         index register on z196 or later.
3190 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3192         * config/s390/s390.c (s390_default_align): Set default function
3193         alignment to 16.
3194         (s390_override_options_after_change): Call s390_default align.
3195         (s390_option_override_internal): Call s390_default_align.
3196         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3198 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3200         PR middle-end/86542
3201         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3202         to _looptemp_ clauses, other than the first two.
3204 2018-07-17  Martin Liska  <mliska@suse.cz>
3206         * opts.c: Do not enable OPT_falign_* for -Os.
3208 2018-07-17  Martin Liska  <mliska@suse.cz>
3210         * align.h (MAX_CODE_ALIGN): New.
3211         (MAX_CODE_ALIGN_VALUE): New.
3212         * common/config/i386/i386-common.c (ix86_handle_option):
3213         (MAX_CODE_ALIGN): Moved to align.h.
3214         * final.c (MAX_CODE_ALIGN): Likewise.
3215         * opts.c (parse_and_check_align_values):
3216         (MAX_CODE_ALIGN): Likewise.
3217         (MAX_CODE_ALIGN_VALUE): Likewise.
3219 2018-07-17  Martin Liska  <mliska@suse.cz>
3221         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3222         in order to fulfil coding style.
3223         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3224         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3225         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3226         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3227         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3228         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3229         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3230         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3231         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3233 2018-07-17  Martin Liska  <mliska@suse.cz>
3235         * align.h: New file.
3236         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3237         directly.
3238         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3239         align_flags of label_to_alignment.
3240         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3241         align_flags class.
3242         * config/m68k/m68k.c: Do not use removed align_labels_value and
3243         align_loops_value.
3244         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3245         (LOOP_ALIGN): Likewise.
3246         (LABEL_ALIGN): Likewise.
3247         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3248         Remove not used macro.
3249         (rs6000_loop_align): Change return type to align_flags.
3250         (rs6000_loop_align_max_skip): Remove.
3251         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3252         Change return type to align_flags.
3253         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3254         Remove not used macro.
3255         (rs6000_loop_align):  Change return type to align_flags.
3256         (rs6000_loop_align_max_skip): Remove.
3257         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3258         * config/rx/rx-protos.h (rx_align_for_label): Make it
3259         static function.
3260         * config/rx/rx.c (rx_align_for_label): Change return type
3261         to align_flags.
3262         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3263         macro definitions.
3264         into align_flags class.
3265         (LABEL_ALIGN): Likewise.
3266         (LOOP_ALIGN): Likewise.
3267         * config/s390/s390.c (s390_label_align): Use align_flags
3268         class member.
3269         (s390_asm_output_function_label): Likewise.
3270         * config/sh/sh.c (sh_override_options_after_change):
3271         Use align_flags class directly without macros.
3272         (find_barrier): Likewise.
3273         (barrier_align): Likewise.
3274         (sh_loop_align): Likewise.
3275         * config/spu/spu.c (spu_option_override):
3276         Use align_flags_tuple::get_value instead of removed macros.
3277         (spu_sched_init): Likewise.
3278         * config/spu/spu.h (GTY): Likewise.
3279         * config/visium/visium.c (visium_option_override):
3280         Set "8" as default secondary alignment.
3281         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3282         in order to guarantee secondary alignment of 8.
3283         * coretypes.h: Include align.h header file.
3284         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3285         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3286         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3287         * doc/tm.texi.in: Likewise.
3288         * final.c (struct label_alignment): Remove not used structure.
3289         (LABEL_ALIGN): Change type to align_flags.
3290         (LOOP_ALIGN): Likewise.
3291         (JUMP_ALIGN): Likewise.
3292         (default_loop_align_max_skip): Remove.
3293         (default_label_align_max_skip): Likewise.
3294         (default_jump_align_max_skip): Likewise.
3295         (default_label_align_after_barrier_max_skip):
3296         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3297         (LABEL_TO_MAX_SKIP): Remove.
3298         (label_to_alignment): Return align_flags type instead of integer.
3299         (label_to_max_skip): Remove.
3300         (align_fuzz): Use align_flags type.
3301         (compute_alignments): Use align_flags type and use align_flags::max
3302         to combine multiple alignments.
3303         (grow_label_align): Grow vec instead of C array.
3304         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3305         (shorten_branches):  Use align_flags type and use align_flags::max
3306         to combine multiple alignments.
3307         (final_scan_insn_1): Remove usage of secondary alignment that comes
3308         from label alignment, but instead use proper secondary alignment
3309         which is computed in grow_label_align.
3310         * flags.h (struct align_flags_tuple): Move to align.h.
3311         (struct align_flags): Likewise.
3312         (state_align_loops): Rename to align_loops.
3313         (state_align_jumps): Rename to align_jumps.
3314         (state_align_labels): Rename to align_labels.
3315         (state_align_functions): Rename to align_functions.
3316         (align_loops_log): Remove.
3317         (align_jumps_log): Remove.
3318         (align_labels_log): Remove.
3319         (align_functions_log): Remove.
3320         (align_loops_max_skip): Remove.
3321         (align_jumps_max_skip): Remove.
3322         (align_labels_max_skip): Remove.
3323         (align_functions_max_skip): Remove.
3324         (align_loops_value): Remove.
3325         (align_jumps_value): Remove.
3326         (align_labels_value): Remove.
3327         (align_functions_value): Remove.
3328         * output.h (label_to_alignment): Change return type to align_flags.
3329         (label_to_max_skip): Remove.
3330         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3331         jump_align_max_skip macros.
3332         * targhooks.h (default_loop_align_max_skip): Remove.
3333         (default_label_align_max_skip): Likewise.
3334         (default_jump_align_max_skip): Likewise.
3335         (default_label_align_after_barrier_max_skip): Remove.
3336         * toplev.c (read_log_maxskip): Use ::normalize function.
3337         (parse_N_M): Remove not used argument and also call ::normalize.
3338         (parse_alignment_opts): Do not pass unused arguments.
3339         * varasm.c (assemble_start_function): Use directly align_functions
3340         instead of removed macros.
3341         * system.h: Do not poison removed macros.
3343 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3345         PR middle-end/86539
3346         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3347         and cond temporaries don't have reference type if iterator has
3348         pointer type.  For init use &for_pre_body instead of pre_p if
3349         for_pre_body is non-empty.
3351 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3353         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3354         double-double modes to SFmode directly directly.
3355         (trunc<mode>sf2_fprs): Delete.
3357 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3359         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3360         for conversions between IFmode and the decimal floating point modes.
3361         (init_float128_ieee): Use the correct names for conversions between
3362         KFmode and the decimal floating point modes.
3364 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3366         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3367         for the conversions between TDmode and IFmode.
3368         (init_float128_ieee): Use more correct names for the conversions
3369         between TDmode and KFmode.
3371 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3373         PR tree-optimization/86526
3374         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3375         (inline_expand_builtin_string_cmp): Likewise.
3376         (inline_string_cmp): Likewise.  Use c_readstr instead of
3377         builtin_memcpy_read_str.  Add unit_mode temporary.
3379 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3381         PR middle-end/86528
3382         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3383         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3385 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3387         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3388         Alphabetize prototypes of built-in functions, separating out
3389         built-in functions that are listed in this section but should be
3390         described elsewhere.
3392 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3394         PR target/86511
3395         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3396         conditional move when trapping comparison was split to a
3397         non-trapping one (and vice versa).
3399 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3401         * config/s390/s390.c (s390_function_profiler): Generate nops
3402         instead of profiler call sequences.
3403         * config/s390/s390.opt: Add the new option.
3405 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3407         * config/s390/s390.c (s390_function_profiler): Generate
3408         __mcount_loc section.
3409         * config/s390/s390.opt: Add the new option.
3411 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3413         * common.opt: Add the new warning.
3414         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3415         %r0,__fentry__" when -mfentry is specified.
3416         (s390_option_override_internal): Disallow -mfentry for 31-bit
3417         CPUs.
3418         * config/s390/s390.opt: Add the new option.
3420 2018-07-16  Richard Biener  <rguenther@suse.de>
3422         PR lto/86523
3423         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3424         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3426 2018-07-16  Martin Liska  <mliska@suse.cz>
3428         PR ipa/86529
3429         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3430         to ::get_create.
3432 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3434         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3436 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3438         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3439         for ARCHS4x.
3440         * config/arc/arc-cpus.def (hs4x): New cpu.
3441         (hs4xd): Likewise.
3442         * config/arc/arc-tables.opt: Regenerate.
3443         * config/arc/arc.c (arc_sched_issue_rate): New function.
3444         (TARGET_SCHED_ISSUE_RATE): Define.
3445         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3446         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3447         fpu_cvt.
3448         (attr tune): Add ARCHS4x tune values.
3449         (attr tune_dspmpy): Define.
3450         (*tst): Correct instruction type.
3451         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3452         * config/arc/arcHS4x.md: New file.
3453         * config/arc/fpu.md: Update instruction type attributes.
3454         * config/arc/t-multilib: Regenerate.
3456 2018-07-16  Tom de Vries  <tdevries@suse.de>
3458         PR debug/86455
3459         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3461 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3463         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3464         early clobber.
3466 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3468         PR tree-optimization/86514
3469         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3470         conversion to a boolean type from a type with greater precision.
3472 2018-07-16  Tom de Vries  <tdevries@suse.de>
3474         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3475         dump_flags request TDF_SLIM.
3477 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3479         * fold-const.c (int_const_binop_1): Abstract...
3480         (wide_int_binop): ...wide int code here.
3481         (poly_int_binop): ...poly int code here.
3482         Abstract the rest of int_const_binop_1 into int_const_binop.
3483         * fold-const.h (wide_int_binop): New.
3484         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3485         Remove useless PLUS/MINUS_EXPR case.
3486         (zero_nonzero_bits_from_vr): Move wide int code...
3487         (zero_nonzero_bits_from_bounds): ...here.
3488         (extract_range_from_binary_expr_1): Move mask optimization code...
3489         (range_easy_mask_min_max): ...here.
3490         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3491         (range_easy_mask_min_max): New.
3493 2018-07-15  Jeff Law  <law@redhat.com>
3495         PR target/85993
3496         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3497         block.
3499 2018-07-14  Jim Wilson  <jimw@sifive.com>
3501         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3503 2018-07-14  Paul Koning  <ni1d@arrl.net>
3505         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3507 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3509         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3510         copying section.
3512 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3513             Steve Munroe  <munroesj52@gmail.com>
3515         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3516         (_mm_andnot_si128): Likewise.
3517         (_mm_or_si128): Likewise.
3518         (_mm_xor_si128): Likewise.
3520 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3522         PR middle-end/78809
3523         * builtins.c (expand_builtin_memcmp): Inline the calls first
3524         when result_eq is false.
3525         (expand_builtin_strcmp): Inline the calls first.
3526         (expand_builtin_strncmp): Likewise.
3527         (inline_string_cmp): New routine. Expand a string compare
3528         call by using a sequence of char comparison.
3529         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3530         a call to str(n)cmp/memcmp.
3531         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3532         New option.
3533         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3535 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3537         * config/arm/driver-arm.c: Include arm-native.h.
3538         (host_detect_local_cpu): Use auto-generated data tables.
3539         (vendors, arm_cpu_table): Delete.  Move part information to ...
3540         * config/arm/arm-cpus.in: ... here.
3541         * config/arm/parsecpu.awk (gen_native): New function.
3542         (vendor, part): New CPU fields.
3543         (END): Add support for building the native CPU detection tables.
3544         * config/arm/t-arm (arm-native.h): Add build rule.
3545         (driver-arm.o): Add dependency on arm-native.h.
3547 2018-07-13  Richard Biener  <rguenther@suse.de>
3549         PR middle-end/85974
3550         * match.pd (addr1 - addr2): Allow either of the operand to
3551         have a conversion.
3553 2018-07-13  Tom de Vries  <tdevries@suse.de>
3555         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3556         in remap_ssa_name.
3558 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3560         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3561         arrays instead of numbered variables.
3563 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3565         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3566         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3568 2018-07-13  Richard Biener  <rguenther@suse.de>
3570         PR debug/86452
3571         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3572         instead of get_context_die.
3574 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3575             Richard Biener  <rguenther@suse.de>
3577         PR middle-end/86489
3578         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3579         that the loop latch destination where phi is defined.
3581 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3583         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3584         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3585         (riscv_set_current_function): Extract getting interrupt type to new
3586         function.
3587         (riscv_get_interrupt_type): New function.
3588         (riscv_merge_decl_attributes): New function, checking interrupt type is
3589         same.
3590         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3592 2018-07-12  Paul Koning  <ni1d@arrl.net>
3594         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3595         directive.
3597 2018-07-12  Paul Koning  <ni1d@arrl.net>
3599         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3600         zero reference, add doloop_end instead.
3601         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3602         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3603         detail for doloop_end.
3605 2018-07-12  Martin Sebor  <msebor@redhat.com>
3607         PR c/86453
3608         * attribs.c (decl_attributes): Reject conflicting attributes before
3609         calling attribute handlers.
3611 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3613         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3614          parameter.
3615         (gcc::dump_manager::get_dump_file_name): likewise.
3616         (dump_begin): Likewise.
3617         * dumpfile.h (dump_begin): Update prototype.
3618         (gcc::dump_manager::get_dump_file_name,
3619         gcc::dump_manager::get_dump_file_name): Update prototype.
3621 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3623         * internal-fn.h (vectorizable_internal_fn_p): New function.
3624         * tree-vect-slp.c (compatible_calls_p): Likewise.
3625         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3626         to internal functions.
3627         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3629 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3631         * fold-const.h (inverse_conditions_p): Declare.
3632         * fold-const.c (inverse_conditions_p): New function.
3633         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3634         that test the inverse condition of a conditional internal function.
3635         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3636         * internal-fn.c (internal_fn_mask_index): Handle conditional
3637         internal functions.
3638         (vectorized_internal_fn_supported_p): New function.
3639         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3640         (any_pred_load_store): Replace with...
3641         (need_to_predicate): ...this new variable.
3642         (redundant_ssa_names): New variable.
3643         (ifcvt_can_use_mask_load_store): Move initial checks to...
3644         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3645         for which a conditional internal function exists.
3646         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3647         instead of ifcvt_can_use_mask_load_store.  Update after variable
3648         name change.
3649         (predicate_load_or_store): New function, split out from
3650         predicate_mem_writes.
3651         (check_redundant_cond_expr): New function.
3652         (value_available_p): Likewise.
3653         (predicate_rhs_code): Likewise.
3654         (predicate_mem_writes): Rename to...
3655         (predicate_statements): ...this.  Use predicate_load_or_store
3656         and predicate_rhs_code.
3657         (combine_blocks, tree_if_conversion): Update after above name changes.
3658         (ifcvt_local_dce): Handle redundant_ssa_names.
3659         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3660         general conditional functions.
3661         * tree-vect-stmts.c (vectorizable_call): Likewise.
3663 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3664             Alan Hayward  <alan.hayward@arm.com>
3665             David Sherwood  <david.sherwood@arm.com>
3667         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3668         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3669         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3670         plus and minus and convert them into IFN_COND_FMA-based sequences.
3671         (convert_mult_to_fma): Handle conditional plus and minus.
3673 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3675         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3676         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3677         (cond_fnms_optab): New optabs.
3678         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3679         internal functions.
3680         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3681         * internal-fn.h (get_conditional_internal_fn): Declare.
3682         (get_unconditional_internal_fn): Likewise.
3683         * internal-fn.c (cond_ternary_direct): New macro.
3684         (expand_cond_ternary_optab_fn): Likewise.
3685         (direct_cond_ternary_optab_supported_p): Likewise.
3686         (FOR_EACH_COND_FN_PAIR): Likewise.
3687         (get_conditional_internal_fn): New function.
3688         (get_unconditional_internal_fn): Likewise.
3689         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3690         (gimple_match_op::gimple_match_op): Add a new overload for 5
3691         operands.
3692         (gimple_match_op::set_op): Likewise.
3693         (gimple_resimplify5): Declare.
3694         * genmatch.c (decision_tree::gen): Generate simplifications for
3695         5 operands.
3696         * gimple-match-head.c (gimple_simplify): Define an overload for
3697         5 operands.  Handle calls with 5 arguments in the top-level overload.
3698         (convert_conditional_op): Handle conversions from unconditional
3699         internal functions to conditional ones.
3700         (gimple_resimplify5): New function.
3701         (build_call_internal): Pass a fifth operand.
3702         (maybe_push_res_to_seq): Likewise.
3703         (try_conditional_simplification): Try converting conditional
3704         internal functions to unconditional internal functions.
3705         Handle 3-operand unconditional forms.
3706         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3707         Define ternary equivalents of the current rules for binary conditional
3708         internal functions.
3709         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3710         ternary operations.
3711         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3712         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3713         (optab): Handle them.
3714         (SVE_COND_FP_TERNARY): New int iterator.
3715         (sve_fmla_op, sve_fmad_op): New int attributes.
3716         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3717         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3718         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3720 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3722         * target.def (preferred_else_value): New target hook.
3723         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3724         * doc/tm.texi: Regenerate.
3725         * targhooks.h (default_preferred_else_value): Declare.
3726         * targhooks.c (default_preferred_else_value): New function.
3727         * internal-fn.h (conditional_internal_fn_code): Declare.
3728         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3729         (get_conditional_internal_fn): Use it.
3730         (conditional_internal_fn_code): New function.
3731         * gimple-match.h (gimple_match_cond): New struct.
3732         (gimple_match_op): Add a cond member function.
3733         (gimple_match_op::gimple_match_op): Update all forms to take a
3734         gimple_match_cond.
3735         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3736         for the suboperation, but don't specify a particular else_value.
3737         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3738         (visit_nary_op, visit_reference_op_load): Pass
3739         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3740         * gimple-match-head.c: Include tree-eh.h
3741         (convert_conditional_op): New function.
3742         (maybe_resimplify_conditional_op): Likewise.
3743         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3744         (gimple_resimplify2): Likewise.
3745         (gimple_resimplify3): Likewise.
3746         (gimple_resimplify4): Likewise.
3747         (maybe_push_res_to_seq): Return null for conditional operations.
3748         (try_conditional_simplification): New function.
3749         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3750         constructor.
3751         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3752         IFN_COND_* call.
3753         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3754         function.
3755         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3757 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3759         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3760         DECL_FCONTEXT
3761         (hash_tree): Do not hash DECL_FCONTEXT
3762         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3763         Do not stream DECL_FCONTEXT.
3764         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3765         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3767 2018-07-12  Richard Biener  <rguenther@suse.de>
3769         PR debug/86462
3770         * dwarf2out.c (gen_block_die): Only output blocks when they have
3771         at least one !DECL_IGNORED_P variable.
3773 2018-07-12  Richard Biener  <rguenther@suse.de>
3775         PR target/84829
3776         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3777         Remove -mieee-fp handling.
3779 2018-07-12  Richard Biener  <rguenther@suse.de>
3781         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3782         left-over from last patch.
3784 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3786         PR tree-optimization/86492
3787         * gimple-ssa-store-merging.c
3788         (imm_store_chain_info::coalesce_immediate_stores): Call
3789         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3791 2018-07-12  Richard Biener  <rguenther@suse.de>
3793         PR middle-end/86479
3794         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3795         move possibly trapping operations into the conditional.
3797 2018-07-12  Richard Biener  <rguenther@suse.de>
3799         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3800         (vn_lookup_simplify_result): Remove recursion limit applied
3801         here.
3802         (vn_nary_build_or_lookup_1): Adjust.
3803         (try_to_simplify): Likewise.
3804         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3805         here.
3806         (gimple_resimplify2): Likewise.
3807         (gimple_resimplify3): Likewise.
3808         (gimple_resimplify4): Likewise.
3810 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3812         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3813         Use __mmask64 type instead of __mmask8 for __M argument.
3814         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3815         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3816         __U argument.
3817         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3818         __mmask16 for __M argument.
3819         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3820         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3821         to __mmask16 instead of __mmask8.
3822         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3823         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3824         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3825         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3826         instead of __mmask16 for __U argument.
3827         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3828         __mmask16 instead of __mmask8 for __U argument.
3829         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3830         __U argument.
3831         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3832         __mmask16.
3833         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3834         argument.
3835         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3836         __U argument.
3837         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3838         __mmask16.
3839         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3840         of __mmask16.
3841         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3842         __U argument.
3843         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3844         __U argument.
3845         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3846         __U argument.
3847         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3848         __U argument.
3849         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3850         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3851         return type as well as __M argument type and all casts from __mmask8
3852         to __mmask32.
3853         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3854         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3855         return type as well as __M argument type and all casts from __mmask8
3856         to __mmask16.
3857         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3858         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3859         return type as well as __M argument type and all casts from __mmask8
3860         to __mmask32.
3861         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3862         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3863         return type as well as __M argument type and all casts from __mmask8
3864         to __mmask16.
3865         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3866         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3867         __mmask16.
3869 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3871         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3872         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3873         for __U argument.
3875 2018-07-11  Paul Koning  <ni1d@arrl.net>
3877         * doc/md.texi (define_subst): Document how multiple occurrences of
3878         the same argument in the replacement pattern are handled.
3880 2018-07-11  Paul Koning  <ni1d@arrl.net>
3882         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3883         alphabetical order.
3884         (Common Type Attributes): Add "mode" attribute.
3886 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3888         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3889         stream DECL_ORIGINAL_TYPE.
3890         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3891         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3892         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3893         Do not walk original type.
3894         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3895         external decls.
3896         (write_ts_decl_non_common_tree_pointers): Do not stream
3897         DECL_ORIGINAL_TYPE
3898         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3899         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3901 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3903         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3904         thread twice from the same starting edge.
3906 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3908         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3909         * gimple.c (gimple_call_nonnull_result_p): ...here...
3910         (gimple_call_nonnull_arg): ...and here.
3911         * gimple.h (gimple_call_nonnull_result_p): New.
3912         (gimple_call_nonnull_arg): New.
3914 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3916         * config/arm/arm-cpus.in: Move information from fpu field of each
3917         cpu definition to the isa field.
3918         * config/arm/parsecpu.awk (fpu): Delete match rule.
3919         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3921 2018-07-11  Richard Biener  <rguenther@suse.de>
3923         PR debug/86457
3924         * dwarf2out.c (init_sections_and_labels): Use
3925         output_asm_line_debug_info consistently.
3926         (dwarf2out_early_finish): Likewise.
3927         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3928         type units.
3930 2018-07-11  Richard Biener  <rguenther@suse.de>
3932         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3933         Rework father_bb setting in a way to avoid propagating constants
3934         multiple times on a loop body.
3936 2018-07-10  Mark Wielaard  <mark@klomp.org>
3938         PR debug/86459
3939         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3941 2018-07-10  Richard Biener  <rguenther@suse.de>
3943         * hash-map.h (hash_map::iterator::operator*): Return
3944         references to key and value.
3946 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3948         PR c++/86443
3949         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3950         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3951         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3952         (gimplify_omp_for): For composite loops, move outer
3953         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3954         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3955         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3956         TREE_LIST for both the original class iterator and the "last" helper
3957         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3958         loop, remember has_decl_expr from outer composite loops for the
3959         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3961 2018-07-09  Martin Sebor  <msebor@redhat.com>
3963         PR middle-end/77357
3964         PR middle-end/86428
3965         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3966         accessing implicitly initialized array elements.
3967         * expr.c (string_constant): Handle string initializers of
3968         character arrays within aggregates.
3969         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3970         Store element offset.  As a special case, handle zero size.
3971         (fold_nonarray_ctor_reference): Same.
3972         (fold_ctor_reference): Add argument.  Store subobject offset.
3973         * gimple-fold.h (fold_ctor_reference): Add argument.
3975 2018-07-09  Paul Koning  <ni1d@arrl.net>
3977         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3978         (pdp11_insn_cost): New function.
3979         (pdp11_md_asm_adjust): New function.
3980         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3981         (pdp11_rtx_costs): Update to match machine better.
3982         (output_addr_const_pdp11): Correct format mismatch warnings.
3983         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3984         * config/pdp11/pdp11.md: General change to add base_cost and/or
3985         length attributes for use by new pdp11_insn_cost function.
3986         (MIN_BRANCH): Correct definition.
3987         (MIN_SOB): Ditto.
3988         (doloop_end): Use standard pattern name for looping pattern.
3989         (doloop_end_nocc): New.
3990         (movsf): Add another constraint alternative.
3991         (zero_extendqihi2): Add constraint alternatives for not in place
3992         extend.
3993         (zero_extendhisi2): Remove.
3994         (shift patterns): Add CC handling variants.
3995         (bswaphi2): New.
3996         (bswapsi2): New.
3997         (rothi3): New.
3998         (define_peephole2): New peephole to recognize mov that sets CC for
3999         subsequent test.
4001 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4003         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4004         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4005         wi::add.
4007 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4009         PR c/86420
4010         * real.c (real_nextafter): Return true if result is denormal.
4012 2018-07-09  Martin Liska  <mliska@suse.cz>
4014         * common.opt: Add back wrongly removed attribute.
4016 2018-07-09  Richard Biener  <rguenther@suse.de>
4018         PR debug/86413
4019         * dwarf2out.c (gen_block_die): For an early generated DIE
4020         always output high/low PC attributes.
4022 2018-07-09  Tom de Vries  <tdevries@suse.de>
4024         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4025         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4026         onto VAR_DECL with abstract origin.
4028 2018-07-07  Jim Wilson  <jimw@sifive.com>
4030         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4032 2018-07-07  Tom de Vries  <tdevries@suse.de>
4034         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4036 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4038         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4039         overflow_type.
4040         (combine_bound): Use wide-int overflow calculation instead of
4041         rolling our own.
4042         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4043         overflow_type.
4044         * fold-const.c (int_const_binop_2): Same.
4045         (extract_muldiv_1): Same.
4046         (fold_div_compare): Same.
4047         (fold_abs_const): Same.
4048         * match.pd: Same.
4049         * poly-int.h (add): Same.
4050         (sub): Same.
4051         (neg): Same.
4052         (mul): Same.
4053         * predict.c (predict_iv_comparison): Same.
4054         * profile-count.c (slow_safe_scale_64bit): Same.
4055         * simplify-rtx.c (simplify_const_binary_operation): Same.
4056         * tree-chrec.c (tree_fold_binomial): Same.
4057         * tree-data-ref.c (split_constant_offset_1): Same.
4058         * tree-if-conv.c (idx_within_array_bound): Same.
4059         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4060         * tree-ssa-phiopt.c (minmax_replacement): Same.
4061         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4062         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4063         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4064         * wide-int.cc (wi::add_large): Same.
4065         (wi::mul_internal): Same.
4066         (wi::sub_large): Same.
4067         (wi::divmod_internal): Same.
4068         * wide-int.h: Change overflow type to overflow_type for neg, add,
4069         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4070         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4071         mul_internal, divmod_internal.
4072         (overflow_type): New enum.
4073         (accumulate_overflow): New.
4075 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4077         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4078         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4080 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4082         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4083         argument is checked for zero before entering loop, avoid checking again.
4085 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4087         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4088         * gimplify.h (generic_expr_could_trap_p): Likwise.
4089         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4091 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4093         PR tree-optimization/86401
4094         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4095         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4096         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4097         * fold-const.h (fold_bit_and_mask): Declare.
4098         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4100 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4102         PR target/86324
4103         * target.def (translate_mode_attribute): New hook.
4104         * targhooks.h (default_translate_mode_attribute): Declare.
4105         * targhooks.c (default_translate_mode_attribute): New function.
4106         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4107         * doc/tm.texi: Regenerate.
4108         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4109         (rs6000_translate_mode_attribute): New function.
4111 2018-07-06  Paul Koning  <ni1d@arrl.net>
4113         * doc/md.texi (define_split): Document DONE and FAIL.
4114         (define_peephole2): Ditto.
4116 2018-07-05  Jeff Law  <law@redhat.com>
4118         PR tree-optimization/86010
4119         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4120         both the head and tail of mem* and str* calls.
4122 2018-07-05  Jim Wilson  <jimw@sifive.com>
4124         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4126 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4128         * config/aarch64/aarch64-simd.md: correct flags text for
4129         MIN_EXPR replacement.
4131 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4133         * configure: Regenerated.
4135 2018-07-05  Carl Love  <cel@us.ibm.com>
4137         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4138         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4139         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4140         VSX_BUILTIN_DOUBLEL_V4SF.
4142 2018-07-05  Martin Sebor  <msebor@redhat.com>
4144         PR c++/86400
4145         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4146         than its domain to compute its the upper bound of a char array.
4148 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4150         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4151         * doc/cpp.texi: Update comment.
4152         * doc/tm.texi: Rebuilt.
4153         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4154         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4155         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4156         headers affected by extern "C".
4157         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4158         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4159         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4160         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4161         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4162         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4163         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4164         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4165         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4166         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4167         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4168         config/sparc/sp64-elf.h, config/spu/spu.h,
4169         config/stormy16/stormy16.h, config/v850/v850.h,
4170         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4171         define NO_IMPLICIT_EXTERN_C.
4172         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4174 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4176         PR target/84711
4177         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4178         instead of GET_MODE_SIZE when comparing Units.
4180 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4182         PR target/84711
4183         * rtlanal.c (set_noop_p): Constrain on mode change,
4184         include hard-reg-set.h
4186 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4188         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4190 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4192         Revert
4193         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4195         PR sanitizer/84250
4196         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4197         libasan.
4198         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4200 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4202         PR sanitizer/84250
4203         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4204         libasan.
4205         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4207 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4209         PR middle-end/86380
4210         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4212 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4214         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4215         neg_*_op* variables.
4217 2018-07-04  Martin Liska  <mliska@suse.cz>
4219         * tree-switch-conversion.c: Define
4220         max_ratio_for_speed and max_ratio_for_size constants.
4222 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4223             Martin Liska  <mliska@suse.cz>
4225         PR middle-end/66240
4226         PR target/45996
4227         PR c/84100
4228         * common.opt: Rename align options with 'str_' prefix.
4229         * common/config/i386/i386-common.c (set_malign_value): New
4230         function.
4231         (ix86_handle_option): Use it to set -falign-* options/
4232         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4233         type from int to string.
4234         * config/aarch64/aarch64.c: Update default values from int
4235         to string.
4236         * config/alpha/alpha.c (alpha_override_options_after_change):
4237         Likewise.
4238         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4239         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4240         max skip conditionally.
4241         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4242         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4243         max skip conditionally.
4244         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4245         max skip conditionally.
4246         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4247         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4248         max skip conditionally.
4249         * config/i386/i386.c (struct ptt): Change type from int to
4250         string.
4251         (ix86_default_align): Set default values.
4252         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4253         max skip conditionally.
4254         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4255         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4256         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4257         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4258         max skip conditionally.
4259         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4260         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4261         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4262         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4263         max skip conditionally.
4264         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4265         * config/ia64/ia64.c (ia64_option_override): Set default values
4266         for alignment options.
4267         * config/m68k/m68k.c: Handle new str_align_* options.
4268         * config/mips/mips.c (mips_set_compression_mode): Change
4269         type of constants.
4270         (mips_option_override): Set default values for options.
4271         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4272         Likewise.
4273         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4274         Likewise.
4275         * config/rx/rx.c (rx_option_override): Likewise.
4276         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4277         (LABEL_ALIGN): Use align_labels_log.
4278         (LOOP_ALIGN): Use align_loops_align.
4279         * config/s390/s390.c (s390_asm_output_function_label): Use new
4280         macros.
4281         * config/sh/sh.c (sh_override_options_after_change):
4282         Change type of constants.
4283         * config/spu/spu.c (spu_sched_init): Likewise.
4284         * config/sparc/sparc.c (sparc_option_override): Set default
4285         values for options.
4286         * config/visium/visium.c (visium_option_override): Likewise.
4287         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4288         emit p2align format with last argument if it's not needed.
4289         * doc/invoke.texi: Document extended format of -falign-*.
4290         * final.c: Use align_labels alignment.
4291         * flags.h (struct target_flag_state): Change type to use
4292         align_flags.
4293         (struct align_flags_tuple): New.
4294         (struct align_flags): Likewise.
4295         (align_loops_log): Redefine macro to use new types.
4296         (align_loops_max_skip): Redefine macro to use new types.
4297         (align_jumps_log): Redefine macro to use new types.
4298         (align_jumps_max_skip): Redefine macro to use new types.
4299         (align_labels_log): Redefine macro to use new types.
4300         (align_labels_max_skip): Redefine macro to use new types.
4301         (align_functions_log): Redefine macro to use new types.
4302         (align_loops): Redefine macro to use new types.
4303         (align_jumps): Redefine macro to use new types.
4304         (align_labels): Redefine macro to use new types.
4305         (align_functions): Redefine macro to use new types.
4306         (align_functions_max_skip): Redefine macro to use new types.
4307         (align_loops_value): New macro.
4308         (align_jumps_value): New macro.
4309         (align_labels_value): New macro.
4310         (align_functions_value): New macro.
4311         * function.c (invoke_set_current_function_hook): Propagate
4312         alignment values from flags to global variables default in
4313         topleev.h.
4314         * ipa-icf.c (sem_function::equals_wpa): Use
4315         cl_optimization_option_eq instead of memcmp.
4316         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4317         of string types.
4318         (cl_optimization_stream_in): Likewise.
4319         * optc-save-gen.awk: Support strings in cl_optimization.
4320         * opth-gen.awk: Likewise.
4321         * opts.c (finish_options): Remove error checking of invalid
4322         value ranges.
4323         (MAX_CODE_ALIGN): Remove.
4324         (MAX_CODE_ALIGN_VALUE): Likewise.
4325         (parse_and_check_align_values): New function.
4326         (check_alignment_argument): Likewise.
4327         (common_handle_option): Use check_alignment_argument.
4328         * opts.h (parse_and_check_align_values): Declare.
4329         * toplev.c (init_alignments): Remove.
4330         (read_log_maxskip): New.
4331         (parse_N_M): Likewise.
4332         (parse_alignment_opts): Likewise.
4333         (backend_init_target): Remove usage of init_alignments.
4334         * toplev.h (parse_alignment_opts): Declare.
4335         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4336         argument.
4337         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4338         * tree.c (cl_option_hasher::equal): New.
4339         * varasm.c: Use new global macros.
4341 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4343         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4344         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4345         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4346         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4347         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4348         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4349         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4350         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4351         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4352         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4353         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4354         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4355         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4357 2018-07-04  Martin Liska  <mliska@suse.cz>
4358             Jonathan Wakely  <jwakely@redhat.com>
4360         * coverage.c: Use correct type.
4361         * doc/invoke.texi: Language correction.
4363 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4365         PR target/85620
4366         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4367         ENDBRANCH for non-tail call which may return via indirect branch.
4368         * doc/extend.texi: Document indirect_return attribute.
4370 2018-07-03  Martin Sebor  <msebor@redhat.com>
4372         PR tree-optimization/86274
4373         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4374         precondition.
4375         (format_floating): Correct handling of infinities and NaNs.
4377 2018-07-03  Martin Sebor  <msebor@redhat.com>
4379         * print-tree.c (print_real_cst): New function.
4380         (print_node_brief): Call it.
4381         (print_node): Ditto.
4383 2018-07-03  Jeff Law  <law@redhat.com>
4385         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4386         into a single pattern.
4388         * config/h8300/h8300.md (ors code_iterator): New.
4389         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4390         a single pattern and single splitter.
4391         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4392         (iorqi3_1, xorqi3_1): Likewise.
4393         (iorqi3, xorqi3 expanders): Similarly.
4395         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4396         (movmd_internal) into a single pattern using the P mode iterator.
4397         (movmd splitters): Similarly.
4398         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4399         (movsd splitters): Similarly.
4401         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4402         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4403         right table based on the size of the operand.
4404         * config/h8300/h8300.md (length_table): Corresponding changes. All
4405         references to "addb", "addw" and "addl" changed to "add".
4406         (btst patterns): Merge two variants into a single pattern.
4407         (tstqi, tsthi): Likewise.
4408         (addhi3_incdec, addsi3_incdec): Likewise.
4409         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4410         (mulhi3, mulsi3): Likewise.
4411         (udivhi3, udivsi3): Likewise.
4412         (divhi3, divsi3): Likewise.
4413         (andorqi3, andorhi3, andorsi3): Likewise.
4415 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4417         PR target/85694
4418         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4419         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4421 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4423         PR tree-optimization/85694
4424         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4425         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4426         UNSPEC_URHADD.
4427         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4428         (<u>avg<mode>3_ceil): New patterns.
4430 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4432         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4433         scan-tree-dump directive.
4434         * gcc.dg/vect/slp-perm-2.c: Likewise.
4435         * gcc.dg/vect/slp-perm-3.c: Likewise.
4436         * gcc.dg/vect/slp-perm-5.c: Likewise.
4437         * gcc.dg/vect/slp-perm-6.c: Likewise.
4438         * gcc.dg/vect/slp-perm-7.c: Likewise.
4439         * gcc.dg/vect/slp-perm-8.c: Likewise.
4441 2018-07-03  Marek Polacek  <polacek@redhat.com>
4443         PR middle-end/86202
4444         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4446 2018-07-03  Richard Biener  <rguenther@suse.de>
4448         PR ipa/86389
4449         * tree-ssa-structalias.c (find_func_clobbers): Properly
4450         handle indirect calls.
4452 2018-07-03  Jeff Law  <law@redhat.com>
4454         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4455         (shifts): New code iterator.
4456         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4457         expander.  Fix HImode handling on H8/SX.
4458         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4459         (subqi3, subhi3, subsi3 expanders): Likewise.
4460         (andqi3, andhi3, andsi3 expanders): Likewise.
4461         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4462         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4463         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4464         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4465         (zero_extendqihi2, zero_extendqisi2): Likewise.
4466         (extendqihi2, extendqisi2): Likewise.
4467         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4468         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4469         (rotlqi3_1, rotlhi3_1): Likewise.
4470         (logicalhi3_sn, logicalsi3_sn): Likewise.
4471         (logicalhi3, logicalsi3): Likewise.
4473 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4475         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4476         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4477         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4478         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4479         type to append_pattern_def_seq instead of creating a stmt_vec_info
4480         directly.
4481         (build_mask_conversion): Likewise.  Remove vinfo argument.
4482         (vect_add_conversion_to_patterm): Likewise, renaming to...
4483         (vect_add_conversion_to_pattern): ...this.
4484         (vect_recog_mask_conversion_pattern): Update call to
4485         build_mask_conversion.  Pass the vector type to
4486         append_pattern_def_seq here too.
4487         (vect_recog_gather_scatter_pattern): Update call to
4488         vect_add_conversion_to_pattern.
4490 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4492         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4493         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4494         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4495         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4496         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4497         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4498         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4499         append_pattern_def_seq instead of new_pattern_def_seq.
4500         (vect_recog_divmod_pattern): Do both of the above.
4501         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4502         is null.
4504 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4506         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4507         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4508         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4509         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4510         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4511         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4512         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4513         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4514         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4515         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4516         parameter with a single stmt_vec_info.
4517         (vect_recog_func_ptr): Likewise.
4518         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4519         (vect_try_gather_scatter_pattern): ...this.
4520         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4521         the stmt_vec_info of the statement to be matched.  Don't clear
4522         STMT_VINFO_RELATED_STMT.
4523         (vect_pattern_recog): Update call accordingly.
4525 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4527         PR tree-optimization/85694
4528         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4529         (uavgM3_ceil): Document new optabs.
4530         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4531         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4532         functions.
4533         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4534         (savg_ceil_optab): New optabs.
4535         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4536         (vect_vect_recog_func_ptrs): Add it.
4537         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4538         constant directly from the associated lhs.
4540 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4542         * tree-vect-patterns.c (vect_split_statement): New function.
4543         (vect_convert_input): Use it to try to split an existing cast.
4545 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4547         * poly-int.h (print_hex): New function.
4548         * dumpfile.h (dump_dec, dump_hex): Declare.
4549         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4550         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4551         min_input_precision, operation_precision and operation_sign.
4552         * tree-vect-patterns.c (vect_get_range_info): New function.
4553         (vect_same_loop_or_bb_p, vect_single_imm_use)
4554         (vect_operation_fits_smaller_type): Delete.
4555         (vect_look_through_possible_promotion): Add an optional
4556         single_use_p parameter.
4557         (vect_recog_over_widening_pattern): Rewrite to use new
4558         stmt_vec_info infomration.  Handle one operation at a time.
4559         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4560         (vect_truncatable_operation_p, vect_set_operation_type)
4561         (vect_set_min_input_precision): New functions.
4562         (vect_determine_min_output_precision_1): Likewise.
4563         (vect_determine_min_output_precision): Likewise.
4564         (vect_determine_precisions_from_range): Likewise.
4565         (vect_determine_precisions_from_users): Likewise.
4566         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4567         (vect_vect_recog_func_ptrs): Put over_widening first.
4568         Add cast_forwprop.
4569         (vect_pattern_recog): Call vect_determine_precisions.
4571 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4573         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4574         statements that have been replaced by further pattern statements.
4575         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4577 2018-07-03  Richard Biener  <rguenther@suse.de>
4579         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4580         always set *dt.  Dump vectype in vectype overload.
4581         * dumpfile.h (dump_gimple_expr): New function.
4582         (dump_gimple_expr_loc): Likewise.
4583         * dumpfile.c (dump_gimple_expr): New function.
4584         (dump_gimple_expr_loc): Likewise.
4586 2018-07-02  Jeff Law  <law@redhat.com>
4588         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4589         the H8/300, H8/300H and H8/S variants into a single pattern.
4590         (movhi_h8300, movqi_h8300hs): Similarly.
4591         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4592         (QHI mode iterator): New.
4594         * config/h8300/h8300.md: Remove trailing whitespace.
4596 2018-07-02  Jim Wilson  <jimw@sifive.com>
4598         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4599         instead of emit_insn for interrupt returns.
4600         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4601         (riscv_sret, riscv_uret): Likewise.
4603 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4605         * pretty-print.c (selftest::test_pp_format): Move save and restore
4606         of quotes to class auto_fix_quotes, and add an instance.
4607         * selftest.c: Include "intl.h".
4608         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4609         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4610         * selftest.h (selftest::auto_fix_quotes): New class.
4612 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4614         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4615         (aarch64_sve_prepare_conditional_op): Remove.
4616         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4617         Allow aarch64_simd_reg_or_zero as select operand; remove
4618         the aarch64_sve_prepare_conditional_op call.
4619         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4620         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4621         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4622         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4623         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4624         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4625         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4626         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4627         and a splitters to match all of the *_any patterns.
4628         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4630         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4631         (SVE_COND_FP_BINARY_REV): Remove.
4632         (sve_int_op_rev, sve_fp_op_rev): New.
4633         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4634         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4635         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4636         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4637         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4638         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4639         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4640         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4641         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4643         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4644         Remove match_dup 1 from the inner unspec.
4645         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4647         * config/aarch64/aarch64.md (movprfx): New attr.
4648         (length): Default movprfx to 8.
4649         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4650         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4651         (*<su>mul<SVE_I>3_highpart): Likewise.
4652         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4653         (*v<ASHIFT><SVE_I>3): Likewise.
4654         (*<su><MAXMIN><SVE_I>3): Likewise.
4655         (*<su><MAXMIN><SVE_F>3): Likewise.
4656         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4657         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4658         (*div<SVE_F>4): Likewise.
4660 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4662         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4663         in dump string.
4665 2018-07-02  Richard Biener  <rguenther@suse.de>
4667         PR tree-optimization/86363
4668         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4669         memset argument refers to a non-variable address.
4671 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4673         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4674         {PLUS,MINUS}_EXPR code to...
4675         (adjust_symbolic_bound): ...here,
4676         (combine_bound): ...here,
4677         (set_value_range_with_overflow): ...and here.
4679 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4681         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4682         code...
4683         (extract_range_from_abs_expr): ...here.
4685 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4687         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4688         -fno-omit-frame-pointer when not optimizing.
4690 2018-07-02  Martin Liska  <mliska@suse.cz>
4692         PR ipa/86279
4693         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4694         (propagate_nothrow): Likewise.
4696 2018-07-02  Martin Liska  <mliska@suse.cz>
4698         PR ipa/86323
4699         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4701 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4703         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4704         function in r262149, changing "loc" param from source_location to
4705         const dump_location_t &.
4706         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4707         declaration, as above.
4709 2018-07-01  Paul Koning  <ni1d@arrl.net>
4711         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4712         -munit-asm, -mgnu-asm, -mdec-asm.
4713         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4714         (pdp11_output_labelref): New.
4715         (pdp11_output_def): New.
4716         (pdp11_output_addr_vec_elt): New.
4717         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4718         %# and %@ format codes.
4719         (pdp11_option_override): New.
4720         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4721         (pdp11_output_ident): New.
4722         (pdp11_asm_named_section): New.
4723         (pdp11_asm_init_sections): New.
4724         (pdp11_file_start): New.
4725         (pdp11_file_end): New.
4726         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4727         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4728         %o, like %c but octal.
4729         (pdp11_option_override): New.
4730         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4731         -mdec-asm.
4732         (DATA_SECTION_ASM_OP): Ditto.
4733         (READONLY_DATA_SECTION_ASM_OP): New.
4734         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4735         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4736         (ASM_OUTPUT_LABELREF): Ditto.
4737         (ASM_OUTPUT_DEF): Ditto.
4738         (ASM_OUTPUT_EXTERNAL): New.
4739         (ASM_OUTPUT_SOURCE_FILENAME): New.
4740         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4741         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4742         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4743         %# and %@ format codes.
4744         * config/pdp11/pdp11.opt (mgnu-asm): New.
4745         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4746         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4747         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4749 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4751         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4752         dereferencing path[] beyond its length.
4753         (debug_path): New.
4754         (debug_all_paths): New.
4755         (rewire_first_differing_edge): New.
4756         (adjust_paths_after_duplication): New.
4757         (duplicate_thread_path): Call adjust_paths_after_duplication.
4758         Add new argument.
4759         (thread_through_all_blocks): Add new argument to
4760         duplicate_thread_path.
4762 2018-06-30  Jim Wilson  <jimw@sifive.com>
4764         * config/riscv/predicates.md (p2m1_shift_operand): New.
4765         (high_mask_shift_operand): New.
4766         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4767         pattern using p2m1_shift_operand.
4768         (lshsi3_zero_extend_3+2): New combiner pattern using
4769         high_mask_shift_operand.
4771 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4773         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4774         split out from...
4775         (vect_recog_rotate_pattern): ...here.
4776         (vect_convert_input): Try to insert casts of invariants in the
4777         preheader.
4778         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4779         preheader to be empty.
4781 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4783         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4784         vector type.  If given, install it in the new statement's
4785         STMT_VINFO_VECTYPE.
4786         (vect_element_precision): New function.
4787         (vect_unpromoted_value): New struct.
4788         (vect_unpromoted_value::vect_unpromoted_value): New function.
4789         (vect_unpromoted_value::set_op): Likewise.
4790         (vect_look_through_possible_promotion): Likewise.
4791         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4792         (vect_widened_op_tree, vect_convert_input): Likewise.
4793         (vect_convert_inputs, vect_convert_output): Likewise.
4794         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4795         to handle the optional cast of the multiplication result and
4796         vect_widened_op_tree to detect the widened multiplication itself.
4797         Do not require the input and output of promotion casts to have
4798         the same sign, but base the signedness of the operation on the
4799         input rather than the result.  If the pattern includes two
4800         promotions, check that those promotions have the same sign.
4801         Do not restrict the MULT_EXPR handling to a double-width result;
4802         handle quadruple-width results and wider.  Use vect_convert_inputs
4803         to convert the inputs to the common type.
4804         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4805         to handle the optional cast of the ABS result.  Also allow a sign
4806         change or a sign extension between the ABS and MINUS.
4807         Use vect_widened_op_tree to detect the widened subtraction and use
4808         vect_convert_inputs to convert the inputs to the common type.
4809         (vect_handle_widen_op_by_const): Delete.
4810         (vect_recog_widen_op_pattern): New function.
4811         (vect_recog_widen_mult_pattern): Use it.
4812         (vect_recog_widen_shift_pattern): Likewise.
4813         (vect_recog_widen_sum_pattern): Use
4814         vect_look_through_possible_promotion to handle the promoted
4815         PLUS_EXPR operand.
4817 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4819         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4820         the containing gimple_seq *.
4821         * gimple-iterator.h (gsi_for_stmt): Declare it.
4822         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4823         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4824         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4825         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4826         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4827         checks.
4828         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4829         split out from...
4830         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4831         statement being replaced is part of an existing pattern
4832         definition sequence, inserting the new pattern statements before
4833         the original one.
4834         (vect_pattern_recog_1): Don't return a bool.  If the statement
4835         is already part of a pattern, instead apply pattern matching
4836         to the pattern definition statements.  Don't clear the
4837         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4838         (vect_pattern_recog): Don't break after the first match;
4839         continue processing the pattern definition statements instead.
4840         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4842 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4844         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4845         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4846         (vect_recog_widen_sum_pattern): Use it.
4848 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4850         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4851         phi is not a pattern statement and has not been replaced by
4852         a pattern statement.
4853         * tree-vect-patterns.c (type_conversion_p): Don't check
4854         STMT_VINFO_IN_PATTERN_P.
4855         (vect_recog_vector_vector_shift_pattern): Likewise.
4856         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4857         the pattern statement rather than the original statement; check
4858         directly for a WIDEN_MULT_EXPR here.
4859         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4860         vect_is_simple_use to return the pattern statement rather
4861         than the original statement; use is_pattern_stmt_p to check
4862         for such a pattern statement.
4863         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4864         to return the pattern statement rather than the original statement;
4865         don't do the same transformation here.
4866         (vect_is_simple_use): If the defining statement has been replaced
4867         by a pattern statement, return the pattern statement instead.
4868         Remove the corresponding (local) transformation from the vectype
4869         overload.
4871 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4873         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4874         end and default to null.
4875         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4876         (vectorizable_reduction): Update calls accordingly, dropping the
4877         gimple ** argument if the passed-back statement isn't needed.
4878         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4879         (vect_recog_rotate_pattern): Likewise.
4880         (vect_recog_mask_conversion_pattern): Likewise.
4881         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4882         (vect_mask_constant_operand_p): Likewise.
4883         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4884         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4885         (get_group_load_store_type, get_load_store_type): Likewise.
4886         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4887         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4888         (vectorizable_conversion, vectorizable_assignment): Likewise.
4889         (vectorizable_shift, vectorizable_operation): Likewise.
4890         (vectorizable_store, vect_is_simple_cond): Likewise.
4891         (vectorizable_condition, vectorizable_comparison): Likewise.
4892         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4893         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4894         and move it to the end.  Cope with null def_stmt_outs.
4896 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4898         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4900 2018-06-29  Jeff Law  <law@redhat.com>
4902         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4903         displacements for TARGET_V850E2V3 and newer.
4904         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4905         * config/v850/v850.md (sign23byte_load): Remove.
4906         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4907         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4909 2018-06-29  Martin Liska  <mliska@suse.cz>
4911         PR lto/85759
4912         * coverage.c (coverage_init): Mangle full path name.
4913         * doc/invoke.texi: Document the change.
4914         * gcov-io.c (mangle_path): New.
4915         * gcov-io.h (mangle_path): Likewise.
4916         * gcov.c (mangle_name): Use mangle_path for path mangling.
4918 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4920         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4921         if starting source register is not even.
4923 2018-06-29  Martin Liska  <mliska@suse.cz>
4925         PR tree-optimization/86263
4926         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4927         Make edge redirection.
4929 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4931         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4932         (dump_scope_depth): New variable.
4933         (get_dump_scope_depth): New function.
4934         (dump_begin_scope): New function.
4935         (dump_end_scope): New function.
4936         * dumpfile.h (get_dump_scope_depth): New declaration.
4937         (dump_begin_scope): New declaration.
4938         (dump_end_scope): New declaration.
4939         (class auto_dump_scope): New class.
4940         (AUTO_DUMP_SCOPE): New macro.
4941         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4942         AUTO_DUMP_SCOPE.
4944 2018-06-29  Richard Biener  <rguenther@suse.de>
4946         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4947         compute_all_dependences succeeds.
4948         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4949         exceed --param loop-max-datarefs-for-datadeps.
4951 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4953         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4955 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4957         PR target/86348
4958         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4959         alternative 0 in preferred_for_speed attribute.
4961 2018-06-28  Paul Koning  <ni1d@arrl.net>
4963         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4964         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4965         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4966         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4967         for shift insn patterns.
4969 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4971         * cgraph.c (cgraph_node::get_body): Replace assignments to
4972         "dump_file" with calls to set_dump_file.
4973         * dumpfile.c (alt_dump_file): Make static, and group with...
4974         (alt_flags): ...this definition.
4975         (dumps_are_enabled): New variable.
4976         (refresh_dumps_are_enabled): New function.
4977         (set_dump_file): New function.
4978         (set_alt_dump_file): New function.
4979         (gcc::dump_manager::dump_start): Replace assignments to
4980         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4981         set_alt_dump_file.
4982         (gcc::dump_manager::dump_finish): Likewise.
4983         * dumpfile.h (alt_dump_file): Delete decl.
4984         (dumps_are_enabled): New variable decl.
4985         (set_dump_file): New function decl.
4986         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4987         global.
4988         * tree-nested.c (lower_nested_functions): Replace assignments to
4989         "dump_file" with calls to set_dump_file.
4991 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4993         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4994         goto_locus of each outgoing edge of each basic block.
4996 2018-06-28  Richard Biener  <rguenther@suse.de>
4998         * dwarf2out.c (decl_scope_table): Remove.
4999         (push_decl_scope): Likewise.
5000         (pop_decl_scope): Likewise.
5001         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5002         (gen_struct_or_union_type_die): Likewise.
5003         (gen_tagged_type_die): Likewise.
5004         (dwarf2out_init): Do not initialize decl_scope_table.
5005         (dwarf2out_c_finalize): Do not free it.
5007 2018-06-28  Richard Biener  <rguenther@suse.de>
5009         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5010         deciding whether to not re-use a DIE.
5012 2018-06-28  Richard Biener  <rguenther@suse.de>
5014         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5015         DW_AT_abstract_origin attribute.
5017 2018-06-28  Martin Liska  <mliska@suse.cz>
5019         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5020         Use newly introduced constants.
5021         * tree-switch-conversion.h (struct jump_table_cluster):
5022         Define max_ratio_for_size and max_ratio_for_speed.
5024 2018-06-28  Martin Liska  <mliska@suse.cz>
5026         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5027         Add new checking assert to catch invalid state.
5028         (jump_table_cluster::can_be_handled): Handle single case
5029         clusters.
5030         (jump_table_cluster::is_beneficial): Bail out for such case.
5031         (bit_test_cluster::find_bit_tests):
5032         Add new checking assert to catch invalid state.
5033         (bit_test_cluster::can_be_handled): Handle single case
5034         clusters.
5035         (bit_test_cluster::is_beneficial): Bail out for such case.
5036         (switch_decision_tree::analyze_switch_statement):
5037         Fix comment.
5039 2018-06-28  Martin Liska  <mliska@suse.cz>
5041         * common.opt: Introduce -completion option.
5042         * gcc.c (driver_handle_option): Handle it.
5043         (driver::main): Print completions if completion
5044         is set.
5045         * opt-suggestions.c (option_proposer::get_completions):
5046         New function.
5047         (option_proposer::suggest_completion): Likewise.
5048         (option_proposer::find_param_completions): Likewise.
5049         (verify_autocompletions): Likewise.
5050         (test_completion_valid_options): Likewise.
5051         (test_completion_valid_params): Likewise.
5052         (in_completion_p): Likewise.
5053         (empty_completion_p): Likewise.
5054         (test_completion_partial_match): Likewise.
5055         (test_completion_garbage): Likewise.
5056         (opt_proposer_c_tests): Likewise.
5057         * opt-suggestions.h: Declare new functions.
5058         * opts.c (common_handle_option): Handle OPT__completion_.
5059         * selftest-run-tests.c (selftest::run_tests): Add
5060         opt_proposer_c_tests.
5061         * selftest.c (assert_str_startswith): New.
5062         * selftest.h (assert_str_startswith): Likewise.
5063         (opt_proposer_c_tests): New.
5064         (ASSERT_STR_STARTSWITH): Likewise.
5066 2018-06-28  Martin Liska  <mliska@suse.cz>
5068         * Makefile.in: Add opt-suggestions.o.
5069         * gcc-main.c: Include opt-suggestions.h.
5070         * gcc.c (driver::driver): Likewise.
5071         (driver::~driver): Remove m_option_suggestions.
5072         (driver::build_option_suggestions): Moved to option_proposer.
5073         (driver::suggest_option): Likewise.
5074         (driver::handle_unrecognized_options): Use option_proposer.
5075         * gcc.h (class driver): Add new memver m_option_proposer.
5076         * opt-suggestions.c: New file.
5077         * opt-suggestions.h: New file.
5079 2018-06-28  Martin Liska  <mliska@suse.cz>
5081         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5082         (auto_string_vec::~auto_string_vec): Likewise.
5084 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5086         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5087         prevent_decl_creation_for_types fields up and add reset_location field.
5088         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5089         statement if id->reset_location is true.
5090         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5091         id->reset_location is true.
5092         (copy_phis_for_bb): Force input_location on the arguments if
5093         id->reset_location is true.
5094         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5095         is set on the function to be inlined.
5097 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5099         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5101 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5103         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5104         registers for Pmode.
5105         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5106         hard registers for the clobbered pseudo.
5108 2018-06-27  Paul Koning  <ni1d@arrl.net>
5110         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5111         mutually exclusive options.
5112         * config/pdp11/constraints.md (h): New constraint.
5113         (O): Update definition to match shift code generation.
5114         (D): New constraint.
5115         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5116         (CCFP): Remove.
5117         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5118         function.
5119         (output_jump): Change arguments.
5120         (pdp11_fixed_cc_regs): New function.
5121         (pdp11_cc_mode): Ditto.
5122         (pdp11_expand_shift): Ditto.
5123         (pdp11_assemble_shift): Ditto.
5124         (pdp11_small_shift): Ditto.
5125         (pdp11_branch_cost): Remove.
5126         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5127         from output.
5128         (pdp11_register_move_cost): Update for CC registers.
5129         (pdp11_rtx_costs): Add case for LSHIFTRT.
5130         (pdp11_output_jump): Add CCNZ mode conditional branches.
5131         (notice_update_cc_on_set): Remove.
5132         (pdp11_cc_mode): New function.
5133         (simple_memory_operand): Correct pre/post decrement case.
5134         (no_side_effect_operand): New function.
5135         (pdp11_regno_reg_class): Add CC_REGS class.
5136         (pdp11_fixed_cc_regs): New function.
5137         (pdp11_small_shift): New function.
5138         (pdp11_expand_shift): New function to expand shift insns.
5139         (pdp11_assemble_shift): New function to output shifts.
5140         (pdp11_branch_cost): Remove.
5141         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5142         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5143         (WCHAR_TYPE): Ditto.
5144         (PTRDIFF_TYPE): Ditto.
5145         (ADJUST_INSN_LENGTH): New macro.
5146         (FIXED_REGISTERS): Add CC registers.
5147         (CALL_USED_REGISTERS): Ditto.
5148         (reg_class): Ditto.
5149         (REG_CLASS_NAMES): Ditto.
5150         (REG_CLASS_CONTENTS): Ditto.
5151         (SELECT_CC_MODE): Use new function.
5152         (TARGET_FLAGS_REGNUM): New macro.
5153         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5154         (cc0_reg_rtx): Remove.
5155         (CC_STATUS_MDEP): Remove.
5156         (CC_STATUS_MDEFP_INIT): Remove.
5157         (CC_IN_FPU): Remove.
5158         (NOTICE_UPDATE_CC): Remove.
5159         (REGISTER_NAMES): Add CC registers.
5160         (BRANCH_COST): Change to constant 1.
5161         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5162         handling.
5163         * config/pdp11/pdp11.opt (mbcopy): Remove.
5164         (mbcopy-builtin): Remove.
5165         (mbranch-cheap): Remove.
5166         (mbranch-expensive): Remove.
5167         * config/pdp11/predicates.md (expand_shift_operand): Update to
5168         match shift code generation.
5169         (ccnz_operator): New predicate.
5170         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5171         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5172         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5173         exclusive options.
5174         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5175         description of O constraint.
5177 2018-06-27  Jeff Law  <law@redhat.com>
5178             Austin Law  <austinklaw@gmail.com>
5180         * config/v850/v850.md (addsi3_set_flags): New pattern.
5181         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5182         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5183         (zero_extendhisi2_v850_set_flags): Likewise.
5184         (zero_extendqisi2_v850_set_flags): Likewise.
5185         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5186         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5187         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5189         * config/v850/v850-protos.h (notice_update_cc): Remove.
5190         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5191         (v850_print_operand): Handle 'D' and "d".
5192         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5193         Add handling of arithmetic/logical operations compared against zero.
5194         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5195         Do not look at v850_compare_op, instead get mode from last argument.
5196         (v850_gen_compare): Remove
5197         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5198         after reload for prologue insns.
5199         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5200         patterns.
5201         (construct_save_jarl): Likewise.
5202         (TARGET_FLAGS_REGNUM): Define.
5203         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5204         (NOTICE_UPDATE_CC): Remove.
5205         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5206         than cc0.  Conditionalize on reload_completed.
5207         (cmpsi_insn, setfcc_insn): Likewise.
5208         (tst1 splitter): Turn into define_and_split which sets the flags
5209         after reload.
5210         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5211         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5212         (cstoresf4, cstoredf4): Clobber the flags.
5213         (cmpsi, cmpsf, cmpdf): Remove expanders.
5214         (setf_insn): Remove pattern.
5215         (addsi3): Turn into define_and_split which clobbers the flags after
5216         reload and a suitable pattern (addsi3_clobber_flags) for use after
5217         reload.
5218         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5219         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5220         (ashrsi3, ashrsi3_v850e2): Likewise.
5221         (bins): Clobber the flags.
5222         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5223         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5224         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5225         (call_value_internal_short, call_value_internal_long): Likewise.
5226         (callt_save_interrupt, callt_return_interrupt): Likewise.
5227         (save_interrupt, return_interrupt): Likewise.
5228         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5229         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5230         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5231         (All FP comparisons): Only allow after reload has completed.
5232         (trfsr): Likewise.
5233         (divh, divhu): Tweak output template.
5234         (branch_z_normal, branch_z_invert): Remove
5235         (branch_nz_normal, branch_nz_invert): Likewise.
5236         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5238         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5239         * config/v850/v850.c (notice_update_cc): Remove.
5240         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5241         (CC_NO_CARRY): Likewise.
5242         (NOTICE_UPDATE_CC): Define to nothing.
5243         * config/v850/v850.md: Remove block comment on cc0 handling
5244         Remove "cc" attribute from all patterns.  Remove cc_status handling
5245         from all patterns.  Minor formatting fixes.
5247 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5249         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5250         (cortex-a76.cortex-a55): Likewise.
5251         * config/aarch64/aarch64-tune.md: Regenerate.
5252         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5253         cortex-a76.cortex-a55.
5255 2018-06-27  Jeff Law  <law@redhat.com>
5257         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5258         (MULTILIB_DIRNAMES): Similarly.
5260 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5262         * gimple.h (gimple_return_retbnd): Delete.
5263         (gimple_return_set_retbnd): Likewise.
5264         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5265         gimple_return_set_retbnd.
5266         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5267         gimple_return_retbnd and adjust.
5268         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5269         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5270         Explicitly return NULL in a couple more cases.  Move assertion
5271         on debug statements and remove unreachable code.
5272         (reset_debug_binding): Do not test id->retbnd.
5273         (expand_call_inline): Do not set it.
5275 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5277         * configure.ac: Add --disable-gcov option.
5278         * configure: Regenerate.
5279         * Makefile.in: Honour @enable_gcov@.
5280         * doc/install.texi: Document --disable-gcov.
5282 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5284         * config/arm/arm-cpus.in (cortex-a76): New entry.
5285         (cortex-a76.cortex-a55): Likewise.
5286         * config/arm/arm-tables.opt: Regenerate.
5287         * config/arm/arm-tune.md: Likewise.
5288         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5289         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5290         cortex-a76.cortex-a55.
5292 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5294         PR target/85769
5295         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5297 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5299         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5300         comment.
5301         (EPILOGUE_USES): Likewise.
5303 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5305         * tree-inline.c (remap_location): New function extracted from...
5306         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5307         (copy_phis_for_bb): ...here.  Call remap_location.
5308         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5310 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5312         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5313         unaligned vsx for 16B memset.
5315 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5317         PR target/86285
5318         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5319         ieee128_float_type_node to long_double_type_node unless
5320         TARGET_LONG_DOUBLE_128 is set.
5322 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5324         * cfgloop.c (get_loop_location): Convert return type from
5325         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5326         by implicit construction from rtx_insn *, and using
5327         dump_user_location_t::from_function_decl for the fallback case.
5328         * cfgloop.h (get_loop_location): Convert return type from
5329         location_t to dump_user_location_t.
5330         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5331         dump_printf_loc to pass in a dump_location_t rather than a
5332         location_t, via the gimple stmt.
5333         * coverage.c (get_coverage_counts): Update calls to
5334         dump_printf_loc to pass in dump_location_t rather than a
5335         location_t.
5336         * doc/optinfo.texi (Dump types): Convert example of
5337         dump_printf_loc from taking "locus" to taking "insn".  Update
5338         description of the "_loc" calls to cover dump_location_t.
5339         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5340         "selftest.h".
5341         (dump_user_location_t::dump_user_location_t): New constructors,
5342         from gimple *stmt and rtx_insn *.
5343         (dump_user_location_t::from_function_decl): New function.
5344         (dump_loc): Make static.
5345         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5346         const dump_location_t &.
5347         (dump_generic_expr_loc): Delete.
5348         (dump_printf_loc): Convert param "loc" from location_t to
5349         const dump_location_t &.
5350         (selftest::test_impl_location): New function.
5351         (selftest::dumpfile_c_tests): New function.
5352         * dumpfile.h: Include "profile-count.h".
5353         (class dump_user_location_t): New class.
5354         (struct dump_impl_location_t): New struct.
5355         (class dump_location_t): New class.
5356         (dump_printf_loc): Convert 2nd param from source_location to
5357         const dump_location_t &.
5358         (dump_generic_expr_loc): Delete.
5359         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5360         const dump_location_t &.
5361         * gimple-fold.c (fold_gimple_assign): Update call to
5362         dump_printf_loc to pass in a dump_location_t rather than a
5363         location_t, via the gimple stmt.
5364         (gimple_fold_call): Likewise.
5365         * gimple-loop-interchange.cc
5366         (loop_cand::analyze_iloop_reduction_var): Update for change to
5367         check_reduction_path.
5368         (tree_loop_interchange::interchange): Update for change to
5369         find_loop_location.
5370         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5371         change in return-type of find_loop_location.
5372         (graphite_regenerate_ast_isl): Likewise.
5373         * graphite-optimize-isl.c (optimize_isl): Likewise.
5374         * graphite.c (graphite_transform_loops): Likewise.
5375         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5376         pass in a dump_location_t rather than a location_t, via the
5377         gimple stmt.
5378         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5379         * ipa.c (walk_polymorphic_call_targets): Likewise.
5380         * loop-unroll.c (report_unroll): Convert "locus" param from
5381         location_t to dump_location_t.
5382         (decide_unrolling): Update for change to get_loop_location's
5383         return type.
5384         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5385         location_t to dump_user_location_t.
5386         (grid_find_single_omp_among_assignments_1): Updates calls to
5387         dump_printf_loc to pass in a dump_location_t rather than a
5388         location_t, via the gimple stmt.
5389         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5390         location_t to dump_location_t.  Updates calls to dump_printf_loc
5391         to pass in a dump_location_t rather than a location_t, via the
5392         gimple stmt.
5393         (grid_inner_loop_gridifiable_p): Likewise.
5394         (grid_dist_follows_simple_pattern): Likewise.
5395         (grid_gfor_follows_tiling_pattern): Likewise.
5396         (grid_target_follows_gridifiable_pattern): Likewise.
5397         (grid_attempt_target_gridification): Convert initialization
5398         of local "grid" from memset to zero-initialization; FIXME: does
5399         this require C++11?  Update call to dump_printf_loc to pass in a
5400         optinfo_location rather than a location_t, via the gimple stmt.
5401         * profile.c (read_profile_edge_counts): Updates call to
5402         dump_printf_loc to pass in a dump_location_t rather than a
5403         location_t
5404         (compute_branch_probabilities): Likewise.
5405         * selftest-run-tests.c (selftest::run_tests): Call
5406         dumpfile_c_tests.
5407         * selftest.h (dumpfile_c_tests): New decl.
5408         * tree-loop-distribution.c (pass_loop_distribution::execute):
5409         Update for change in return type of find_loop_location.
5410         * tree-parloops.c (parallelize_loops): Likewise.
5411         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5412         "locus" from location_t to dump_user_location_t.
5413         (canonicalize_loop_induction_variables): Likewise.
5414         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5415         for change in return type of find_loop_location.
5416         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5417         to dump_printf_loc to pass in a dump_location_t rather than a
5418         location_t, via the stmt.
5419         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5420         Likewise.
5421         * tree-vect-loop-manip.c (find_loop_location): Convert return
5422         type from source_location to dump_user_location_t.
5423         (vect_do_peeling): Update for above change.
5424         (vect_loop_versioning): Update for change in type of
5425         vect_location.
5426         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5427         from location_t to dump_user_location_t.
5428         (vect_estimate_min_profitable_iters): Update for change in type
5429         of vect_location.
5430         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5431         location_t to dump_location_t.
5432         (vect_slp_bb): Update for change in type of vect_location.
5433         * tree-vectorizer.c (vect_location): Convert from source_location
5434         to dump_user_location_t.
5435         (try_vectorize_loop_1): Update for change in vect_location's type.
5436         (vectorize_loops): Likewise.
5437         (increase_alignment): Likewise.
5438         * tree-vectorizer.h (vect_location): Convert from source_location
5439         to dump_user_location_t.
5440         (find_loop_location): Convert return type from source_location to
5441         dump_user_location_t.
5442         (check_reduction_path): Convert 1st param from location_t to
5443         dump_user_location_t.
5444         * value-prof.c (check_counter): Update call to dump_printf_loc to
5445         pass in a dump_user_location_t rather than a location_t; update
5446         call to error_at for change in type of "locus".
5447         (check_ic_target): Update call to dump_printf_loc to
5448         pass in a dump_user_location_t rather than a location_t, via the
5449         call_stmt.
5451 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5453         * config/s390/s390.h (enum processor_flags): Do not use
5454         default tune parameter when -march was specified.
5456 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5458         PR target/86314
5459         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5460         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5461         operands.
5463 2018-06-26  Richard Biener  <rguenther@suse.de>
5465         PR tree-optimization/86287
5466         PR bootstrap/86316
5467         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5468         (vect_analyze_loop): Initialize n_stmts.
5470 2018-06-26  Richard Biener  <rguenther@suse.de>
5472         PR middle-end/86271
5473         * fold-const.c (fold_convertible_p): Pointer extension
5474         isn't valid.
5476 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5478         PR debug/86064
5479         * dwarf2out.c (loc_list_has_views): Adjust comments.
5480         (dw_loc_list): Split single cross-partition range with
5481         nonzero locview.
5483 2018-06-25  Jeff Law  <law@redhat.com>
5485         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5486         on -mbig-switch by default.
5488         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5489         test.
5490         (const_float_0_operand): Remove unused predicate.
5491         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5492         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5493         (recipsf2): New expander.  Original pattern now called
5494         (recipsf2_insn).
5495         (recipdf2, recipdf2_insn): Similarly.
5496         (rsqrtsf2, rsqrtsf2_insn): Similarly
5497         (rsqrtdf2, rsqrtdf2_insn): Similarly
5499 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5501         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5502         Simplify logic for FreeBSD (twice).
5504 2018-06-25  Martin Sebor  <msebor@redhat.com>
5506         PR tree-optimization/86204
5507         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5508         a strnlen result if it's less than the length of the string.
5510 2018-06-25  Martin Sebor  <msebor@redhat.com>
5512         PR tree-optimization/85700
5513         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5514         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5515         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5517 2018-06-25  Martin Sebor  <msebor@redhat.com>
5519         * doc/extend.texi (Zero-length arrays): Update and clarify.
5521 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5523         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5524         added IEEE/IBM long double multilib support on PowerPC little
5525         endian Linux systems.
5526         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5527         (MULTILIB_DEFAULTS): Likewise.
5528         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5529         Likewise.
5530         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5531         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5532         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5534 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5536         PR middle-end/86311
5537         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5538         (REORDER_45): Likewise.
5540 2018-06-25  Jeff Law  <law@redhat.com>
5542         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5543         dividend to 32 bits.  Adjust length.
5544         (udivmodhi4): Cleanup output template.  Fix length.
5546 2018-06-25  Carl Love  <cel@us.ibm.com>
5548         * config/rs6000/vsx.md: Change word selector to prefered location.
5550 2018-06-25  Richard Biener  <rguenther@suse.de>
5552         PR tree-optimization/86304
5553         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5554         epilogue-if-converted loops as well.
5556 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5558         * lto-section-out.c (lto_begin_section): Do not print section
5559         name for noaddr and unnumbered dumps.
5561 2018-06-25  Richard Biener  <rguenther@suse.de>
5563         * tree-vectorizer.h (struct vec_info_shared): New structure
5564         with parts split out from struct vec_info and loop_nest from
5565         struct _loop_vec_info.
5566         (struct vec_info): Adjust accordingly.
5567         (struct _loop_vec_info): Likewise.
5568         (LOOP_VINFO_LOOP_NEST): Adjust.
5569         (LOOP_VINFO_DATAREFS): Likewise.
5570         (LOOP_VINFO_DDRS): Likewise.
5571         (struct _bb_vec_info): Likewise.
5572         (BB_VINFO_DATAREFS): Likewise.
5573         (BB_VINFO_DDRS): Likewise.
5574         (struct _stmt_vec_info): Add dr_aux member.
5575         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5576         (DR_MISALIGNMENT_UNINITIALIZED): New.
5577         (set_dr_misalignment): Adjust.
5578         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5579         (vect_analyze_loop): Adjust prototype.
5580         (vect_analyze_loop_form): Likewise.
5581         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5582         Compute dependences lazily.
5583         (vect_record_base_alignments): Use shared datarefs/ddrs.
5584         (vect_verify_datarefs_alignment): Likewise.
5585         (vect_analyze_data_refs_alignment): Likewise.
5586         (vect_analyze_data_ref_accesses): Likewise.
5587         (vect_analyze_data_refs): Likewise.
5588         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5589         constructor parameter for shared part.
5590         (vect_analyze_loop_form): Pass in shared part and adjust.
5591         (vect_analyze_loop_2): Pass in storage for the number of
5592         stmts.  Move loop nest finding to the caller.  Compute
5593         datarefs lazily.
5594         (vect_analyze_loop): Pass in shared part.
5595         (vect_transform_loop): Verify shared datarefs are unchanged.
5596         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5597         constructor parameter for shared part.
5598         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5599         (vect_slp_bb): Verify shared datarefs are unchanged before
5600         transform.
5601         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5602         change.
5603         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5604         DR_MISALIGNMENT_UNINITIALIZED.
5605         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5606         parameter for shared part.
5607         (vec_info::~vec_info): Adjust.
5608         (vec_info_shared::vec_info_shared): New.
5609         (vec_info_shared::~vec_info_shared): Likewise.
5610         (vec_info_shared::save_datarefs): Likewise.
5611         (vec_info_shared::check_datarefs): Likewise.
5612         (try_vectorize_loop_1): Construct shared part live for analyses
5613         of a single loop for multiple vector sizes.
5614         * tree-parloops.c (gather_scalar_reductions): Adjust.
5616 2018-06-25  Richard Biener  <rguenther@suse.de>
5618         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5619         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5620         (vect_analyze_data_refs): Remove similar code from here and
5621         simplify accordingly.
5623 2018-06-25  Richard Biener  <rguenther@suse.de>
5625         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5626         for reverse storage order accesses rather than asserting
5627         they cannot happen here.
5629 2018-06-25  Tom de Vries  <tdevries@suse.de>
5631         PR debug/86257
5632         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5633         Use data16 instead of .byte for insn prefix.
5635 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5637         PR C++/86082
5638         * parser.c (make_char_string_pack): Pass this literal chars
5639         through cpp_interpret_string.
5640         (cp_parser_userdef_numeric_literal): Check the result of
5641         make_char_string_pack.
5643 2018-06-24  Maya Rashish  <coypu@sdf.org>
5645         * ginclude/stddef.h: Simplify conditions around avoiding
5646         re-definition of __size_t.
5648 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5650         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5651         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5653 2018-06-22  Maya Rashish  <coypu@sdf.org>
5655         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5656         made to OpenBSD and NetBSD through the years.
5658 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5660         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5661         behavior of vec_pack (vector double, vector double) to match
5662         behavior of vec_float2 (vector double, vector double).
5664 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5666         * gimplify.c (gimplify_function_tree): Prevent creation
5667         of a trampoline for the address of the current function
5668         passed to entry/exit instrumentation hooks.
5670 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5672         PR target/86222
5673         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5674         correctly.
5676 2018-06-22  Martin Liska  <mliska@suse.cz>
5678         PR tree-optimization/86263
5679         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5680         Bail out if is_enabled is false.
5681         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5682         New declaration.
5683         (jump_table_cluster::is_enabled): New function.
5685 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5687         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5688         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5689         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5690         (lto_input_ts_binfo_tree_pointers): Likewise.
5691         * tree-streamer-out.c (streamer_write_tree_bitfields,
5692         write_ts_binfo_tree_pointers): Likewise.
5693         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5695 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5697         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5699 2018-06-22  Martin Liska  <mliska@suse.cz>
5701         * symbol-summary.h (get): Make it pure and inline move
5702         functionality from ::get function.
5703         (get): Remove and inline into ::get and ::get_create.
5704         (get_create): Move code from ::get function.
5706 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5708         PR target/85994
5709         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5710         -x assembler-with-cpp.
5712 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5714         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5715         _FILE_OFFSET_BITS=64 for C++.
5717 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5719         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5720         conversion insn that shows up when pr85657-3.c is compiled using
5721         IEEE 128-bit long double.
5722         (neg<mode>2_internal): Use the correct mode to check whether the
5723         mode is IBM extended.
5724         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5725         multiply and divide external functions from being created more
5726         than once.
5728 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5730         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5731         functions.
5732         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5733         the edge can be forwarded.
5734         (cfg_layout_merge_blocks): Likewise.
5736 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5738         * except.c (finish_eh_generation): Commit edge insertions only after
5739         the EH edges have been redirected from post-landing to landing pads.
5741 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5743         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5744         create_tmp_var_for to create the FRAME decl.
5745         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5747 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5749         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5750         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5751         debug statement when resetting its value.
5752         (expand_call_inline): Copy the locus of the call onto the assignment
5753         of the return value, if any.  Use local variable in more cases.
5755 2018-06-21  Martin Liska  <mliska@suse.cz>
5757         * ipa-pure-const.c (propagate_nothrow): Use
5758         funct_state_summaries->get.
5759         (dump_malloc_lattice): Likewise.
5760         (propagate_malloc): Likewise.
5762 2018-06-21  Richard Biener  <rguenther@suse.de>
5764         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5765         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5766         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5767         comment.
5768         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5769         BLOCK_ABSTRACT_ORIGIN unconditionally.
5771 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5773         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5774         deleting it.
5775         * ipa-reference.c (ipa_reference_c_finalize): Delete
5776         ipa_ref_opt_sum_summaries and set it to NULL.
5778 2018-06-21  Tom de Vries  <tdevries@suse.de>
5780         PR tree-optimization/85859
5781         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5782         test with comment from bb_no_side_effects_p.
5784 2018-06-21  Richard Biener  <rguenther@suse.de>
5786         PR tree-optimization/86232
5787         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5788         max for constant niter.
5790 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5792         * config/aarch64/aarch64-simd.md
5793         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5795 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5797         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5798         Make opernads of the unspec commutative.
5800 2018-06-21  Richard Biener  <rguenther@suse.de>
5802         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5803         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5804         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5805         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5806         NULL DR_STEP.
5807         (vect_record_base_alignments): Do not record base alignment
5808         for gathers or scatters.
5809         (vect_compute_data_ref_alignment): Drop return value that is always
5810         true.  Bail out early for gathers or scatters.
5811         (vect_enhance_data_refs_alignment): Bail out early for gathers
5812         or scatters.
5813         (vect_find_same_alignment_drs): Likewise.
5814         (vect_analyze_data_refs_alignment): Remove dead code.
5815         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5816         (vect_analyze_data_refs): For possible gathers or scatters do
5817         not create an alternate DR, just check their possible validity
5818         and mark them.  Adjust DECL_NONALIASED handling to not rely
5819         on DR_BASE_ADDRESS.
5820         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5821         update inits of gathers or scatters.
5822         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5823         Also copy gather/scatter flag to pattern vinfo.
5825 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5827         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5828         behavior of vec_packsu (vector unsigned long long, vector unsigned
5829         long long) to match behavior of vec_packs with same signature.
5831 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5832             Thomas Schwinge <thomas@codesourcery.com>
5833             Cesar Philippidis  <cesar@codesourcery.com>
5835         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5836         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5837         (gimplify_adjust_omp_clauses): Likewise.
5838         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5839         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5840         (gimplify_omp_target_update): Update handling of acc update and
5841         enter/exit data.
5842         * omp-low.c (install_var_field): Remove unused parameter
5843         base_pointers_restrict.
5844         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5845         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5846         FINALIZE}
5847         (omp_target_base_pointers_restrict_p): Delete.
5848         (scan_omp_target): Update call to scan_sharing_clauses.
5849         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5850         FINALIZE}.
5851         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5852         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5853         (convert_local_omp_clauses): Likewise.
5854         * tree-pretty-print.c (dump_omp_clause): Likewise.
5855         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5856         FINALIZE}.
5857         (omp_clause_code_name): Likewise.
5859 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5861         PR debug/86194
5862         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5863         be narrowed.
5865         PR tree-optimization/86231
5866         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5867         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5869 2018-06-20  Tom de Vries  <tdevries@suse.de>
5871         PR tree-optimization/86097
5872         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5873         iv type if signedness of iv type is not the same as that of *nit.
5875 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5877         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5878         EDGE_EH edges, verify they are all EDGE_EH.
5880 2018-06-20  Maya Rashish  <coypu@sdf.org>
5882         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5884 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5886         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5887         * config/aarch64/aarch64.c (xgene1_tunings): Add
5888         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5889         (aarch64_mode_valid_for_sched_fusion_p):
5890         Allow 16-byte modes.
5891         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5892         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5893         128-bit modes.
5894         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5895         New pattern.
5896         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5897         * config/aarch64/iterators.md (VQ2): New mode iterator.
5899 2018-06-20  Martin Liska  <mliska@suse.cz>
5901         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5902         Change default ratio from 10 to 8.
5904 2018-06-20  Martin Liska  <mliska@suse.cz>
5906         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5907         New.
5908         (bit_test_cluster::find_bit_tests): Likewise.
5909         (switch_decision_tree::analyze_switch_statement): Find clusters.
5910         * tree-switch-conversion.h (struct jump_table_cluster): Document
5911         hierarchy.
5913 2018-06-20  Martin Liska  <mliska@suse.cz>
5915         * tree-switch-conversion.c (switch_conversion::collect):
5916         Record m_uniq property.
5917         (switch_conversion::expand): Bail out for special conditions.
5918         (group_cluster::~group_cluster): New.
5919         (group_cluster::group_cluster): Likewise.
5920         (group_cluster::dump): Likewise.
5921         (jump_table_cluster::emit): New.
5922         (switch_decision_tree::fix_phi_operands_for_edges): New.
5923         (struct case_node): Remove struct.
5924         (jump_table_cluster::can_be_handled): New.
5925         (case_values_threshold): Moved to header.
5926         (reset_out_edges_aux): Likewise.
5927         (jump_table_cluster::is_beneficial): New.
5928         (bit_test_cluster::can_be_handled): Likewise.
5929         (add_case_node): Remove.
5930         (bit_test_cluster::is_beneficial): New.
5931         (case_bit_test::cmp): New.
5932         (bit_test_cluster::emit): New.
5933         (expand_switch_as_decision_tree_p): Remove.
5934         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5935         (fix_phi_operands_for_edge): Likewise.
5936         (switch_decision_tree::analyze_switch_statement): New.
5937         (compute_cases_per_edge): Move ...
5938         (switch_decision_tree::compute_cases_per_edge): ... here.
5939         (try_switch_expansion): Likewise.
5940         (switch_decision_tree::try_switch_expansion): Likewise.
5941         (record_phi_operand_mapping): Likewise.
5942         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5943         (emit_case_decision_tree): Likewise.
5944         (switch_decision_tree::emit): Likewise.
5945         (balance_case_nodes): Likewise.
5946         (switch_decision_tree::balance_case_nodes): Likewise.
5947         (dump_case_nodes): Likewise.
5948         (switch_decision_tree::dump_case_nodes): Likewise.
5949         (emit_jump): Likewise.
5950         (switch_decision_tree::emit_jump): Likewise.
5951         (emit_cmp_and_jump_insns): Likewise.
5952         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5953         (emit_case_nodes): Likewise.
5954         (switch_decision_tree::emit_case_nodes): Likewise.
5955         (conditional_probability): Remove.
5956         * tree-switch-conversion.h (enum cluster_type): New.
5957         (PRINT_CASE): New.
5958         (struct cluster): Likewise.
5959         (cluster::cluster): Likewise.
5960         (struct simple_cluster): Likewise.
5961         (simple_cluster::simple_cluster): Likewise.
5962         (struct group_cluster): Likewise.
5963         (struct jump_table_cluster): Likewise.
5964         (struct bit_test_cluster): Likewise.
5965         (struct min_cluster_item): Likewise.
5966         (struct case_tree_node): Likewise.
5967         (case_tree_node::case_tree_node): Likewise.
5968         (jump_table_cluster::case_values_threshold): Likewise.
5969         (struct case_bit_test): Likewise.
5970         (struct switch_decision_tree): Likewise.
5971         (struct switch_conversion): Likewise.
5972         (switch_decision_tree::reset_out_edges_aux): Likewise.
5974 2018-06-20  Martin Liska  <mliska@suse.cz>
5976         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5977         (hoist_edge_and_branch_if_true): Likewise.
5978         (expand_switch_using_bit_tests_p): Likewise.
5979         (struct case_bit_test): Likewise.
5980         (case_bit_test_cmp): Likewise.
5981         (emit_case_bit_tests): Likewise.
5982         (switch_conversion::switch_conversion): New class.
5983         (struct switch_conv_info): Remove old struct.
5984         (collect_switch_conv_info): More to ...
5985         (switch_conversion::collect): ... this.
5986         (check_range): Likewise.
5987         (switch_conversion::check_range): Likewise.
5988         (check_all_empty_except_final): Likewise.
5989         (switch_conversion::check_all_empty_except_final): Likewise.
5990         (check_final_bb): Likewise.
5991         (switch_conversion::check_final_bb): Likewise.
5992         (create_temp_arrays): Likewise.
5993         (switch_conversion::create_temp_arrays): Likewise.
5994         (free_temp_arrays): Likewise.
5995         (gather_default_values): Likewise.
5996         (switch_conversion::gather_default_values): Likewise.
5997         (build_constructors): Likewise.
5998         (switch_conversion::build_constructors): Likewise.
5999         (constructor_contains_same_values_p): Likewise.
6000         (switch_conversion::contains_same_values_p): Likewise.
6001         (array_value_type): Likewise.
6002         (switch_conversion::array_value_type): Likewise.
6003         (build_one_array): Likewise.
6004         (switch_conversion::build_one_array): Likewise.
6005         (build_arrays): Likewise.
6006         (switch_conversion::build_arrays): Likewise.
6007         (gen_def_assigns): Likewise.
6008         (switch_conversion::gen_def_assigns): Likewise.
6009         (prune_bbs): Likewise.
6010         (switch_conversion::prune_bbs): Likewise.
6011         (fix_phi_nodes): Likewise.
6012         (switch_conversion::fix_phi_nodes): Likewise.
6013         (gen_inbound_check): Likewise.
6014         (switch_conversion::gen_inbound_check): Likewise.
6015         (process_switch): Use the newly created class.
6016         (switch_conversion::expand): New.
6017         (switch_conversion::~switch_conversion): New.
6018         * tree-switch-conversion.h: New file.
6020 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6022         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6023         tree-vect-patterns.c.
6024         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6025         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6026         (vect_recog_sad_pattern): Likewise.
6027         (vect_recog_widen_sum_pattern): Likewise.
6028         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6029         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6030         (vect_recog_rotate_pattern): Likewise.
6031         (vect_recog_mult_pattern): Likewise.
6032         (vect_recog_vector_vector_shift_pattern): Likewise.
6033         (vect_recog_divmod_pattern): Likewise.
6034         (vect_recog_mixed_size_cond_pattern): Likewise.
6035         (vect_recog_bool_pattern): Likewise.
6036         (vect_recog_mask_conversion_pattern): Likewise.
6037         (vect_try_gather_scatter_pattern): Likewise.
6038         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6039         (vect_recog_over_widening_pattern): Likewise.
6040         (vect_recog_gather_scatter_pattern): Likewise.
6041         (vect_recog_func_ptr): Move from tree-vectorizer.h
6042         (vect_vect_recog_func_ptrs): Move further down the file.
6043         (vect_recog_func): Likewise.  Remove the third argument.
6044         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6045         (vect_pattern_recog_1): Expect the pattern function to do any
6046         necessary target tests.  Also expect it to provide a vector type.
6047         Remove the type_in handling.
6049 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6051         * tree-vect-patterns.c (vect_pattern_detected): New function.
6052         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6053         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6054         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6055         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6056         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6057         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6058         (vect_recog_mask_conversion_pattern)
6059         (vect_try_gather_scatter_pattern): Likewise.
6061 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6063         * tree-vect-patterns.c (vect_get_internal_def): New function.
6064         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6065         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6066         (search_type_for_mask_1): Use it.
6068 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6070         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6071         redundant WIDEN_SUM_EXPR handling.
6072         (vect_recog_sad_pattern): Likewise.
6074 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6076         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6077         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6078         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6079         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6080         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6082 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6084         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6085         use the stmt_vec_info of the original bb statement for the
6086         new zero assignment, even if the call is part of a pattern.
6088 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6090         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6091         that the sequence is attached to the original statement rather
6092         than the pattern statement.
6093         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6094         PATTERN_DEF_SEQ from the original statement rather than
6095         the main pattern statement.
6096         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6097         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6098         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6100 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6102         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6103         definition statements before the early exit for statements that aren't
6104         live or relevant.
6105         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6106         split out from...
6107         (vect_transform_loop): ...here.  Process pattern definition
6108         statements without first checking whether the main pattern
6109         statement is live or relevant.
6111 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6113         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6114         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6116 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6118         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6119         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6120         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6121         (expand_block_compare): Change select_block_compare_mode call.
6122         (expand_strncmp_align_check): Use new functions, fix comment.
6123         (emit_final_str_compare_gpr): New function.
6124         (expand_strn_compare): Refactor and clean up code.
6125         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6127 2018-06-19  Tony Reix  <tony.reix@atos.com>
6128             Damien Bergamini  <damien.bergamini@atos.com>
6129             David Edelsohn  <dje.gcc@gmail.com>
6131         * collect2.c (static_obj): New variable.
6132         (static_libs): New variable.
6133         (is_in_list): Uncomment declaration.
6134         (main): Track AIX libraries linked statically.
6135         (is_in_list): Uncomment definition.
6136         (scan_prog_file): Don't add AIX shared libraries initializer
6137         to constructor list if linking statically.
6139 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6141         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6142         constant.
6143         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6145 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6147         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6148         blocks.
6150 2018-06-19  Martin Liska  <mliska@suse.cz>
6152         * config/i386/i386.c (ix86_can_inline_p): Do not use
6153         ipa_fn_summaries::get_create.
6154         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6155         get.
6156         (devirtualization_time_bonus): Likewise.
6157         (ipcp_propagate_stage): Likewise.
6158         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6159         (edge_set_predicate): Likewise.
6160         (evaluate_conditions_for_known_args): Likewise.
6161         (evaluate_properties_for_edge): Likewise.
6162         (ipa_call_summary::reset): Tranform to ...
6163         (ipa_call_summary::~ipa_call_summary): ... this.
6164         (ipa_fn_summary::reset): Transform to ...
6165         (ipa_fn_summary::~ipa_fn_summary): ... this.
6166         (ipa_fn_summary_t::remove): Rename to ...
6167         (ipa_fn_summary_t::remove_callees): ... this.
6168         (ipa_fn_summary_t::duplicate): Use placement new
6169         instead of memory copy.
6170         (ipa_call_summary_t::duplicate): Likewise.
6171         (ipa_call_summary_t::remove): Remove.
6172         (dump_ipa_call_summary): Change get_create to get.
6173         (ipa_dump_fn_summary): Dump only when summary exists.
6174         (analyze_function_body): Use symbol_summary::get instead
6175         of get_create.
6176         (compute_fn_summary): Likewise.
6177         (estimate_edge_devirt_benefit): Likewise.
6178         (estimate_edge_size_and_time): Likewise.
6179         (inline_update_callee_summaries): Likewise.
6180         (remap_edge_change_prob): Likewise.
6181         (remap_edge_summaries): Likewise.
6182         (ipa_merge_fn_summary_after_inlining): Likewise.
6183         (write_ipa_call_summary): Likewise.
6184         (ipa_fn_summary_write): Likewise.
6185         (ipa_free_fn_summary): Likewise.
6186         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6187         (struct ipa_call_summary): Likewise.
6188         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6189         of get_create.
6190         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6191         (estimate_size_after_inlining): Likewise.
6192         (estimate_growth): Likewise.
6193         (growth_likely_positive): Likewise.
6194         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6195         (inline_call): Likewise.
6196         * ipa-inline.c (caller_growth_limits): Likewise.
6197         (can_inline_edge_p): Likewise.
6198         (can_inline_edge_by_limits_p): Likewise.
6199         (compute_uninlined_call_time): Likewise.
6200         (compute_inlined_call_time): Likewise.
6201         (want_inline_small_function_p): Likewise.
6202         (edge_badness): Likewise.
6203         (update_caller_keys): Likewise.
6204         (update_callee_keys): Likewise.
6205         (inline_small_functions): Likewise.
6206         (inline_to_all_callers_1): Likewise.
6207         (dump_overall_stats): Likewise.
6208         (early_inline_small_functions): Likewise.
6209         (early_inliner): Likewise.
6210         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6211         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6212         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6213         * ipa-split.c (execute_split_functions): Likewise.
6214         * symbol-summary.h: Likewise.
6215         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6217 2018-06-19  Richard Biener  <rguenther@suse.de>
6219         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6220         (vectorize_loops): ... here.  Fix dbgcnt handling.
6221         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6223 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6225         PR target/86197
6226         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6227         ieee128 argument takes up only one (vector) register, not two (floating
6228         point) registers.
6230 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6232         * gimplify.c (gimplify_init_constructor): Really never clear for an
6233         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6235 2018-06-19  Richard Biener  <rguenther@suse.de>
6237         PR tree-optimization/86179
6238         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6239         after failed recognition.
6241 2018-06-18  Martin Sebor  <msebor@redhat.com>
6243         PR middle-end/85602
6244         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6245         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6246         Handle integer subtraction.
6247         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6248         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6250 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6252         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6253         param from rtx to rtx_insn *.
6254         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6255         param.
6256         (frv_ifcvt_modify_insn): Likwise.
6257         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6258         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6259         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6260         as_a <rtx_insn *> cast to local "unprotected_region" once
6261         it's been established that it's not NULL or pc_rtx.
6262         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6263         param "sethi" from rtx to rtx_insn *.
6264         (nds32_group_float_insns): Likewise for param "insn".
6265         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6266         param.
6267         (vax_output_int_subtract): Likewise.
6268         * config/vax/vax.c (vax_output_int_add): Likewise for param
6269         "insn".
6270         (vax_output_int_subtract): Likewise.
6271         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6272         (emit_pattern_after): Likewise for param "after".
6273         (emit_insn_after): Likewise.
6274         (emit_jump_insn_after): Likewise.
6275         (emit_call_insn_after): Likewise.
6276         (emit_debug_insn_after): Likewise.
6277         (emit_pattern_before): Likewise for param "before".
6278         (emit_insn_before): Likewise.
6279         (emit_jump_insn_before): Likewise.
6280         * final.c (get_insn_template): Likewise for param "insn", removing
6281         a cast.
6282         * output.h (get_insn_template): Likewise for 2nd param.
6283         * rtl.h (emit_insn_before): Likewise.
6284         (emit_jump_insn_before): Likewise.
6285         (emit_debug_insn_before_noloc): Likewise.
6286         (emit_insn_after): Likewise.
6287         (emit_jump_insn_after): Likewise.
6288         (emit_call_insn_after): Likewise.
6289         (emit_debug_insn_after): Likewise.
6290         (set_insn_deleted): Likewise for param.
6292 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6294         PR target/85358
6295         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6296         floating point modes, so that IFmode is numerically greater than
6297         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6298         to declare the ordering.  This prevents IFmode from being
6299         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6300         machine.  Include rs6000-modes.h to share the fractional values
6301         between genmodes* and the rest of the compiler.
6302         (IFmode): Likewise.
6303         (KFmode): Likewise.
6304         (TFmode): Likewise.
6305         * config/rs6000/rs6000-modes.h: New file.
6306         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6307         meaning of rs6000_long_double_size so that 126..128 selects an
6308         appropriate 128-bit floating point type.
6309         (rs6000_option_override_internal): Likewise.
6310         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6311         (TARGET_LONG_DOUBLE_128): Change the meaning of
6312         rs6000_long_double_size so that 126..128 selects an appropriate
6313         128-bit floating point type.
6314         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6315         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6316         source and destination to match the standard usage.
6317         (truncifkf2): Likewise.
6318         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6319         ISA 2.07 to use an explicit clobber, instead of passing in a
6320         temporary.
6321         (copysign<mode>3_soft): Likewise.
6323 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6325         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6326         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6327         (vect_slp_analyze_instance_dependence): Likewise.
6328         (vect_enhance_data_refs_alignment): Likewise.
6329         (vect_analyze_data_refs_alignment): Likewise.
6330         (vect_slp_analyze_and_verify_instance_alignment
6331         (vect_analyze_data_ref_accesses): Likewise.
6332         (vect_prune_runtime_alias_test_list): Likewise.
6333         (vect_analyze_data_refs): Likewise.
6334         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6335         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6336         (vect_analyze_scalar_cycles_1): Likewise.
6337         (vect_get_loop_niters): Likewise.
6338         (vect_analyze_loop_form_1): Likewise.
6339         (vect_update_vf_for_slp): Likewise.
6340         (vect_analyze_loop_operations): Likewise.
6341         (vect_analyze_loop): Likewise.
6342         (vectorizable_induction): Likewise.
6343         (vect_transform_loop): Likewise.
6344         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6345         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6346         (vect_make_slp_decision): Likewise.
6347         (vect_detect_hybrid_slp): Likewise.
6348         (vect_slp_analyze_operations): Likewise.
6349         (vect_slp_bb): Likewise.
6350         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6351         (vectorizable_bswap): Likewise.
6352         (vectorizable_call): Likewise.
6353         (vectorizable_simd_clone_call): Likewise.
6354         (vectorizable_conversion): Likewise.
6355         (vectorizable_assignment): Likewise.
6356         (vectorizable_shift): Likewise.
6357         (vectorizable_operation): Likewise.
6358         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6360 2018-06-18  Martin Sebor  <msebor@redhat.com>
6362         PR tree-optimization/81384
6363         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6364         * builtins.c (expand_builtin_strnlen): New function.
6365         (expand_builtin): Call it.
6366         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6367         * builtins.def (BUILT_IN_STRNLEN): New.
6368         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6369         Warn for bounds in excess of maximum object size.
6370         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6371         single-value ranges.  Handle strnlen.
6372         (handle_builtin_strlen): Handle strnlen.
6373         (strlen_check_and_optimize_stmt): Same.
6374         * doc/extend.texi (Other Builtins): Document strnlen.
6376 2018-06-18  Maya Rashish  <coypu@sdf.org>
6378         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6379         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6380         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6382         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6383         here to ...
6384         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6386 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6388         * tree.c (escaped_string::escape): Replace cast to char * by
6389         const_cast<char *> (unescaped).
6391 2018-06-18  Nick Clifton  <nickc@redhat.com>
6393         PR 84195
6394         * tree.c (escaped_string): New class.  Converts an unescaped
6395         string into its escaped equivalent.
6396         (warn_deprecated_use): Use the new class to convert the
6397         deprecation message, if present.
6398         (test_escaped_strings): New self test.
6399         (test_c_tests): Add test_escaped_strings.
6400         * doc/extend.texi (deprecated): Add a note that the
6401         deprecation message is affected by the -fmessage-length
6402         option, and that control characters will be escaped.
6403         (#pragma GCC error): Document this pragma.
6404         (#pragma GCC warning): Likewise.
6405         * doc/invoke.texi (-fmessage-length): Document this option's
6406         effect on the #warning and #error preprocessor directives and
6407         the deprecated attribute.
6409 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6411         * tree.c (decl_value_expr_lookup): Revert latest change.
6412         (decl_value_expr_insert): Likewise.
6414 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6416         * gimplify.c (nonlocal_vlas): Delete.
6417         (nonlocal_vla_vars): Likewise.
6418         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6419         referenced VLAs.
6420         (gimplify_body): Do not create and destroy nonlocal_vlas.
6421         * tree-nested.c: Include diagnostic.h.
6422         (use_pointer_in_frame): Tweak.
6423         (lookup_field_for_decl): Add assertion and declare the transformation.
6424         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6425         internal error when the reference is in a wrong context.  Do not
6426         create a debug decl by default.
6427         (note_nonlocal_block_vlas): Delete.
6428         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6429         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6430         create a debug decl by default.
6431         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6432         call is in a wrong context.
6433         (fixup_vla_decls): New function.
6434         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6435         debug variables were created.
6436         * tree.c (decl_value_expr_lookup): Add checking assertion.
6437         (decl_value_expr_insert): Likewise.
6439 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6441         PR middle-end/82479
6442         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6443         * tree-scalar-evolution.c (interpret_expr): Likewise.
6444         (expression_expensive_p): Likewise.
6445         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6446         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6447         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6448         (ssa_defined_by_minus_one_stmt_p): New.
6450 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6452         PR middle-end/64946
6453         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6454         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6455         * dojump.c (do_jump): Likewise.
6456         * expr.c (expand_expr_real_2): Check operand type's sign.
6457         * fold-const.c (const_unop): Handle ABSU_EXPR.
6458         (fold_abs_const): Likewise.
6459         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6460         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6461         (strip_sign_op_1): Likesise.
6462         * match.pd: Add new pattern to generate ABSU_EXPR.
6463         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6464         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6465         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6466         * tree-inline.c (estimate_operator_cost): Likewise.
6467         * tree-pretty-print.c (dump_generic_node): Likewise.
6468         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6469         * tree.def (ABSU_EXPR): New.
6471 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6473         PR middle-end/86095
6474         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6475         documented as preserved for backward compatibility only.
6476         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6478         PR rtl-optimization/86108
6479         * bb-reorder.c (create_forwarder_block): Renamed to ...
6480         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6481         jump from new landing pad to the second part.
6482         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6483         Adjust callers.
6485 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6487         PR middle-end/85878
6488         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6489         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6490         Only call store_expr for halves if the mode is the same.
6492         PR middle-end/86123
6493         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6494         Fix up comment formatting.
6496 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6498         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6499         (typed_splay_tree::closure,
6500         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6501         (typed_splay_tree::typed_splay_tree,
6502         typed_splay_tree::operator =): Declared private.
6503         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6504         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6505         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6506         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6507         typed_splay_tree::splay_tree_splay,
6508         typed_splay_tree::splay_tree_foreach_helper,
6509         typed_splay_tree::splay_tree_insert,
6510         typed_splay_tree::splay_tree_remove,
6511         typed_splay_tree::splay_tree_lookup,
6512         typed_splay_tree::splay_tree_predecessor,
6513         typed_splay_tree::splay_tree_successor,
6514         typed_splay_tree::splay_tree_min,
6515         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6516         (typed_splay_tree::root, typed_splay_tree::comp,
6517         typed_splay_tree::delete_key,
6518         typed_splay_tree::delete_value): New data members.
6519         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6520         typed_splay_tree::remove.
6522 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6524         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6525         -mginv and -mno-ginv to the assembler.
6526         * config/mips/mips.opt (-mcrc): New option.
6527         (-mginv): Likewise.
6528         * doc/invoke.text (-mcrc): Document.
6529         (-mginv): Likewise.
6531 2018-06-15  Nick Clifton  <nickc@redhat.com>
6533         PR 84195
6534         * tree.c (escaped_string): New class.  Converts an unescaped
6535         string into its escaped equivalent.
6536         (warn_deprecated_use): Use the new class to convert the
6537         deprecation message, if present.
6538         (test_escaped_strings): New self test.
6539         (test_c_tests): Add test_escaped_strings.
6540         * doc/extend.texi (deprecated): Add a note that the
6541         deprecation message is affected by the -fmessage-length
6542         option, and that control characters will be escaped.
6543         (#pragma GCC error): Document this pragma.
6544         (#pragma GCC warning): Likewise.
6545         * doc/invoke.texi (-fmessage-length): Document this option's
6546         effect on the #warning and #error preprocessor directives and
6547         the deprecated attribute.
6549 2018-06-15  Richard Biener  <rguenther@suse.de>
6551         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6552         here, also noting vector size used.
6553         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6554         size used in MSG_OPTIMIZED_LOCATIONS dump.
6555         (pass_slp_vectorize::execute): Adjust.
6557 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6559         PR target/85968
6560         * config/arc/arc.c (arc_return_address_register): Fix
6561         if-condition.
6563 2018-06-15  Richard Biener  <rguenther@suse.de>
6565         PR middle-end/86159
6566         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6567         leave useless conversion stripping to force_gimple_operand_gsi.
6568         (gimplify_build2): Likewise.
6569         (gimplify_build1): Likewise.
6571 2018-06-15  Richard Biener  <rguenther@suse.de>
6573         PR middle-end/86076
6574         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6575         before adjusting their block.
6577 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6579         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6580         multilibs for *-*-rtems*.
6581         * config/riscv/t-rtems: New file.
6583 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6585         PR middle-end/86122
6586         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6587         unsigned_type_for returns NULL.
6589         PR target/85945
6590         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6591         subregs of multi-word pseudos unless the float mode has word size.
6593 2018-06-14  Richard Biener  <rguenther@suse.de>
6595         PR middle-end/86139
6596         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6597         duplicate and harmful type_hash_canon.
6598         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6600 2018-06-14  Richard Biener  <rguenther@suse.de>
6602         PR ipa/86124
6603         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6604         NULL cgraph_node.
6606 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6608         * config/rtems.h (STDINT_LONG32): Define.
6610 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6611             Prachi Godbole  <prachi.godbole@imgtec.com>
6613         * config/mips/mips-cpus.def: Define P6600.
6614         * config/mips/mips-tables.opt: Regenerate.
6615         * config/mips/mips.c (mips_ucbranch_type): New enum.
6616         (mips_rtx_cost_data): Add support for P6600.
6617         (mips_issue_rate): Likewise.
6618         (mips_multipass_dfa_lookahead): Likewise.
6619         (mips_avoid_hazard): Likewise.
6620         (mips_reorg_process_insns): Likewise.
6621         (mips_classify_branch_p6600): New function.
6622         * config/mips/mips.h (TUNE_P6600): New define.
6623         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6624         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6625         * config/mips/mips.md: Include p6600.md.
6626         (processor): Add p6600.
6627         * config/mips/p6600.md: New file.
6628         * doc/invoke.texi: Add p6600 to supported architectures.
6630 2018-06-13  Martin Sebor  <msebor@redhat.com>
6632         PR tree-optimization/86114
6633         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6634         of integer types.
6635         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6637 2018-06-13  Richard Biener  <rguenther@suse.de>
6639         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6640         Properly set vector type of the intermediate stmt.
6641         * tree-vect-stmts.c (vectorizable_operation): The destination
6642         var always has vectype_out type.
6644 2018-06-13  Jeff Law  <law@redhat.com>
6646         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6647         integer 0 for argument to print_rtl_with_bb.
6648         (rl78_reorg): Likewise.
6650 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6652         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6653         from rtx to rtx_insn *.
6654         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6655         "label".
6656         (add_sched_insns_for_speculation): Likewise for local "target",
6657         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6658         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6659         from rtx_insn ** to rtx_code_label **.
6660         (reorg_emit_nops): Likewise.
6661         (c6x_reorg): Likewise for local "call_labels".
6662         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6663         rtx to rtx_insn *.
6664         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6665         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6666         the loops over LABEL_REFS.
6667         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6668         braf_label.
6669         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6670         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6671         (split_branches): Strengthen local "olabel" from rtx to
6672         rtx_insn *, adding a safe_as_a cast.
6673         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6674         to "rtx_insn *".
6675         (add_insn_after): Likewise for first two params.
6676         (add_insn_before): Likewise.
6677         (remove_insn): Likewise for param.
6678         (emit_pattern_before_noloc): Likewise for second and third params.
6679         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6680         (emit_call_insn_before_noloc): Likewise.
6681         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6682         to "rtx_insn *".
6683         (emit_barrier_before): Likewise.
6684         (emit_label_before): Strengthen "label" param from "rtx" to
6685         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6686         "rtx_insn *".
6687         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6688         "rtx_insn *".
6689         (emit_pattern_after_noloc): Likewise.
6690         (emit_insn_after_noloc): Likewise.
6691         (emit_jump_insn_after_noloc): Likewise.
6692         (emit_call_insn_after_noloc): Likewise.
6693         (emit_debug_insn_after_noloc): Likewise.
6694         (emit_barrier_after): Likewise.
6695         (emit_label_after): Likewise for both params.
6696         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6697         "loc" param from "int" to "location_t".
6698         (emit_insn_after_setloc): Likewise.
6699         (emit_jump_insn_after_setloc): Likewise.
6700         (emit_call_insn_after_setloc): Likewise.
6701         (emit_debug_insn_after_setloc): Likewise.
6702         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6703         "loc" param from "int" to "location_t".
6704         (emit_pattern_before): Convert NULL_RTX to NULL.
6705         (emit_insn_before_setloc): Convert "loc" param from "int" to
6706         "location_t".
6707         (emit_jump_insn_before_setloc): Likewise.
6708         (emit_call_insn_before_setloc): Likewise.
6709         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6710         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6711         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6712         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6713         Convert 3rd param from "int" to "location_t".
6714         (emit_barrier_before, emit_barrier_after, next_real_insn):
6715         Strengthen param from rtx to rtx_insn *.
6716         (emit_label_before): Strengthen 1st param from "rtx" to
6717         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6718         "rtx_insn *".
6719         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6720         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6721         Strengthen 2nd param from "rtx" to "rtx_insn *".
6722         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6723         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6724         Likewise. Convert 3rd param from "int" to "location_t".
6725         (emit_label_after): Strengthen 1st param from "rtx" to
6726         "rtx_code_label *".
6727         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6728         "rtx_insn *".
6729         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6730         from "rtx" to "rtx_insn *".
6732 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6734         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6735         bodies streamed in with -Q.
6736         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6737         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6738         * gimple-streamer-out.c: Include gimple-pretty-print.h
6739         (output_bb): Dump stmts streamed.
6740         * lto-section-out.c: Include print-tree.h
6741         (lto_begin_section): Dump sections created.
6742         (lto_output_decl_index): Dump decl encoded.
6743         * lto-streamer-out.c: Include print-tree.h
6744         (create_output_block): Dump output block created.
6745         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6746         (output_function): Dump function output.
6747         (output_constructor): Dump constructor streamed.
6748         (write_global_stream): Output indexes encoded.
6749         (produce_asm_for_decls): Dump streams encoded.
6750         * lto-streamer.c (streamer_dump_file): New global var.
6751         * lto-streamer.h (streamer_dump_file): Declare.
6752         * passes.c (ipa_write_summaries): Initialize streamer dump.
6753         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6754         in.
6756 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6758         PR target/86048
6759         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6760         offsets for register save directives.  Emit a second batch of save
6761         directives, if need be, when the function accesses prior frames.
6763 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6765         * config/arc/fpu.md (fmasf4): Force operand to register.
6766         (fnmasf4): Likewise.
6768 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6770         * config/arc/arc-protos.h (arc_pad_return): Remove.
6771         * config/arc/arc.c (machine_function): Remove force_short_suffix
6772         and size_reason.
6773         (arc_print_operand): Adjust printing of '&'.
6774         (arc_verify_short): Remove conditional printing of short suffix.
6775         (arc_final_prescan_insn): Remove reference to size_reason.
6776         (pad_return): New function.
6777         (arc_reorg): Call pad_return.
6778         (arc_pad_return): Remove.
6779         (arc_init_machine_status): Remove reference to force_short_suffix.
6780         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6781         (attr length): When attribute iscompact is true force to 2
6782         regardless; in the case of maybe check if we want to force the
6783         instruction to have 4 bytes length.
6784         (nopv): Change it to generate 4 byte long nop as well.
6785         (blockage): New pattern.
6786         (simple_return): Remove call to arc_pad_return.
6787         (p_return_i): Likewise.
6789 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6791         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6793 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6795         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6796         ARC cores.
6798 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6800         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6801         for ARC700 and ARCv2.
6803 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6805         PR target/86076
6806         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6807         operands[2] instead of operands[1].
6810 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6812         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6813         case, check whether the outer register overlaps an unallocatable
6814         register, not just whether it fits the required class.
6816 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6818         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6819         are poly_ints.
6820         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6821         (memrefs_conflict_p): Likewise.
6822         (init_alias_analysis): Likewise.
6823         * cfgexpand.c (expand_debug_expr): Likewise.
6824         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6825         * cse.c (fold_rtx): Likewise.
6826         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6827         * expr.c (emit_block_move_hints): Likewise.
6828         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6829         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6830         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6831         (emit_group_store): Likewise.
6832         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6833         to read the PRE/POST_MODIFY increment.
6834         * calls.c (store_one_arg): Use strip_offset.
6835         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6836         poly_int_rtx_p.
6837         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6838         by a VEC_SELECT.
6839         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6840         (simplify_binary_operation_1): Extend CONST_INT handling to
6841         poly_int_rtx_p.
6842         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6843         than a HOST_WIDE_INT.
6844         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6845         poly_int64.
6846         (adjust_mems, add_stores): Update accodingly.
6847         (vt_canonicalize_addr): Track polynomial offsets.
6848         (emit_note_insn_var_location): Likewise.
6849         (vt_add_function_parameter): Likewise.
6850         (vt_initialize): Likewise.
6852 2018-06-12  Jeff Law  <law@redhat.com>
6854         * config.gcc (alpha*-*-freebsd*): Remove.
6855         * config/alpha/freebsd.h: Remove.
6857 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6859         PR other/69968
6860         * spellcheck-tree.c (levenshtein_distance): Rename to...
6861         (get_edit_distance): ...this, and update for underlying renaming.
6862         * spellcheck-tree.h (levenshtein_distance): Rename to...
6863         (get_edit_distance): ...this.
6864         * spellcheck.c (levenshtein_distance): Rename to...
6865         (get_edit_distance): ...this.  Convert from Levenshtein distance
6866         to Damerau-Levenshtein distance by supporting transpositions of
6867         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6868         "v_one_ago".
6869         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6870         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6871         update for underlying renaming.
6872         (selftest::levenshtein_distance_unit_test): Rename to...
6873         (selftest::test_get_edit_distance_unit): ...this, and update for
6874         underlying renaming.
6875         (selftest::test_find_closest_string): Add example from PR 69968
6876         where transposition helps
6877         (selftest::test_metric_conditions): Update for renaming.
6878         (selftest::test_metric_conditions): Likewise.
6879         (selftest::spellcheck_c_tests): Likewise.
6880         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6881         (get_edit_distance): ...this.
6882         (best_match::consider): Update for renaming.
6884 2018-06-12  Martin Sebor  <msebor@redhat.com>
6886         PR tree-optimization/85259
6887         * builtins.c (compute_objsize): Handle constant offsets.
6888         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6889         true iff a warning has been issued.
6890         * gimple.h (gimple_nonartificial_location): New function.
6891         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6892         gimple_nonartificial_location and handle -Wno-system-headers.
6893         (handle_builtin_stxncpy): Same.
6895 2018-06-12  Martin Sebor  <msebor@redhat.com>
6897         PR c/85931
6898         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6900 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6902         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6903         BUILTIN_VEC_XST entries for pointer to double and long long.
6905 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6907         PR target/85990
6908         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6909         Update comments.
6910         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6911         Likewise.
6913 2018-06-12  Martin Liska  <mliska@suse.cz>
6915         * doc/options.texi: Document IntegerRange.
6917 2018-06-12  Martin Liska  <mliska@suse.cz>
6919         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6920         * opt-functions.awk: Handle Deprecated flag.
6921         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6922         and report error.
6923         (read_cmdline_option): Report warning for a deprecated option.
6924         * opts.h (struct cl_option): Add new field cl_deprecated.
6925         (CL_ERR_DEPRECATED): New.
6927 2018-06-12  Martin Liska  <mliska@suse.cz>
6929         * doc/options.texi: Document Deprecated option flag.
6931 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6933         * config/arc/arc-arch.h (arc_extras): New enum.
6934         (arc_cpu_t):Add field extra.
6935         (arc_cpu_types): Consider the extras.
6936         * config/arc/arc-cpus.def: Add extras info.
6937         * config/arc/arc-opts.h (processor_type): Consider extra field.
6938         * config/arc/arc.c (arc_override_options): Handle extra field.
6940 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6942         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6943         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6944         field.
6945         * config/arc/arc.c (arc_init): Update pic warning.
6946         (irq_range): Update irq range parsing warnings.
6947         (arc_override_options): Update various warning messages.
6948         (arc_handle_aux_attribute): Likewise.
6950 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6952         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6954 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6956         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6957         compiler messages directives.
6959 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6961         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6962         * config/mips/mips-tables.opt: Regenerate.
6963         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6964         mips64r6.
6965         * doc/invoke.texi: Document -march=i6500.
6967 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6969         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6970         (i6400_gpmul): Add cpu_unit.
6971         (i6400_gpdiv): Likewise.
6972         (i6400_msa_add_d): Update reservations.
6973         (i6400_msa_int_add) Likewise.
6974         (i6400_msa_short_logic3) Likewise.
6975         (i6400_msa_short_logic2) Likewise.
6976         (i6400_msa_short_logic) Likewise.
6977         (i6400_msa_move) Likewise.
6978         (i6400_msa_cmp) Likewise.
6979         (i6400_msa_short_float2) Likewise.
6980         (i6400_msa_div_d) Likewise.
6981         (i6400_msa_long_logic1) Likewise.
6982         (i6400_msa_long_logic2) Likewise.
6983         (i6400_msa_mult) Likewise.
6984         (i6400_msa_long_float2) Likewise.
6985         (i6400_msa_long_float4) Likewise.
6986         (i6400_msa_long_float5) Likewise.
6987         (i6400_msa_long_float8) Likewise.
6988         (i6400_fpu_fadd): Include frint type.
6989         (i6400_fpu_store): New define_insn_reservation.
6990         (i6400_fpu_load): Likewise.
6991         (i6400_fpu_move): Likewise.
6992         (i6400_fpu_fcmp): Likewise.
6993         (i6400_fpu_fmadd): Likewise.
6994         (i6400_int_mult): Include imul3nc type and update reservation.
6995         (i6400_int_div): Include idiv3 type and update reservation.
6996         (i6400_int_load): Update to check type not move_type.
6997         (i6400_int_store): Likewise.
6998         (i6400_int_prefetch): Set zero latency.
7000 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7002         * gcc.c: Document new %@{...} sequence.
7003         (LINK_COMMAND_SPEC): Use it for the -L switches.
7004         (cpp_unique_options): Use it for the -I switches.
7005         (at_file_argbuf): New global variable.
7006         (in_at_file): Likewise.
7007         (alloc_args): Create at_file_argbuf.
7008         (clear_args): Truncate at_file_argbuf.
7009         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7010         (open_at_file): New function.
7011         (close_at_file): Likewise.
7012         (create_at_file): Delete.
7013         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7014         <'o'>: Likewise.
7015         <'@'>: New case.
7016         (validate_switches_from_spec): Deal with %@{...} sequence.
7017         (validate_switches): Likewise.
7018         (driver::finalize): Call clear_args.
7020 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7022         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7024 2018-06-11  Martin Sebor  <msebor@redhat.com>
7026         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7027         (Wno-class-memaccess): Add @opindex.
7028         (Wno-templates, Wno-multiple-inheritance): Same.
7029         (Wno-virtual-inheritance, Wno-namespaces): Same.
7030         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7031         (Wno-format-overflow, Wno-format-truncation): Same.
7032         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7033         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7034         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7035         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7036         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7037         (Wno-misspelled-isr): Same.
7039 2018-06-11  Martin Sebor  <msebor@redhat.com>
7041         * PR tree-optimization/86083
7042         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7044 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7046         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7048 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7050         PR target/85755
7051         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7052         on the correct operand.
7053         (*movdi_internal64): Ditto.
7055 2018-06-11  Martin Liska  <mliska@suse.cz>
7057         PR tree-optimization/86089
7058         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7060 2018-06-11  Julia Koval  <julia.koval@intel.com>
7062         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7063         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7064         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7066 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7068         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7069         for Ada with strict dwarf2.
7071 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7073         PR target/85755
7074         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7075         addresses.
7077 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7079         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7081 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7083         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7084         TARGET_ELF.
7086 2018-06-08  Martin Liska  <mliska@suse.cz>
7088         * tree-cfg.h (debug_function): Fix argument type to match
7089         implementation.
7091 2018-06-08  Martin Liska  <mliska@suse.cz>
7093         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7094         Remove usage of MPX-related (and removed) fields.
7095         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7097 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7099         * cfg.c (debug): Use TDF_NONE rather than 0.
7100         * cfghooks.c (debug): Likewise.
7101         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7102         (struct dump_option_value_info): Convert to...
7103         (struct kv_pair): ...this template type.
7104         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7105         rather than 0.
7106         (optinfo_verbosity_options): Likewise.
7107         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7108         OPTGROUP_NONE.
7109         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7110         than int for "optgroup_flags" param.
7111         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7112         "dump_kind" param.
7113         (dump_dec): Likewise.
7114         (dump_finish): Use TDF_NONE rather than 0.
7115         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7116         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7117         than 0.  Update for change to option_ptr.
7118         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7119         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7120         0.  Update for changes to optinfo_verbosity_options and
7121         optgroup_options.
7122         (opt_info_switch_p): Convert optgroup_flags from int to
7123         optgroup_flags_t.
7124         (dump_basic_block): Use dump_flags_t rather than int
7125         for "dump_kind" param.
7126         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7127         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7128         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7129         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7130         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7131         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7132         TDF_NONE): Convert from macros to...
7133         (enum dump_flag): ...this new enum.
7134         (dump_flags_t): Update to use enum.
7135         (operator|, operator&, operator~, operator|=, operator&=):
7136         Implement for dump_flags_t.
7137         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7138         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7139         Convert from macros to...
7140         (enum optgroup_flag): ...this new enum.
7141         (optgroup_flags_t): New typedef.
7142         (operator|, operator|=): Implement for optgroup_flags_t.
7143         (struct dump_file_info): Convert field "alt_flags" to
7144         dump_flags_t.  Convert field "optgroup_flags" to
7145         optgroup_flags_t.
7146         (dump_basic_block): Use dump_flags_t rather than int for param.
7147         (dump_generic_expr_loc): Likewise.
7148         (dump_dec): Likewise.
7149         (dump_register): Convert param "optgroup_flags" to
7150         optgroup_flags_t.
7151         (opt_info_enable_passes): Likewise.
7152         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7153         than 0.
7154         * gimple-pretty-print.c (debug): Likewise.
7155         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7156         (merged_store_group::apply_stores): Likewise.
7157         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7158         * gimple.c (verify_gimple_pp): Likewise.
7159         * graphite-poly.c (print_pbb_body): Likewise.
7160         * passes.c (pass_manager::register_one_dump_file): Convert
7161         local "optgroup_flags" to optgroup_flags_t.
7162         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7163         (debug): Likewise.
7164         (debug_body): Likewise.
7165         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7166         to optgroup_flags_t.
7167         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7168         than 0.
7169         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7170         (convert_mult_to_fma): Likewise.
7171         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7172         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7173         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7174         "dump_kind" to dump_flags_t.
7176 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7178         * config/rs6000/rs6000.c (min, max): Delete.
7180 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7182         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7183         -mabi=spe and -mabi=no-spe.
7185 2018-06-08  Martin Liska  <mliska@suse.cz>
7187         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7188         where we expect an existing summary.
7190 2018-06-08  Martin Liska  <mliska@suse.cz>
7192         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7193         * ipa-inline.h (estimate_edge_growth): Likewise.
7195 2018-06-08  Martin Liska  <mliska@suse.cz>
7197         * cgraph.c (function_version_hasher::hash): Use
7198         cgraph_node::get_uid ().
7199         (function_version_hasher::equal):
7200         * cgraph.h (cgraph_node::get_uid): New method.
7201         * ipa-inline.c (update_caller_keys): Use
7202         cgraph_node::get_uid ().
7203         (update_callee_keys): Likewise.
7204         * ipa-utils.c (searchc): Likewise.
7205         (ipa_reduced_postorder): Likewise.
7206         * lto-cgraph.c (input_node): Likewise.
7207         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7208         * symbol-summary.h (symtab_insertion): Likewise.
7209         (symtab_removal): Likewise.
7210         (symtab_duplication): Likewise.
7211         * tree-pretty-print.c (dump_function_header): Likewise.
7212         * tree-sra.c (convert_callers_for_node): Likewise.
7214 2018-06-08  Martin Liska  <mliska@suse.cz>
7216         * cgraph.c (symbol_table::create_edge): Always assign a new
7217         unique number.
7218         (symbol_table::free_edge): Do not recycle numbers.
7219         * cgraph.h (cgraph_edge::get): New method.
7220         * symbol-summary.h (symtab_removal): Use it.
7221         (symtab_duplication): Likewise.
7222         (call_summary::hashable_uid): Remove.
7224 2018-06-08  Martin Liska  <mliska@suse.cz>
7226         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7227         (initialize_growth_caches): Remove.
7228         (free_growth_caches): Likewise.
7229         (do_estimate_edge_time): Use edge_growth_cache.
7230         (do_estimate_edge_size): Likewise.
7231         (do_estimate_edge_hints): Likewise.
7232         * ipa-inline.c (reset_edge_caches): Likewise.
7233         (recursive_inlining): Likewise.
7234         (inline_small_functions): Likewise.
7235         * ipa-inline.h (initialize_growth_caches): Remove.
7236         (estimate_edge_size): Likewise.
7237         (estimate_edge_time): Likewise.
7238         (estimate_edge_hints): Likewise.
7239         (reset_edge_growth_cache): Likewise.
7240         * symbol-summary.h (call_summary::remove): New method.
7242 2018-06-08  Martin Liska  <mliska@suse.cz>
7244         * ipa-cp.c (class edge_clone_summary): New summary.
7245         (grow_edge_clone_vectors): Remove.
7246         (ipcp_edge_duplication_hook): Remove.
7247         (class edge_clone_summary_t): New call_summary class.
7248         (ipcp_edge_removal_hook): Remove.
7249         (edge_clone_summary_t::duplicate): New function.
7250         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7251         (create_specialized_node): Likewise.
7252         (ipcp_driver): Initialize edge_clone_summaries and do not
7253         register hooks.
7255 2018-06-08  Martin Liska  <mliska@suse.cz>
7257         * symbol-summary.h (get): New function.
7258         (call_summary::m_initialize_when_cloning): New class member.
7260 2018-06-08  Martin Liska  <mliska@suse.cz>
7262         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7263         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7264         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7265         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7266         (remove_cgraph_node_from_order): Use the removed_nodes set.
7267         (do_per_function_toporder): Likwise.
7268         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7269         instead of summary_uid.
7270         (symtab_removal): Likewise.
7271         (symtab_duplication): Likewise.
7273 2018-06-08  Martin Liska  <mliska@suse.cz>
7275         * ipa-cp.c (ipcp_store_bits_results): Use
7276         ipcp_transformation_sum.
7277         (ipcp_store_vr_results): Likewise.
7278         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7279         to ...
7280         (ipcp_transformation_initialize): ... this.
7281         (ipa_set_node_agg_value_chain):
7282         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7283         (write_ipcp_transformation_info): Likewise.
7284         (read_ipcp_transformation_info): Likewise.
7285         (ipcp_update_bits): Likewise.
7286         (ipcp_update_vr): Likewise.
7287         (ipcp_transform_function): Likewise.
7288         * ipa-prop.h: Rename ipcp_transformation_summary to
7289         ipcp_transformation.
7290         (class ipcp_transformation_t): New function summary.
7291         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7292         (ipa_get_agg_replacements_for_node): Likewise.
7294 2018-06-08  Martin Liska  <mliska@suse.cz>
7296         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7297         of struct.
7298         (class funct_state_summary_t): New function_summary class.
7299         (has_function_state): Remove.
7300         (get_function_state): Likewise.
7301         (set_function_state): Likewise.
7302         (add_new_function): Likewise.
7303         (funct_state_summary_t::insert): New function.
7304         (duplicate_node_data): Remove.
7305         (remove_node_data): Remove.
7306         (funct_state_summary_t::duplicate): New function.
7307         (register_hooks): Create new funct_state_summaries.
7308         (pure_const_generate_summary): Use it.
7309         (pure_const_write_summary): Likewise.
7310         (pure_const_read_summary): Likewise.
7311         (propagate_pure_const): Likewise.
7312         (propagate_nothrow): Likewise.
7313         (dump_malloc_lattice): Likewise.
7314         (propagate_malloc): Likewise.
7315         (execute): Do not register hooks, just remove summary
7316         instead.
7317         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7318         constructor.
7320 2018-06-08  Martin Liska  <mliska@suse.cz>
7322         * ipa-reference.c (remove_node_data): Remove.
7323         (duplicate_node_data): Likewise.
7324         (class ipa_ref_var_info_summary_t): New class.
7325         (class ipa_ref_opt_summary_t): Likewise.
7326         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7327         (get_reference_optimization_summary): Use
7328         ipa_ref_opt_sum_summaries.
7329         (set_reference_vars_info): Remove.
7330         (set_reference_optimization_summary): Likewise.
7331         (ipa_init): Create summaries.
7332         (init_function_info): Use function summary.
7333         (ipa_ref_opt_summary_t::duplicate): New function.
7334         (ipa_ref_opt_summary_t::remove): New function.
7335         (get_read_write_all_from_node): Fix GNU coding style.
7336         (propagate): Use function summary.
7337         (write_node_summary_p): Fix GNU coding style.
7338         (stream_out_bitmap): Likewise.
7339         (ipa_reference_read_optimization_summary): Use function summary.
7340         (ipa_reference_c_finalize): Do not release hooks.
7342 2018-06-08  Martin Liska  <mliska@suse.cz>
7344         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7345         (analyze_function_body): Extract multiple calls of get_create.
7346         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7347         * ipa-inline.c (recursive_inlining): Use ::get method.
7348         * ipa-inline.h (estimate_edge_growth): Likewise.
7350 2018-06-08  Martin Liska  <mliska@suse.cz>
7352         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7353         HSA_INVALID.
7354         (hsa_function_summary::hsa_function_summary): Use the new enum
7355         value.
7356         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7357         * hsa-gen.c (hsa_get_host_function): Likewise.
7358         (get_brig_function_name): Likewise.
7359         * ipa-hsa.c (process_hsa_functions): Likewise.
7360         (ipa_hsa_write_summary): Likewise.
7361         * symbol-summary.h (symtab_duplication): Use ::get function/
7362         (get): New function.
7364 2018-06-08  Martin Liska  <mliska@suse.cz>
7366         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7367         of get.
7368         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7369         (hsa_register_kernel): Likewise.
7370         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7371         * hsa-gen.c (hsa_get_host_function): Likewise.
7372         (get_brig_function_name): Likewise.
7373         (generate_hsa): Likewise.
7374         (pass_gen_hsail::execute): Likewise.
7375         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7376         (devirtualization_time_bonus): Likewise.
7377         (ipcp_propagate_stage): Likewise.
7378         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7379         (edge_set_predicate): Likewise.
7380         (evaluate_conditions_for_known_args): Likewise.
7381         (evaluate_properties_for_edge): Likewise.
7382         (ipa_fn_summary::reset): Likewise.
7383         (ipa_fn_summary_t::duplicate): Likewise.
7384         (dump_ipa_call_summary): Likewise.
7385         (ipa_dump_fn_summary): Likewise.
7386         (analyze_function_body): Likewise.
7387         (compute_fn_summary): Likewise.
7388         (estimate_edge_devirt_benefit): Likewise.
7389         (estimate_edge_size_and_time): Likewise.
7390         (estimate_calls_size_and_time): Likewise.
7391         (estimate_node_size_and_time): Likewise.
7392         (inline_update_callee_summaries): Likewise.
7393         (remap_edge_change_prob): Likewise.
7394         (remap_edge_summaries): Likewise.
7395         (ipa_merge_fn_summary_after_inlining): Likewise.
7396         (ipa_update_overall_fn_summary): Likewise.
7397         (read_ipa_call_summary): Likewise.
7398         (inline_read_section): Likewise.
7399         (write_ipa_call_summary): Likewise.
7400         (ipa_fn_summary_write): Likewise.
7401         (ipa_free_fn_summary): Likewise.
7402         * ipa-hsa.c (process_hsa_functions): Likewise.
7403         (ipa_hsa_write_summary): Likewise.
7404         (ipa_hsa_read_section): Likewise.
7405         * ipa-icf.c (sem_function::merge): Likewise.
7406         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7407         (do_estimate_edge_time): Likewise.
7408         (estimate_size_after_inlining): Likewise.
7409         (estimate_growth): Likewise.
7410         (growth_likely_positive): Likewise.
7411         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7412         (inline_call): Likewise.
7413         * ipa-inline.c (caller_growth_limits): Likewise.
7414         (can_inline_edge_p): Likewise.
7415         (can_inline_edge_by_limits_p): Likewise.
7416         (compute_uninlined_call_time): Likewise.
7417         (compute_inlined_call_time): Likewise.
7418         (want_inline_small_function_p): Likewise.
7419         (edge_badness): Likewise.
7420         (update_caller_keys): Likewise.
7421         (update_callee_keys): Likewise.
7422         (recursive_inlining): Likewise.
7423         (inline_small_functions): Likewise.
7424         (inline_to_all_callers_1): Likewise.
7425         (dump_overall_stats): Likewise.
7426         (early_inline_small_functions): Likewise.
7427         (early_inliner): Likewise.
7428         * ipa-inline.h (estimate_edge_growth): Likewise.
7429         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7430         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7431         * ipa-prop.h (IPA_NODE_REF): Likewise.
7432         (IPA_EDGE_REF): Likewise.
7433         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7434         (propagate_malloc): Likewise.
7435         * ipa-split.c (execute_split_functions): Likewise.
7436         * symbol-summary.h: Rename get to get_create.
7437         (get): Likewise.
7438         (get_create): Likewise.
7439         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7441 2018-06-08  Martin Liska  <mliska@suse.cz>
7443         * symbol-summary.h (release): Move definition out of class
7444         declaration.
7445         (symtab_removal): Likewise.
7446         (symtab_duplication): Likewise.
7448 2018-06-08  Martin Liska  <mliska@suse.cz>
7450         * symbol-summary.h (function_summary): Move constructor
7451         implementation out of class declaration.
7452         (release): Likewise.
7453         (symtab_insertion): Likewise.
7454         (symtab_removal): Likewise.
7455         (symtab_duplication): Likewise.
7456         (get): Likewise.
7458 2018-06-08  Martin Liska  <mliska@suse.cz>
7460         * Makefile.in: Remove support for MPX (macros, related functions,
7461         fields in cgraph_node, ...).
7462         * builtin-types.def (BT_BND): Likewise.
7463         (BT_FN_BND_CONST_PTR): Likewise.
7464         (BT_FN_CONST_PTR_BND): Likewise.
7465         (BT_FN_VOID_PTR_BND): Likewise.
7466         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7467         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7468         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7469         (expand_builtin_mempcpy_with_bounds): Likewise.
7470         (expand_builtin_memset_with_bounds): Likewise.
7471         (expand_builtin_memset_args): Likewise.
7472         (std_expand_builtin_va_start): Likewise.
7473         (expand_builtin): Likewise.
7474         (expand_builtin_with_bounds): Likewise.
7475         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7476         (DEF_LIB_BUILTIN_CHKP): Likewise.
7477         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7478         (DEF_CHKP_BUILTIN): Likewise.
7479         (BUILT_IN_MEMCPY): Likewise.
7480         (BUILT_IN_MEMMOVE): Likewise.
7481         (BUILT_IN_MEMPCPY): Likewise.
7482         (BUILT_IN_MEMSET): Likewise.
7483         (BUILT_IN_STPCPY): Likewise.
7484         (BUILT_IN_STRCAT): Likewise.
7485         (BUILT_IN_STRCHR): Likewise.
7486         (BUILT_IN_STRCPY): Likewise.
7487         (BUILT_IN_STRLEN): Likewise.
7488         (BUILT_IN_MEMCPY_CHK): Likewise.
7489         (BUILT_IN_MEMMOVE_CHK): Likewise.
7490         (BUILT_IN_MEMPCPY_CHK): Likewise.
7491         (BUILT_IN_MEMSET_CHK): Likewise.
7492         (BUILT_IN_STPCPY_CHK): Likewise.
7493         (BUILT_IN_STRCAT_CHK): Likewise.
7494         (BUILT_IN_STRCPY_CHK): Likewise.
7495         * calls.c (store_bounds): Likewise.
7496         (emit_call_1): Likewise.
7497         (special_function_p): Likewise.
7498         (maybe_warn_nonstring_arg): Likewise.
7499         (initialize_argument_information): Likewise.
7500         (finalize_must_preallocate): Likewise.
7501         (compute_argument_addresses): Likewise.
7502         (expand_call): Likewise.
7503         * cfgexpand.c (expand_call_stmt): Likewise.
7504         (expand_return): Likewise.
7505         (expand_gimple_stmt_1): Likewise.
7506         (pass_expand::execute): Likewise.
7507         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7508         (cgraph_node::remove): Likewise.
7509         (cgraph_node::dump): Likewise.
7510         (cgraph_node::verify_node): Likewise.
7511         * cgraph.h (chkp_function_instrumented_p): Likewise.
7512         (symtab_node::get_alias_target): Likewise.
7513         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7514         (cgraph_local_p): Likewise.
7515         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7516         (cgraph_edge::rebuild_references): Likewise.
7517         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7518         (walk_polymorphic_call_targets): Likewise.
7519         (cgraph_node::expand_thunk): Likewise.
7520         (symbol_table::output_weakrefs): Likewise.
7521         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7522         (ix86_handle_option): Likewise.
7523         * config/i386/constraints.md: Likewise.
7524         * config/i386/i386-builtin-types.def (BND): Likewise.
7525         (VOID): Likewise.
7526         (PVOID): Likewise.
7527         (ULONG): Likewise.
7528         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7529         (BDESC_FIRST): Likewise.
7530         (BDESC): Likewise.
7531         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7532         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7533         * config/i386/i386.c (enum reg_class): Likewise.
7534         (ix86_target_string): Likewise.
7535         (ix86_option_override_internal): Likewise.
7536         (ix86_conditional_register_usage): Likewise.
7537         (ix86_valid_target_attribute_inner_p): Likewise.
7538         (ix86_set_indirect_branch_type): Likewise.
7539         (ix86_set_current_function): Likewise.
7540         (ix86_function_arg_regno_p): Likewise.
7541         (init_cumulative_args): Likewise.
7542         (ix86_function_arg_advance): Likewise.
7543         (ix86_function_arg): Likewise.
7544         (ix86_pass_by_reference): Likewise.
7545         (ix86_function_value_regno_p): Likewise.
7546         (ix86_function_value_1): Likewise.
7547         (ix86_function_value_bounds): Likewise.
7548         (ix86_return_in_memory): Likewise.
7549         (ix86_setup_incoming_vararg_bounds): Likewise.
7550         (ix86_va_start): Likewise.
7551         (indirect_thunk_need_prefix): Likewise.
7552         (print_reg): Likewise.
7553         (ix86_print_operand): Likewise.
7554         (ix86_expand_call): Likewise.
7555         (ix86_output_function_return): Likewise.
7556         (reg_encoded_number): Likewise.
7557         (BDESC_VERIFYS): Likewise.
7558         (ix86_init_mpx_builtins): Likewise.
7559         (ix86_init_builtins): Likewise.
7560         (ix86_emit_cmove): Likewise.
7561         (ix86_emit_move_max): Likewise.
7562         (ix86_expand_builtin): Likewise.
7563         (ix86_builtin_mpx_function): Likewise.
7564         (ix86_get_arg_address_for_bt): Likewise.
7565         (ix86_load_bounds): Likewise.
7566         (ix86_store_bounds): Likewise.
7567         (ix86_load_returned_bounds): Likewise.
7568         (ix86_store_returned_bounds): Likewise.
7569         (ix86_class_likely_spilled_p): Likewise.
7570         (ix86_hard_regno_mode_ok): Likewise.
7571         (x86_order_regs_for_local_alloc): Likewise.
7572         (ix86_mitigate_rop): Likewise.
7573         (ix86_bnd_prefixed_insn_p): Likewise.
7574         (ix86_mpx_bound_mode): Likewise.
7575         (ix86_make_bounds_constant): Likewise.
7576         (ix86_initialize_bounds): Likewise.
7577         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7578         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7579         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7580         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7581         (TARGET_CHKP_BOUND_MODE): Likewise.
7582         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7583         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7584         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7585         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7586         * config/i386/i386.h (TARGET_MPX): Likewise.
7587         (TARGET_MPX_P): Likewise.
7588         (VALID_BND_REG_MODE): Likewise.
7589         (FIRST_BND_REG): Likewise.
7590         (LAST_BND_REG): Likewise.
7591         (enum reg_class): Likewise.
7592         (BND_REG_P): Likewise.
7593         (BND_REGNO_P): Likewise.
7594         (BNDmode): Likewise.
7595         (ADJUST_INSN_LENGTH): Likewise.
7596         * config/i386/i386.md: Likewise.
7597         * config/i386/i386.opt: Likewise.
7598         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7599         (defined): Likewise.
7600         (LINK_MPX): Likewise.
7601         (MPX_SPEC): Likewise.
7602         (LIBMPX_SPEC): Likewise.
7603         (LIBMPXWRAPPERS_SPEC): Likewise.
7604         (CHKP_SPEC): Likewise.
7605         * config/i386/predicates.md: Likewise.
7606         * dbxout.c (dbxout_type): Likewise.
7607         * doc/extend.texi: Likewise.
7608         * doc/invoke.texi: Likewise.
7609         * doc/md.texi: Likewise.
7610         * doc/tm.texi: Likewise.
7611         * doc/tm.texi.in: Likewise.
7612         * dwarf2out.c (is_base_type): Likewise.
7613         (gen_formal_types_die): Likewise.
7614         (gen_subprogram_die): Likewise.
7615         (gen_type_die_with_usage): Likewise.
7616         (gen_decl_die): Likewise.
7617         (dwarf2out_late_global_decl): Likewise.
7618         * expr.c (expand_assignment): Likewise.
7619         (emit_storent_insn): Likewise.
7620         (store_expr_with_bounds): Likewise.
7621         (store_expr): Likewise.
7622         (expand_expr_real_1): Likewise.
7623         * expr.h (store_expr_with_bounds): Likewise.
7624         * function.c (use_register_for_decl): Likewise.
7625         (struct bounds_parm_data): Likewise.
7626         (assign_parms_augmented_arg_list): Likewise.
7627         (assign_parm_find_entry_rtl): Likewise.
7628         (assign_parm_is_stack_parm): Likewise.
7629         (assign_parm_load_bounds): Likewise.
7630         (assign_bounds): Likewise.
7631         (assign_parms): Likewise.
7632         (expand_function_start): Likewise.
7633         * gcc.c (CHKP_SPEC): Likewise.
7634         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7635         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7636         (wrestrict_dom_walker::check_call): Likewise.
7637         * gimple.c (gimple_build_call_from_tree): Likewise.
7638         * gimple.h (enum gf_mask): Likewise.
7639         (gimple_call_with_bounds_p): Likewise.
7640         (gimple_call_set_with_bounds): Likewise.
7641         * gimplify.c (gimplify_init_constructor): Likewise.
7642         * ipa-cp.c (initialize_node_lattices): Likewise.
7643         (propagate_constants_across_call): Likewise.
7644         (find_more_scalar_values_for_callers_subset): Likewise.
7645         * ipa-hsa.c (process_hsa_functions): Likewise.
7646         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7647         * ipa-icf.c (sem_function::merge): Likewise.
7648         * ipa-inline.c (early_inliner): Likewise.
7649         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7650         (warn_function_cold): Likewise.
7651         (propagate_pure_const): Likewise.
7652         * ipa-ref.h (enum GTY): Likewise.
7653         * ipa-split.c (find_retbnd): Likewise.
7654         (consider_split): Likewise.
7655         (split_function): Likewise.
7656         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7657         * ipa.c (walk_polymorphic_call_targets): Likewise.
7658         (symbol_table::remove_unreachable_nodes): Likewise.
7659         (process_references): Likewise.
7660         (cgraph_build_static_cdtor_1): Likewise.
7661         * lto-cgraph.c (lto_output_node): Likewise.
7662         (output_refs): Likewise.
7663         (compute_ltrans_boundary): Likewise.
7664         (input_overwrite_node): Likewise.
7665         (input_node): Likewise.
7666         (input_cgraph_1): Likewise.
7667         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7668         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7669         (class pass_chkp_instrumentation_passes): Likewise.
7670         (make_pass_chkp_instrumentation_passes): Likewise.
7671         * passes.def: Likewise.
7672         * rtl.h (struct GTY): Likewise.
7673         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7674         * stor-layout.c (layout_type): Likewise.
7675         * symtab.c: Likewise.
7676         * target.def: Likewise.
7677         * targhooks.c (default_chkp_bound_type): Likewise.
7678         (default_chkp_bound_mode): Likewise.
7679         (default_builtin_chkp_function): Likewise.
7680         (default_chkp_function_value_bounds): Likewise.
7681         (default_chkp_make_bounds_constant): Likewise.
7682         (default_chkp_initialize_bounds): Likewise.
7683         * targhooks.h (default_chkp_bound_type): Likewise.
7684         (default_chkp_bound_mode): Likewise.
7685         (default_builtin_chkp_function): Likewise.
7686         (default_chkp_function_value_bounds): Likewise.
7687         (default_chkp_make_bounds_constant): Likewise.
7688         (default_chkp_initialize_bounds): Likewise.
7689         * toplev.c (compile_file): Likewise.
7690         (process_options): Likewise.
7691         * tree-core.h (DEF_BUILTIN): Likewise.
7692         (DEF_BUILTIN_CHKP): Likewise.
7693         * tree-inline.c (declare_return_variable): Likewise.
7694         (remap_gimple_stmt): Likewise.
7695         (copy_bb): Likewise.
7696         (initialize_inlined_parameters): Likewise.
7697         (expand_call_inline): Likewise.
7698         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7699         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7700         (make_pass_ipa_chkp_produce_thunks): Likewise.
7701         (make_pass_chkp): Likewise.
7702         (make_pass_chkp_opt): Likewise.
7703         (make_pass_chkp_instrumentation_passes): Likewise.
7704         * tree-pretty-print.c (dump_generic_node): Likewise.
7705         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7706         * tree-ssa-dce.c (propagate_necessity): Likewise.
7707         (eliminate_unnecessary_stmts): Likewise.
7708         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7709         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7710         * tree-ssa-sccvn.h: Likewise.
7711         * tree-ssa-strlen.c (get_string_length): Likewise.
7712         (valid_builtin_call): Likewise.
7713         (adjust_last_stmt): Likewise.
7714         (handle_builtin_strchr): Likewise.
7715         (handle_builtin_strcpy): Likewise.
7716         (handle_builtin_stxncpy): Likewise.
7717         (handle_builtin_memcpy): Likewise.
7718         (handle_builtin_strcat): Likewise.
7719         (strlen_check_and_optimize_stmt): Likewise.
7720         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7721         * tree-streamer-in.c: Likewise.
7722         * tree-streamer.c (record_common_node): Likewise.
7723         * tree.c (tree_code_size): Likewise.
7724         (wide_int_to_tree_1): Likewise.
7725         (type_contains_placeholder_1): Likewise.
7726         (build_common_tree_nodes): Likewise.
7727         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7728         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7729         (POINTER_BOUNDS_P): Likewise.
7730         (BOUNDED_TYPE_P): Likewise.
7731         (BOUNDED_P): Likewise.
7732         (CALL_WITH_BOUNDS_P): Likewise.
7733         (pointer_bounds_type_node): Likewise.
7734         * value-prof.c (gimple_ic): Likewise.
7735         * var-tracking.c (vt_add_function_parameters): Likewise.
7736         * varasm.c (make_decl_rtl): Likewise.
7737         (assemble_start_function): Likewise.
7738         (output_constant): Likewise.
7739         (maybe_assemble_visibility): Likewise.
7740         * varpool.c (ctor_for_folding): Likewise.
7741         * chkp-builtins.def: Remove.
7742         * ipa-chkp.c: Remove.
7743         * ipa-chkp.h: Remove.
7744         * rtl-chkp.c: Remove.
7745         * rtl-chkp.h: Remove.
7746         * tree-chkp-opt.c: Remove.
7747         * tree-chkp.c: Remove.
7748         * tree-chkp.h: Remove.
7750 2018-06-07  Carl Love  <cel@us.ibm.com>
7752         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7753         vextract_fp_from_shortl): Add BE support.
7755 2018-06-07  Paul Koning  <ni1d@arrl.net>
7757         * compare-elim.c (try_merge_compare): Don't merge compare if
7758         address contains a side effect.
7759         (try_eliminate_compare): Likewise.
7761 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7763         * config.gcc: Support "tremont".
7764         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7765         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7766         PROCESSOR_TREMONT.
7767         * config/i386/i386.c (m_TREMONT): Define.
7768         (processor_target_table): Add "tremont".
7769         (PTA_TREMONT): Define.
7770         (ix86_lea_outperforms): Add TARGET_TREMONT.
7771         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7772         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7773         and M_INTEL_GOLDMONT_PLUS.
7774         (fold_builtin_cpu): Add "tremont".
7775         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7776         (ix86_option_override_internal): Add "tremont".
7777         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7778         (processor_type): Add PROCESSOR_TREMONT.
7779         * config/i386/x86-tune.def: Add m_TREMONT.
7780         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7782 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7784         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7785         symbol defined for msp430i* devices to be lower case.
7787 2018-06-07  Richard Biener  <rguenther@suse.de>
7789         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7790         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7791         Properly wrap signed arithmetic if overflow wraps.
7793 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7795         PR tree-optimization/69615
7796         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7797         of a cast from a same precision integral SSA_NAME in a bb dominated
7798         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7799         cast to utype if rhs2 has already a compatible type.
7801 2018-06-07  Richard Biener  <rguenther@suse.de>
7803         PR tree-optimization/85935
7804         * graphite-scop-detection.c (find_params_in_bb): Analyze
7805         condition operands with respect to the correct loop.  Assert
7806         the analysis doesn't fail.
7808 2018-06-04  Carl Love  <cel@us.ibm.com>
7810         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7811         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7812         as it is slightly cheaper.
7813         (first_match_or_eos_index_<mode>):
7814         Calculate index using natural element order.
7815         (first_match_index_<mode>):
7816         Calculate index using natural element order.
7817         (first_match_or_eos_index_<mode>):
7818         Calculate index using natural order.
7819         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7820         for BE and LE modes.
7821         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7822         P9V_BUILTIN_VCLZLSBB_V16QI.
7823         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7824         specific.
7826 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7828         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7829         indentation and line wrap for many prototypes.  Add missing
7830         @smallexample directives around block of prototypes for vec_xl and
7831         vec_xst.
7833 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7835         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7836         track if we pass or return IEEE 128-bit floating point.
7837         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7838         C++ mangling that is compatible with GCC 8.1.
7839         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7840         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7841         floating point types.
7842         (rs6000_function_arg_advance_1): Likewise.
7843         (rs6000_mangle_type): Optionally generate mangled names that match
7844         what GCC 8.1 generated for IEEE 128-bit floating point types.
7845         (rs6000_globalize_decl_name): If we have an external function that
7846         passes or returns IEEE 128-bit types, generate a weak reference
7847         from the mangled name used in GCC 8.1 to the current mangled
7848         name.
7849         (rs6000_init_builtins): Make __ibm128 use the long double type if
7850         long double is IBM extended double.  Make __float128 use the long
7851         double type if long double is IEEE 128-bit.
7853         PR target/85657
7854         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7855         macro for __ibm128 built-in functions.
7856         (PACK_IF): Add __ibm128 pack/unpack functions.
7857         (UNPACK_IF): Likewise.
7858         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7859         enable long double built-in functions if long double is IEEE
7860         128-bit floating point.
7861         (rs6000_invalid_builtin): Update long double built-in function
7862         error message.
7863         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7864         functions, adjust the built-in function to use the long double
7865         built-in function if __ibm128 and long double are the same type.
7866         * doc/extend.texi (PowerPC builtins): Update documention for
7867         __builtin_{,un}pack_longdouble.  Add documentation for
7868         __builtin_{,un}pack_ibm128.
7870 2018-06-06  Jim Wilson  <jimw@sifive.com>
7872         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7873         (struct machine_function): New field interrupt_mode.
7874         (riscv_handle_type_attribute): New function.  Add forward declaration.
7875         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7876         (riscv_expand_epilogue): Check interrupt_mode field.
7877         (riscv_set_current_function): Check interrupt attribute args and
7878         set interrupt_mode field.
7879         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7880         (riscv_sret, riscv_uret): New.
7881         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7882         new arguments to interrupt attribute.
7884 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7886         PR target/63177
7887         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7888         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7890 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7892         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7893         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7894         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7895         several redundant entries.
7897 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7899         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7900         type from "rtx" to "rtx_insn *".
7901         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7902         for local "call_insn", removing cast.
7903         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7905 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7907         PR tree-optimization/86066
7908         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7909         for BIT_INSERT_EXPR stores.
7911 2018-06-06  Richard Biener  <rguenther@suse.de>
7913         PR tree-optimization/86062
7914         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7915         component refs ontop
7916         of to be offsetted base.
7918 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7920         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7921         to be static and remove check on interrupt attribute name.
7923 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7925         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7926         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7928 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7930         PR target/79924
7931         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7932         second argument.
7933         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7934         Remove second argument, change how error is called.
7935         (aarch64_layout_arg): Remove second argument from
7936         aarch64_err_no_fpadvsimd call.
7937         (aarch64_init_cumulative_args): Ditto.
7938         (aarch64_gimplify_va_arg_expr): Ditto.
7939         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7941 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7943         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7944         (*simple_return_indirect_internal<mode>): Rename from
7945         simple_return_indirect_internal.  Use W mode iterator.
7946         (rstorssp): New expander.
7947         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7948         (clrssbsy): New expander.
7949         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7951 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7953         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7954         __typeof__.
7955         (cmse_check_pointed_object): Likewise.
7957 2018-06-05  Martin Liska  <mliska@suse.cz>
7959         PR gcov-profile/47618
7960         * doc/invoke.texi: Document how -fprofile-dir format
7961         is extended.
7963 2018-06-05  Richard Biener  <rguenther@suse.de>
7965         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7966         removal pretend DOM info isn't available so we do not update
7967         it and only remove edges, not dominated blocks.  Actually free
7968         DOM info in case we removed something.  Remove unreachable blocks.
7969         (mfb_keep_latches): Work with either DOM info or marked backedges.
7970         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7971         first.  Mark backedges if DOM info isn't available.
7972         (Re-)compute DOM info after cleanup_control_flow_pre.
7974 2018-06-05  Richard Biener  <rguenther@suse.de>
7976         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7977         (locus_discrim_hasher::hash): Adjust.
7978         (locus_discrim_hasher::equal): Likewise.
7979         (next_discriminator_for_locus): Work on line directly.
7980         (same_line_p): Pass in expanded locus1 as well.
7981         (assign_discriminators): Avoid redundant location expansions.
7983 2018-06-05  Richard Biener  <rguenther@suse.de>
7985         PR tree-optimization/86046
7986         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7987         if required after clearing TREE_ADDRESSABLE.
7989 2018-06-05  Richard Biener  <rguenther@suse.de>
7991         PR tree-optimization/86047
7992         * tree-ssa-loop.c (for_each_index): Glob handling of all
7993         decls and constants and really handle all of them.
7995 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7997         PR target/81497
7998         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7999         qualifier_void_pointer and qualifier_const_void_pointer.
8000         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8001         (arm_init_builtins): Handle the above.
8002         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8003         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8004         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8005         void intrinsics.
8007 2018-06-05  Martin Liska  <mliska@suse.cz>
8009         * auto-profile.c (read_autofdo_file): Do not use
8010         gcov_ctr_summary struct.
8011         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8012         * coverage.c (struct counts_entry): Likewise.
8013         (read_counts_file): Read just single summary entry.
8014         (get_coverage_counts): Use gcov_summary struct.
8015         * coverage.h (get_coverage_counts): Likewise.
8016         * gcov-dump.c (dump_working_sets): Likewise.
8017         (tag_summary): Dump just single summary.
8018         * gcov-io.c (gcov_write_summary): Write just histogram
8019         summary.
8020         (gcov_read_summary): Read just single summary.
8021         (compute_working_sets): Use gcov_summary struct.
8022         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8023         of GCOV_COUNTERS_SUMMABLE.
8024         (GCOV_COUNTERS_SUMMABLE): Remove.
8025         (GCOV_FIRST_VALUE_COUNTER): Replace with
8026         GCOV_COUNTER_V_INTERVAL.
8027         (struct gcov_ctr_summary): Remove.
8028         (struct gcov_summary): Directly use fields of former
8029         gcov_ctr_summary.
8030         (compute_working_sets): Use gcov_summary struct.
8031         * gcov.c (read_count_file): Do not use ctrs fields.
8032         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8033         struct.
8034         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8035         struct.
8036         * profile.c: Likewise.
8037         * profile.h: Likewise.
8039 2018-06-05  Martin Liska  <mliska@suse.cz>
8041         PR gcov-profile/84846
8042         * gcov.c (output_lines): Print working directory only
8043         in intermediate format.
8045 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8047         * config/s390/s390-builtin-types.def: Add void function type.
8048         * config/s390/s390-builtins.def: Use the function type for the
8049         tbeginc builtin.
8051 2018-06-04  Jim Wilson  <jimw@sifive.com>
8053         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8054         to int.
8055         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8056         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8057         handle EH_RETURN_DATA_REGNO registers properly.
8058         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8059         (riscv_expand_epilogue): Update comment.  Change argument name and
8060         type.  Update code to use new name and type.  Pass new args to
8061         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8062         EXCEPTION_RETURN.
8063         * config/riscv/riscv.md (NORMAL_RETURN): New.
8064         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8065         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8066         (eh_return): Call gen_eh_return_internal and emit barrier.
8067         (eh_return_internal): Call riscv_expand_epilogue.
8069 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8071         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8072         bit_insertion field and declare can_be_merged_into method.
8073         (merged_store_group::can_be_merged_into): New method.
8074         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8075         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8076         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8078 2018-06-04  Richard Biener  <rguenther@suse.de>
8080         PR tree-optimization/85955
8081         * builtins.c (fold_builtin_sincos): Convert pointers to
8082         destination to appropriate type before dereferencing.
8084 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8086         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8088 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8090         * expr.c (expand_expr_real_1): Force the operand into memory if
8091         its TYPE_MODE is BLKmode and if there is no integer mode for
8092         the number of bits being extracted.
8094 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8096         PR target/85832
8097         PR target/86036
8098         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8099         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8101 2018-06-04  Richard Biener  <rguenther@suse.de>
8103         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8104         (cleanup_tree_cfg_noloop): ... single caller.  Do
8105         start_recording_case_labels later.
8107 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8109         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8110         to _IMMINTRIN_H_INCLUDED.
8111         * config/i386/pconfigintrin.h: Ditto.
8112         * config/i386/waitpkgintrin.h: Ditto.
8113         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8114         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8115         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8116         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8117         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8118         waitpkgintrin.h and cldemoteintrin.h.
8120 2018-06-04  Richard Biener  <rguenther@suse.de>
8122         PR tree-optimization/86038
8123         * tracer.c (find_best_successor): Check probability for
8124         being initialized, bail out if not.
8126 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8128         PR target/86003
8129         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8130         of bits to ignore when comparing architectures.
8132 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8134         PR tree-optimization/69615
8135         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8136         maximum or minimum of the type, try to merge it also as if
8137         range1 is + [-, x - 1] or + [x + 1, -].
8139         PR c++/86025
8140         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8142 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8144         PR tree-optimization/86034
8145         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8146         the unsigned bitfield type in a bit insertion sequence if it does not
8147         have a larger precision than the bitfield size.
8148         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8150 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8152         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8154 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8156         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8157         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8158         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8159         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8161 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8163         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8164         Disable -fdelete-null-pointer-checks for ELF toolchain.
8166 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8167             Kito Cheng  <kito.cheng@gmail.com>
8169         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8170         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8171         (nds32*-*-*): Add glibc and uclibc conditions.
8172         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8173         (TARGET_EXCEPT_UNWIND_INFO): Define.
8174         * config/nds32/elf.h: New file.
8175         * config/nds32/linux.h: New file.
8176         * config/nds32/nds32-elf.opt: New file.
8177         * config/nds32/nds32-linux.opt: New file.
8178         * config/nds32/nds32-fp-as-gp.c
8179         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8180         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8181         TARGET_LINUX_ABI.
8182         (nds32_asm_file_end): Ditto.
8183         (nds32_print_operand): Ditto.
8184         (nds32_insert_attributes): Ditto.
8185         (nds32_init_libfuncs): New function.
8186         (TARGET_HAVE_TLS): Define.
8187         (TARGET_INIT_LIBFUNCS): Define.
8188         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8189         spec content.
8190         (TARGET_ELF): Apply different mcmodel setting.
8191         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8192         been migrated into elf.h and linux.h files.
8193         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8194         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8195         (mcmodel): The content has been migrated into nds32-elf.opt and
8196         nds32-linux.opt files.
8197         * config/nds32/t-elf: New file.
8198         * config/nds32/t-linux: New file.
8200 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8201             Shiva Chen  <shiva0217@gmail.com>
8203         * config/nds32/constants.md (unspec_volatile_element): Add
8204         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8205         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8206         optimization.
8207         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8208         (make_pass_nds32_fp_as_gp): Declare.
8209         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8210         optmization pass.
8211         (nds32_asm_function_end_prologue): Remove unused asm output.
8212         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8213         (nds32_asm_file_start): Output necessary fp_as_gp information.
8214         (nds32_option_override): Adjust register usage.
8215         (nds32_expand_prologue): Consider fp_as_gp situation.
8216         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8217         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8218         (epilogue): Ditto.
8219         (return): Ditto.
8220         (simple_return): Ditto.
8221         (omit_fp_begin): Output special directive for fp_as_gp.
8222         (omit_fp_end): Output special directive for fp_as_gp.
8223         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8224         mforbid-fp-as-gp): New options.
8226 2018-06-01  Mark Wielaard  <mark@klomp.org>
8228         * dwarf2out.c (dwarf2out_finish): Remove generation of
8229         DW_AT_loclists_base.
8231 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8233         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8234         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8235         (struct merged_store_group): Add bit_insertion field.
8236         (dump_char_array): Use standard hexadecimal format.
8237         (merged_store_group::merged_store_group): Set bit_insertion to false.
8238         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8239         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8240         also print the mask in the dump file.
8241         (pass_store_merging::gate): Minor tweak.
8242         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8243         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8244         stores with INTEGER_CST stores.
8245         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8246         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8247         and use it throughout.  Generate bit insertion sequences if need be.
8248         (pass_store_merging::process_store): Remove redundant condition.
8249         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8251 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8253         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8254         the 128-bit floating point types.  Fix function comment.
8256 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8258         * config/aarch64/aarch64-simd.md
8259         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8260         mnemonics.
8261         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8262         mnemonics.
8264 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8266         PR tree-optimization/85989
8267         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8268         variable.
8269         (backprop::intersect_uses): Check it when deciding whether this
8270         is a backedge reference.
8271         (backprop::process_block): Add each phi to m_visited_phis
8272         after visiting it, then clear it at the end.
8274 2018-06-01  Richard Biener  <rguenther@suse.de>
8276         * tree-vectorizer.h (vect_dr_stmt): New function.
8277         (vect_get_load_cost): Adjust.
8278         (vect_get_store_cost): Likewise.
8279         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8280         Use vect_dr_stmt instead of DR_SMTT.
8281         (vect_record_base_alignments): Likewise.
8282         (vect_calculate_target_alignment): Likewise.
8283         (vect_compute_data_ref_alignment): Likewise and make static.
8284         (vect_update_misalignment_for_peel): Likewise.
8285         (vect_verify_datarefs_alignment): Likewise.
8286         (vector_alignment_reachable_p): Likewise.
8287         (vect_get_data_access_cost): Likewise.  Pass down
8288         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8289         (vect_get_peeling_costs_all_drs): Likewise.
8290         (vect_peeling_hash_get_lowest_cost): Likewise.
8291         (vect_enhance_data_refs_alignment): Likewise.
8292         (vect_find_same_alignment_drs): Likewise.
8293         (vect_analyze_data_refs_alignment): Likewise.
8294         (vect_analyze_group_access_1): Likewise.
8295         (vect_analyze_group_access): Likewise.
8296         (vect_analyze_data_ref_access): Likewise.
8297         (vect_analyze_data_ref_accesses): Likewise.
8298         (vect_vfa_segment_size): Likewise.
8299         (vect_small_gap_p): Likewise.
8300         (vectorizable_with_step_bound_p): Likewise.
8301         (vect_prune_runtime_alias_test_list): Likewise.
8302         (vect_analyze_data_refs): Likewise.
8303         (vect_supportable_dr_alignment): Likewise.
8304         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8305         (vect_gen_prolog_loop_niters): Likewise.
8306         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8307         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8308         modify DR_STMT.
8309         (vect_recog_mask_conversion_pattern): Likewise.
8310         (vect_try_gather_scatter_pattern): Likewise.
8311         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8312         to vect_get_store_cost.
8313         (vect_get_store_cost): Get stmt_info instead of DR.
8314         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8315         (vect_get_load_cost): Get stmt_info instead of DR.
8317 2018-06-01  Richard Biener  <rguenther@suse.de>
8319         PR middle-end/86017
8320         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8321         vars wrapped in MEM_REFs.
8323 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8325         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8326         Fix subreg tests so that we only return a choice between
8327         GENERAL_REGS and FP_REGS if the original classes included both.
8329 2018-06-01  Richard Biener  <rguenther@suse.de>
8331         PR ipa/85960
8332         * tree-ssa-structalias.c (get_function_part_constraint):
8333         Handle NULL fi->decl.
8334         (find_func_aliases_for_call): Properly handle indirect
8335         fi from direct call.
8336         (find_func_clobbers): Likewise.
8337         (ipa_pta_execute): Likewise.
8338         (create_variable_info_for): For functions that are ifunc_resolver
8339         resolve to a varinfo that contains the result of the resolver call.
8340         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8341         aliases.
8343 2018-05-31  Michael Collison  <michael.collison@arm.com>
8345         * config/aarch64/aarch64.md:
8346         (*fix_to_zero_extenddfdi2): New pattern.
8347         * gcc.target/aarch64/fix_extend1.c: New testcase.
8349 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8351         PR middle-end/78809
8352         PR middle-end/83026
8353         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8354         and BUILT_IN_STRNCMP_EQ.
8355         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8356         BUILT_IN_STRNCMP_EQ.
8357         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8358         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8359         (gimple_fold_builtin): Likewise.
8360         * tree-ssa-strlen.c (compute_string_length): New function.
8361         (determine_min_obsize): New function.
8362         (handle_builtin_string_cmp): New function to handle calls to
8363         string compare functions.
8364         (strlen_optimize_stmt): Add handling to builtin string compare
8365         calls.
8366         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8367         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8368         * tree.c (build_common_builtin_nodes): Add new defines of
8369         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8371 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8373         PR target/85984
8374         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8375         functions with naked attribute.
8377 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8379         * config/i386/sse.md (avx_vec_concat<mode>):
8380         Substitute concat_tg_mode mode attribute with xtg_mode.
8381         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8382         (concat_tg_mode): Remove mode attribute.
8384 2018-05-31  Martin Sebor  <msebor@redhat.com>
8386         PR c/82063
8387         * calls.c (alloc_max_size): Correct a logic error/typo.
8388         Treat excessive arguments as infinite.  Warn for invalid arguments.
8389         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8391 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8393         PR target/85829
8394         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8395         and movx for Haswell.
8397 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8398             Cesar Philippidis  <cesar@codesourcery.com>
8400         PR middle-end/85879
8401         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8402         when emitting error on private/firstprivate reductions.
8403         * omp-low.c (lower_omp_target): Avoid reference-type processing
8404         on pointers for firstprivate clause.
8406 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8408         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8409         (st1x2): Likewise.
8410         (st1x3): Likewise.
8411         * config/aarch64/aarch64-simd.md
8412         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8413         (aarch64_ld1_x3_<mode>): Likewise
8414         (aarch64_st1x2<VALLDIF:mode>): Likewise
8415         (aarch64_st1_x2_<mode>): Likewise
8416         (aarch64_st1x3<VALLDIF:mode>): Likewise
8417         (aarch64_st1_x3_<mode>): Likewise
8418         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8419         (vld1_s8_x3): Likewise.
8420         (vld1_u16_x3): Likewise.
8421         (vld1_s16_x3): Likewise.
8422         (vld1_u32_x3): Likewise.
8423         (vld1_s32_x3): Likewise.
8424         (vld1_u64_x3): Likewise.
8425         (vld1_s64_x3): Likewise.
8426         (vld1_f16_x3): Likewise.
8427         (vld1_f32_x3): Likewise.
8428         (vld1_f64_x3): Likewise.
8429         (vld1_p8_x3): Likewise.
8430         (vld1_p16_x3): Likewise.
8431         (vld1_p64_x3): Likewise.
8432         (vld1q_u8_x3): Likewise.
8433         (vld1q_s8_x3): Likewise.
8434         (vld1q_u16_x3): Likewise.
8435         (vld1q_s16_x3): Likewise.
8436         (vld1q_u32_x3): Likewise.
8437         (vld1q_s32_x3): Likewise.
8438         (vld1q_u64_x3): Likewise.
8439         (vld1q_s64_x3): Likewise.
8440         (vld1q_f16_x3): Likewise.
8441         (vld1q_f32_x3): Likewise.
8442         (vld1q_f64_x3): Likewise.
8443         (vld1q_p8_x3): Likewise.
8444         (vld1q_p16_x3): Likewise.
8445         (vld1q_p64_x3): Likewise.
8446         (vst1_s64_x2): Likewise.
8447         (vst1_u64_x2): Likewise.
8448         (vst1_f64_x2): Likewise.
8449         (vst1_s8_x2): Likewise.
8450         (vst1_p8_x2): Likewise.
8451         (vst1_s16_x2): Likewise.
8452         (vst1_p16_x2): Likewise.
8453         (vst1_s32_x2): Likewise.
8454         (vst1_u8_x2): Likewise.
8455         (vst1_u16_x2): Likewise.
8456         (vst1_u32_x2): Likewise.
8457         (vst1_f16_x2): Likewise.
8458         (vst1_f32_x2): Likewise.
8459         (vst1_p64_x2): Likewise.
8460         (vst1q_s8_x2): Likewise.
8461         (vst1q_p8_x2): Likewise.
8462         (vst1q_s16_x2): Likewise.
8463         (vst1q_p16_x2): Likewise.
8464         (vst1q_s32_x2): Likewise.
8465         (vst1q_s64_x2): Likewise.
8466         (vst1q_u8_x2): Likewise.
8467         (vst1q_u16_x2): Likewise.
8468         (vst1q_u32_x2): Likewise.
8469         (vst1q_u64_x2): Likewise.
8470         (vst1q_f16_x2): Likewise.
8471         (vst1q_f32_x2): Likewise.
8472         (vst1q_f64_x2): Likewise.
8473         (vst1q_p64_x2): Likewise.
8474         (vst1_s64_x3): Likewise.
8475         (vst1_u64_x3): Likewise.
8476         (vst1_f64_x3): Likewise.
8477         (vst1_s8_x3): Likewise.
8478         (vst1_p8_x3): Likewise.
8479         (vst1_s16_x3): Likewise.
8480         (vst1_p16_x3): Likewise.
8481         (vst1_s32_x3): Likewise.
8482         (vst1_u8_x3): Likewise.
8483         (vst1_u16_x3): Likewise.
8484         (vst1_u32_x3): Likewise.
8485         (vst1_f16_x3): Likewise.
8486         (vst1_f32_x3): Likewise.
8487         (vst1_p64_x3): Likewise.
8488         (vst1q_s8_x3): Likewise.
8489         (vst1q_p8_x3): Likewise.
8490         (vst1q_s16_x3): Likewise.
8491         (vst1q_p16_x3): Likewise.
8492         (vst1q_s32_x3): Likewise.
8493         (vst1q_s64_x3): Likewise.
8494         (vst1q_u8_x3): Likewise.
8495         (vst1q_u16_x3): Likewise.
8496         (vst1q_u32_x3): Likewise.
8497         (vst1q_u64_x3): Likewise.
8498         (vst1q_f16_x3): Likewise.
8499         (vst1q_f32_x3): Likewise.
8500         (vst1q_f64_x3): Likewise.
8501         (vst1q_p64_x3): Likewise.
8503 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8505         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8506         user_label_prefix to name.
8508         * tree-core.h: Update comment about the format of NAME string
8509         passed to handler in attribute_spec.
8511         * config/msp430/msp430.md: Remove erroneous subreg expression from
8512         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8513         zero_extend{q,h}isi2.
8515 2018-05-30  Borislav Petkov  <bp@suse.de>
8517         * doc/extend.texi: Document some architecture specific
8518         constraints and sort entries.
8520 2018-05-30  Martin Sebor  <msebor@redhat.com>
8522         PR middle-end/85369
8523         * builtins.c (expand_builtin_stpcpy_1): New function.
8524         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8525         only if the former succeeds.
8527 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8529         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8530         in saphira.
8532 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8534         * doc/invoke.texi (-flinker-output): Document
8536 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8538         * passes.c (ipa_write_summaries): Only modify statements if body
8539         is in memory.
8540         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8541         incrementally linking.
8542         (ipa_passes): Likewise.
8543         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8544         pass down resolution info.
8545         * common.opt (flag_incremental_link): Update info.
8546         * gcc.c (plugin specs): Turn flinker-output=* to
8547         -plugin-opt=-linker-output-known
8548         * toplev.c (compile_file): Also cut compilation when doing incremental
8549         link.
8550         * flag-types. (enum lto_partition_model): Add
8551         LTO_LINKER_OUTPUT_NOLTOREL.
8552         (invoke.texi): Add -flinker-output docs.
8553         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8554         link same way as WPA; do not stream in dead initializers.
8556         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8557         darf2out_register_external_decl): Support incremental link.
8559 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8561         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8563 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8565         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8566         it down to simple_object_copy_lto_debug_sections.
8567         (run_gcc): Determine incremental LTO link time and configure
8568         lto1 into non-wpa mode, disable renaming of debug sections.
8570 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8572         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8573         descriptions of various incorrectly documented functions.
8575 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8577         Revert:
8578         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8579         address check not strict.
8581 2018-05-30  Richard Biener  <rguenther@suse.de>
8583         PR tree-optimization/85964
8584         * tracer.c (better_p): Drop initialized count check, we only
8585         call the function with initialized counts now.
8586         (find_best_successor): Do find a best edge if one
8587         has uninitialized count.
8588         (find_best_predecessor): Likewise.  Do BB frequency check only
8589         if count is initialized.
8591 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8593         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8594         (aarch64_ldrstr_offset_compare): New.
8595         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8596         load/store orderings.
8597         (aarch64_gen_adjusted_ldpstp): Likewise.
8599 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8601         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8602         Check for subset of GENERAL_REGS and FP_REGS.
8603         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8604         r=w alternative.
8606 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8608         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8609         and wi::to_poly_offset.  Add the current offset and then check
8610         whether the sum fits, rather than using an unchecked addition of
8611         a checked term.  Check for a shwi rather than a uhwi.
8612         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8613         (store_constructor): Use poly_int_tree_p.
8614         (expand_expr_real_1): Likewise.
8615         * function.c (assign_temp): Likewise.
8616         * fold-const.c (const_binop): Use poly_int_tree_p and
8617         wi::to_poly_offset.
8618         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8619         division.
8620         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8621         to_poly_offset for MEM offsets.
8622         * ipa-icf.c (sem_variable::equals): Likewise.
8623         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8624         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8625         wi::to_poly_offset for BIT_FIELD_REF offsets.
8626         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8627         wi::to_poly_offset.
8628         * var-tracking.c (emit_note_insn_var_location): Use
8629         tree_to_poly_uint64.
8631 2018-05-29  Jim Wilson  <jimw@sifive.com>
8633         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8635 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8637         PR target/85950
8638         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8639         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8640         sequence.
8641         (sse4_1_round<mode>2): Use nonimmediate_operand
8642         for operand 1 predicate.
8644 2018-05-29  Martin Sebor  <msebor@redhat.com>
8645             Richard Biener  <rguenther@suse.de>
8647         PR testsuite/85888
8648         * calls.c (get_size_range): Call determine_value_range instead
8649         of get_value_range..
8650         * tree-vrp.h (determine_value_range): Declared new function.
8651         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8653 2018-05-29  Richard Biener  <rguenther@suse.de>
8655         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8656         sure to use non-pattern stmts for get_earlier_stmt arguments.
8657         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8658         called on pattern stmts.
8659         (get_later_stmt): Likewise.
8661 2018-05-29  Martin Liska  <mliska@suse.cz>
8663         PR gcov-profile/85759
8664         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8665         env variables.
8667 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8669         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8670         VEC_UNPACK_*_EXPR.
8671         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8672         VEC_PACK_*_EXPR.
8674         PR target/85918
8675         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8676         VEC_PACK_FLOAT_EXPR): New tree codes.
8677         * tree-pretty-print.c (op_code_prio): Handle
8678         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8679         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8680         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8681         * tree-inline.c (estimate_operator_cost): Likewise.
8682         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8683         * fold-const.c (const_binop): Likewise.
8684         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8685         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8686         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8687         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8688         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8689         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8690         * expr.c (expand_expr_real_2): Likewise.
8691         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8692         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8693         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8694         optabs.
8695         * optabs.c (expand_widen_pattern_expr): For
8696         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8697         sign from result type rather than operand's type.
8698         (expand_binop_directly): For vec_packu_float_optab and
8699         vec_packs_float_optab allow result type to be different from operand's
8700         type.
8701         * optabs-tree.c (optab_for_tree_code): Handle
8702         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8703         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8704         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8705         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8706         VEC_PACK_FLOAT_EXPR.
8707         * tree-vect-stmts.c (supportable_widening_operation): Handle
8708         FIX_TRUNC_EXPR.
8709         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8710         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8711         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8712         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8713         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8714         mode attributes.
8715         (vec_pack<floatprefix>_float_<mode>): New expander.
8716         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8717         attributes.
8718         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8719         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8720         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8721         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8722         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8723         Document.
8724         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8725         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8726         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8727         VEC_PACK_FLOAT_EXPR): Document.
8729 2018-05-29  Richard Biener  <rguenther@suse.de>
8731         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8732         member.
8733         (stmt_vec_info_vec): Make pointer.
8734         (init_stmt_vec_info_vec): Remove.
8735         (free_stmt_vec_info_vec): Likewise.
8736         (set_stmt_vec_info_vec): New function.
8737         (free_stmt_vec_infos): Likewise.
8738         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8739         (set_vinfo_for_stmt): Likewise.
8740         (get_earlier_stmt): Likewise.
8741         (get_later_stmt): Likewise.
8742         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8743         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8744         (vec_info::~vec_info): Free stmt_vec_infos.
8745         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8746         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8747         (pass_slp_vectorize::execute): Likewise.
8748         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8749         (free_stmt_vec_info_vec): Likewise.
8750         (set_stmt_vec_info_vec): New function.
8751         (free_stmt_vec_infos): Likewise.
8752         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8753         the global stmt_vec_info_vec.
8754         * tree-parloops.c (gather_scalar_reductions): Use
8755         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8756         vector.
8758 2018-05-29  Richard Biener  <rguenther@suse.de>
8760         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8762 2018-05-29  Martin Liska  <mliska@suse.cz>
8763             David Malcolm  <dmalcolm@redhat.com>
8765         * vec.c (test_reverse): New.
8766         (vec_c_tests): Add new test.
8767         * vec.h (vl_ptr>::reverse): New function.
8769 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8771         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8773         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8774         and later.
8776 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8778         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8780 2018-05-28  Richard Biener  <rguenther@suse.de>
8782         PR tree-optimization/85933
8783         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8784         look at stmts marked as vectorizable.
8786 2018-05-28  Richard Biener  <rguenther@suse.de>
8788         PR tree-optimization/85934
8789         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8790         vector boolean check before scalar optimization.
8792 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8794         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8795         for armv5te.
8797 2018-05-28  Mark Wielaard  <mark@klomp.org>
8799         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8800         if it is an expression containing a minus sign.
8802 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8804         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8806 2018-05-27  Paul Koning  <ni1d@arrl.net>
8808         * config/pdp11/pdp11.md (truncsihi2): Remove.
8810 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8811             Chung-Ju Wu  <jasonwucj@gmail.com>
8813         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8814         implementation.
8815         (unaligned_store_dw): Ditto.
8816         * config/nds32/nds32-memory-manipulation.c
8817         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8818         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8819         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8820         (emit_setmem_word_loop): Rename to ...
8821         (emit_setmem_doubleword_loop): ... this.
8822         (nds32_gen_dup_4_byte_to_word_value): New function.
8823         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8824         (nds32_expand_setmem_loop): Refine implementation.
8825         (nds32_expand_setmem_loop_v3m): Ditto.
8826         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8827         pattern.
8829 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8831         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8833 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8835         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8836         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8837         machine->attr_no_prologue_p.
8838         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8839         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8840         (nds32_expand_epilogue): Consider attr_naked_p.
8841         (nds32_expand_epilogue_v3pop): Likewise.
8842         (nds32_can_use_return_insn): Likewise.
8843         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8844         attr_no_prologue_p fields.
8845         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8847 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8849         PR target/85918
8850         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8851         attributes.
8852         * config/i386/sse.md
8853         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8854         Rename to ...
8855         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8856         ... this.
8857         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8858         Rename to ...
8859         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8860         ... this.
8861         (*<floatsuffix>floatv2div2sf2): Rename to ...
8862         (*float<floatunssuffix>v2div2sf2): ... this.
8863         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8864         (float<floatunssuffix>v2div2sf2_mask): ... this.
8865         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8866         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8867         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8868         to ...
8869         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8870         ... this.
8871         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8872         Rename to ...
8873         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8874         ... this.
8875         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8876         Rename to ...
8877         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8878         ... this.
8879         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8880         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8881         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8882         gen_ufix_truncv8dfv8si2.
8883         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8884         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8885         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8886         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8887         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8888         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8889         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8890         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8892 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8894         PR target/85900
8895         PR target/85345
8896         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8898 2018-05-25  Jim Wilson  <jimw@sifive.com>
8900         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8901         * config/riscv/riscv.c (struct machine_function): Add
8902         interrupt_handler_p and attribute_checked_p fields.
8903         (riscv_attribute_table): Add interrupt.
8904         (riscv_interrupt_type_p): New.
8905         (riscv_save_reg_p): Save extra regs for interrupt handler.
8906         (riscv_use_save_libcall): Return false  for interrupt handler.
8907         (riscv_first_stack_step): Add forward declaration.
8908         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8909         for interrupt handler with large frame.  Use it for saved reg list.
8910         (riscv_expand_prologue): Move flag_stack_usage_info support to
8911         eliminate duplication.
8912         (riscv_expand_epilogue): Generate mret for interrupt handler.
8913         (riscv_epilogue_uses): New.
8914         (riscv_can_use_return_insn): Return false for interrupt handler.
8915         (riscv_function_ok_for_sibcall): Likewise.
8916         (riscv_set_current_function): Add interrupt handler support.
8917         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8918         * config/riscv/riscv.md (UNSPECV_MRET): New.
8919         (GP_REGNUM): New.
8920         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8921         (riscv_mret): New.
8922         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8924 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8926         PR tree-optimization/85712
8927         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8928         this candidate has already been replaced in-situ by a copy.
8930 2018-05-25  Jason Merrill  <jason@redhat.com>
8932         PR c++/80485 - inline function non-zero address.
8933         * symtab.c (nonzero_address): Check DECL_COMDAT.
8935 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8937         PR target/83628
8938         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8939         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8940         extension of SImode operation.  Use const123_operand predicate.
8941         (*saddsi_1): Remove.
8942         (*saddl_se_1): Ditto.
8943         (*ssubsi_1): Ditto.
8944         (*ssubl_se_1): Ditto.
8945         * config/alpha/predicates.md (const123_operand): New predicate.
8946         * config/alpha/constraints.md (P): Use IN_RANGE.
8948 2018-05-25  Richard Biener  <rguenther@suse.de>
8950         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8951         defaulted to true.
8952         (ref_maybe_used_by_stmt_p): Likewise.
8953         (stmt_may_clobber_ref_p): Likewise.
8954         (stmt_may_clobber_ref_p_1): Likewise.
8955         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8956         and pass it along.
8957         (ref_maybe_used_by_stmt_p): Likewise.
8958         (stmt_may_clobber_ref_p): Likewise.
8959         (stmt_may_clobber_ref_p_1): Likewise.
8960         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8961         the alias oracle to disambiguate DRs with stmts DR analysis
8962         couldn't handle.
8963         (vect_analyze_data_refs): Do not give up on not analyzable
8964         DRs for BB vectorization.  Remove code truncating the dataref
8965         vector.
8967 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8969         PR target/85832
8970         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8971         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8972         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8974 2018-05-25  Richard Biener  <rguenther@suse.de>
8976         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8977         function, combining stmt data ref gathering and fatal analysis
8978         parts.
8979         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8980         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8981         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8982         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8983         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8985 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8987         PR tree-optimization/85720
8988         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8989         SCC if all partitions are builtins.
8990         (version_loop_by_alias_check): New parameter.  Generate cancelable
8991         runtime alias check if all partitions are builtins.
8992         (distribute_loop): Update call to above function.
8994 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8996         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8997         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8998         (parm_default_def_partition_arg): Ditto.
8999         (set_parm_default_def_partition): Ditto.
9000         (get_parm_default_def_partitions): Ditto and make it static.
9001         (get_undefined_value_partitions): Ditto and make it static.
9002         (remove_ssa_form): Refactor call to init_var_map here.
9003         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9004         computation for loop region.
9005         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9006         (register_default_def): Delete.
9007         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9008         (parm_default_def_partition_arg): Ditto.
9009         (set_parm_default_def_partition): Ditto.
9010         (get_parm_default_def_partitions): Ditto and make it static.
9011         (get_undefined_value_partitions): Ditto and make it static.
9012         (coalesce_with_default, coalesce_with_default): Update comment.
9013         (create_coalesce_list_for_region): New func factored out from
9014         create_outofssa_var_map.
9015         (populate_coalesce_list_for_outofssa): New func factored out from
9016         create_outofssa_var_map and coalesce_ssa_name.
9017         (create_outofssa_var_map): Delete.
9018         (coalesce_ssa_name): Refactor to support live range computation.
9019         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9020         (get_parm_default_def_partitions): Delete.
9021         (get_undefined_value_partitions): Ditto.
9022         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9023         computation for loop region.
9024         (new_tree_live_info, loe_visit_block): Ditto.
9025         (live_worklist, set_var_live_on_entry): Ditto.
9026         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9027         * tree-ssa-live.h (struct _var_map): New fields.
9028         (init_var_map): Change decl.
9029         (region_contains_p): New.
9031 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9033         * tree-ssa-live.h (live_merge_and_clear): Delete.
9035 2018-05-25  Richard Biener  <rguenther@suse.de>
9037         PR c++/85912
9038         * tree-dump.c (dequeue_and_dump): Remove access to removed
9039         operand 2 of a SWITCH_EXPR.
9041 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9043         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9044         multiplication and division.
9045         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9046         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9047         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9048         (cond_udiv_optab, cond_umod_optab): New optabs.
9049         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9050         (IFN_COND_RDIV): New internal functions.
9051         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9052         TRUNC_MOD_EXPR and RDIV_EXPR.
9053         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9054         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9055         New unspecs.
9056         (SVE_INT_BINARY): Include mult.
9057         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9058         (optab, sve_int_op): Handle mult.
9059         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9060         UNSPEC_COND_DIV.
9061         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9062         for SVE_INT_BINARY_SD.
9064 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9066         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9067         (optab, sve_int_op): Handle div and udiv.
9068         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9069         for SVE_INT_BINARY_SD.
9070         (*<optab><mode>3): New insn for the same.
9072 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9074         * tree-vect-patterns.c: Include predict.h.
9075         (vect_recog_divmod_pattern): Restrict check for division support
9076         to when optimizing for size.
9078 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9080         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9081         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9082         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9083         (gimple_match_op::set_op): Likewise.
9084         (gimple_resimplify4): Declare.
9085         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9086         (expr::gen_transform): Likewise.
9087         (decision_tree::gen): Generate a simplification routine for 4 operands.
9088         * gimple-match-head.c (gimple_simplify): Add an overload for
9089         4 operands.  In the top-level function, handle up to 4 call
9090         arguments and call gimple_resimplify4.
9091         (gimple_resimplify4): New function.
9092         (build_call_internal): Pass a fourth operand.
9093         (maybe_push_to_seq): Likewise.
9094         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9095         Fold VEC_COND_EXPRs of an operation and a default value into
9096         an IFN_COND_* function if possible.
9097         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9098         New unspecs.
9099         (SVE_COND_FP_BINARY): Include them.
9100         (optab, sve_fp_op): Handle them.
9101         (SVE_INT_BINARY_REV): New code iterator.
9102         (SVE_COND_FP_BINARY_REV): New int iterator.
9103         (commutative): New int attribute.
9104         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9105         Declare.
9106         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9107         function.
9108         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9109         (*cond_<optab><mode>): New patterns for reversed operands.
9111 2018-05-25  Richard Biener  <rguenther@suse.de>
9113         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9114         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9115         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9116         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9117         * tree-vect-data-refs.c (everywhere): Adjust users.
9118         * tree-vect-loop.c (everywhere): Likewise.
9119         * tree-vect-slp.c (everywhere): Likewise.
9120         * tree-vect-stmts.c (everywhere): Likewise.
9121         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9123 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9125         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9126         Rename to...
9127         (gcc_cv_as_section_exclude): ... this.
9128         Try Solaris as #exclude syntax.
9129         * configure: Regenerate.
9130         * config.in: Regenerate.
9131         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9132         SECTION_EXCLUDE.
9133         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9134         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9136         * varasm.c (default_elf_asm_named_section): Don't check if
9137         HAVE_GAS_SECTION_EXCLUDE is defined.
9139 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9141         * doc/md.texi: Update the documentation of the cond_* optabs
9142         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9143         Describe the scalar case too.
9144         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9145         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9146         instead of 2.
9147         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9148         (get_conditional_internal_fn): Update comment.
9149         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9150         accumulator value as a final argument to conditional functions.
9151         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9152         a define_expand and add an "else" operand.  Assert for now that
9153         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9154         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9155         (*cond_<optab><mode>): New patterns.
9156         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9157         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9158         (UNSPEC_COND_EOR): Delete.
9159         (optab): Remove associated mappings.
9160         (SVE_INT_BINARY): New code iterator.
9161         (sve_int_op): Remove int attribute and add "minus" to the code
9162         attribute.
9163         (SVE_COND_INT_OP): Delete.
9164         (SVE_COND_FP_OP): Rename to...
9165         (SVE_COND_FP_BINARY): ...this.
9167 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9169         * optabs.c (can_reuse_operands_p): New function.
9170         (maybe_legitimize_operands): Try to reuse the results for
9171         earlier operands.
9173 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9175         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9176         Add {q} suffix to insn mnemonic.
9178 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9180         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9181         (msp430_warn_func_return): New.
9183 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9185         * fold-const.c (tree_nonzero_bits): New function.
9186         * fold-const.h (tree_nonzero_bits): Likewise.
9187         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9188         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9190 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9192         PR target/85900
9193         PR target/85345
9194         * varasm.c (assemble_alias): Check ifunc_resolver only on
9195         FUNCTION_DECL.
9197 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9199         PR target/85903
9200         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9201         when memory input operand is handled.
9203 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9205         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9206         global.
9207         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9209 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9211         * match.pd: Delay FMA folds until after vectorization.
9213 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9215         PR target/83009
9216         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9217         address check not strict.
9219 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9221         * gimple-match.h (gimple_match_op): New class.
9222         (mprts_hook): Replace parameters with a gimple_match_op *.
9223         (maybe_build_generic_op): Likewise.
9224         (gimple_simplified_result_is_gimple_val): Replace parameters with
9225         a const gimple_match_op *.
9226         (gimple_simplify): Replace code_helper * and tree * parameters with
9227         a gimple_match_op * parameter.
9228         (gimple_resimplify1): Replace code_helper *, tree and tree *
9229         parameters with a gimple_match_op * parameter.
9230         (gimple_resimplify2): Likewise.
9231         (gimple_resimplify3): Likewise.
9232         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9233         parameters with a gimple_match_op * parameter.
9234         * gimple-match-head.c (gimple_simplify): Change prototypes of
9235         auto-generated functions to take a gimple_match_op * instead of
9236         separate code_helper * and tree * parameters.  Make the same
9237         change in the top-level overload and update calls to the
9238         gimple_resimplify routines.  Update calls to the auto-generated
9239         functions and to maybe_push_res_to_seq in the publicly-facing
9240         operation-specific gimple_simplify overloads.
9241         (gimple_match_op::MAX_NUM_OPS): Define.
9242         (gimple_resimplify1): Replace rcode and ops with a single res_op
9243         parameter.  Update call to gimple_simplify.
9244         (gimple_resimplify2): Likewise.
9245         (gimple_resimplify3): Likewise.
9246         (mprts_hook): Replace parameters with a gimple_match_op *.
9247         (maybe_build_generic_op): Likewise.
9248         (build_call_internal): Replace type, nargs and ops with
9249         a gimple_match_op *.
9250         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9251         with a single gimple_match_op *.  Update calls to mprts_hook,
9252         build_call_internal and gimple_simplified_result_is_gimple_val.
9253         Factor out code that is common to the tree_code and combined_fn cases.
9254         * genmatch.c (expr::gen_transform): Replace tem_code and
9255         tem_ops with a gimple_match_op called tem_op.  Update calls
9256         to the gimple_resimplify functions and maybe_push_res_to_seq.
9257         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9258         res_ops.  Update call to the gimple_resimplify functions.
9259         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9260         (decision_tree::gen): Make the functions take a gimple_match_op *
9261         called res_op instead of separate res_code and res_ops parameters.
9262         Update call accordingly.
9263         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9264         and ops with a single res_op parameter.  Update calls to
9265         maybe_build_generic_op and maybe_push_res_to_seq.
9266         (fold_stmt_1): Update calls to gimple_simplify and
9267         replace_stmt_with_simplification.
9268         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9269         and gimple_simplified_result_is_gimple_val.
9270         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9271         gimple_simplify.
9272         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9273         with a gimple_match_op *.
9274         (vn_nary_build_or_lookup): Likewise.  Update call to
9275         vn_nary_build_or_lookup_1.
9276         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9277         gimple_match_op *.  Update calls to the gimple_resimplify routines
9278         and to gimple_simplified_result_is_gimple_val.
9279         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9280         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9281         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9282         (visit_nary_op): Likewise.
9283         (visit_reference_op_load): Likewise.
9285 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9287         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9288         modifier for printing the step amount.
9290 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9292         PR target/78849
9293         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9294         types.
9296 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9298         * doc/sourcebuild.texi (Endianness): New subsubsection.
9300 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9302         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9303         <prefetch_dynamic_strides>: New const bool field.
9304         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9305         prefetch_dynamic_strides.
9306         (exynosm1_prefetch_tune): Likewise.
9307         (thunderxt88_prefetch_tune): Likewise.
9308         (thunderx_prefetch_tune): Likewise.
9309         (thunderx2t99_prefetch_tune): Likewise.
9310         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9311         false.
9312         (aarch64_override_options_internal): Update to set
9313         PARAM_PREFETCH_DYNAMIC_STRIDES.
9314         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9315         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9316         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9317         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9318         prefetch-dynamic-strides setting.
9320 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9322         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9323         <minimum_stride>: New const int field.
9324         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9325         minimum_stride field defaulting to -1.
9326         (exynosm1_prefetch_tune): Likewise.
9327         (thunderxt88_prefetch_tune): Likewise.
9328         (thunderx_prefetch_tune): Likewise.
9329         (thunderx2t99_prefetch_tune): Likewise.
9330         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9331         <default_opt_level>: Set to 3.
9332         (aarch64_override_options_internal): Update to set
9333         PARAM_PREFETCH_MINIMUM_STRIDE.
9334         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9335         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9336         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9337         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9338         stride is constant and is below the minimum stride threshold.
9340 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9342         * config/arm/arm-cpus.in (mode26): Delete.
9343         (armv4): Delete mode26 reference.
9344         * config/arm/arm.c (arm_configure_build_target): Delete use of
9345         isa_bit_mode26.
9347 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9349         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9350         New insn pattern.
9351         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9352         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9353         for non-SSE modes.
9354         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9355         (floatunsdidf2): Ditto.
9357 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9359         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9360         (fixuns_trunc<mode>si2_avx512f): Ditto.
9361         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9362         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9363         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9365 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9367         PR rtl-optimization/79985
9368         * df-scan.c (df_insn_refs_collect): Remove special case for
9369         global registers and asm statements.
9371 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9373         * extend.texi (Global Register Variables): Rewrite the bullet list.
9374         Note that the register is available for allocation. Note that access
9375         via inline asm must use constraints. Add note about async-signal
9376         handlers. Remove paragraph about automagic register selection.
9378 2018-05-23  Richard Biener  <rguenther@suse.de>
9380         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9381         of fixed offset from memset VN.
9383 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9385         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9386         first_interp field.
9387         (alloc_cand_and_find_basis): Initialize first_interp field.
9388         (slsr_process_mul): Modify first_interp field.
9389         (slsr_process_add): Likewise.
9390         (slsr_process_cast): Modify first_interp field for each new
9391         interpretation.
9392         (slsr_process_copy): Likewise.
9393         (dump_candidate): Dump first_interp field.
9394         (replace_mult_candidate): Process all interpretations, not just
9395         subsequent ones.
9396         (replace_rhs_if_not_dup): Likewise.
9397         (replace_one_candidate): Likewise.
9399 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9401         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9402         Add new boolean.
9403         (aarch64_needs_frame_chain): New function.
9404         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9406 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9408         PR target/84882
9409         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9410         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9411         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9412         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9413         as true for strict-align.
9414         (aarch64_can_inline_p): Perform checks even when callee has no
9415         attributes to check for strict alignment.
9416         * doc/extend.texi (AArch64 Function Attributes): Document
9417         no-strict-align.
9418         * doc/invoke.texi: (AArch64 Options): Likewise.
9420 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9422         PR tree-optimization/85853
9423         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9424         the handling of the root of the node to...
9425         (vect_slp_analyze_node_operations_1): ...this new function,
9426         and run the whole thing with the child nodes' def types
9427         set according to their SLP node's def type.
9429 2018-05-23  Richard Biener  <rguenther@suse.de>
9431         PR middle-end/85874
9432         * tree-data-ref.c (create_runtime_alias_checks): Defer
9433         and ignore overflow warnings.
9435 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9437         PR tree-optimization/85822
9438         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9439         constants.
9441 2018-05-23  Richard Biener  <rguenther@suse.de>
9443         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9444         memset constants via native_interpret_expr.
9446 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9448         PR target/85345
9449         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9450         attribute.
9451         (cgraph_node::create_alias): Likewise.
9452         (cgraph_node::get_availability): Check ifunc_resolver instead
9453         of looking up ifunc attribute.
9454         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9455         * varasm.c (do_assemble_alias): Likewise.
9456         (assemble_alias): Likewise.
9457         (default_binds_local_p_3): Likewise.
9458         * cgraph.h (cgraph_node): Add ifunc_resolver.
9459         (cgraph_node::only_called_directly_or_aliased_p): Return false
9460         for IFUNC resolver.
9461         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9462         attribute.
9463         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9464         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9465         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9466         instead of looking up ifunc attribute.
9468 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9470         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9472 2018-05-22  Martin Sebor  <msebor@redhat.com>
9474         PR middle-end/85359
9475         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9476         only when expasion succeeds.
9477         (expand_builtin_strcmp): Same.
9478         (expand_builtin_strncmp): Same.
9480 2018-05-22  Martin Sebor  <msebor@redhat.com>
9482         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9484 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9485             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9487         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9488         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9489         code.
9490         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9491         Add check for legitimate_address.
9492         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9493         (aarch64_swap_ldrstr_operands): New.
9494         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9495         Define prototype.
9497 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9498             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9500         * config/aarch64/aarch64.md: New patterns to generate stp
9501         and ldp.
9502         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9503         single words and double words.
9504         (load_pair_sw, load_pair_dw): Likewise.
9505         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9506         Delete.
9507         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9508         Delete.
9509         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9510         for different mode ldpstp and add peephole for merged zero stores.
9511         Likewise for loads.
9512         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9513         Add size check.
9514         (aarch64_gen_store_pair): Rename calls to match new patterns.
9515         (aarch64_gen_load_pair): Rename calls to match new patterns.
9516         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9517         (load_pair<DREG:mode><DREG2:mode>): ... This.
9518         (store_pair<mode>): Rename to...
9519         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9520         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9521         New mode iterators.
9522         (V_INT_EQUIV): Handle SImode.
9523         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9524         New predicate.
9526 2018-05-22  Martin Sebor  <msebor@redhat.com>
9528         PR c/85623
9529         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9530         or ajust the presumed bound on an operation to avoid unnecessary
9531         warnings.
9533 2018-05-22  Martin Sebor  <msebor@redhat.com>
9535         PR tree-optimization/85826
9536         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9537         assuming that a DECL necesarily has a constant size.
9539 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9541         PR middle-end/85862
9542         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9544 2018-05-22  Richard Biener  <rguenther@suse.de>
9546         PR tree-optimization/85834
9547         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9548         non-constant and non-zero memset arguments.
9550 2018-05-22  Martin Liska  <mliska@suse.cz>
9552         PR ipa/85607
9553         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9555 2018-05-22  Richard Biener  <rguenther@suse.de>
9557         PR tree-optimization/85863
9558         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9559         comparisons when vectype is specified.
9560         (vectorizable_condition): Do not specify vectype for
9561         vect_is_simple_cond when SLP vectorizing.
9563 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9565         PR target/85657
9566         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9567         define __ibm128 as long double.
9568         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9569         as a distinct type when IEEE 128-bit support is enabled.
9570         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9571         128-bit types to use the correct functions.
9572         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9573         convert between 128-bit floating point types that have different
9574         modes but the same representation, instead of using gen_lowpart to
9575         makean alias.
9576         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9577         KFmode.
9578         (IFKF_reg): New attributes to give the register constraints for
9579         IFmode and KFmode.
9580         (extend<mode>tf2_internal): New insns to mark an explicit
9581         conversion between 128-bit floating point types that have a
9582         different mode but share the same representation.
9584 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9586         PR tree-optimization/85814
9587         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9588         a null return from get_strinfo when unsharing the next
9589         strinfo in the chain.
9591 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9593         PR gcc/84923
9594         * varasm.c (weak_finish): Clean up weak_decls.
9596 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9598         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9599         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9600         UNSPEC_UADALP values.
9601         * config/aarch64/iterators.md (ABAL): New int iterator.
9602         (ABDL2): Likewise.
9603         (ADALP): Likewise.
9604         (sur): Add mappings for the above.
9605         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9606         New define_insn.
9607         (aarch64_<sur>abal<mode>_4): Likewise.
9608         (aarch64_<sur>adalp<mode>_3): Likewise.
9609         (<sur>sadv16qi): New define_expand.
9611 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9613         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9614         (*movdf_internal): Ditto.
9615         (*rcpsf2_sse): Ditto.
9616         (*rsqrtsf2_sse): Ditto.
9617         (*sqrt<mode>2_sse): Ditto.
9619 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9621         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9622         eor3q<mode>4.
9623         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9624         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9625         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9626         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9627         vbcaxq_s64): New.
9628         * config/aarch64/arm_neon.h: Likewise.
9629         * config/aarch64/iterators.md (VQ_I): New.
9631 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9633         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9634         arc*-*-linux*.
9635         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9636         MULTILIB_DIRNAMES
9638 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9640         * config/nds32/constraints.md (S): New constraint.
9641         * config/nds32/nds32.md (call_internal): Use constraint S.
9642         (call_value_internal): Likewise.
9643         (sibcall_internal): Likewise.
9644         (sibcall_value_internal): Likewise.
9646 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9647             Chung-Ju Wu  <jasonwucj@gmail.com>
9649         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9650         into consideration.
9652 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9653             Chung-Ju Wu  <jasonwucj@gmail.com>
9655         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9656         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9657         (nds32_rtx_costs_impl): Simplify.
9658         (nds32_address_cost_impl): Simplify.
9659         (nds32_init_rtx_costs): New function.
9660         (nds32_rtx_costs_speed_prefer): Likewise.
9661         (nds32_rtx_costs_size_prefer): Likewise.
9662         (nds32_address_cost_speed_prefer): Likewise.
9663         (nds32_address_cost_speed_fwprop): Likewise.
9664         (nds32_address_cost_size_prefer): Likewise.
9665         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9666         * config/nds32/nds32.c (nds32_option_override): Use
9667         nds32_init_rtx_costs function.
9669 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9671         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9672         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9673         (TARGET_PIPELINE_N8): Likewise.
9674         (TARGET_PIPELINE_N10): Likewise.
9675         (TARGET_PIPELINE_N13): Likewise.
9676         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9678 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9680         * config/nds32/nds32-fpu.md: Update copyright year.
9682 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9684         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9686 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9688         * config/nds32/nds32.c
9689         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9690         * config/nds32/nds32.opt (minline-asm-r15): New option.
9692 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9694         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9695         MASK_HW_ABS.
9696         * config/nds32/nds32.md (abssi2): New pattern.
9698 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9700         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9701         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9702         Merge insn pattern from sse_cvtsi2ss<round_name> and
9703         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9704         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9705         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9706         using SWI48 mode iterator.
9707         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9708         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9709         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9710         pattern from sse_cvttss2si<round_saeonly_name>
9711         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9712         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9713         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9714         using SWI48 mode iterator.
9715         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9716         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9717         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9718         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9719         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9720         using SWI48 mode iterator.
9721         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9722         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9723         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9724         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9725         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9726         SWI48 mode iterator.
9727         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9728         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9729         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9730         pattern from sse_cvttsd2si<round_saeonly_name>
9731         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9733 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9735         * config/nds32/nds32-md-auxiliary.c
9736         (nds32_valid_smw_lwm_base_p): Refine.
9737         (nds32_output_smw_single_word): Refine.
9738         (nds32_output_smw_double_word): New.
9739         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9741 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9743         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9744         (nds32_output_stack_pop): Refine.
9745         (nds32_expand_unaligned_load): Refine.
9746         (nds32_expand_unaligned_store): Refine.
9748 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9749             Chung-Ju Wu  <jasonwucj@gmail.com>
9751         * config/nds32/constants.md: Add TP_REGNUM constant.
9752         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9753         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9754         UNSPEC_ADD32.
9755         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9756         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9757         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9758         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9759         and PIC code generation.
9760         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9761         code generation.
9762         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9763         optimization.
9764         * config/nds32/nds32.md: Support TLS and PIC.
9765         * config/nds32/nds32.c: Support TLS and PIC.
9766         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9767         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9768         predicate.
9770 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9772         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9773         mode with E_ prefix.
9775 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9776             Chung-Ju Wu  <jasonwucj@gmail.com>
9778         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9779         * config/nds32/nds32-md-auxiliary.c
9780         (symbolic_reference_mentioned_p): New.
9781         (nds32_legitimize_ict_address): New.
9782         (nds32_expand_ict_move): New.
9783         (nds32_indirect_call_referenced_p): New.
9784         (nds32_symbol_binds_local_p): Delete.
9785         (nds32_long_call_p): Modify.
9786         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9787         * config/nds32/nds32-protos.h
9788         (symbolic_reference_mentioned_p): Declare.
9789         (nds32_legitimize_ict_address): Declare.
9790         (nds32_expand_ict_move): Declare.
9791         (nds32_indirect_call_referenced_p): Declare.
9792         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9793         (nds32_relax_group): Use nds32_ict_const_p as condition.
9794         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9795         (nds32_asm_file_start): Output ict_model directive in asm code.
9796         (nds32_legitimate_address_p): Consider indirect call.
9797         (nds32_print_operand): Consider indirect call.
9798         (nds32_print_operand_address): Consider indirect call.
9799         (nds32_insert_attributes): Handle "indirect_call" attribute.
9800         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9801         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9802         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9803         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9804         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9805         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9806         (TARGET_ICT_MODEL_SMALL): Define.
9807         (TARGET_ICT_MODEL_LARGE): Define.
9808         * config/nds32/nds32.md (movsi): Consider ict model.
9809         (call, call_value): Consider ict model.
9810         (sibcall, sibcall_value): Consider ict model.
9811         * config/nds32/nds32.opt (mict-model): New option.
9812         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9813         model.
9815 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9816             Monk Chiang  <sh.chiang04@gmail.com>
9817             Jim Wilson <jimw@sifive.com>
9819         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9820         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9821         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9822         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9823         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9824         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9825         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9826         compute save_libcall_adjustment properly.
9827         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9828         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9829         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9830         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9831         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9832         (ABI_SPEC): Handle mabi=ilp32e.
9833         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9834         (RVE): Add RVE mask.
9835         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9836         <-march>: Add rv32e as an example.
9838 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9840         PR c++/82899
9841         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9842         (intra_create_variable_infos): Handle C++ constructors.
9844 2018-05-18  Martin Liska  <mliska@suse.cz>
9846         * passes.def: Remove a redundant pass.
9848 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9850         PR bootstrap/85838
9851         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9853 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9855         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9856         (ARMv4): Update.
9857         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9858         (ARMv6m): Update.
9859         (armv2, armv2a, armv3, armv3m): Delete architectures.
9860         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9861         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9862         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9863         Delete cpus.
9864         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9865         (*mulsidi3adddi): Likewise.
9866         (mulsidi3): Likewise.
9867         (*mulsidi3_nov6): Likewise.
9868         (umulsidi3): Likewise.
9869         (umulsidi3_nov6): Likewise.
9870         (umaddsidi4): Likewise.
9871         (*umulsidi3adddi): Likewise.
9872         (smulsi3_highpart): Likewise.
9873         (*smulsi3_highpart_nov6): Likewise.
9874         (umulsi3_highpart): Likewise.
9875         (*umulsi3_highpart_nov6): Likewise.
9876         * config/arm/arm.h (arm_arch3m): Delete.
9877         * config/arm/arm.c (arm_arch3m): Delete.
9878         (arm_option_override_internal): Update armv3-related comment.
9879         (arm_configure_build_target): Delete use of isa_bit_mode32.
9880         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9881         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9882         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9883         (mulsa3): Likewise.
9884         (mulusa3): Likewise.
9885         * config/arm/arm-protos.h (arm_arch3m): Delete.
9886         * config/arm/arm-tables.opt: Regenerate.
9887         * config/arm/arm-tune.md: Likewise.
9888         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9889         deleted architectures.
9891 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9893         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9894         (armv5t, armv5te): New features.
9895         (ARMv5, ARMv5e): Delete fgroups.
9896         (ARMv5t, ARMv5te): Adjust for above changes.
9897         (ARMv6m): Likewise.
9898         (armv5, armv5e): Delete arches.
9899         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9900         arm_arch5.
9901         (*call_reg_arm): Likewise.
9902         (*call_value_reg_armv5): Likewise.
9903         (*call_value_reg_arm): Likewise.
9904         (*call_symbol): Likewise.
9905         (*call_value_symbol): Likewise.
9906         (*sibcall_insn): Likewise.
9907         (*sibcall_value_insn): Likewise.
9908         (clzsi2): Likewise.
9909         (prefetch): Likewise.
9910         (define_split and define_peephole2 dependent on arm_arch5):
9911         Likewise.
9912         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9913         arm_arch5e.
9914         (TARGET_ARM_QBIT): Likewise.
9915         (TARGET_DSP_MULTIPLY): Likewise.
9916         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9917         (arm_arch5, arm_arch5e): Delete.
9918         (arm_arch5t, arm_arch5te): Declare.
9919         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9920         (arm_arch5t): Declare.
9921         (arm_option_reconfigure_globals): Update for the above.
9922         (arm_options_perform_arch_sanity_checks): Update comment, replace
9923         use of arm_arch5 with arm_arch5t.
9924         (use_return_insn): Likewise.
9925         (arm_emit_call_insn): Likewise.
9926         (output_return_instruction): Likewise.
9927         (arm_final_prescan_insn): Likewise.
9928         (arm_coproc_builtin_available): Likewise.
9929         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9930         arm_arch5e with arm_arch5t and arm_arch5te.
9931         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9932         (arm_arch5t, arm_arch5te): Declare.
9933         * config/arm/arm-tables.opt: Regenerate.
9934         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9935         * config/arm/t-multilib: Likewise.
9936         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9937         instead of arm_arch5.
9938         (*call_reg_thumb1): Likewise.
9939         (*call_value_reg_thumb1_v5): Likewise.
9940         (*call_value_reg_thumb1): Likewise.
9941         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9942         unreachable path.
9943         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9945 2018-05-18  Martin Liska  <mliska@suse.cz>
9947         PR gcov-profile/84846
9948         * doc/gcov.texi: Document -t option of gcov tool.
9950 2018-05-18  Martin Liska  <mliska@suse.cz>
9952         PR gcov-profile/84846
9953         * gcov.c (print_usage): Add new -t option.
9954         (process_args): Handle the option.
9955         (generate_results): Use stdout as output when requested by
9956         the option.
9958 2018-05-18  Martin Liska  <mliska@suse.cz>
9960         PR gcov-profile/84846
9961         * coverage.c (coverage_init): Write PWD to .gcno file.
9962         * doc/gcov.texi: Document how working directory is printed.
9963         * gcov-dump.c (dump_gcov_file): Print PWD.
9964         * gcov.c (output_intermediate_file): Likewise.
9965         (read_graph_file): Read PWD string.
9966         (output_lines): Print PWD.
9968 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9970         PR middle-end/85817
9971         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9972         for retval and return false if all args to phi are zero.
9974 2018-05-18  Richard Biener  <rguenther@suse.de>
9976         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9977         method.
9978         (evrp_dom_walker::before_dom_children): Call it.
9980 2018-05-18  Richard Biener  <rguenther@suse.de>
9982         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9983         results when processing array refs with variable index.
9985 2018-05-18  Toon Moene  <toon@moene.org>
9987         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9988         directly after that of -floop-interchange. Indicate that both
9989         options are enabled by default when specifying -O3.
9991 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9993         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9994         iterator.  Delete separate integer-mode vec_set<mode> expander.
9995         (aarch64_simd_vec_setv2di): Delete.
9996         (vec_setv2di): Delete.
9997         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9998         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9999         the "w, r" alternative.
10001 2018-05-18  Martin Liska  <mliska@suse.cz>
10003         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10004         * tree-pass.h (make_pass_lower_switch_O0): New function.
10005         * tree-switch-conversion.c (node_has_low_bound): Remove.
10006         (node_has_high_bound): Likewise.
10007         (node_is_bounded): Likewise.
10008         (class pass_lower_switch): Make it a template type and create
10009         two instances.
10010         (pass_lower_switch::execute): Add template argument.
10011         (make_pass_lower_switch): New function.
10012         (make_pass_lower_switch_O0): New function.
10013         (do_jump_if_equal): Remove.
10014         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10015         all the hard work to tree optimization passes.
10017 2018-05-18  Martin Liska  <mliska@suse.cz>
10019         * dbgcnt.c (limit_low): Renamed from limit.
10020         (limit_high): New variable.
10021         (dbg_cnt_is_enabled): Check for upper limit.
10022         (dbg_cnt): Adjust dumping.
10023         (dbg_cnt_set_limit_by_index): Add new argument for high
10024         value.
10025         (dbg_cnt_set_limit_by_name): Likewise.
10026         (dbg_cnt_process_single_pair): Parse new format.
10027         (dbg_cnt_process_opt): Use strtok.
10028         (dbg_cnt_list_all_counters): Remove 'value' and add
10029         'limit_high'.
10030         * doc/invoke.texi: Document changes.
10032 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10034         * doc/sourcebuild.texi (scalar_all_fma): Document.
10035         * tree.def (FMA_EXPR): Delete.
10036         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10037         * internal-fn.c (ternary_direct): New macro.
10038         (expand_ternary_optab_fn): Likewise.
10039         (direct_ternary_optab_supported_p): Likewise.
10040         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10041         * builtins.c (fold_builtin_fma): Delete.
10042         (fold_builtin_3): Don't call it.
10043         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10044         * expr.c (expand_expr_real_2): Likewise.
10045         * fold-const.c (operand_equal_p): Likewise.
10046         (fold_ternary_loc): Likewise.
10047         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10048         * gimple.c (DEFTREECODE): Likewise.
10049         * gimplify.c (gimplify_expr): Likewise.
10050         * optabs-tree.c (optab_for_tree_code): Likewise.
10051         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10052         * tree-eh.c (operation_could_trap_p): Likewise.
10053         (stmt_could_throw_1_p): Likewise.
10054         * tree-inline.c (estimate_operator_cost): Likewise.
10055         * tree-pretty-print.c (dump_generic_node): Likewise.
10056         (op_code_prio): Likewise.
10057         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10058         * tree-ssa-operands.c (get_expr_operands): Likewise.
10059         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10060         * fold-const-call.h (fold_fma): Delete.
10061         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10062         CFN_FNMA and CFN_FNMS.
10063         (fold_fma): Delete.
10064         * genmatch.c (combined_fn): New enum.
10065         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10066         (commutative_op): New function.
10067         (commutate): Use it.  Handle more than 2 operands.
10068         (dt_operand::gen_gimple_expr): Use commutative_op.
10069         (parser::parse_expr): Allow :c to be used with non-binary
10070         operators if the commutative operand is known.
10071         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10072         CFN_FMS, CFN_FNMA and CFN_FNMS.
10073         (backprop::process_assign_use): Remove FMA_EXPR handling.
10074         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10075         (gen_hsa_fma): New function.
10076         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10077         IFN_FNMA and IFN_FNMS.
10078         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10079         * gimple-fold.h (follow_all_ssa_edges): Declare.
10080         * gimple-fold.c (follow_all_ssa_edges): New function.
10081         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10082         gimple_build interface and use follow_all_ssa_edges to fold the result.
10083         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10084         instead of checking for optabs directly.
10085         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10086         rather than FMA_EXPRs.
10087         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10088         call to IFN_FMA instead of an FMA_EXPR.
10090 2018-05-17  Jim Wilson  <jimw@sifive.com>
10092         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10093         sign extended promoted subreg, and the range does not have the sign bit
10094         set, then do a sign extend.
10096         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10097         test, check for sign extended subreg and/or constant operands, and
10098         do a sign extend in that case.
10100 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10102         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10103         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10104         Add untyped.
10105         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10106         Change logics_shift_reg to logics_shift_imm.
10107         (thunderx2t99_fp_loadpair_basic): Delete.
10108         (thunderx2t99_fp_storepair_basic): Delete.
10109         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10110         (thunderx2t99_asimd_polynomial): Delete.
10111         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10112         and neon_fp_mul_d_scalar_q.
10113         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10114         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10115         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10116         (thunderx2t99_asimd_lut): Add missing tbl types.
10117         (thunderx2t99_asimd_ext): Delete.
10118         (thunderx2t99_asimd_load1_1_mult): Delete.
10119         (thunderx2t99_asimd_load1_2_mult): Delete.
10120         (thunderx2t99_asimd_load1_ldp): New.
10121         (thunderx2t99_asimd_load1): New.
10122         (thunderx2t99_asimd_load2): Add missing *load2* types.
10123         (thunderx2t99_asimd_load3): New.
10124         (thunderx2t99_asimd_load4): New.
10125         (thunderx2t99_asimd_store1_1_mult): Delete.
10126         (thunderx2t99_asimd_store1_2_mult): Delete.
10127         (thunderx2t99_asimd_store2_mult): Delete.
10128         (thunderx2t99_asimd_store2_onelane): Delete.
10129         (thunderx2t99_asimd_store_stp): New.
10130         (thunderx2t99_asimd_store1): New.
10131         (thunderx2t99_asimd_store2): New.
10132         (thunderx2t99_asimd_store3): New.
10133         (thunderx2t99_asimd_store4): New.
10135 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10137         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10138         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10140 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10141             Segher Boessenkool  <segher@kernel.crashing.org>
10143         PR target/85698
10144         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10145         operand.
10147 2018-05-17  Richard Biener  <rguenther@suse.de>
10149         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10150         for pruning loop and prune defs feeding only already visited PHIs.
10152 2018-05-17  Richard Biener  <rguenther@suse.de>
10154         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10156 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10157             Richard Biener  <rguenther@suse.de>
10159         PR tree-optimization/85793
10160         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10161         for VMAT_ELEMENTWISE.
10163 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10165         * internal-fn.h (lookup_internal_fn): Declare
10166         * internal-fn.c (lookup_internal_fn): New function.
10167         * gimple.c (gimple_build_call_from_tree): Handle calls to
10168         internal functions.
10169         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10170         internal function names.
10171         * tree-pretty-print.c (dump_generic_node): Likewise.
10172         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10174 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10176         * gimple-fold.h (gimple_build): Make the function forms take
10177         combined_fn rather than built_in_function.
10178         (gimple_simplify): Likewise.
10179         * gimple-match-head.c (gimple_simplify): Likewise.
10180         * gimple-fold.c (gimple_build): Likewise.
10181         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10182         rather than gimple_build_call_internal.
10183         (get_initial_defs_for_reduction): Likewise.
10184         (vect_create_epilog_for_reduction): Likewise.
10185         (vectorizable_live_operation): Likewise.
10187 2018-05-17  Martin Liska  <mliska@suse.cz>
10189         * gimple-ssa-sprintf.c (format_directive): Do not use
10190         space in between 'G_' and '('.
10192 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10194         PR target/85323
10195         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10196         even if the mask is not all ones.
10198         PR target/85323
10199         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10200         vector.
10201         (ix86_gimple_fold_builtin): Likewise.
10203         PR target/85323
10204         * config/i386/i386.c: Include tree-vector-builder.h.
10205         (ix86_vector_shift_count): New function.
10206         (ix86_fold_builtin): Fold shift builtins by scalar count.
10207         (ix86_gimple_fold_builtin): Likewise.
10209         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10210         _mm512_setzero): New intrinsics.
10212 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10213             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10215         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10216         code generation for cases where splatting a value is not useful.
10217         * simplify-rtx.c (simplify_ternary_operation): Simplify
10218         vec_merge across a vec_duplicate and a paradoxical subreg forming
10219         a vector mode to a vec_concat.
10221 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10223         * config.gcc: Support "goldmont-plus".
10224         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10225         "goldmont-plus".
10226         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10227         PROCESSOR_GOLDMONT_PLUS.
10228         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10229         (processor_target_table): Add "goldmont-plus".
10230         (PTA_GOLDMONT_PLUS): Define.
10231         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10232         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10233         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10234         (fold_builtin_cpu): Add "goldmont-plus".
10235         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10236         (ix86_option_override_internal): Add "goldmont-plus".
10237         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10238         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10239         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10240         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10242 2018-05-17  Richard Biener  <rguenther@suse.de>
10244         PR tree-optimization/85757
10245         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10246         remove defs that only feed that PHI from further processing.
10248 2018-05-16  Jim Wilson  <jimw@sifive.com>
10250         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10251         asterisk to name.
10252         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10254 2018-05-16  Mark Wielaard  <mark@klomp.org>
10256         * dwarf2out.c (count_index_strings): New function.
10257         (output_indirect_strings): Call count_index_strings and generate
10258         header for dwarf_version >= 5.
10260 2018-05-16  Mark Wielaard  <mark@klomp.org>
10262         * dwarf2out.c (dwarf_FORM): New function.
10263         (set_indirect_string): Use dwarf_FORM.
10264         (reset_indirect_string): Likewise.
10265         (size_of_die): Likewise.
10266         (value_format): Likewise.
10267         (output_die): Likewise.
10268         (add_skeleton_AT_string): Likewise.
10269         (output_macinfo_op): Likewise.
10270         (index_string): Likewise.
10271         (output_index_string_offset): Likewise.
10272         (output_index_string): Likewise.
10273         (count_index_strings): Likewise.
10275 2018-05-16  Carl Love  <cel@us.ibm.com>
10277         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10278         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10280 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10282         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10283         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10285 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10287         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10288         (fnma<mode>4): Likewise.
10289         (fms<mode>4): Likewise.
10290         (fnms<mode>4): Likewise.
10291         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10292         (aarch64_fnma<mode>4): Likewise.
10293         (aarch64_fms<mode>4): Likewise.
10294         (aarch64_fnms<mode>4): Likewise.
10295         (aarch64_fnmadd<mode>4): Likewise.
10297 2018-05-16  Jason Merrill  <jason@redhat.com>
10299         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10301 2018-05-16  Richard Biener  <rguenther@suse.de>
10303         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10304         (dump_stmt_cost): Declare.
10305         (add_stmt_cost): Dump cost we add.
10306         (add_stmt_costs): New function.
10307         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10308         No longer exported.
10309         (vect_analyze_stmt): Adjust prototype.
10310         (vectorizable_condition): Likewise.
10311         (vectorizable_live_operation): Likewise.
10312         (vectorizable_reduction): Likewise.
10313         (vectorizable_induction): Likewise.
10314         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10315         cost vector to pass to vectorizable_ and record afterwards.
10316         (vect_model_reduction_cost): Take cost vector argument and adjust.
10317         (vect_model_induction_cost): Likewise.
10318         (vectorizable_reduction): Likewise.
10319         (vectorizable_induction): Likewise.
10320         (vectorizable_live_operation): Likewise.
10321         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10322         SLP_TREE_NUMBER_OF_VEC_STMTS.
10323         (vect_analyze_slp_cost_1): Remove.
10324         (vect_analyze_slp_cost): Likewise.
10325         (vect_slp_analyze_node_operations): Take visited args and
10326         a target cost vector.  Avoid processing already visited stmt sets.
10327         (vect_slp_analyze_operations): Use a local cost vector to gather
10328         costs and register those of non-discarded instances.
10329         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10330         (vect_schedule_slp_instance): Remove copying of
10331         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10332         zero.
10333         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10334         adding cost.  Record cost entry location.
10335         (vect_prologue_cost_for_slp_op): Function to compute cost of
10336         a constant or invariant generated for SLP vect in the prologue,
10337         split out from vect_analyze_slp_cost_1.
10338         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10339         (vect_model_promotion_demotion_cost): Likewise.
10340         (vect_model_store_cost): Likewise, make static.
10341         (vect_model_load_cost): Likewise.
10342         (vectorizable_bswap): Add cost vector arg and adjust.
10343         (vectorizable_call): Likewise.
10344         (vectorizable_simd_clone_call): Likewise.
10345         (vectorizable_conversion): Likewise.
10346         (vectorizable_assignment): Likewise.
10347         (vectorizable_shift): Likewise.
10348         (vectorizable_operation): Likewise.
10349         (vectorizable_store): Likewise.
10350         (vectorizable_load): Likewise.
10351         (vectorizable_condition): Likewise.
10352         (vectorizable_comparison): Likewise.
10353         (can_vectorize_live_stmts): Likewise.
10354         (vect_analyze_stmt): Likewise.
10355         (vect_transform_stmt): Adjust calls to vectorizable_*.
10356         * tree-vectorizer.c: Include gimple-pretty-print.h.
10357         (dump_stmt_cost): New function.
10359 2018-05-16  Richard Biener  <rguenther@suse.de>
10361         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10362         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10363         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10364         (check_name): New callback.
10365         (dse_classify_store): Track cycles via a visited bitmap of PHI
10366         defs and simplify handling of in-loop and across loop dead stores
10367         and properly fail for loop-variant refs.  Handle byte-tracking with
10368         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10369         limiting the walk.
10371 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10373         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10374         (vect_get_mask_type_for_stmt): Likewise.
10375         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10376         split out from...
10377         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10378         to determine the statement's vector type and the vector type that
10379         should be used for calculating nunits.  Deal with cases in which
10380         the type has to be deferred.
10381         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10382         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10383         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10384         (vect_determine_vf_for_stmt): New functions, split out from...
10385         (vect_determine_vectorization_factor): ...here.
10386         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10387         (vect_get_mask_type_for_stmt): New functions, split out from
10388         vect_determine_vectorization_factor.
10390 2018-05-16  Richard Biener  <rguenther@suse.de>
10392         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10393         verify the [VEC_]COND_EXPR embedded comparison.
10395 2018-05-15  Martin Sebor  <msebor@redhat.com>
10397         PR tree-optimization/85753
10398         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10399         RECORD_TYPE in addition to ARRAY_TYPE.
10401 2018-05-15  Martin Sebor  <msebor@redhat.com>
10403         PR middle-end/85643
10404         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10406 2018-05-15  Richard Biener  <rguenther@suse.de>
10408         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10409         add by_clobber_p one.  Change algorithm to collect all defs
10410         representing uses we need to walk and try reducing them to
10411         a single one before failing.
10412         (dse_dom_walker::dse_optimize_stmt): Adjust.
10414 2018-05-13  Mark Wielaard  <mark@klomp.org>
10416         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10417         (size_of_loc_descr): Likewise.
10418         (output_loc_operands): Likewise.
10419         (output_loc_operands_raw): Likewise.
10420         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10421         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10422         (hash_loc_operands): Likewise.
10423         (compare_loc_operands): Likewise.
10425 2018-05-14  Mark Wielaard  <mark@klomp.org>
10427         * dwarf2out.c (count_index_addrs): New function.
10428         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10430 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10432         PR tree-optimization/83648
10433         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10434         return value as malloc candidate.
10436 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10438         PR ipa/85734
10439         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10440         param as true in call to suggest_attribute.
10442 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10444         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10445         -mreadonly-in-sdata.
10447 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10449         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10450         New pattern.
10451         (aarch64_crypto_aesd_fused): Likewise.
10453 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10455         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10456         (movsi_aarch64): Likewise.
10457         (load_pairsi): Likewise.
10458         (load_pairdi): Likewise.
10459         (store_pairsi): Likewise.
10460         (store_pairdi): Likewise.
10461         (load_pairsf): Likewise.
10462         (load_pairdf): Likewise.
10463         (store_pairsf): Likewise.
10464         (store_pairdf): Likewise.
10465         (zero_extend): Likewise.
10466         (trunc): Swap alternatives.
10467         (fcvt_target): Add '?' to prefer w over r.
10469 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10471         PR target/85756
10472         * config/i386/i386.md: Disallow non-commutative arithmetics in
10473         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10474         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10475         in the peephole2 before it.
10477 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10479         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10480         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10481         (ix86_handle_option): Handle -mcldemote.
10482         * config.gcc: New header.
10483         * config/i386/cldemoteintrin.h: New file.
10484         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10485         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10486         -mcldemote.
10487         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10488         OPTION_MASK_ISA_CLDEMOTE.
10489         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10490         (ix86_valid_target_attribute_inner_p): Ditto.
10491         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10492         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10493         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10494         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10495         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10496         (cldemote): New.
10497         * config/i386/i386.opt: Add -mcldemote.
10498         * config/i386/x86intrin.h: New header.
10499         * doc/invoke.texi: Add -mcldemote.
10501 2018-05-14  Richard Biener  <rguenther@suse.de>
10503         * doc/match-and-simplify.texi: Adjust :s documentation.
10505 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10507         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10508         intended memcpy size.
10509         (REORDER_45): Likewise.
10511 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10513         * sort.cc: New file.
10514         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10515         * vec.c (qsort_chk): Use gcc_qsort.
10516         * Makefile.in (OBJS-libcommon): Add sort.o.
10517         (build/sort.o): New target.  Use it...
10518         (BUILD_RTL): ... here, and...
10519         (build/gencfn-macros): ... here, and...
10520         (build/genmatch): ... here.
10522 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10523             Chung-Ju Wu  <jasonwucj@gmail.com>
10525         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10526         * config/nds32/nds32-graywolf.md: New file.
10527         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10528         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10529         pipeline.
10530         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10531         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10532         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10533         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10534         * config/nds32/pipelines.md: Include n15 settings.
10536 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10537             Chung-Ju Wu  <jasonwucj@gmail.com>
10539         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10540         * config/nds32/nds32-n13.md: New file.
10541         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10542         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10543         pipeline.
10544         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10545         * config/nds32/nds32.md (pipeline_model): Add n13.
10546         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10547         * config/nds32/pipelines.md: Include n13 settings.
10549 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10550             Chung-Ju Wu  <jasonwucj@gmail.com>
10552         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10553         * config/nds32/nds32-n10.md: New file.
10554         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10555         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10556         pipeline.
10557         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10558         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10559         * config/nds32/nds32.md (pipeline_model): Add n10.
10560         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10561         * config/nds32/pipelines.md: Include n10 settings.
10563 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10564             Kito Cheng  <kito.cheng@gmail.com>
10565             Chung-Ju Wu  <jasonwucj@gmail.com>
10567         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10568         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10569         Add enum values for DSP extension instructions.
10570         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10571         New constraints.
10572         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10573         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10574         New code iterators.
10575         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10576         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10577         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10578         * config/nds32/nds32-intrinsic.md: Likewise.
10579         * config/nds32/nds32_intrinsic.h: Likewise.
10580         * config/nds32/nds32-md-auxiliary.c: Likewise.
10581         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10582         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10583         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10584         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10585         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10586         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10587         TYPE_DMAC in switch statement.
10588         * config/nds32/nds32.c: New checking and implementation for DSP
10589         extension instructions.
10590         * config/nds32/nds32.h: Likewise.
10591         * config/nds32/nds32.md: Likewise.
10592         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10593         * config/nds32/predicates.md: Implement new predicates for DSP
10594         extension.
10596 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10598         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10599         Reformat alternatives and attributes so it is easier to identify
10600         which constraints/attributes go with which instruction.
10601         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10602         (mov<mode>_softfloat32, FMOVE64): Likewise.
10603         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10604         (mov<mode>_softfloat64, FMOVE64): Likewise.
10606 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10608         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10609         subsection.
10610         (Basic PowerPC Built-in Functions): The new name of the
10611         subsection previously known as "PowerPC Built-in Functions".
10612         (Basic PowerPC Built-in Functions Available on all Configurations):
10613         New subsubsection.
10614         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10615         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10616         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10617         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10619 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10621         PR ipa/85655
10622         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10623         single const.
10625 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10627         PR target/85733
10628         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10630 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10632         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10633         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10634         (ix86_handle_option): Handle -mwaitpkg.
10635         * config.gcc: New header.
10636         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10637         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10638         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10639         function type.
10640         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10641         OPTION_MASK_ISA_WAITPKG.
10642         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10643         (ix86_option_override_internal): Add PTA_WAITPKG.
10644         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10645         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10646         IX86_BUILTIN_TPAUSE.
10647         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10648         __builtin_ia32_umwait and __builtin_ia32_tpause.
10649         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10650         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10651         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10652         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10653         UNSPECV_TPAUSE): New.
10654         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10655         * config/i386/i386.opt: Add -mwaitpkg.
10656         * config/i386/waitpkgintrin.h: New file.
10657         * config/i386/x86intrin.h: New header.
10658         * doc/invoke.texi: Add -mwaitpkg.
10660 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10662         PR target/85606
10663         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10664         equivalent.
10665         (cortex-m0): Use armv6s-m isa.
10666         (cortex-m0plus): Likewise.
10667         (cortex-m1): Likewise.
10668         (cortex-m0.small-multiply): Likewise.
10669         (cortex-m0plus.small-multiply): Likewise.
10670         (cortex-m1.small-multiply): Likewise.
10672 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10673             Jakub Jelinek  <jakub@redhat.com>
10675         PR tree-optimization/85692
10676         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10677         source permute as well.
10679 2018-05-11  Martin Liska  <mliska@suse.cz>
10681         PR sanitizer/85556
10682         * doc/extend.texi: Document LLVM style format for no_sanitize
10683         attribute.
10685 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10687         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10688         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10689         (mode_supports_vsx_dform_quad): Likewise.
10690         (mode_supports_vmx_dform): Move these functions to be next to the
10691         other mode_supports functions.
10692         (mode_supports_dq_form): Likewise.
10693         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10694         mode_supports_dq_form.
10695         (reg_offset_addressing_ok_p): Likewise.
10696         (offsettable_ok_by_alignment): Likewise.
10697         (rs6000_legitimate_offset_address_p): Likewise.
10698         (legitimate_lo_sum_address_p): Likewise.
10699         (rs6000_legitimize_address): Likewise.
10700         (rs6000_legitimize_reload_address): Likewise.
10701         (rs6000_secondary_reload_inner): Likewise.
10702         (rs6000_preferred_reload_class): Likewise.
10703         (rs6000_output_move_128bit): Likewise.
10705 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10707         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10708         Generate SImode target register for null target.
10709         <case IX86_BUILTIN_XGETBV>: Ditto.
10710         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10711         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10713 2018-05-10  Carl Love  <cel@us.ibm.com>
10715         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10716         dcbtt and dcbtstt if operands[2] is 0.
10718 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10720         PR target/85693
10721         * config/i386/sse.md (usadv64qi): New expander.
10723 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10725         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10726         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10727         -maltivec=be support.
10728         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10729         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10730         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10731         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10732         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10733         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10734         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10735         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10736         altivec_vsumsws): Adjust.
10737         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10738         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10739         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10740         support.
10741         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10742         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10743         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10744         (altivec_lve<VI_char>x): Delete expand.
10745         (*altivec_lve<VI_char>x_internal): Rename to...
10746         (altivec_lve<VI_char>x): ... this.
10747         (altivec_lvxl_<mode>): Delete expand.
10748         (*altivec_lvxl_<mode>_internal): Rename to ...
10749         (altivec_lvxl_<mode>): ... this.
10750         (altivec_stvxl_<mode>): Delete expand.
10751         (*altivec_stvxl_<mode>_internal): Rename to ...
10752         (altivec_stvxl_<mode>): ... this.
10753         (altivec_stve<VI_char>x): Delete expand.
10754         (*altivec_stve<VI_char>x_internal): Rename to ...
10755         (altivec_stve<VI_char>x): ... this.
10756         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10757         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10758         reduc_plus_scal_<mode>): Adjust.
10759         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10760         comment.
10761         (rs6000_cpu_cpp_builtins): Adjust.
10762         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10763         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10764         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10765         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10766         -maltivec=be support.
10767         (rs6000_split_vec_extract_var): Adjust.
10768         (rs6000_split_v4si_init): Adjust.
10769         (swap_selector_for_mode): Delete.
10770         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10771         altivec_expand_stvex_be): Delete.
10772         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10773         -maltivec=be support.
10774         (rs6000_gimple_fold_builtin): Ditto.
10775         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10776         Adjust.
10777         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10778         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10779         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10780         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10781         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10782         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10783         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10784         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10785         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10786         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10787         anonymous split): Adjust.
10788         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10789         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10791 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10793         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10794         when --with-gxx-include-dir is also specified.
10795         * configure: Regenerate.
10797 2018-05-09  Jim Wilson  <jimw@sifive.com>
10799         PR target/84797
10800         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10801         * config/riscv/t-withmultilib: New.
10802         * config/riscv/withmultilib.h: New.
10803         * doc/install.texi: Document RISC-V --with-multilib-list support.
10805 2018-05-09  Richard Biener  <rguenther@suse.de>
10807         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10808         vector.
10809         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10810         actual scalar cost using the cost vector and the add_stmt_cost
10811         machinery.
10813 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10815         PR rtl-optimization/85645
10816         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10817         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10819 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10821         PR rtl-optimization/85645
10822         * shrink-wrap.c (spread_components): Return a boolean saying if
10823         anything was changed.
10824         (try_shrink_wrapping_separate): Iterate spread_components until
10825         nothing changes anymore.
10827 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10829         PR rtl-optimization/85645
10830         * regrename.c (build_def_use): Also kill the chains that include the
10831         destination of a REG_CFA_REGISTER note.
10833 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10835         PR rtl-optimization/85645
10836         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10837         insn that has a REG_CFA_REGISTER note.
10839 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10841         * cfgexpand.c (expand_clobber): New function.
10842         (expand_gimple_stmt_1): Use it.
10843         * tree-vect-stmts.c (vect_clobber_variable): New function,
10844         split out from...
10845         (vectorizable_simd_clone_call): ...here.
10846         (vectorizable_store): Emit a clobber either side of an
10847         IFN_STORE_LANES sequence.
10848         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10850 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10852         PR target/85626
10853         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10854         (define_insn "trap_if_false"): Add exit after trap.
10856 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10858         PR rtl-optimization/85638
10859         * bb-reorder.c: Include common/common-target.h.
10860         (create_forwarder_block): New function extracted from...
10861         (fix_up_crossing_landing_pad): ...here.  Rename into...
10862         (dw2_fix_up_crossing_landing_pad): ...this.
10863         (sjlj_fix_up_crossing_landing_pad): New function.
10864         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10865         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10866         from both partitions and exit the loop after one iteration.
10868 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10870         Revert:
10871         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10872         subsection.
10873         (Basic PowerPC Built-in Functions): The new name of the
10874         subsection previously known as "PowerPC Built-in Functions".
10875         (Basic PowerPC Built-in Functions Available on all Configurations):
10876         New subsubsection.
10877         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10878         subsubsection.
10879         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10880         subsubsection.
10881         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10882         subsubsection.
10883         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10884         subsubsection.
10886 2018-05-08  Jim Wilson  <jimw@sifive.com>
10888         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10889         (LD_EMUL_SUFFIX): New.
10890         (LINK_SPEC): Use it.
10892 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10894         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10895         subsection.
10896         (Basic PowerPC Built-in Functions): The new name of the
10897         subsection previously known as "PowerPC Built-in Functions".
10898         (Basic PowerPC Built-in Functions Available on all Configurations):
10899         New subsubsection.
10900         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10901         subsubsection.
10902         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10903         subsubsection.
10904         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10905         subsubsection.
10906         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10907         subsubsection.
10909 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10911         PR target/85683
10912         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10913         after cmpelim optimization.
10915 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10917         * config.gcc: Support "goldmont".
10918         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10919         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10920         PROCESSOR_GOLDMONT.
10921         * config/i386/i386.c (m_GOLDMONT): Define.
10922         (processor_target_table): Add "goldmont".
10923         (PTA_GOLDMONT): Define.
10924         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10925         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10926         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10927         (fold_builtin_cpu): Add "goldmont".
10928         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10929         (ix86_option_override_internal): Add "goldmont".
10930         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10931         (processor_type): Add PROCESSOR_GOLDMONT.
10932         * config/i386/i386.md: Add CPU "glm".
10933         * config/i386/glm.md: New file.
10934         * config/i386/x86-tune.def: Add m_GOLDMONT.
10935         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10937 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10939         PR target/85572
10940         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10941         E_V4DImode.
10942         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10943         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10944         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10946         PR target/85317
10947         * config/i386/i386.c (ix86_fold_builtin): Handle
10948         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10950         PR target/85480
10951         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10952         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10954 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10956         PR target/85658
10957         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10958         (check_arch): Likewise.
10959         (check_fpu): Return the result rather than printing it.
10960         (end arch): Fix operator precedence.
10961         (end cpu): Likewise.
10962         (END): Print the result from check_fpu.
10964 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10965             Alan Hayward  <alan.hayward@arm.com>
10966             David Sherwood  <david.sherwood@arm.com>
10968         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10969         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10970         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10971         (*fcmuo<mode>_and): New patterns.
10973 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10975         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10976         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10977         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10978         (cmp_op, sve_imm_con): New code attributes.
10979         (SVE_COND_INT_CMP, imm_con): Delete.
10980         (cmp_op): Remove above unspecs from int attribute.
10981         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10982         to...
10983         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10984         comparison-specific unspecs.
10985         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10986         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10987         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10988         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10989         (*vec_fcm<cmp_op><mode>): Rename to...
10990         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10991         (*vec_fcmuo<mode>): Rename to...
10992         (*fcmuo<mode>): ...this and adjust likewise.
10993         (*pred_fcm<cmp_op><mode>): New pattern.
10994         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10995         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10996         functions.
10997         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10998         and UNORDERED.
10999         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11000         (aarch64_emit_sve_predicated_cond): New function.
11001         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11002         (aarch64_emit_unspec_cond_or): Replace with...
11003         (aarch64_emit_sve_or_conds): ...this new function.  Use
11004         aarch64_emit_sve_ptrue_op for the individual comparisons and
11005         aarch64_emit_binop to OR them together.
11006         (aarch64_emit_inverted_unspec_cond): Replace with...
11007         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11008         aarch64_emit_sve_ptrue_op for the comparison and
11009         aarch64_emit_unop to invert the result.
11010         (aarch64_expand_sve_vec_cmp_float): Update after the above
11011         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11013 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11015         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11016         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11017         (Backwards Compatibility): Likewise.
11019 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11021         PR bootstrap/85681
11022         Revert:
11023         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11025         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11026         <prefetch_dynamic_strides>: New const bool field.
11027         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11028         prefetch_dynamic_strides.
11029         (exynosm1_prefetch_tune): Likewise.
11030         (thunderxt88_prefetch_tune): Likewise.
11031         (thunderx_prefetch_tune): Likewise.
11032         (thunderx2t99_prefetch_tune): Likewise.
11033         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11034         to false.
11035         (aarch64_override_options_internal): Update to set
11036         PARAM_PREFETCH_DYNAMIC_STRIDES.
11037         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11038         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11039         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11040         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11041         prefetch-dynamic-strides setting.
11043         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11045         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11046         <minimum_stride>: New const int field.
11047         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11048         minimum_stride field.
11049         (exynosm1_prefetch_tune): Likewise.
11050         (thunderxt88_prefetch_tune): Likewise.
11051         (thunderx_prefetch_tune): Likewise.
11052         (thunderx2t99_prefetch_tune): Likewise.
11053         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11054         (aarch64_override_options_internal): Update to set
11055         PARAM_PREFETCH_MINIMUM_STRIDE.
11056         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11057         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11058         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11060         stride is constant and is below the minimum stride threshold.
11062 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11064         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11065         to 512.
11067 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11069         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11070         <prefetch_dynamic_strides>: New const bool field.
11071         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11072         prefetch_dynamic_strides.
11073         (exynosm1_prefetch_tune): Likewise.
11074         (thunderxt88_prefetch_tune): Likewise.
11075         (thunderx_prefetch_tune): Likewise.
11076         (thunderx2t99_prefetch_tune): Likewise.
11077         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11078         to false.
11079         (aarch64_override_options_internal): Update to set
11080         PARAM_PREFETCH_DYNAMIC_STRIDES.
11081         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11082         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11083         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11084         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11085         prefetch-dynamic-strides setting.
11087 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11089         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11090         <minimum_stride>: New const int field.
11091         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11092         minimum_stride field.
11093         (exynosm1_prefetch_tune): Likewise.
11094         (thunderxt88_prefetch_tune): Likewise.
11095         (thunderx_prefetch_tune): Likewise.
11096         (thunderx2t99_prefetch_tune): Likewise.
11097         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11098         (aarch64_override_options_internal): Update to set
11099         PARAM_PREFETCH_MINIMUM_STRIDE.
11100         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11101         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11102         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11103         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11104         stride is constant and is below the minimum stride threshold.
11106 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11108         PR c++/85659
11109         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11110         the type is addressable.  Don't force op into register if it has
11111         BLKmode.
11113 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11115         PR other/77609
11116         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11117         any section for which we don't know a specific type it should have,
11118         regardless of name.  Previously this was done only for the exact
11119         names ".init_array", ".fini_array", and ".preinit_array".
11120         (default_elf_asm_named_section): Add comment about
11121         relationship with default_section_type_flags and SECTION_NOTYPE.
11122         (get_section): Don't consider it a type conflict if one side has
11123         SECTION_NOTYPE and the other doesn't, as long as neither has the
11124         SECTION_BSS et al used in the default_section_type_flags logic.
11126 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11128         PR target/85653
11129         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11130         (workaround_barsyncs): New function.
11131         (nvptx_reorg): Use workaround_barsyncs.
11132         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11133         (define_expand "nvptx_membar_cta"): New define_expand.
11134         (define_insn "*nvptx_membar_cta"): New insn.
11136 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11138         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11139         To improve optimization opportunities.
11140         * builtin-types.def: The new needed builtin types for the above.
11142 2018-05-04  Richard Biener  <rguenther@suse.de>
11144         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11145         * gimple-ssa-store-merging.c
11146         (imm_store_chain_info::output_merged_store): Remove redundant create,
11147         release split_store vector contents on failure.
11148         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11149         scalar stmt vector on cache hit.
11151 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11153         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11154         Xilinx FP support.
11155         * config.gcc (powerpc-xilinx-eabi*): Remove.
11156         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11157         support.
11158         (fusion_addis_mem_combo_load): Ditto.
11159         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11160         FP support.
11161         (rs6000_cpu_cpp_builtins): Ditto.
11162         * config/rs6000/rs6000-linux.c
11163         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11164         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11165         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11166         support.
11167         (rs6000_setup_reg_addr_masks): Ditto.
11168         (rs6000_init_hard_regno_mode_ok): Ditto.
11169         (rs6000_option_override_internal): Ditto.
11170         (legitimate_lo_sum_address_p): Ditto.
11171         (rs6000_legitimize_address): Ditto.
11172         (rs6000_legitimize_reload_address): Ditto.
11173         (rs6000_legitimate_address_p): Ditto.
11174         (abi_v4_pass_in_fpr): Ditto.
11175         (setup_incoming_varargs): Ditto.
11176         (rs6000_gimplify_va_arg): Ditto.
11177         (rs6000_split_multireg_move): Ditto.
11178         (rs6000_savres_strategy): Ditto.
11179         (rs6000_emit_prologue_components): Ditto.
11180         (rs6000_emit_epilogue_components): Ditto.
11181         (rs6000_emit_prologue): Ditto.
11182         (rs6000_emit_epilogue): Ditto.
11183         (rs6000_elf_file_end): Ditto.
11184         (rs6000_function_value): Ditto.
11185         (rs6000_libcall_value): Ditto.
11186         * config/rs6000/rs6000.h: Ditto.
11187         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11188         (TARGET_MINMAX): ... this.  New.
11189         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11190         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11191         (*movsi_internal1_single): Delete.
11192         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11193         mfpu=, mxilinx-fpu): Delete.
11194         * config/rs6000/singlefp.h: Delete.
11195         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11196         * config/rs6000/t-rs6000: Ditto.
11197         * config/rs6000/t-xilinx: Delete.
11198         * config/rs6000/titan.md: Adjust for fp_type removal.
11199         * config/rs6000/vsx.md: Remove Xilinx FP support.
11200         (VStype_simple): Delete.
11201         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11202         * config/rs6000/xfpu.h: Delete.
11203         * config/rs6000/xfpu.md: Delete.
11204         * config/rs6000/xilinx.h: Delete.
11205         * config/rs6000/xilinx.opt: Delete.
11206         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11207         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11209 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11211         PR libgomp/85639
11212         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11213         if ignore == 0.
11215 2018-05-04  Richard Biener  <rguenther@suse.de>
11217         PR middle-end/85627
11218         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11219         (expand_complex_div_wide): Likewise.
11220         (expand_complex_operations_1): Likewise.
11221         (expand_complex_libcall): Preserve EH info of the original stmt.
11222         (tree_lower_complex): Handle removed blocks.
11223         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11224         on complex multiplication and division libcall builtins.
11226 2018-05-04  Richard Biener  <rguenther@suse.de>
11228         PR middle-end/85574
11229         * fold-const.c (negate_expr_p): Restrict negation of operand
11230         zero of a division to when we know that can happen without
11231         overflow.
11232         (fold_negate_expr_1): Likewise.
11234 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11236         PR libstdc++/85466
11237         * real.h (real_nextafter): Declare.
11238         * real.c (real_nextafter): New function.
11239         * fold-const-call.c (fold_const_nextafter): New function.
11240         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11241         CASE_CFN_NEXTTOWARD.
11242         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11243         even when arg1_mode is different from arg0_mode.
11245 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11247         * doc/extend.texi (Deprecated Features): Remove
11248         -ffriend-injection.
11249         (Backwards Compatibility): Likewise.
11250         * doc/invoke.texi (C++ Language Options): Likewise.
11251         (C++ Dialect Options): Likewise.
11253 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11255         PR target/85530
11256         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11257         _mm512_mask_mullox_epi64): New intrinsics.
11259 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11261         PR testsuite/85106
11262         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11263         dump files): Add offload-tree.
11265 2018-05-03  Richard Biener  <rguenther@suse.de>
11267         PR tree-optimization/85615
11268         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11269         to loops not nested in BBs loop father to avoid creating multi-entry
11270         loops.
11272 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11274         PR tree-optimization/70291
11275         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11276         arguments.  Change return type to tree.  Emit libcall as a new
11277         statement rather than replacing existing one when inplace_p is true.
11278         (expand_complex_multiplication_components): New function.
11279         (expand_complex_multiplication): Expand floating-point complex
11280         multiplication using the above.
11281         (expand_complex_division): Rename inner_type parameter to type.
11282         Update expand_complex_libcall call-site.
11283         (expand_complex_operations_1): Update expand_complex_multiplication
11284         and expand_complex_division call-sites.
11286 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11288         PR target/85582
11289         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11290         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11291         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11292         the highest significant bit of the shift count mask is clear.  In
11293         check whether and[sq]i3 is needed verify that all significant bits
11294         of the shift count other than the highest are set.
11296 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11298         PR libgomp/82428
11299         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11300         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11301         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11302         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11303         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11304         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11305         __builtin_goacc_parlevel_size.
11307 2018-05-02  Richard Biener  <rguenther@suse.de>
11309         PR tree-optimization/85597
11310         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11311         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11312         directly.
11314 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11316         PR testsuite/85106
11317         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11318         dump files): Add ltrans-tree.
11320 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11322         PR testsuite/85106
11323         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11324         dump files): Add wpa-ipa.
11326 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11328         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11329         powerpc*-*-linux*paired* target.
11330         * config/rs6000/750cl.h: Delete.
11331         * config/rs6000/paired.h: Delete.
11332         * config/rs6000/paired.md: Delete.
11333         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11334         float support.
11335         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11336         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11337         comment.  Remove paired float support.
11338         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11339         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11340         VECTOR_PAIRED.
11341         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11342         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11343         declarations.
11344         * config/rs6000/rs6000.c: Remove paired float support.
11345         (paired_expand_vector_init, paired_expand_vector_move,
11346         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11347         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11348         paired_expand_builtin, paired_expand_predicate_builtin,
11349         paired_init_builtins): Delete.
11350         * config/rs6000/rs6000.h: Remove paired float support.
11351         * config/rs6000/rs6000.md: Remove paired float support.
11352         (move_from_CR_ov_bit): Delete.
11353         * config/rs6000/rs6000.opt (mpaired): Delete.
11354         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11355         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11357 2018-05-02  Richard Biener  <rguenther@suse.de>
11359         PR middle-end/85567
11360         * gimplify.c (gimplify_save_expr): When in SSA form allow
11361         SAVE_EXPRs to compute to SSA vars.
11363 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11365         PR target/85582
11366         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11367         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11368         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11369         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11371 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11373         PR tree-optimization/85586
11374         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11375         exit early for statements in the same group if the accesses are
11376         not strided.
11378 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11380         PR lto/85451
11381         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11382         error message.
11384 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11386         PR tree-optimization/85143
11387         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11389 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11391         PR lto/85451
11392         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11393         not found" error message.
11395 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11397         PR other/83786
11398         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11399         * vec.c (test_ordered_remove_if): New function.
11400         (vec_c_tests): Call test_ordered_remove_if.
11401         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11402         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11403         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11404         VEC_ORDERED_REMOVE_IF.
11406 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11408         PR tree-optimization/82665
11409         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11410         pointer subtraction where arguments come from a memchr call.
11412 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11414         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11415         --push-state --as-needed and --pop-state instead of --as-needed and
11416         --no-as-needed if ld supports it.
11417         * configure: Regenerated.
11419         PR web/85578
11420         * doc/install.texi2html: Replace _002d with - and _002a with * in
11421         generated html files using sed.
11423 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11425         PR c++/85523
11426         * gcc-rich-location.c (blank_line_before_p): New function.
11427         (use_new_line): New function.
11428         (gcc_rich_location::add_fixit_insert_formatted): New function.
11429         * gcc-rich-location.h
11430         (gcc_rich_location::add_fixit_insert_formatted): New function.
11432 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11434         * selftest.c (assert_streq): Rename "expected" and "actual" to
11435         "val1" and "val2".  Extend NULL-handling to cover both inputs
11436         symmetrically, while still requiring both to be non-NULL for a pass.
11437         * selftest.h (assert_streq): Rename "expected" and "actual" to
11438         "val1" and "val2".
11439         (ASSERT_EQ): Likewise.
11440         (ASSERT_EQ_AT): Likewise.
11441         (ASSERT_KNOWN_EQ): Likewise.
11442         (ASSERT_KNOWN_EQ_AT): Likewise.
11443         (ASSERT_NE): Likewise.
11444         (ASSERT_MAYBE_NE): Likewise.
11445         (ASSERT_MAYBE_NE_AT): Likewise.
11446         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11447         the assertion to pass.
11448         (ASSERT_STREQ_AT): Likewise.
11450 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11452         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11453         interaction with -pie.
11455 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11457         * selftest.h: Fix alphabetization of per-source-file selftest
11458         declarations.
11460 2018-04-30  Jason Merrill  <jason@redhat.com>
11462         PR c++/61982 - dead stores to destroyed objects.
11463         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11464         of clobber.
11466 2018-04-30  Jason Merrill  <jason@redhat.com>
11468         * tree.c (build_clobber): New.
11469         * tree.h: Declare it.
11470         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11472 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11474         * diagnostic-show-locus.c (layout::layout): Update for
11475         location_get_source_line returning a char_span.
11476         (struct char_span): Move to input.h.
11477         (struct correction): Update for fields in char_span becoming
11478         private.
11479         (struct source_line): Update for location_get_source_line
11480         returning a char_span.
11481         (layout::print_line): Likewise.
11482         * edit-context.c (edited_file::print_content): Likewise.
11483         (edited_file::print_diff_hunk): Likewise.
11484         (edited_file::print_run_of_changed_lines): Likewise.
11485         (edited_file::get_num_lines): Likewise.
11486         (edited_line::edited_line): Likewise.
11487         * final.c (asm_show_source): Likewise.
11488         * input.c (location_get_source_line): Convert return type
11489         from const char * to char_span, losing the final "line_len"
11490         param.
11491         (dump_location_info): Update for the above.
11492         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11493         when handling the literal within the line.
11494         (test_reading_source_line): Update for location_get_source_line
11495         returning a char_span.
11496         * input.h (class char_span): Move here from
11497         diagnostic-show-locus.c, converting from a struct to a class.
11498         Make data members private.
11499         (char_span::operator bool): New.
11500         (char_span::length): New.
11501         (char_span::get_buffer): New.
11502         (char_span::operator[]): New.
11503         (char_span::subspan): Make const.
11504         (char_span::xstrdup): New.
11505         (location_get_source_line): Convert return type from const char *
11506         to char_span, losing the final "line_size" param.
11508 2018-04-30  Jan Hubicka  <jh@suse.cz>
11510         * lto-wrapper.c (ltrans_priorities): New static var.
11511         (cmp_priority): New.
11512         (run_gcc): Read priorities and if doing parallel build order
11513         the Makefile by them.
11515 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11517         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11519 2018-04-30  Richard Biener  <rguenther@suse.de>
11521         * tree-cfg.c (verify_address): Remove base argument, add
11522         flag whether to check TREE_ADDRESSABLE and do that.
11523         (verify_expr): Remove.
11524         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11525         (verify_gimple_assign_single): Likewise.
11526         (verify_gimple_switch): Likewise.
11527         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11528         piece from verify_expr.
11529         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11531 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11533         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11535 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11537         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11538         (small_data_pattern): Likewise.
11539         (arc_rewrite_small_data): Likewise.
11540         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11541         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11542         (get_symbol_alignment): New function.
11543         (legitimate_small_data_address_p): Likewise.
11544         (legitimate_scaled_address): Update, call
11545         legitimate_small_data_address_p.
11546         (output_sdata): New static variable.
11547         (arc_print_operand): Update how we handle small data operands.
11548         (arc_print_operand_address): Likewise.
11549         (arc_legitimate_address_p): Update, use
11550         legitimate_small_data_address_p.
11551         (arc_rewrite_small_data_p): Remove.
11552         (arc_rewrite_small_data_1): Likewise.
11553         (arc_rewrite_small_data): Likewise.
11554         (small_data_pattern): Likewise.
11555         (compact_sda_memory_operand): Update to use
11556         legitimate_small_data_address_p and get_symbol_alignment.
11557         (prepare_move_operands): Don't rewite sdata pattern.
11558         (prepare_extend_operands): Remove.
11559         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11560         pattern.
11561         (zero_extendqisi2): Likewise.
11562         (zero_extendhisi2): Likewise.
11563         (extendqihi2): Likewise.
11564         (extendqisi2): Likewise.
11565         (extendhisi2): Likewise.
11566         (addsi3): Likewise.
11567         (subsi3): Likewise.
11568         (andsi3): Likewise.
11569         * config/arc/constraints.md (Usd): Change it to memory constraint.
11571 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11573         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11574         as source of std instructions.
11575         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11576         allow 6-bit constants as source for store instructions.
11577         (movdi_insn): Update instruction pattern to allow 6-bit constants
11578         as source for store instructions.
11580 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11582         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11584 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11585             Sandra Loosemore <sandra@codesourcery.com>
11587         * dumpfile.c (dump_open): Allow '-' for stdout.
11588         * doc/invoke.texi (Developer Options): Document dump filename
11589         determination early.  Document stdin/stdout selection.
11591 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11593         Microblaze Target: PIC data text relative
11595         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11596         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11597         Add declaration.
11598         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11599         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11600         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11601         New addressing mode for data-text relative position indepenedent code.
11602         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11603         'ADDRESS_SYMBOLIC_TXT_REL'.
11604         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11605         (microblaze_legitimate_pic_operand): Exclude function calls from
11606         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11607         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11608         addresses cases.
11609         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11610         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11611         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11612         for 'address + offset'.
11613         (microblaze_expand_prologue): Add new function prologue call for
11614         'r20' assignation.
11615         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11616         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11617         table in case of TARGET_PIC_DATA_TEXT_REL.
11618         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11619         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11620         Add new macros 'UNSPEC_TEXT',
11621         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11622         + exclude function calls from 'UNSPEC_PLT' in case of data text
11623         relative mode.
11624         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11625         new target hook for generating address diff vector tables in case of
11626         flag_pic.
11627         * doc/tm.texi : Regenerate.
11628         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11629         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11630         of addr diff vector generation.
11631         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11632         target hook definition.
11633         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11634         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11635         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11636         option for data text relative.
11638 2018-04-30  Richard Biener  <rguenther@suse.de>
11640         * tree-chrec.h (evolution_function_is_constant_p): Remove
11641         redundant check.
11642         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11644 2018-04-30  Richard Biener  <rguenther@suse.de>
11646         PR bootstrap/85571
11647         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11649 2018-04-30  Richard Biener  <rguenther@suse.de>
11651         PR tree-optimization/28364
11652         PR tree-optimization/85275
11653         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11654         copying first exit test.
11656 2018-04-28  Mark Wielaard  <mark@klomp.org>
11658         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11659         dwarf_version >= 5.
11660         (dwarf_AT): Handle DW_AT_addr_base.
11661         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11663 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11665         PR target/84431
11666         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11667         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11668         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11669         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11671 2018-04-28  Richard Biener  <rguenther@suse.de>
11673         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11674         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11675         to reflect use.  Only add interesting stmts.
11677 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11679         PR ipa/85549
11680         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11681         the jump function allows for passing through aggregate values.
11683 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11685         * input.h (in_system_header_at): Convert from macro to inline
11686         function.
11687         (from_macro_expansion_at): Likewise.
11688         (from_macro_definition_at): Likewise.
11690 2018-04-27  Jeff Law  <law@redhat.com>
11692         * config.gcc: Mark tile* targets as deprecated/obsolete.
11694 2018-04-27  Richard Biener  <rguenther@suse.de>
11696         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11697         fix for ILP32.
11699 2018-04-27  Richard Biener  <rguenther@suse.de>
11701         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11703 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11705         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11706         with Yd constraint. Set "preferred_for_speed" attribute from
11707         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11708         with Yd constraint.
11709         (*movdi_internal): Ditto.
11710         (movti_interunit splitters): Remove
11711         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11712         (movdi_interunit splitters): Ditto.
11713         * config/i386/constraints.md (Ye): Remove.
11714         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11716 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11718         PR target/85512
11719         * config/aarch64/constraints.md (Usg): Limit to 31.
11720         (Usj): Limit to 63.
11722 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11724         PR tree-optimization/85529
11725         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11726         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11727         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11728         zero extension or masking of the MSB bit.
11729         (optimize_range_tests): Add FIRST_BB argument, pass it through
11730         to optimize_range_tests_var_bound.
11731         (maybe_optimize_range_tests, reassociate_bb): Adjust
11732         optimize_range_tests callers.
11734 2018-04-26  Richard Biener  <rguenther@suse.de>
11735             Jakub Jelinek  <jakub@redhat.com>
11737         * cgraph.h (symbol_table): Just declare debug method here.
11738         * symtab.c (symbol_table::debug): Define.
11740 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11742         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11744 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11746         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11747         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11748         (*movdi_internal): Substitute Yi and Yj constraint with x
11749         and Ym and Yn constraint with y constraint.  Update "isa"
11750         attribute and set "preferred_for_speed" attribute from
11751         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11752         (*movsi_internal): Ditto.
11753         (*movdf_internal): Ditto.
11754         (*movsf_internal): Ditto.
11755         (*zero_extendsidi2): Ditto.
11756         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11757         (sse2_loadld): Ditto.
11758         (*vec_extract<ssevecmodelower>_0): Ditto.
11759         (*vec_extractv4si_0_zext_sse4): Ditto.
11760         (vec_concatv2di): Ditto.
11761         (*vec_dup<mode>): Ditto.
11762         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11763         * config/i386/constraints.md (Yi): Remove.
11764         (Yj): Remove.
11765         (Ym): Remove.
11766         (Yn): Remove.
11768 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11770         * dumpfile.c (dump_open): New.
11771         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11772         (dump_finish): Detect stdio/stderr by value not name.
11774 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11776         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11778 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11780         PR target/84952
11781         * config/nvptx/nvptx.c (verify_neutering_jumps)
11782         (verify_neutering_labels): New function
11783         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11785 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11787         PR target/84025
11788         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11789         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11790         need neutering.
11792 2018-04-26  Richard Biener <rguenther@suse.de>
11793             Tom de Vries  <tom@codesourcery.com>
11795         PR lto/85422
11796         * lto-streamer-out.c (output_function): Fixup loops if required to match
11797         discovery done in the reader.
11799 2018-04-26  Richard Biener  <rguenther@suse.de>
11801         PR tree-optimization/85116
11802         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11803         have a loop exit from the single latch predecessor.  Remove
11804         case of header with just condition.
11805         (ch_base::copy_headers): Exclude infinite loops from any
11806         processing.
11807         (pass_ch::execute): Record exits.
11809 2018-04-26  Richard Biener  <rguenther@suse.de>
11811         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11812         prologue cost vector and pass it to vect_get_load_cost.
11813         (vect_get_peeling_costs_all_drs): Likewise.
11814         (vect_peeling_hash_get_lowest_cost): Likewise.
11815         (vect_enhance_data_refs_alignment): Likewise.
11817 2018-04-26  Richard Biener  <rguenther@suse.de>
11819         PR middle-end/85450
11820         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11821         checking of integer<->pointer conversions.
11822         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11823         sign-/zero-extending pointer types.
11824         (expand_omp_for_static_chunk): Likewise.
11826 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11827             Jean Lee  <xiaoyur347@gmail.com>
11829         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11830         (TARGET_ASAN_SHADOW_OFFSET): Define.
11831         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11832         true for -fsanitize=address.
11834 2018-04-25  Mark Wielaard  <mark@klomp.org>
11836         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11837         shorter ones.
11839 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11841         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11842         than "alu", remove explicit "memory" and "imm_disp" attributes.
11843         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11845         PR middle-end/85414
11846         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11847         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11848         gen_lowpart_no_emit.
11850 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11852         PR target/85473
11853         * config/i386/i386.c (ix86_expand_builtin): Change memory
11854         operand to XI, extend p0 to Pmode.
11855         * config/i386/i386.md: Change unspec volatile and operand
11856         1 mode to XI, change operand 0 mode to P.
11858 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11860         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11861         GET_MODE_MASK before any checking.
11862         (nds32_can_use_bset_p): Likewise.
11863         (nds32_can_use_btgl_p): Likewise.
11865 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11867         * config/nds32/nds32-doubleword.md: New define_split pattern for
11868         illegal register number.
11870 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11872         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11874 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11876         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11878 2018-04-25  Richard Biener  <rguenther@suse.de>
11880         * lto-streamer.h (LTO_major_version): Bump to 8.
11882 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11884         * BASE-VER: Set to 9.0.0.
11886 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11888         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11889         in __abskf2 and __powikf2.
11891 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11893         PR target/85512
11894         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11895         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11896         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11897         Use the above on operand 2.  Reindent.
11898         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11900 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11902         PR target/85485
11903         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11904         handle OPT_mcet.
11905         * config/i386/i386.opt (mcet): Removed.
11906         * doc/install.texi: Remove -mcet documentation.
11907         * doc/invoke.texi: Likewise.
11909 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11911         PR target/85485
11912         * doc/install.texi: Remove -mcet from bootstrap-cet.
11914 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11916         PR target/85511
11917         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11918         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11919         if TARGET_64BIT.
11921         PR target/85503
11922         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11923         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11924         containing a CONST_VECTOR.
11926 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11928         * doc/install.texi: Update newlib dependency for nvptx.
11930 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11932         PR target/85508
11933         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11934         instead of INTVAL when shifting x left.
11936 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11938         PR tree-optimization/85478
11939         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11940         vect_grouped_store_supported for single element vectors.
11942 2018-04-24  Richard Biener  <rguenther@suse.de>
11944         PR target/85491
11945         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11946         load cost increase to the case of non-constant step.
11948 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11950         PR target/84828
11951         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11952         destination if any_malformed_asm.
11954 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11956         PR middle-end/85496
11957         * expr.c (store_field): In the bitfield case, if the value comes from
11958         a function call and is returned in registers by means of a PARALLEL,
11959         do not change the mode of the temporary unless BLKmode and VOIDmode.
11961 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11963         PR rtl-optimization/85423
11964         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11965         dependencies to debug insns when the previous insn is non-debug.
11967 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11969         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11970         enums into a single definition.
11971         (fls): Fix predicates and printing.
11972         (seti): Likewise.
11974 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11976         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11977         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11978         and short u6 immediate.
11979         (check_if_valid_sleep_operand): Remove.
11980         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11982 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11984         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11985         flag_always_save_lp condition.
11986         * config/nds32/nds32.opt (malways-save-lp): New option.
11988 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11990         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11991         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11992         * config/nds32/nds32.h
11993         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11994         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11996 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11998         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11999         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12001 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12002             Chung-Ju Wu  <jasonwucj@gmail.com>
12004         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12005         Declare.
12006         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12007         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12009 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12011         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12013 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12015         * config/nds32/nds32-protos.h (nds32_data_alignment,
12016         nds32_local_alignment): Declare.
12017         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12018         nds32_local_alignment): New functions.
12019         (TARGET_CONSTANT_ALIGNMENT): Define.
12020         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12022 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12024         * config/nds32/nds32.c
12025         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12026         (TARGET_MODES_TIEABLE_P): Likewise.
12028 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12030         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12031         level Ofast and Og.
12033 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12034             Chung-Ju Wu  <jasonwucj@gmail.com>
12036         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12037         for unaligned access.
12038         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12039         unaligned access.
12040         * config/nds32/nds32-intrinsic.md: Likewise.
12041         * config/nds32/nds32_intrinsic.h: Likewise.
12042         * config/nds32/nds32.h (nds32_builtins): Likewise.
12043         * config/nds32/nds32.opt (munaligned-access): New option.
12044         * config/nds32/nds32.c (nds32_asm_file_start): Display
12045         flag_unaligned_access status.
12047 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12049         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12050         -mno-relax is present.
12051         * config/riscv/linux.h (LINK_SPEC): Ditto.
12053 2018-04-20  Martin Sebor  <msebor@redhat.com>
12055         PR c/85365
12056         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12057         for null pointers.
12058         (gimple_fold_builtin_stxcpy_chk): Same.
12059         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12061 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12063         PR target/85456
12064         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12065         __powikf2 when long double is IEEE 128-bit.
12067 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12069         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12070         step to make sure stack always aligned.
12072 2018-04-20  Carl Love  <cel@us.ibm.com>
12074         PR target/83402
12075         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12076         size check for arg0.
12078 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12079             Tom de Vries  <tom@codesourcery.com>
12081         PR target/85445
12082         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12083         Emit insns for calls too.
12084         (nvptx_find_par): Always look for worker-level predecessor insn.
12085         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12086         calls.
12087         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12088         (nvptx_process_pars): Propagate frames for calls.
12090 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12092         PR target/85469
12093         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12094         Removed.
12095         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12096         (ix86_handle_option): Don't handle OPT_mibt.
12097         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12098         __SHSTK__.
12099         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12100         has_ibt and ibt.
12101         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12102         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12103         (ix86_target_macros): Define __CET__ with flag_cf_protection
12104         for -fcf-protection.
12105         * config/i386/i386.c (isa2_opts): Remove -mibt.
12106         * config/i386/i386.h (TARGET_IBT): Removed.
12107         (TARGET_IBT_P): Likewise.
12108         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12109         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12110         * config/i386/i386.opt (mcet): Update help message.
12111         (mshstk): Likewise.
12112         (mibt): Removed.
12113         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12114         -mcet as an alias for -mshstk.
12116 2018-04-20  Richard Biener <rguenther@suse.de>
12118         PR middle-end/85475
12119         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12120         complexity by forcing a single use of the multiply operand.
12122 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12124         ipa/85449
12125         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12126         recursion dependency to only apply to non-clones.
12128 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12130         ipa/85447
12131         * ipa-cp.c (create_specialized_node): Check that clones of
12132         self-recursive edges exist during IPA-CP.
12134 2018-04-19  Toon Moene  <toon@moene.org>
12136         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12137         by -O3.
12139 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12141         PR tree-optimization/85467
12142         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12143         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12144         VECTOR_CST element to type.
12146 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12148         PR target/85397
12149         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12150         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12151         (builtin_longjmp): Likewise.
12152         (save_stack_nonlocal): New pattern.
12153         (restore_stack_nonlocal): Likewise.
12155 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12157         PR target/85404
12158         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12159         Replace ASM_OUTPUT_LABEL with fprintf.
12161 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12163         PR target/85417
12164         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12165         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12166         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12167         define __IBT__ and __SHSTK__ for -fcf-protection.
12168         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12169         TARGET_IBT.
12170         (ix86_trampoline_init): Likewise.
12171         (x86_output_mi_thunk): Likewise.
12172         (ix86_notrack_prefixed_insn_p): Likewise.
12173         (ix86_option_override_internal): Don't disallow -fcf-protection.
12174         * config/i386/i386.md (rdssp<mode>): Also enable for
12175         -fcf-protection.
12176         (incssp<mode>): Likewise.
12177         (nop_endbr): Likewise.
12178         * config/i386/i386.opt (mcet): Change help message to built-in
12179         functions only.
12180         (mibt): Likewise.
12181         (mshstk): Likewise.
12182         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12183         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12184         enable CET built-in functions.
12186 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12188         * common/config/i386/i386-common.c
12189         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12190         OPTION_MASK_ISA_MOVDIRI_UNSET,
12191         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12192         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12193         * config.gcc (movdirintrin.h): New header.
12194         * config/i386/cpuid.h (bit_MOVDIRI,
12195         bit_MOVDIR64B): New bits.
12196         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12197         and -mmvodir64b.
12198         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12199         (VOID, PVOID, PCVOID)): New function types.
12200         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12201         __builtin_ia32_directstoreu_u64,
12202         __builtin_ia32_movdir64b): New builtins.
12203         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12204         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12205         and -mmovdiri.
12206         (ix86_valid_target_attribute_inner_p): Ditto.
12207         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12208         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12209         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12210         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12211         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12212         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12213         (movdiri<mode>, movdir64b_<mode>): New.
12214         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12215         * config/i386/immintrin.h: Include movdirintrin.h.
12216         * config/i386/movdirintrin.h: New file.
12217         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12219 2018-04-19  Richard Biener  <rguenther@suse.de>
12221         PR middle-end/85455
12222         * cfg.c (clear_bb_flags): When loop state says we have
12223         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12225 2018-04-19  Richard Biener  <rguenther@suse.de>
12227         PR tree-optimization/84737
12228         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12229         copying restrict info.
12230         (vect_setup_realignment): Use it.
12231         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12232         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12233         the first DR to all generated stores.
12234         (vectorizable_load): Likewise for loads.
12236 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12238         PR tree-optimization/85446
12239         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12240         the integral and pointer types to have the same precision.
12242         * doc/install.texi: Document --disable-cet being the default and
12243         --enable-cet=auto.
12245 2018-04-18  Martin Liska  <mliska@suse.cz>
12247         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12248         style.
12250 2018-04-18  Martin Liska  <mliska@suse.cz>
12252         Revert
12253         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12255         PR ipa/83983
12256         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12257         arguments if they are comparable.
12259 2018-04-18  Martin Liska  <mliska@suse.cz>
12261         Revert
12262         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12264         PR lto/84805
12265         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12266         incomplete types.
12268 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12270         PR target/85388
12271         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12272         ENDBR after calling __morestack.
12274 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12276         PR jit/85384
12277         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12278         by using gcc_base_ver to generate a gcc_driver_version, and use
12279         it when generating GCC_DRIVER_NAME.
12280         * configure: Regenerate.
12282 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12284         PR target/81084
12285         * config.gcc: Obsolete powerpc*-*-*spe*.
12287 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12289         PR debug/84637
12290         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12291         (stabstr_D): Change type of unum from unsigned int to
12292         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12293         type.
12295 2018-04-17  Jim Wilson  <jimw@sifive.com>
12297         PR 84856
12298         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12299         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12300         Set arg_pointer_offset after using pretend_args_size.
12302 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12304         PR rtl-optimization/85431
12305         * dse.c (record_store): Ignore zero width stores.
12307         PR sanitizer/85230
12308         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12309         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12310         __builtin_stack_restore rather than after it.
12311         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12312         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12313         argument instead of virtual_dynamic_stack_rtx.
12315 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12317         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12318         New prototype.
12319         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12320         Add note to error message to explain internal mapping of overloaded
12321         built-in function name to non-overloaded built-in function name.
12322         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12323         function.
12325 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12327         PR target/85424
12328         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12329         where the inputs overlap with the output.
12331 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12333         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12334         (=v, v) alternative and explicit "memory" attribute.
12335         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12336         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12337         attributes.
12338         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12339         "sselog1" type instead of "sselog".
12340         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12341         "sselog".  Remove explicit "memory" attribute.
12342         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12343         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12344         attributes.
12345         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12346         "sselog1" type instead of "sselog".  Remove explicit "memory"
12347         attribute.
12348         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12349         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12350         attribute.
12351         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12352         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12353         attributes.
12354         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12355         "sselog1" type instead of "sselog".  Remove explicit "memory"
12356         attribute.
12357         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12358         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12359         attribute.
12361         PR target/85430
12362         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12364         PR middle-end/85414
12365         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12366         on a SUBREG.
12368 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12370         PR ipa/85421
12371         * ipa-cp.c (create_specialized_node): Call
12372         expand_all_artificial_thunks if necessary.
12374 2018-04-17  Martin Liska  <mliska@suse.cz>
12376         PR lto/85405
12377         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12378         in message, remote space in between '_G' and '('.
12380 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12382         PR target/85281
12383         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12384         avx512f_vmcmp<mode>3<round_saeonly_name>,
12385         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12386         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12387         avx512f_rndscale<mode><round_saeonly_name>,
12388         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12389         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12390         Use %<iptr>2 instead of %2 for -masm=intel.
12391         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12392         avx512f_vcvttss2usi<round_saeonly_name>,
12393         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12394         -masm=intel.
12395         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12396         avx512f_vcvttsd2usi<round_saeonly_name>,
12397         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12398         Use %q1 instead of %1 for -masm=intel.
12399         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12400         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12401         of %3 for -masm=intel.
12402         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12403         -masm=intel.
12404         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12405         -masm=intel.
12406         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12407         -masm=intel.
12408         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12409         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12410         %g1.
12411         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12412         -masm=intel.
12413         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12414         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12415         %g1 and one with %0 and %1.
12416         (avx512er_vmrcp28<mode><round_saeonly_name>,
12417         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12418         %1 for -masm=intel.
12419         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12420         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12421         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12422         of %0 and %{%4%} for -masm=intel.
12423         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12424         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12425         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12426         order of %0 and %{%5%}%{z%} for -masm=intel.
12428 2018-04-17  Jan Hubicka  <jh@suse.cz>
12430         PR lto/85405
12431         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12433 2018-04-17  Martin Liska  <mliska@suse.cz>
12435         PR ipa/85329
12436         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12437         for target_clone error message.  Make default implementation
12438         clone to be a local declaration.
12439         (separate_attrs): Add new argument and check for an empty
12440         string.
12441         (expand_target_clones): Handle it.
12442         (ipa_target_clone): Make redirection just for target_clones
12443         functions.
12445 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12446             Tom de Vries  <tom@codesourcery.com>
12448         PR middle-end/84955
12449         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12450         tiled basic blocks without omp continue statements.
12452 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12454         PR target/83660
12455         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12456         vec_extract expression as having side effects to make sure it gets
12457         a cleanup point.
12459 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12461         PR target/85403
12462         * config/i386/i386.c (get_builtin_code_for_version): Check
12463         error_mark_node.
12465 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12467         PR target/84331
12468         * config.gcc: Support "skylake".
12469         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12470         PROCESSOR_SKYLAKE.
12471         * config/i386/i386.c (m_SKYLAKE): Define.
12472         (processor_target_table): Add "skylake".
12473         (ix86_option_override_internal): Add "skylake".
12474         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12475         PROCESSOR_CANNONLAKE.
12476         (get_builtin_code_for_version): Fix priority for
12477         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12478         PROCESSOR_SKYLAKE-AVX512.
12479         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12480         (processor_type): Add PROCESSOR_SKYLAKE.
12482 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12483             Jason Merrill  <jason@redhat.com>
12485         PR c++/85112
12486         * convert.c (convert_to_integer_1): Use direct recursion for
12487         enumeral types and types with a precision less than the number
12488         of bits in their mode.
12490 2018-04-16  Julia Koval  <julia.koval@intel.com>
12492         PR target/84413
12493         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12494         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12496 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12498         PR target/85293
12499         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12500         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12501         and -mno-direct-move.
12503 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12505         PR target/83402
12506         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12507         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12508         Ensure negative shifts result in {0}.
12510 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12512         PR rtl-optimization/79916
12513         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12514         regs (if any) to define how to gnerate SD moves when LRA is in
12515         progress.
12517 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12519         PR rtl-optimization/85393
12520         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12521         * except.c (expand_dw2_landing_pad_for_region): Make static.
12522         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12523         a label and unconditional jump to old_bb, rather than
12524         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12525         basic block.
12527         PR rtl-optimization/85376
12528         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12529         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12530         instead of a specific value.
12532 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12533             Bin Cheng  <bin.cheng@arm.com>
12535         PR tree-optimization/82965
12536         PR tree-optimization/83991
12537         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12538         by_profile_only parameter.
12539         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12540         information if the loop was predicted to iterate too many times.
12541         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12543 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12545         PR lto/71991
12546         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12547         always inline.
12549 2018-04-13  Martin Liska  <mliska@suse.cz>
12550             Jakub Jelinek  <jakub@redhat.com>
12552         PR middle-end/81657
12553         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12554         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12555         * builtins.c (expand_builtin_memory_copy_args): Use
12556         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12557         handle dest_addr == pc_rtx.
12559 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12561         PR target/85291
12562         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12563         asked to not generate direct moves.
12564         (fix_trunc<mode>si2_stfiwx): Similar.
12565         (fix_trunc<mode>si2_internal): Similar.
12567 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12569         PR debug/83157
12570         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12571         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12572         lookup if dest in some wider mode is known to be const0_rtx and
12573         if so, record permanent equivalence for it to be ZERO_EXTEND of
12574         the narrower mode destination.
12576 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12578         * lto-streamer-out.c (output_function): Revert 259346.
12579         * omp-expand.c (expand_oacc_for): Likewise.
12581 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12583         PR rtl-optimization/85354
12584         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12585         * sel-sched.c (sel_global_init): ... here.
12587 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12589         PR target/85238
12590         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12591         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12592         mode for PE-COFF targets.
12593         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12594         (i386_pe_asm_lto_end): Likewise.
12595         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12596         (TARGET_ASM_LTO_END): Likewise.
12597         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12598         (i386_pe_asm_lto_start): New function.
12599         (i386_pe_asm_lto_end): Likewise.
12601 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12602             Richard Biener  <rguenther@suse.de>
12604         PR middle-end/84955
12605         * lto-streamer-out.c (output_function): Fix CFG loop state before
12606         streaming out.
12607         * omp-expand.c (expand_oacc_for): Handle calls to internal
12608         functions like regular functions.
12610 2018-04-12  Richard Biener  <rguenther@suse.de>
12612         PR lto/85371
12613         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12614         for the early LTO debug to properly generate references to it
12615         during DIE emission.  Do not re-use that for the skeleton for
12616         split-dwarf.
12617         (dwarf2out_early_finish): Likewise.
12619 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12621         PR target/85328
12622         * config/i386/sse.md
12623         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12624         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12625         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12626         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12627         and output is a reg, avoid creating invalid lowpart subreg, but
12628         instead split into a 512-bit move.  Don't split if not AVX512VL,
12629         input is xmm16+ reg and output is a mem.
12630         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12631         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12632         xmm16+ reg and output is a mem.
12634 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12636         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12637         also for flag_dwarf2_cfi_asm.
12639 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12641         PR rtl-optimization/85342
12642         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12643         a bool scalar var inside of the loop instead.  Don't try to update
12644         recog_data.operand after failed apply_change_group.
12646 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12648         PR target/85296
12649         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12650         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12651         array with flexible array member as array without given dimension.
12652         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12653         argument for undefined param to true.
12655 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12657         PR target/85321
12658         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12659         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12660         from PowerPC section.
12661         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12662         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12663         help text that is too long.
12664         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12665         help text that is too long.
12666         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12667         help text that is too long.
12669 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12671         * config/alpha/alpha.md (stack_probe_internal): Rename
12672         from "probe_stack".  Update all callers.
12674 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12676         PR rtl-optimization/84566
12677         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12678         sched_macro_fuse_insns.
12680 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12682         PR target/84301
12683         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12684         (compute_block_dependences): ... from here.
12686 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12688         PR tree-optimization/85331
12689         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12690         from int to HOST_WIDE_INT.
12692 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12694         PR ipa/84149
12695         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12696         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12697         not the same as the source val.
12698         (cgraph_edge_brings_value_p): New parameter.
12699         (gather_edges_for_value): Pass destination value to
12700         cgraph_edge_brings_value_p.
12701         (perhaps_add_new_callers): Likewise.
12702         (get_info_about_necessary_edges): Likewise and exclude values brought
12703         only by self-recursive edges.
12704         (create_specialized_node): Redirect only clones of self-calling edges.
12705         (+self_recursive_pass_through_p): New function.
12706         (find_more_scalar_values_for_callers_subset): Use it.
12707         (find_aggregate_values_for_callers_subset): Likewise.
12708         (known_aggs_to_agg_replacement_list): Removed.
12709         (decide_whether_version_node): Re-calculate known constants for all
12710         remaining context clones.
12712 2018-04-11  Richard Biener  <rguenther@suse.de>
12714         PR lto/85339
12715         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12716         from early DWARF output.
12717         (dwarf2out_early_finish): Output line info unconditionally into
12718         early DWARF and add reference to it.
12720 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12722         PR target/85281
12723         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12724         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12725         other than V2DFmode using iptr mode attribute.
12726         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12728 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12730         PR rtl-optimization/84659
12731         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12733 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12735         PR debug/85302
12736         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12737         SIZEP is NULL.
12738         (output_loc_list): Pass address of a dummy size variable even in the
12739         locview handling loop.
12740         (index_location_lists): Add comment on why skip_loc_list_entry can't
12741         call size_of_locs.
12743 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12745         PR target/85261
12746         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12747         into register.
12749 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12751         PR target/85321
12752         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12753         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12754         and -mstring-compare-inline-limit.
12756 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12758         PR target/85287
12759         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12760         for stack clash protection in a register whenever we need it to be in
12761         a register.
12763 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12765         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12766         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12768 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12770         PR target/85321
12771         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12772         the help text.
12773         (mlong-double-): Ditto.
12774         * config/rs6000/sysv4.opt (msdata=): Ditto.
12775         (mtls-size=): Ditto.
12777 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12779         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12780         erroneous entries for
12781         "vector int vec_ldl (int, long int *)", and
12782         "vector unsigned int vec_ldl (int, unsigned long int *)".
12783         Add comments and entries for
12784         "vector bool char vec_ldl (int, bool char *)",
12785         "vector bool short vec_ldl (int, bool short *)",
12786         "vector bool int vec_ldl (int, bool int *)",
12787         "vector bool long long vec_ldl (int, bool long long *)",
12788         "vector pixel vec_ldl (int, pixel *)",
12789         "vector long long vec_ldl (int, long long *)",
12790         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12791         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12792         type tree bool_long_long_type_node and correct definition of
12793         bool_V2DI_type_node to make reference to this new type tree.
12794         (rs6000_mangle_type): Replace erroneous reference to
12795         bool_long_type_node with bool_long_long_type_node.
12796         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12797         comments to emphasize sign distinctions for char and int types and
12798         replace RS6000_BTI_bool_long constant with
12799         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12800         use of RS6000_BTI_pixel.
12801         (bool_long_type_node): Remove this macro definition.
12802         (bool_long_long_type_node): New macro definition
12804 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12806         PR rtl-optimization/85300
12807         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12808         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12809         simplify_unary_operation fails.
12811 2018-04-10  Martin Liska  <mliska@suse.cz>
12813         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12814         cgraph_edge and ipa_ref.
12816 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12818         PR target/85177
12819         PR target/85255
12820         * config/i386/sse.md
12821         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12822         computation of the VEC_MERGE selector from mask.
12823         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12824         Fix decoding of the VEC_MERGE selector into mask.
12826 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12828         PR tree-optimization/85286
12829         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12831 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12833         * final.c (final_1): Set insn_last_address as well as
12834         insn_current_address.
12836 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12838         PR target/85173
12839         * explow.c (emit_stack_probe): Call validize_mem on memory location
12840         before passing it to gen_probe_stack.  Create address operand and
12841         legitimize it for the probe_stack_address case.
12843 2018-04-09  Jan Hubicka  <jh@suse.cz>
12845         PR lto/85078
12846         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12847         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12848         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12849         walk basetypes.
12850         (free_lang_data): Rebuild type inheritance graph.
12852 2018-04-09  Martin Sebor  <msebor@redhat.com>
12854         * invoke.texi (-finline-small-functions): Mention other optimization
12855         options.
12856         (-findirect-inlining, -fpartial-inlining): Same.
12857         (-finline-functions-called-once): Same.
12858         (-freorder-blocks-and-partition): Same.
12860 2018-04-09  Jan Hubicka  <jh@suse.cz>
12862         PR rtl/84058
12863         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12864         jumps; choose last target that matches the criteria (i.e.
12865         no partition changes for non-crossing jumps).
12866         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12867         support for redirecting crossing jumps to non-crossing.
12869 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12871         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12872         also for naked functions.
12874 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12876         * config/arc/arc.md (add_shift): New pattern.
12877         (add_shift2): Likewise.
12878         (sub_shift): Likewise.
12879         (sub_shift_cmp0_noout): Likewise.
12880         (compare_si_ashiftsi): Likewise.
12881         (xbfu_cmp0_noout): New combine pattern.
12882         (xbfu_cmp0"): Likewise.
12883         (movsi_set_cc_insn): Place the predicable variant first.
12884         (commutative_binary_cmp0_noout): Remove clobber.
12885         (commutative_binary_cmp0): New pattern.
12886         (noncommutative_binary_cmp0): Likewise.
12887         (noncommutative_binary_cmp0_noout): Likewise.
12888         (noncommutative_binary_comparison_result_used): Removed.
12889         (rsub_cmp0): New pattern.
12890         (rsub_cmp0_noout): Likewise.
12891         (extzvsi): Changed, keep only meaningful variants.
12892         (SQH, SEZ): New iterators.
12893         (SQH_postfix): New mode attribute.
12894         (SEZ_prefix): New code attribute.
12895         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12896         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12897         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12898         of numerical value.
12899         (noncommutative_operator): Check the availability of barrel
12900         shifter option.
12902 2018-04-09  Richard Biener  <rguenther@suse.de>
12904         PR tree-optimization/85284
12905         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12906         Only use the niter constraining form of simple_iv when the exit
12907         is always executed.
12909 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12911         PR target/84041
12912         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12913         (define_expand "*memory_barrier"): New define_expand.
12914         (define_insn "memory_barrier"): New insn.
12916 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12918         PR rtl-optimization/80463
12919         PR rtl-optimization/83972
12920         PR rtl-optimization/83480
12922         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12923         correct producer for the insn.
12924         (tidy_control_flow): Fixup seqnos in case of debug insns.
12926 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12928         PR rtl-optimization/83913
12930         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12931         different sched-times when merging exprs.
12933 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12935         PR rtl-optimization/83962
12937         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12938         tidy_fallthru_edge and tidy_control_flow.
12940 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12942         PR rtl-optimization/83530
12944         * sel-sched.c (force_next_insn): New global variable.
12945         (remove_insn_for_debug): When force_next_insn is true, also leave only
12946         next insn in the ready list.
12947         (sel_sched_region): When the region wasn't scheduled, make another pass
12948         over it with force_next_insn set to 1.
12950 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12952         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12953         into tm_file.
12954         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12955         for interrupt control.
12956         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12957         functions for interrupt control.
12958         * config/nds32/nds32-intrinsic.md: Likewise.
12959         * config/nds32/nds32_intrinsic.h: Likewise.
12960         * config/nds32/nds32.h (nds32_builtins): Likewise.
12962 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12964         * config/nds32/nds32.c (nds32_init_machine_status,
12965         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12966         strict_aligned_p field.
12967         (nds32_expand_to_rtl_hook): New function.
12968         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12969         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12971 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12972             Chung-Ju Wu  <jasonwucj@gmail.com>
12974         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12975         * config/nds32/nds32-n7.md: New file.
12976         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12977         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12978         pipeline.
12979         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12980         * config/nds32/nds32.md (pipeline_model): Add n7.
12981         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12982         * config/nds32/pipelines.md: Include n7 settings.
12984 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12985             Chung-Ju Wu  <jasonwucj@gmail.com>
12987         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12988         * config/nds32/nds32-e8.md: New file.
12989         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12990         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12991         pipeline.
12992         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12993         * config/nds32/nds32.md (pipeline_model): Add e8.
12994         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12995         * config/nds32/pipelines.md: Include e8 settings.
12997 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12998             Chung-Ju Wu  <jasonwucj@gmail.com>
13000         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13001         * config/nds32/nds32-n8.md: New file.
13002         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13003         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13004         pipeline.
13005         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13006         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13007         * config/nds32/nds32.md (pipeline_model): Add n8.
13008         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13009         * config/nds32/pipelines.md: Include n8 settings.
13011 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13012             Chung-Ju Wu  <jasonwucj@gmail.com>
13014         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13015         * config/nds32/nds32-n9-2r1w.md: New file.
13016         * config/nds32/nds32-n9-3r2w.md: New file.
13017         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13018         nds32_register_ports): New or modify for cpu n9.
13019         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13020         pipeline.
13021         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13022         * config/nds32/nds32-utils.c: New file.
13023         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13024         TARGET_MUL_SLOW): Define.
13025         * config/nds32/nds32.md (pipeline_model): New attribute.
13026         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13027         New options that support cpu n9.
13028         * config/nds32/pipelines.md: Include n9 settings.
13029         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13031 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13033         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13034         information if necessary.
13035         (output_cond_branch_compare_zero): Likewise.
13036         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13037         (nds32_target_alignment): Refine for alignment.
13038         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13039         (FUNCTION_BOUNDARY): Modify.
13040         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13041         align case.
13042         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13044 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13046         * config/nds32/constants.md (unspec_volatile_element): Add values for
13047         TLB operation and data prefetch.
13048         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13049         functions for TLB operation and data prefetch.
13050         * config/nds32/nds32-intrinsic.md: Likewise.
13051         * config/nds32/nds32_intrinsic.h: Likewise.
13052         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13053         (nds32_print_operand): Likewise.
13054         * config/nds32/nds32.h (nds32_builtins): Likewise.
13056 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13057         Andrew Pinski <pinsika@gcc.gnu.org>
13059         PR middle-end/82976
13060         * match.pd: Use constant_boolean_node of correct type instead of
13061         boolean_true_node or boolean_false_node for simplifying
13062         pointer comparisons to zero.
13064 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13066         PR tree-optimization/80021
13067         * tree.c (verify_type_variant): Make error call in verify_variant_match
13068         translatable and remove final full stop.
13070 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13072         * config/nds32/constants.md (unspec_volatile_element): Add
13073         UNSPEC_VOLATILE_EH_RETURN.
13074         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13075         nds32_output_stack_pop): Support dwarf exception handling process.
13076         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13077         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13078         exception handling process.
13079         (nds32_compute_stack_frame): Likewise.
13080         (nds32_return_addr_rtx): Likewise.
13081         (nds32_initial_elimination_offset): Likewise.
13082         (nds32_expand_prologue): Likewise.
13083         (nds32_expand_epilogue): Likewise.
13084         (nds32_dynamic_chain_address): New function.
13085         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13086         exception handling.
13087         (DYNAMIC_CHAIN_ADDRESS): Define.
13088         (EH_RETURN_DATA_REGNO): Define.
13089         (EH_RETURN_STACKADJ_RTX): Define.
13090         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13091         patterns for dwarf exception handling.
13093 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13095         * config/nds32/nds32.h: Clean up obsolete macros.
13097 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13099         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13100         Add enum values for particular instructions.
13101         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13102         particular intrinsic functions.
13103         * config/nds32/nds32-intrinsic.md: Likewise.
13104         * config/nds32/nds32_intrinsic.h: Likewise.
13105         * config/nds32/nds32.h (nds32_builtins): Likewise.
13106         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13107         (btst, ave): New patterns for particular instructions.
13109 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13111         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13112         Add enum values for atomic load/store and memory sync.
13113         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13114         and memory sync.
13115         * config/nds32/nds32-intrinsic.md: Likewise.
13116         * config/nds32/nds32_intrinsic.h: Likewise.
13117         * config/nds32/nds32.h (nds32_builtins): Likewise.
13119 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13121         PR tree-optimization/85257
13122         * fold-const.c (native_encode_vector): If not all elts could fit
13123         and off is -1, return 0 rather than offset.
13124         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13125         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13126         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13127         adjust buffer in native_interpret_expr call.
13129 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13131         * config/nds32/constants.md (unspec_volatile_element): Add cache
13132         control enum values.
13133         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13134         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13135         * config/nds32/nds32.c (nds32_cctl_names): New.
13136         (nds32_print_operand): Handle cache control register names.
13137         * config/nds32/nds32.h (nds32_builtins): New enum values.
13138         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13139         macros.
13140         * config/nds32/nds32.md (type): Add mmu.
13141         * config/nds32/pipelines.md (simple_insn): Add mmu.
13143 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13145         * config/nds32/nds32.md (type): Remove call.
13146         * config/nds32/pipelines.md (simple_insn): Likewise.
13148 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13150         * config/nds32/constants.md (unspec_volatile_element): Add
13151         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13152         UNSPEC_VOLATILE_FMFCFG.
13153         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13154         description for fmfcfg and fmfcsr.
13155         (bdesc_1arg): Add fmtcsr.
13156         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13157         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13158         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13159         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13160         unspec_fmfcfg): New patterns.
13161         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13162         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13163         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13164         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13165         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13166         __nds32__fmfcfg): Define.
13168 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13170         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13171         intrinsic register names.
13172         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13173         intrinsic register enum values and macros.
13175 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13177         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13178         for load/store addressing form.
13179         (nds32_print_operand_address): Likewise.
13181 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13183         PR target/85196
13184         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13185         based on LABEL_REF.  Remove useless assertion.
13186         (pic_address_needs_scratch): Fix formatting.
13187         (sparc_legitimize_pic_address): Minor tweaks.
13188         (sparc_delegitimize_address): Adjust assertion accordingly.
13189         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13190         into symbolic_operand.
13191         (movsi_high_pic_label_ref): Likewise.
13192         (movsi_lo_sum_pic_label_ref): Likewise.
13193         (movdi_pic_label_ref): Likewise.
13194         (movdi_high_pic_label_ref): Likewise.
13195         (movdi_lo_sum_pic_label_ref): Likewise.
13197 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13199         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13200         custom LIB_SPEC setup.
13202 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13203             Kito Cheng  <kito.cheng@gmail.com>
13205         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13206         * config/riscv/freebsd.h: New.
13208 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13210         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13211         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13212         file.
13214 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13215             Kito Cheng  <kito.cheng@gmail.com>
13217         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13218         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13219         * config/nds32/nds32-protos.h (nds32_output_call,
13220         nds32_output_return): Declare.
13221         * config/nds32/nds32.md: Refine all the call and return patterns.
13223 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13225         PR debug/85252
13226         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13227         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13229         PR rtl-optimization/84872
13230         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13231         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13232         EDGE_CROSSING edge.
13234 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13236         * expr.c (copy_blkmode_to_reg): Revert 254862.
13237         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13239 2018-04-06  Richard Biener  <rguenther@suse.de>
13241         PR middle-end/85244
13242         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13243         after seeing a component reference with an adjacent field.  Treat
13244         refs to arrays at struct end of external decls similar to
13245         refs to unconstrained commons.
13247 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13249         PR sanitizer/85213
13250         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13251         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13252         recursive calls.
13253         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13254         save_p here.
13256 2018-04-06  Richard Biener  <rguenther@suse.de>
13258         PR middle-end/85180
13259         * alias.c (find_base_term): New wrapper around find_base_term
13260         unwinding CSELIB_VAL_PTR changes.
13261         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13262         recursion.
13264 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13266         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13267         instructions.
13268         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13269         constant definitions.
13270         ("nop"): lr 0,0 -> nopr r0
13271         ("nop_lr0", "nop_lr1"): New insn definitions.
13273 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13275         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13276         NDS32_V3PUSH_AVAILABLE_P macro.
13278 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13279             Chung-Ju Wu  <jasonwucj@gmail.com>
13281         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13282         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13283         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13284         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13285         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13286         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13287         * config/nds32/constraints.md: New constraints and checking for hard
13288         float configuration.
13289         * config/nds32/iterators.md: New mode iterator and attribute for hard
13290         float configuration.
13291         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13292         patterns.
13293         * config/nds32/nds32-fpu.md: New file.
13294         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13295         deal with hard float code generation.
13296         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13297         ARCH_V3S.
13298         (abi_type, float_reg_number): New enum type.
13299         * config/nds32/nds32-predicates.c: New predicates for hard float.
13300         * config/nds32/nds32-protos.h: Declare functions for hard float.
13301         * config/nds32/nds32.c: Implementation for hard float configuration.
13302         * config/nds32/nds32.h: Definitions for hard float configuration.
13303         * config/nds32/nds32.md: Include hard float machine description and
13304         modify patterns for hard float configuration.
13305         * config/nds32/nds32.opt: New options for hard float configuration.
13306         * config/nds32/predicates.md: New predicates for hard float
13307         configuration.
13309 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13311         * common/config/nds32/nds32-common.c
13312         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13314 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13316         PR middle-end/85195
13317         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13318         CONSTRUCTOR_ELT (ctor, ...)->value.
13320 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13322         PR target/85193
13323         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13325 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13327         PR target/85204
13328         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13329         cond jump.
13331 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13332             Kito Cheng  <kito.cheng@gmail.com>
13334         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13335         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13336         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13337         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13339 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13340             Kito Cheng  <kito.cheng@gmail.com>
13342         * config/nds32/constraints.md (Ufe): New memory constraint.
13343         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13344         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13345         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13346         operands.
13347         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13348         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13350 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13352         * config/nds32/nds32.md: Use optimize_size in the condition for
13353         alu-shift instructions.
13355 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13357         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13359 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13361         * config/nds32/nds32.md (negsi2): Refine pattern.
13363 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13364             Chung-Ju Wu  <jasonwucj@gmail.com>
13366         * config/nds32/iterators.md (shift_rotate): New code iterator.
13367         (shift): New code attribute.
13368         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13369         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13370         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13371         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13372         bit-wise operations.
13373         (andsi3, *andsi3): Ditto.
13374         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13375         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13376         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13377         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13378         nds32_ior_operand, nds32_xor_operand): New predicates.
13380 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13382         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13383         (addsi3, subsi3): ... this.
13385 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13387         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13389 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13391         * config/nds32/nds32.md: Adjust indention.
13393 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13395         * config/nds32/nds32.md (feature): New attribute.
13397 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13399         * config/nds32/nds32.md (subtype): New attribute.
13401 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13403         PR target/85203
13404         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13405         expansion to perform a bitwise AND of the argument followed by a
13406         boolean negation of the result.
13408 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13410         PR rtl-optimization/84878
13411         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13412         the basic block.  Assert the use reference is not artificial and that
13413         it has an associated insn.
13415 2018-04-04  Michael Matz  <matz@suse.de>
13417         * builtins.c (compute_objsize): Pass correct operand
13418         to array_at_struct_end_p.
13420 2018-04-04  Richard Biener  <rguenther@suse.de>
13422         PR lto/85176
13423         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13424         from contexts for DINFO_LEVEL_TERSE and below.
13426 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13428         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13429         resiter_operand condition.
13430         * config/nds32/nds32.md (*move<mode>): Ditto.
13432 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13433             Monk Chiang  <sh.chiang04@gmail.com>
13435         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13437 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13439         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13441 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13442             Kito Cheng  <kito.cheng@gmail.com>
13444         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13445         nds32_cond_code_str, output_cond_branch,
13446         output_cond_branch_compare_zero, nds32_expand_cbranch,
13447         nds32_expand_cstore, nds32_expand_movcc,
13448         nds32_output_cbranchsi4_equality_zero,
13449         nds32_output_cbranchsi4_equality_reg,
13450         nds32_output_cbranchsi4_equality_reg_or_const_int,
13451         nds32_output_cbranchsi4_greater_less_zero: New functions.
13452         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13453         nds32_expand_cstore, nds32_expand_movcc,
13454         nds32_output_cbranchsi4_equality_zero,
13455         nds32_output_cbranchsi4_equality_reg,
13456         nds32_output_cbranchsi4_equality_reg_or_const_int,
13457         nds32_output_cbranchsi4_greater_less_zero): Declare.
13458         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13459         nds32_rimm11s_operand): New predicates.
13460         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13461         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13462         patterns.
13464 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13466         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13467         * config/nds32/nds32.md: Ditto.
13468         * config/nds32/pipelines.md: Ditto.
13470 2018-04-04  Richard Biener  <rguenther@suse.de>
13472         PR tree-optimization/85168
13473         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13474         propagating abnormals.
13476 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13478         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13480 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13481             Kito Cheng  <kito.cheng@gmail.com>
13483         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13484         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13485         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13486         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13487         * config/nds32/nds32.md (sibcall_internal): New.
13488         (sibcall_register): Remove.
13489         (sibcall_immediate): Remove.
13490         (sibcall_value_internal): New.
13491         (sibcall_value_register): Remove.
13492         (sibcall_value_immediate): Remove.
13493         * config/nds32/predicates.md (nds32_general_register_operand): New.
13494         (nds32_call_address_operand): New.
13496 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13498         PR rtl-optimization/85167
13499         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13500         bb_defs if *split_p, instead preinitialize it to NULL.
13502         PR tree-optimization/85156
13503         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13504         evaluating the argument multiple times.
13506 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13508         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13509         than vector.
13510         (_mm_cvtpd_ps): Likewise.
13511         (_mm_cvttpd_epi32): Likewise.
13512         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13513         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13514         vector, pixel, and bool following altivec.h include.
13516 2018-04-03  Martin Sebor  <msebor@redhat.com>
13518         * doc/extend.texi (Common Function Attributes): Clarify.
13519         (const attribute): Likewise.
13520         (pure attribute): Likewise.
13522 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13524         PR target/85169
13525         * config/i386/i386.c (ix86_expand_vector_set): Use
13526         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13528 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13530         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13531         instructions when changing rounding bits to preserve precision bits
13532         in the x87 control word.
13534 2018-04-03  Martin Liska  <mliska@suse.cz>
13536         PR tree-optimization/82491
13537         * rtl.h (strip_offset_and_add): Replace += suboffset with
13538         poly_uint64 () + suboffset.
13540 2018-03-29  Martin Liska  <mliska@suse.cz>
13541             Martin Jambor  <mjambor@suse.cz>
13543         PR ipa/84947
13544         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13545         param_type is not an integral or pointer type.
13547 2018-04-03  Richard Biener  <rguenther@suse.de>
13549         * sese.h (recompute_all_dominators): Remove.
13551 2018-04-02  Martin Sebor  <msebor@redhat.com>
13553         * doc/invoke.texi (-Wrestrict): Fix typos.
13555 2018-04-02  Jim Wilson  <jimw@sifive.com>
13557         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13558         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13559         (<optab>di3, <optab>si3_extend): Likewise.
13560         (<optab>si3_mask, <optab>si3_mask_1): New.
13561         (<optab>di3_mask, <optab>di3_mask_1): New.
13562         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13563         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13564         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13566 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13568         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13569         example.
13571 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13573         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13574         (nds32_canonicalize_comparison): New function.
13576 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13577             Kito Cheng  <kito.cheng@gmail.com>
13578             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13580         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13581         * config/nds32/constants.md (unspec_volatile_element): Add
13582         UNSPEC_VOLATILE_RELAX_GROUP.
13583         * config/nds32/nds32-relax-opt.c: New file.
13584         * config/nds32/nds32-predicates.c
13585         (nds32_symbol_load_store_p): New function.
13586         * config/nds32/nds32-protos.h
13587         (nds32_symbol_load_store_p): Declare function.
13588         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13589         * config/nds32/nds32.c
13590         (nds32_register_pass): New function to register pass.
13591         (nds32_register_passes): New function to register passes.
13592         * config/nds32/nds32.md (relax_group): New pattern.
13593         * config/nds32/nds32.opt (mrelax-hint): New option.
13594         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13596 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13598         * config/nds32/t-nds32: Modify files dependency.
13600 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13602         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13603         (PROFILE_HOOK): Define its implementation.
13605 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13607         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13608         type and 32-bit size.
13610 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13612         PR middle-end/85090
13613         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13614         (V_128_256): New mode iterator.
13615         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13616         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13617         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13618         of V.
13619         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13620         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13622 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13624         PR target/83315
13625         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13626         NaN inputs correctly.
13628 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13630         PR target/80546
13631         * config/rs6000/vsx.md (??r): New mode attribute.
13632         (*vsx_mov<mode>_64bit): Use it.
13633         (*vsx_mov<mode>_32bit): Likewise.
13635 2018-03-30  Martin Sebor  <msebor@redhat.com>
13637         PR tree-optimization/84818
13638         * builtins.c (check_access): Use warning_n.
13640 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13642         PR target/83822
13643         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13644         condition.
13645         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13646         condition.
13648 2018-03-30  Julia Koval  <julia.koval@intel.com>
13650         PR target/84413
13651         * x86-tune.def (movx, partial_reg_dependency): Enable for
13652         m_SKYLAKE_AVX512.
13654 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13656         PR inline-asm/84985
13657         * lra-constraints.c (process_alt_operands): Move setting
13658         this_alternative_matches below.
13660 2018-03-29  Martin Liska  <mliska@suse.cz>
13662         PR lto/84995.
13663         * doc/invoke.texi: Document how LTO works with debug info.
13664         Describe auto-load support of binutils.  Mention 'x86-64'
13665         as valid option value of -march option.
13667 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13669         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13671         PR c/85094
13672         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13673         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13674         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13675         checking.
13677 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13679         PR target/84912
13680         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13681         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13682         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13683         for RS6000_BTM_POWERPC64.
13684         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13685         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13686         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13687         definition.
13688         (DIVDE): Use it.
13689         (DIVDEU): Likewise.
13691 2018-03-28  Carl Love  <cel@us.ibm.com>
13693         Revert
13694         2017-09-27  Carl Love  <cel@us.ibm.com>
13696         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13697         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13698         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13699         fctiw instruction.
13701 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13703         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13704         instead of __vector bool.
13705         (_mm_max_pu8): Likewise.
13706         (_mm_min_pi16): Likewise.
13708 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13710         PR target/84912
13711         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13712         (DIVWEUO): Likewise.
13713         (DIVDEO): Likewise.
13714         (DIVDEUO): Likewise.
13715         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13716         DIVWEUO and DIVDEUO.
13717         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13718         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13719         (div_extend): Likewise.
13720         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13721         builtin function.
13722         (__builtin_divweuo): Likewise.
13723         (__builtin_divdeo): Likewise.
13724         (__builtin_divdeuo): Likewise.
13726 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13728         PR target/85095
13729         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13730         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13732         PR tree-optimization/82004
13733         * gimple-match-head.c (optimize_pow_to_exp): New function.
13734         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13735         Don't fold to exp if optimize_pow_to_exp is false.
13737 2018-03-28  Martin Liska  <mliska@suse.cz>
13739         PR other/84819
13740         * calls.c (initialize_argument_information): Fix trailing space.
13741         * common.opt: Fix typo and provide better explanation for
13742         -fsanitize-coverage option.
13743         * config/i386/i386.opt: Fix typo.
13745 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13746             Martin Liska  <mliska@suse.cz>
13748         PR sanitizer/85081
13749         * gimplify.c (asan_poison_variable): Don't do the check for
13750         gimplify_omp_ctxp here.
13751         (gimplify_decl_expr): Do it here.
13752         (gimplify_target_expr): Likewise.
13754 2018-03-28  Martin Liska  <mliska@suse.cz>
13756         PR target/84988
13757         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13758         chkp_type_bounds_count if MPX is not enabled.
13760 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13762         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13764 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13766         PR target/84914
13767         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13768         function to create the function decl for complex long double
13769         multiply and divide for -mabi=ieeelongdouble.
13770         (init_float128_ieee): Call it.
13772 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13774         PR target/85044
13775         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13776         -fcf-protection=branch -mibt.
13777         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13779 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13781         PR target/81863
13782         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13783         arm_word_relocations.
13785 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13787         PR target/85056
13788         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13789         extern array declarations.
13791 2018-03-27  Richard Biener  <rguenther@suse.de>
13793         PR middle-end/84067
13794         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13795         explicit single_use checks.
13797 2018-03-27  Richard Biener  <rguenther@suse.de>
13799         PR tree-optimization/85082
13800         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13801         Valueize the VUSE.
13803 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13805         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13806         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13807         Turn on fasynchronous-unwind-tables and funwind-tables.
13809 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13811         PR target/85073
13812         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13813         (*bmi_blsr_<mode>_ccz): Ditto.
13815 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13817         PR tree-optimization/85063
13818         * omp-general.c (offloading_function_p): New function.  Factor out
13819         of ...
13820         * omp-offload.c (pass_omp_target_link::gate): ... here.
13821         * omp-general.h (offloading_function_p): Declare.
13822         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13823         with attribute omp declare target for offloading functions.
13825 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13827         PR tree-optimization/84005
13828         * tree-data-ref.h (get_base_for_alignment): Declare.
13829         * tree-data-ref.c (get_base_for_alignment_1): New function.
13830         (get_base_for_alignment): Likewise.
13831         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13832         get_base_for_alignment to find a suitable base object, instead
13833         of always using drb->base_address.
13835 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13837         PR inline-asm/85022
13838         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13839         known size by default.
13841 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13843         PR inline-asm/85030
13844         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13845         and non BLKmode operands.
13847 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13849         PR target/85026
13850         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13851         Clean up attributes.
13853 2018-03-23  Richard Biener  <rguenther@suse.de>
13855         PR debug/85020
13856         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13857         we are going to emit early debug for LTO.
13859 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13861         PR inline-asm/85034
13862         * function.c (match_asm_constraints_1): Don't optimize if input
13863         doesn't satisfy general_operand predicate for output's mode.
13865         PR inline-asm/85022
13866         * alias.c (write_dependence_p): Don't require for x_canonicalized
13867         non-VOIDmode if x has VOIDmode.
13869         PR sanitizer/85029
13870         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13871         just don't try to optimize it rather than assert it never happens.
13873 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13875         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13876         macro expansions for definition of ST_INTERNAL_<mode> and
13877         LD_INTERNAL_<mode> builtins.
13878         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13879         Remove prototype.
13880         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13881         function.
13882         (altivec_expand_st_builtin): Likewise.
13883         (altivec_expand_builtin): Remove calls to deleted functions.
13884         (rs6000_address_for_altivec): Delete this function.
13885         * config/rs6000/vector.md: Remove expands for
13886         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13888 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13890         PR target/84826
13891         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13892         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13893         re-computing once computed.
13894         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13895         (arm_init_machine_status): Initialize
13896         machine->static_chain_stack_bytes.
13898 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13900         PR target/84760
13901         * doc/extend.texi: Add four new prototypes for vec_ld.
13902         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13903         definitions for more logical presentation.
13904         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13905         entries for V1TI variants of __builtin_altivec_ld builtin.
13906         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13907         handling of V1TI variant of LVX icode pattern.
13908         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13909         (rs6000_gimple_fold_builtin): Likewise.
13910         (altivec_init_builtins): Add code to define
13911         __builtin_altivec_lvx_v1ti function.
13913 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13915         PR inline-asm/84941
13916         * function.c (match_asm_constraints_1): Don't do the optimization
13917         if input isn't a REG, SUBREG, MEM or constant.
13919 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13921         PR tree-optimization/84956
13922         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13923         bb_has_abnormal_pred.
13925 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13927         PR sanitizer/85018
13928         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13929         DECL_INITIAL (decl) to decl at the end.
13930         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13931         adjust the comment.
13933 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13935         * doc/extend.texi (__builtin_tgmath): Document when complex
13936         integer types are treated as _Complex _Float64.
13938 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13940         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13942 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13944         PR tree-optimization/84960
13945         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13946         if it is ENTRY block, move them into single succ of ENTRY in that case.
13948 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13950         PR tree-optimization/84811
13951         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13952         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13953         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13954         (known_subrange_p): Update accordingly.  Cast each value involved
13955         in the size comparison, rather than casting the result of the
13956         subtraction.
13958 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13960         PR tree-optimization/84982
13961         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13962         by flipping the least significant bit rather than all bits from
13963         bitpos to bitpos + bitsize - 1.
13965 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13967         * doc/extend.texi (Deprecated Features): Remove mention of
13968         long-deleted deprecations.
13970 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13972         PR jit/84288
13973         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13974         * configure: Regenerate.
13976 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13978         PR tree-optimization/83126
13979         * tree-parloops.c (num_phis): New function.
13980         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13982 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13984         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13985         mention anon-struct/union members and trailing attributes.
13987 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13989         PR tree-optimization/84969
13990         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13991         builtin memset partitions if they set different rhs values.
13993 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13995         PR rtl-optimization/84989
13996         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13997         VEC_DUPLICATE with scalar result mode.
13999 2018-03-21  Martin Liska  <mliska@suse.cz>
14001         PR ipa/84963
14002         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14003         not intended return statement.
14005 2018-03-21  Martin Liska  <mliska@suse.cz>
14007         PR target/84988
14008         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14009         (chkp_find_bound_slots_1): Limit number of iterations.
14011 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14013         PR target/84838
14014         * Minor grammar fixes for x86 options.
14016 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14018         PR debug/84875
14019         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14020         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14022 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14024         PR target/83789
14025         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14026         (altivec_lvx_<mode>_1op): Likewise.
14027         (altivec_stvx_<mode>_2op): Likewise.
14028         (altivec_stvx_<mode>_1op): Likewise.
14029         (altivec_lvx_<VM2:mode>): New define_expand.
14030         (altivec_stvx_<VM2:mode>): Likewise.
14031         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14032         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14033         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14034         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14035         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14036         (rs6000_gen_lvx): Likewise.
14037         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14038         (altivec_expand_stv_builtin): Likewise.
14039         (altivec_expand_builtin): Likewise.
14040         * config/rs6000/vector.md: Likewise.
14042 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14044         PR target/82518
14045         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14046         BYTES_BIG_ENDIAN.
14048 2018-03-20  Richard Biener  <rguenther@suse.de>
14050         PR target/84986
14051         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14052         sign-conversions as zero, fall back to standard scalar_stmt
14053         cost for the rest.
14055 2018-03-20  Martin Liska  <mliska@suse.cz>
14057         PR ipa/84825
14058         * predict.c (rebuild_frequencies): Handle case when we have
14059         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14061 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14063         PR target/84990
14064         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14065         flag_section_anchors.
14066         * varasm.c (use_blocks_for_decl_p): Remove hack for
14067         dw2_force_const_mem.
14069         PR target/84845
14070         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14071         to ...
14072         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14073         be created, use lowpart_subreg of operands[0] rather than operands[0]
14074         itself.
14075         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14076         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14077         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14078         and n constraint instead of aarch64_shift_imm_di and Usd.
14079         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14080         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14082 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14084         PR target/82989
14085         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14086         to favor GPR over NEON registers.
14087         (<shift>di3_neon): Likewise.
14089 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14091         PR target/84952
14092         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14093         (nvptx_process_pars): Emit bar.sync asap and alap.
14095 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14097         PR target/84954
14098         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14099         seen_label if seen_label is already set.
14101 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14103         PR target/84945
14104         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14105         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14106         Use 1U instead of 1.  Formatting fixes.
14108         PR c/84953
14109         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14110         instead of TREE_TYPE (s1) for the return value.
14112 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14114         PR tree-optimization/84946
14115         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14116         bitsize + bitsize in poly_uint64 rather than poly_int64.
14118         PR sanitizer/78651
14119         * dwarf2asm.c: Include fold-const.c.
14120         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14121         of decl rather than decl itself.
14123         PR rtl-optimization/84643
14124         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14126 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14128         PR sanitizer/78651
14129         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14130         calling assemble_variable.
14132 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14134         PR target/81647
14135         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14136         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14138 2018-03-19  Jim Wilson  <jimw@sifive.com>
14140         PR bootstrap/84856
14141         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14142         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14143         (riscv_first_stack_step): Likewise.
14144         (riscv_option_override): Use STACK_BOUNDARY instead of
14145         MIN_STACK_BOUNDARY.
14146         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14147         MIN_STACK_BOUNDARY.
14148         (BIGGEST_ALIGNMENT): Set to 128.
14149         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14150         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14151         STACK_BOUNDARY.
14153 2018-03-19  Richard Biener  <rguenther@suse.de>
14155         PR tree-optimization/84933
14156         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14157         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14159 2018-03-19  Richard Biener  <rguenther@suse.de>
14161         PR tree-optimization/84859
14162         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14163         (cond_if_else_store_replacement): Perform sinking operation on
14164         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14165         Generalize what a BB with a single eligible store is.
14167 2018-03-19  Richard Biener  <rguenther@suse.de>
14169         PR tree-optimization/84929
14170         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14171         chrec_is_positive against non-chrec arg.
14173 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14175         PR target/84711
14176         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14178 2018-03-18  Martin Liska  <mliska@suse.cz>
14180         PR rtl-optimization/84635
14181         * regrename.c (build_def_use): Use matches_mode only when
14182         matches >= 0.
14184 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14186         PR tree-optimization/84913
14187         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14188         vectorize chains of COND_EXPRs.
14190 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14192         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14194 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14196         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14198 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14200         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14202 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14203             Kito Cheng  <kito.cheng@gmail.com>
14205         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14206         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14207         (nds32_adjust_reg_alloc_order): New function.
14208         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14210 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14212         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14213         nds32_print_operand, nds32_print_operand_address): Use
14214         HOST_WIDE_INT_PRINT_DEC instead.
14216 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14218         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14220 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14222         PR target/84902
14223         * config/i386/i386.c (initial_ix86_tune_features,
14224         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14225         unsigned long long.
14226         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14227         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14228         rather than 1u << ix86_tune.  Formatting fix.
14229         (ix86_option_override_internal): Change ix86_arch_mask from
14230         unsigned int to unsigned HOST_WIDE_INT, initialize to
14231         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14232         (ix86_function_specific_restore): Likewise.
14234 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14236         PR target/84899
14237         * postreload.c (reload_combine_recognize_pattern): Perform
14238         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14239         truncate_int_for_mode the result for the destination's mode.
14241         PR c/84909
14242         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14243         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14244         Likewise.
14245         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14246         Likewise.
14248 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14250         PR target/84876
14251         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14252         regno_allocno_class_array and sorted_pseudos.
14253         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14254         insns where regno is used.
14256 2018-03-16  Martin Liska  <mliska@suse.cz>
14258         PR ipa/84833
14259         * multiple_target.c (create_dispatcher_calls): Redirect
14260         reference in the symbol table.
14262 2018-03-16  Martin Liska  <mliska@suse.cz>
14264         PR ipa/84722
14265         * multiple_target.c (create_dispatcher_calls): Redirect also
14266         an alias.
14268 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14270         PR c++/79937
14271         PR c++/82410
14272         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14273         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14274         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14276 2018-03-16  Julia Koval  <julia.koval@intel.com>
14278         * doc/invoke.texi (Skylake Server): Add CLWB.
14279         Cannonlake): Remove CLWB.
14281 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14283         PR tree-optimization/84841
14284         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14285         1 << 3.
14286         (FLOAT_ONE_CONST_TYPE): Define.
14287         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14288         (sort_by_operand_rank): Put entries with higher constant_type last
14289         rather than first to match comments.
14291 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14293         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14294         split predicate.
14296 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14298         PR c++/79085
14299         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14300         check and use address of target always.
14302 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14304         PR target/84574
14305         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14306         (indirect_thunk_bnd_needed): Likewise.
14307         (indirect_thunks_used): Likewise.
14308         (indirect_thunks_bnd_used): Likewise.
14309         (indirect_return_needed): New.
14310         (indirect_return_bnd_needed): Likewise.
14311         (output_indirect_thunk_function): Add a bool argument for
14312         function return.
14313         (output_indirect_thunk_function): Don't generate alias for
14314         function return thunk.
14315         (ix86_code_end): Call output_indirect_thunk_function to generate
14316         function return thunks.
14317         (ix86_output_function_return): Set indirect_return_bnd_needed
14318         and indirect_return_needed instead of indirect_thunk_bnd_needed
14319         and indirect_thunk_needed.
14321 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14323         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14324         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14325         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14327 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14328             Paul Hua <paul.hua.gm@gmail.com>
14330         PR c/84852
14331         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14333 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14335         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14336         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14337         resp. SFmode cases.
14339 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14341         PR target/84711
14342         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14343         instead of GET_MODE_SIZE when comparing Units.
14345 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14347         PR target/68256
14348         * varasm.c (hash_section): Return an unchangeble hash value
14349         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14350         Return !aarch64_can_use_per_function_literal_pools_p ().
14352 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14354         PR target/84860
14355         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14356         rather than address of cmode as last argument to prepare_cmp_insn.
14358 2018-03-15  Julia Koval  <julia.koval@intel.com>
14360         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14361         F_AVX512VNNI, F_AVX512BITALG): New.
14363 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14365         PR target/83451
14366         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14367         insn for floating-point loads and stores.
14369 2018-03-14  Carl Love  <cel@us.ibm.com>
14371         * config/rs6000/rs6000-c.c: Add macro definitions for
14372         ALTIVEC_BUILTIN_VEC_PERMXOR.
14373         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14374         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14375         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14376         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14377         UNSPEC_VPERMXOR.
14378         * config/doc/extend.texi: Add prototypes for vec_permxor.
14380 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14382         PR c/84852
14383         * diagnostic-show-locus.c (class layout_point): Convert m_line
14384         from int to linenum_type.
14385         (line_span::comparator): Use linenum "compare" function when
14386         comparing line numbers.
14387         (test_line_span): New function.
14388         (layout_range::contains_point): Convert param "row" from int to
14389         linenum_type.
14390         (layout_range::intersects_line_p): Likewise.
14391         (layout::will_show_line_p): Likewise.
14392         (layout::print_source_line): Likewise.
14393         (layout::should_print_annotation_line_p): Likewise.
14394         (layout::print_annotation_line): Likewise.
14395         (layout::print_leading_fixits): Likewise.
14396         (layout::annotation_line_showed_range_p): Likewise.
14397         (struct line_corrections): Likewise for field m_row.
14398         (line_corrections::line_corrections): Likewise for param "row".
14399         (layout::print_trailing_fixits): Likewise.
14400         (layout::get_state_at_point): Likewise.
14401         (layout::get_x_bound_for_row): Likewise.
14402         (layout::print_line): Likewise.
14403         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14404         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14405         * input.c (selftest::test_linenum_comparisons): New function.
14406         (selftest::input_c_tests): Call it.
14407         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14408         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14409         * selftest.h (ASSERT_GT): New macro.
14410         (ASSERT_GT_AT): New macro.
14411         (ASSERT_LT): New macro.
14412         (ASSERT_LT_AT): New macro.
14414 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14416         PR rtl-optimization/84780
14417         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14419 2018-03-14  Martin Liska  <mliska@suse.cz>
14421         * tree.c (record_node_allocation_statistics): Use
14422         get_stats_node_kind.
14423         (get_stats_node_kind): New function extracted from
14424         record_node_allocation_statistics.
14425         (free_node): Use get_stats_node_kind.
14427 2018-03-14  Richard Biener  <rguenther@suse.de>
14429         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14430         that the value-set of ANTIC_IN doesn't grow.
14432         Revert
14433         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14434         member.
14435         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14436         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14438 2018-03-14  Julia Koval  <julia.koval@intel.com>
14440         * config.gcc (icelake-client, icelake-server): New.
14441         (icelake): Remove.
14442         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14443         (initial_ix86_arch_features): Ditto.
14444         (PTA_SKYLAKE): Add SGX.
14445         (PTA_ICELAKE): Remove.
14446         (PTA_ICELAKE_CLIENT): New.
14447         (PTA_ICELAKE_SERVER): New.
14448         (ix86_option_override_internal): Split up icelake on icelake client and
14449         icelake server.
14450         (get_builtin_code_for_version): Ditto.
14451         (fold_builtin_cpu): Ditto.
14452         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14453         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14454         * config/i386/i386.h (processor_type): Ditto.
14455         * doc/invoke.texi: Ditto.
14457 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14459         PR sanitizer/83392
14460         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14461         INTEGER_CST offset, add it together with bitpos / 8 and
14462         sign extend based on POINTER_SIZE.
14464         PR target/84844
14465         Revert
14466         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14468         PR target/78090
14469         * config/i386/constraints.md (Yc): New register constraint.
14470         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14471         Use Yc constraint for alternative 2 of operand 0.  Remove
14472         preferred_for_speed attribute.
14474 2018-03-14  Richard Biener  <rguenther@suse.de>
14476         PR tree-optimization/84830
14477         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14478         with the old one to avoid oscillations.
14480 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14482         PR target/83712
14483         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14484         pseudos.
14485         (assign_by_spills): Return a flag of reload assignment failure.
14486         Do not process the reload assignment failures.  Do not spill other
14487         reload pseudos if they has the same reg class.  Update n if
14488         necessary.
14489         (lra_assign): Add a return arg.  Set up from the result of
14490         assign_by_spills call.
14491         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14492         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14493         usage_insns if it is not NULL.
14494         (spill_hard_reg_in_range): New function.
14495         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14496         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14497         function prototypes.
14498         (lra_assign): Change prototype.
14499         * lra.c (lra): Add code to deal with fails by splitting hard reg
14500         live ranges.
14502 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14504         * config/riscv/riscv.opt (mrelax): New option.
14505         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14506         "norelax" when riscv_mrelax is disabled.
14507         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14509 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14511         PR target/84743
14512         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14513         reassociation for int modes.
14515 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14517         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14518         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14519         for big-endian.
14520         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14521         * config/aarch64/aarch64-sve.md
14522         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14523         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14524         (*extend<mode><Vwide>2): Rename to...
14525         (aarch64_sve_extend<mode><Vwide>2): ...this.
14526         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14527         renaming the old pattern to...
14528         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14529         unsigned packs.
14530         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14531         define_expand, renaming the old pattern to...
14532         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14533         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14534         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14535         account when deciding which SVE instruction the optab should use.
14536         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14538 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14540         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14541         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14542         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14543         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14544         (tlsdesc_small_<mode>): Turn a define_expand and use
14545         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14546         (tlsdesc_small_advsimd_<mode>): ...this.
14547         (tlsdesc_small_sve_<mode>): New pattern.
14549 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14551         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14552         (UNSPEC_UMUL_HIGHPART): New constants.
14553         (MUL_HIGHPART): New int iteraor.
14554         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14555         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14556         define_expand.
14557         (*<su>mul<mode>3_highpart): New define_insn.
14559 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14561         PR lto/84805
14562         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14563         incomplete types.
14565 2018-03-13  Martin Liska  <mliska@suse.cz>
14567         PR ipa/84658.
14568         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14569         vector.
14570         (sem_item_optimizer::~sem_item_optimizer): Release it.
14571         (sem_item_optimizer::merge_classes): Register variable aliases.
14572         (sem_item_optimizer::fixup_pt_set): New function.
14573         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14574         * ipa-icf.h: Declare new variables and functions.
14576 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14578         PR middle-end/84834
14579         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14580         integer_pow2p@2 and test integer_pow2p in condition.
14581         (A < 0 ? C : 0): Similarly for @1.
14583         PR middle-end/84831
14584         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14585         characters starting at p contain '\0' character, don't look beyond
14586         that.
14588         PR target/84827
14589         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14590         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14592         PR target/84828
14593         * reg-stack.c (change_stack): Change update_end var from int to
14594         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14595         also call set_block_for_insn on the newly added insns and rescan.
14597         PR target/84786
14598         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14599         on the last operand.
14601         PR c++/84704
14602         * tree.c (stabilize_reference_1): Return save_expr (e) for
14603         STATEMENT_LIST even if it doesn't have side-effects.
14605 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14607         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14609 2018-03-12  Renlin Li  <renlin.li@arm.com>
14611         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14612         aarch64_output_scalar_simd_mov_immediate.
14614 2018-03-12  Martin Sebor  <msebor@redhat.com>
14616         PR tree-optimization/83456
14617         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14618         for perfectly overlapping calls to memcpy.
14619         (gimple_fold_builtin_memory_chk): Same.
14620         (gimple_fold_builtin_strcpy): Handle no-warning.
14621         (gimple_fold_builtin_stxcpy_chk): Same.
14622         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14624 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14626         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14627         parameter.  Use it for SFmode.
14628         (rs6000_function_arg_advance_1): Adjust.
14629         (rs6000_function_arg): Adjust.
14630         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14632 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14634         PR rtl-optimization/84169
14635         PR rtl-optimization/84780
14636         * combine.c (can_combine_p): Check for a 2-insn combination whether
14637         the destination register is used between the two insns, too.
14639 2018-03-12  Richard Biener  <rguenther@suse.de>
14641         PR tree-optimization/84803
14642         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14643         for refs DR analysis didn't process.
14645 2018-03-12  Richard Biener  <rguenther@suse.de>
14647         PR tree-optimization/84777
14648         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14649         force-vectorize loops ignore whether we are optimizing for size.
14651 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14653         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14654         (TARGET_MD_ASM_ADJUST): Define.
14656 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14657             Kito Cheng  <kito.cheng@gmail.com>
14658             Chung-Ju Wu  <jasonwucj@gmail.com>
14660         * config/nds32/nds32.c (nds32_compute_stack_frame,
14661         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14662         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14663         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14664         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14665         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14666         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14667         * config/nds32/nds32.md (prologue, epilogue): Use macro
14668         NDS32_V3PUSH_AVAILABLE_P to do checking.
14670 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14672         PR debug/58150
14673         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14674         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14675         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14676         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14677         addition of most attributes on !orig_type_die or the attribute not
14678         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14680 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14681             Chung-Ju Wu  <jasonwucj@gmail.com>
14683         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14684         __NDS32_VH__ macro.
14685         * config/nds32/nds32.opt (mvh): New option.
14687 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14688             Chung-Ju Wu  <jasonwucj@gmail.com>
14690         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14691         function.
14692         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14693         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14694         definition.
14696 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14697             Chung-Ju Wu  <jasonwucj@gmail.com>
14699         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14700         function.
14701         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14702         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14704 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14705             Kito Cheng  <kito.cheng@gmail.com>
14706             Chung-Ju Wu  <jasonwucj@gmail.com>
14708         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14709         UNSPEC_FFMISM and UNSPEC_FLMISM.
14710         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14711         for ffb, ffmism and flmism.
14712         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14713         (unspec_ffmism): Ditto.
14714         (unspec_flmism): Ditto.
14715         (nds32_expand_builtin_impl): Check if string extension is available.
14716         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14717         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14719 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14721         Reverting patch:
14722         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14724         PR target/83712
14725         * lra-assigns.c (assign_by_spills): Return a flag of reload
14726         assignment failure.  Do not process the reload assignment
14727         failures.  Do not spill other reload pseudos if they has the same
14728         reg class.
14729         (lra_assign): Add a return arg.  Set up from the result of
14730         assign_by_spills call.
14731         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14732         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14733         usage_insns if it is not NULL.
14734         (spill_hard_reg_in_range): New function.
14735         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14736         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14737         function prototypes.
14738         (lra_assign): Change prototype.
14739         * lra.c (lra): Add code to deal with fails by splitting hard reg
14740         live ranges.
14742 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14744         PR target/84807
14745         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14747 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14749         PR debug/84620
14750         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14751         (dw_val_node): Add val_symbolic_view.
14752         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14753         (symview_upper_bound): New.
14754         (new_line_info_table): Initialize symviews_since_reset.
14755         (dwarf2out_source_line): Count symviews_since_reset and set
14756         symview_upper_bound.
14757         (dw_val_equal_p): Handle symview.
14758         (add_AT_symview): New.
14759         (print_dw_val): Handle symview.
14760         (attr_checksum, attr_checksum_ordered): Likewise.
14761         (same_dw_val_p, size_of_die): Likewise.
14762         (value_format, output_die): Likewise.
14763         (add_high_low_attributes): Use add_AT_symview for entry_view.
14764         (dwarf2out_finish): Reset symview_upper_bound, clear
14765         zero_view_p.
14767 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14769         PR target/83969
14770         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14771         Add strict argument and use it.
14772         (rs6000_split_multireg_move): Update for new strict argument.
14773         (mem_operand_gpr): Disallow all non-offsettable addresses.
14774         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14776 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14778         PR target/84772
14779         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14780         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14781         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14783         PR c++/84767
14784         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14785         decl, use remap_type if we want to use the type.
14787 2018-03-09  Martin Sebor  <msebor@redhat.com>
14789         PR tree-optimization/84526
14790         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14791         Remove dead code.
14792         (builtin_access::generic_overlap): Be prepared to handle non-array
14793         base objects.
14795 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14797         PR rtl-optimization/84682
14798         * lra-constraints.c (process_address_1): Check is_address flag
14799         for address constraints.
14800         (process_alt_operands): Likewise.
14801         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14802         preprocess_constraints.
14803         * recog.h (preprocess_constraints): Add oploc parameter.
14804         Adjust callers.
14805         * recog.c (preprocess_constraints): Test address_operand for
14806         CT_ADDRESS constraints.
14808 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14810         PR target/83712
14811         * lra-assigns.c (assign_by_spills): Return a flag of reload
14812         assignment failure.  Do not process the reload assignment
14813         failures.  Do not spill other reload pseudos if they has the same
14814         reg class.
14815         (lra_assign): Add a return arg.  Set up from the result of
14816         assign_by_spills call.
14817         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14818         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14819         usage_insns if it is not NULL.
14820         (spill_hard_reg_in_range): New function.
14821         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14822         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14823         function prototypes.
14824         (lra_assign): Change prototype.
14825         * lra.c (lra): Add code to deal with fails by splitting hard reg
14826         live ranges.
14828 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14830         PR target/83193
14831         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14832         Accept complain bool parameter.  Only emit errors if it is true.
14833         (arm_parse_cpu_option_name): Likewise.
14834         (arm_target_thumb_only): Adjust callers of the above.
14835         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14836         prototype to take a default true bool parameter.
14837         (arm_parse_arch_option_name): Likewise.
14839 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14840             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14842         PR jit/64089
14843         PR jit/84288
14844         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14845         * configure: Regenerate.
14846         * configure.ac ("linker --version-script option"): New.
14847         ("linker soname option"): New.
14849 2018-03-09  Richard Biener  <rguenther@suse.de>
14851         PR tree-optimization/84775
14852         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14853         immediate uses of predicate stmts and mark them modified.
14855         Revert
14856         PR tree-optimization/84178
14857         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14858         to caller.
14859         (version_loop_for_if_conversion): Delay update_ssa call.
14860         (tree_if_conversion): Delay update_ssa until after predicate
14861         insertion.
14863 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14865         PR target/84763
14866         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14867         when the function accesses prior frames.
14869 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14871         PR debug/84456
14872         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14873         gen_llsym, otherwise call maybe_gen_llsym.
14875         PR inline-asm/84742
14876         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14877         has ',' character inside of it.
14879 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14881         PR target/84748
14882         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14883         as clobbering CC_REGNUM.
14885 2018-03-08  Richard Biener  <rguenther@suse.de>
14887         PR middle-end/84552
14888         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14889         (follow_copies_to_constant): Do not follow SSA names registered
14890         for update.
14892 2018-03-08  Richard Biener  <rguenther@suse.de>
14894         PR tree-optimization/84178
14895         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14896         to caller.
14897         (version_loop_for_if_conversion): Delay update_ssa call.
14898         (tree_if_conversion): Delay update_ssa until after predicate
14899         insertion.
14901 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14903         PR tree-optimization/84178
14904         * tree-if-conv.c (release_bb_predicate): Remove the
14905         the assertion that the stmts have NULL use_ops.
14906         Discard the statements, asserting that they haven't
14907         yet been added to a BB.
14909 2018-03-08  Richard Biener  <rguenther@suse.de>
14911         PR tree-optimization/84746
14912         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14913         (phi_translate): Pass in destination ANTIC_OUT set.
14914         (phi_translate_1): Likewise.  For a simplified result lookup
14915         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14916         (phi_translate_set): Adjust.
14917         (do_pre_regular_insertion): Likewise.
14918         (do_pre_partial_partial_insertion): Likewise.
14920 2018-03-08  Martin Liska  <mliska@suse.cz>
14922         PR gcov-profile/84735
14923         * doc/gcov.texi: Document usage of profile files.
14924         * gcov-io.h: Document changes in the format.
14926 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14928         PR debug/84404
14929         PR debug/84408
14930         * dwarf2out.c (struct dw_line_info_table): Update comments for
14931         view == -1.
14932         (FORCE_RESET_NEXT_VIEW): New.
14933         (FORCE_RESETTING_VIEW_P): New.
14934         (RESETTING_VIEW_P): Check for -1 too.
14935         (ZERO_VIEW_P): Likewise.
14936         (new_line_info_table): Force-reset next view.
14937         (dwarf2out_begin_function): Likewise.
14938         (dwarf2out_source_line): Simplify zero_view_p initialization.
14939         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14940         view directly.  Omit view when omitting .loc at line 0.
14942 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14944         PR tree-optimization/84740
14945         * tree-switch-conversion.c (process_switch): Call build_constructors
14946         only if info.phi_count is non-zero.
14948         PR tree-optimization/84739
14949         * tree-tailcall.c (find_tail_calls): Check call arguments against
14950         DECL_ARGUMENTS (current_function_decl) rather than
14951         DECL_ARGUMENTS (func) when checking for tail recursion.
14953 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14955         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14956         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14957         Volker Reichelt's entry and add entries for people that perform
14958         GCC fuzzy testing and report numerous bugs.
14960 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14962         PR target/82411
14963         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14964         readonly data in sdata, if that is disabled.
14965         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14966         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14967         -mreadonly-in-sdata option.
14969 2018-03-07  Martin Sebor  <msebor@redhat.com>
14971         PR tree-optimization/84468
14972         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14973         basic block when looking for nul assignment.
14975 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14977         PR target/84277
14978         * except.h (output_function_exception_table): Adjust prototype.
14979         * except.c (output_function_exception_table): Remove FNNAME parameter
14980         and add SECTION parameter.  Ouput one part of the table at a time.
14981         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14982         the first part of the exception table and emit unwind directives.
14983         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14984         (i386_pe_seh_cold_init): Likewise.
14985         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14986         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14987         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14988         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14989         * config/i386/winnt.c: Include except.h.
14990         (struct seh_frame_state): Add reg_offset, after_prologue and
14991         in_cold_section fields.
14992         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14993         (i386_pe_seh_cold_init): New function.
14994         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14995         to seh->in_cold_section.
14996         (seh_emit_push): Record the offset of the push.
14997         (seh_emit_save): Record the offet of the save.
14998         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14999         Test seh->after_prologue to disregard the epilogue.
15000         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15001         (i386_pe_end_cold_function): New function.
15003 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15005         PR fortran/84565
15006         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15007         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15009         PR c++/84704
15010         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15011         on tmp_var.
15012         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15013         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15015         PR middle-end/84723
15016         * multiple_target.c: Include tree-inline.h and intl.h.
15017         (expand_target_clones): Diagnose and fail if node->definition and
15018         !tree_versionable_function_p (node->decl).
15020 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15022         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15023         sprint_ul.
15024         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15025         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15026         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15028 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15030         PR target/84710
15031         * combine.c (try_combine): Use reg_or_subregno instead of handling
15032         just paradoxical SUBREGs and REGs.
15034 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15036         * config/arc/arc.c (arc_finalize_pic): Remove function.
15037         (arc_must_save_register): We use single base PIC register, remove
15038         checks to save/restore the PIC register.
15039         (arc_expand_prologue): Likewise.
15040         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15041         Remove.
15042         (arc_verify_short): Likewise.
15043         (arc_attr_type): Likewise.
15044         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15045         (walk_stores): Likewise.
15046         (arc_address_cost): Make it static.
15047         (arc_verify_short): Likewise.
15048         (branch_dest): Likewise.
15049         (arc_attr_type): Likewise.
15050         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15051         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15052         (arc_final_prescan_insn): Remove inserting the nops due to
15053         hardware hazards.  It is done in reorg step.
15054         (insn_length_variant_t): Remove.
15055         (insn_length_parameters_t): Likewise.
15056         (arc_insn_length_parameters): Likewise.
15057         (arc_get_insn_variants): Likewise.
15058         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15060 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15062         PR inline-asm/84683
15063         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15064         assertion failure.
15066         PR tree-optimization/84687
15067         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15068         on new_node->decl.
15069         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15071 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15073         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15074         Rename to ppc_speculation_barrier.
15075         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15076         __builtin_ppc_speculation_barrier.
15078 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15080         PR target/84700
15081         * combine.c (combine_simplify_rtx): Don't try to simplify if
15082         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15083         are equal to x.
15085 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15087         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15088         to 32 bytes when compiling for POWER9.
15090 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15092         PR target/84564
15093         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15094         regparm >= 3 with no arg reg available also for calls with
15095         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15097         PR target/84524
15098         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15099         orig,vex.
15100         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15102 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15104         PR target/84264
15105         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15107 2018-03-05  Richard Biener  <rguenther@suse.de>
15109         PR tree-optimization/84486
15110         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15111         When inserting a __builtin_assume_aligned call set the LHS
15112         SSA name alignment info accordingly.
15114 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15116         PR tree-optimization/84114
15117         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15118         Avoid reassociation of FLOAT_MODE addition.
15120 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15122         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15123         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15124         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15125         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15126         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15127         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15128         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15129         and -mwbnoinvd.
15130         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15131         __builtin_ia32_wbinvd): New builtins.
15132         (SPECIAL_ARGS2): New.
15133         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15134         (SPECIAL_ARGS2): New.
15135         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15136         (ix86_valid_target_attribute_inner_p): Ditto.
15137         (ix86_init_mmx_sse_builtins): Add special_args2.
15138         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15139         TARGET_WBNOINVD_P): New.
15140         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15141         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15142         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15143         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15144         * config/i386/pconfigintrin.h: New file.
15145         * config/i386/wbnoinvdintrin.h: Ditto.
15146         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15147         wbnoinvdintrin.h.
15148         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15150 2018-03-05  Richard Biener  <rguenther@suse.de>
15152         PR tree-optimization/84670
15153         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15154         member.
15155         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15156         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15157         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15158         doesn't grow if all successors (recursively) were visited at least
15159         once.
15161 2018-03-05  Richard Biener  <rguenther@suse.de>
15163         PR tree-optimization/84650
15164         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15165         if executed in the loop pipeline.
15167 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15169         * doc/configfiles.texi (Configuration Files): Move info about
15170         conditionalizing $target-protos.h to...
15171         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15172         differs from $target-protos.h.
15174 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15175             Chung-Ju Wu  <jasonwucj@gmail.com>
15177         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15178         * config/nds32/nds32-multiple.md (setmemsi): Define.
15179         * config/nds32/nds32-memory-manipulation.c
15180         (nds32_gen_dup_4_byte_to_word_value): New.
15181         (emit_setmem_word_loop): New.
15182         (emit_setmem_byte_loop): New.
15183         (nds32_expand_setmem_loop): New.
15184         (nds32_expand_setmem_loop_v3m): New.
15185         (nds32_expand_setmem_unroll): New.
15186         (nds32_expand_setmem): New.
15188 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15189             Chung-Ju Wu  <jasonwucj@gmail.com>
15191         * config/nds32/nds32-memory-manipulation.c
15192         (nds32_emit_load_store): New.
15193         (nds32_emit_post_inc_load_store): New.
15194         (nds32_emit_mem_move): New.
15195         (nds32_emit_mem_move_block): New.
15196         (nds32_expand_movmemsi_loop_unknown_size): New.
15197         (nds32_expand_movmemsi_loop_known_size): New.
15198         (nds32_expand_movmemsi_loop): New.
15199         (nds32_expand_movmemsi_unroll): New.
15200         (nds32_expand_movmemqi): Rename ...
15201         (nds32_expand_movmemsi): ... to this.
15202         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15203         (movmemsi): ... to this.
15204         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15205         (nds32_expand_movmemsi): ... to this.
15207 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15208             Monk Chiang  <sh.chiang04@gmail.com>
15209             Chung-Ju Wu  <jasonwucj@gmail.com>
15211         * config/nds32/nds32-protos.h
15212         (nds32_expand_load_multiple): New arguments.
15213         (nds32_expand_store_multiple): Ditto.
15214         (nds32_valid_multiple_load_store): Rename ...
15215         (nds32_valid_multiple_load_store_p): ... to this.
15216         * config/nds32/nds32-memory-manipulation.c
15217         (nds32_expand_load_multiple): Refine implementation.
15218         (nds32_expand_store_multiple): Ditto.
15219         * config/nds32/nds32-multiple.md
15220         (load_multiple): Update nds32_expand_load_multiple interface.
15221         (store_multiple): Update nds32_expand_store_multiple interface.
15222         * config/nds32/nds32-predicates.c
15223         (nds32_valid_multiple_load_store): Rename ...
15224         (nds32_valid_multiple_load_store_p): ... to this and refine
15225         implementation.
15226         * config/nds32/predicates.md
15227         (nds32_load_multiple_and_update_address_operation): New predicate.
15228         (nds32_store_multiple_and_update_address_operation): New predicate.
15230 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15231             Chung-Ju Wu  <jasonwucj@gmail.com>
15233         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15234         (combo): New attribute.
15235         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15237 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15239         * config/nds32/nds32.opt: Change -mcmodel= default value.
15241 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15242             Monk Chiang  <sh.chiang04@gmail.com>
15243             Chung-Ju Wu  <jasonwucj@gmail.com>
15245         * config/nds32/constants.md (unspec_element): New enum.
15246         * config/nds32/constraints.md (Umw): New constraint.
15247         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15248         * config/nds32/nds32-intrinsic.md: Likewise.
15249         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15250         (nds32_valid_smw_lwm_base_p): New.
15251         (nds32_output_smw_single_word): New.
15252         (nds32_output_lmw_single_word): New.
15253         (nds32_expand_unaligned_load): New.
15254         (nds32_expand_unaligned_store): New.
15255         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15256         (nds32_output_smw_single_word): Declare.
15257         (nds32_output_lmw_single_word): Declare.
15258         (nds32_expand_unaligned_load): Declare.
15259         (nds32_expand_unaligned_store): Declare.
15260         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15261         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15262         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15263         NDS32_BUILTIN_UASTORE_DW.
15264         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15265         predicate.
15267 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15268             Kito Cheng  <kito.cheng@gmail.com>
15269             Chung-Ju Wu  <jasonwucj@gmail.com>
15271         * config/nds32/nds32-intrinsic.c
15272         (nds32_expand_builtin_null_ftype_reg): Delete.
15273         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15274         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15275         (nds32_read_argument): New.
15276         (nds32_legitimize_target): Ditto.
15277         (nds32_legitimize_argument): Ditto.
15278         (nds32_check_constant_argument): Ditto.
15279         (nds32_expand_unop_builtin): Ditto.
15280         (nds32_expand_unopimm_builtin): Ditto.
15281         (nds32_expand_binop_builtin): Ditto.
15282         (nds32_builtin_decl_impl): Ditto.
15283         (builtin_description): Ditto.
15284         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15285         (nds32_init_builtins_impl): Ditto.
15286         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15287         (nds32_builtin_decl): New.
15288         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15289         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15291 2018-03-02  Jeff Law  <law@redhat.com>
15293         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15294         (redundant_insn, fill_simple_delay_slots): Likewise.
15295         (fill_slots_from_thread): Likewise.
15296         * resource.c (mark_referenced_resources): Likewise.
15297         (mark_set_resources, find_dead_or_set_registers): Likewise.
15299 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15301         * substring-locations.h (format_warning_va): Formatting fix for
15302         ATTRIBUTE_GCC_DIAG.
15303         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15304         argument.
15305         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15306         * substring-locations.c: Include intl.h.
15307         (format_warning_va): Turned into small wrapper around
15308         format_warning_n_va, renamed to ...
15309         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15310         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15311         use ngettext.
15312         (format_warning_at_substring_n): New function.
15313         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15314         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15315         format_warning_at_substring with just a shorter name instead of
15316         const function pointer.
15317         (fmtwarn_n): New function.
15318         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15319         appropriate, get rid of all the fmtstr temporaries, move conditionals
15320         with G_() wrapped string literals directly into fmtwarn arguments,
15321         cast dir.len to (int), formatting fixes.
15323 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15325         * doc/invoke.texi: Remove "Cilk Plus" references.
15327 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15328             Richard Biener  <rguenther@suse.de>
15330         PR ipa/84628
15331         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15332         for error or warning attributes if CALL_FROM_THUNK_P is set.
15333         Formatting fixes.
15335 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15337         PR target/56540
15338         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15339         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15341         PR target/56540
15342         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15343         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15345         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15346         instead of -1U in last predictors element's probability member.
15348 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15350         PR ipa/83983
15351         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15352         arguments if they are comparable.
15354 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15356         PR tree-optimization/84634
15357         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15358         masks and masked_loop_p with a single loop_masks, making sure it's
15359         null for bb vectorization.
15361 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15363         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15364         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15365         loop->force_vectorize to check whether there is no alias.
15367 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15369         PR target/84614
15370         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15371         prototypes.
15372         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15373         comments.
15374         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15375         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15376         instead of a loop around prev_real_insn.
15377         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15378         prev_real_insn.
15380         PR inline-asm/84625
15381         * config/i386/i386.c (ix86_print_operand): Use conditional
15382         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15383         zero vector.
15385 2018-03-02  Richard Biener  <rguenther@suse.de>
15387         PR tree-optimization/84427
15388         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15389         (bitmap_set_subtract_values): Rewrite to handle multiple
15390         exprs per value.
15391         (clean): Likewise.
15392         (prune_clobbered_mems): Likewise.
15393         (phi_translate): Take edge instead of pred/phiblock.
15394         (phi_translate_1): Likewise.
15395         (phi_translate_set): Likewise.  Insert all translated
15396         exprs for a value into the set, keeping possibly multiple
15397         expressions per value.
15398         (compute_antic_aux): Adjust for phi_translate changes.
15399         When intersecting union the expressions and prune those
15400         not in the final value set, keeping possibly multiple
15401         expressions per value.  Do not use value-insertion
15402         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15403         all expressions.  Add verification that the value-sets
15404         only shrink during iteration.
15405         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15406         (do_pre_regular_insertion): Likewise.
15407         (do_pre_partial_partial_insertion): Likewise.
15409 2018-03-02  Richard Biener  <rguenther@suse.de>
15411         PR target/82005
15412         * config/darwin.c (saved_debug_info_level): New static global.
15413         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15414         (darwin_asm_lto_end): Restore debug info generation settings.
15416 2018-03-01  Martin Liska  <mliska@suse.cz>
15418         PR sanitizer/82484
15419         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15420         volatile arguments.
15422 2018-03-01  Richard Biener  <rguenther@suse.de>
15424         PR debug/84645
15425         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15426         type annotation with LTO when debug was disabled at compile-time.
15428 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15430         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15431         XINT with INTVAL.
15432         (mips_final_postscan_insn): Likewise.
15434 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15436         PR rtl-optimization/84528
15437         * alias.c (init_alias_target): Add commentary.
15438         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15439         a unique base value if the frame pointer is not eliminated
15440         to the stack pointer.
15442 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15444         PR rtl-optimization/83327
15445         * lra-int.h (hard_regs_spilled_into): Declare.
15446         * lra.c (hard_regs_spilled_into): Define.
15447         (init_reg_info): Init hard_regs_spilled_into.
15448         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15449         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15450         (process_bb_lives): Handle hard_regs_spilled_into.
15451         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15452         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15454 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15456         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15457         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15458         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15459         * config/rs6000/aix72.h: New file.
15461 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15463         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15464         instead of warning_at with conditional singular and plural messages
15465         where possible.
15467         PR target/52991
15468         * stor-layout.c (update_alignment_for_field): For
15469         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15470         && !DECL_PACKED (field), do the alignment update, just use
15471         only desired_align instead of MAX (type_align, desired_align)
15472         as the alignment.
15473         (place_field): Don't do known_align < desired_align handling
15474         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15475         is non-NULL, instead do it after rli->prev_field handling and
15476         only if not within a bitfield word.  For DECL_PACKED (field)
15477         use type_align of BITS_PER_UNIT.
15479 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15481         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15482         superfluous parentheses and trailing spaces.
15484 2018-02-28  Richard Biener  <rguenther@suse.de>
15486         PR tree-optimization/84584
15487         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15488         SCoPs with fake exit edge.
15490 2018-02-28  Martin Liska  <mliska@suse.cz>
15492         PR testsuite/84597
15493         * timevar.c (timer::print): Fix format to properly print 100%
15494         values.
15496 2018-02-28  Richard Biener  <rguenther@suse.de>
15498         PR middle-end/84607
15499         * genmatch.c (capture_info::walk_match): Do not mark
15500         captured expressions without operands as expr_p given
15501         they act more like predicates and should be subject to
15502         "lost tail" side-effect preserving.
15504 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15506         PR rtl-optimization/81611
15507         * auto-inc-dec.c (attempt_change): Move dead note from
15508         mem_insn if it's the next use of regno
15509         (find_address): Take address use of reg holding
15510         non-incremented value.  Add parm to limit search to the named
15511         reg only.
15512         (merge_in_block): Attempt to use a mem insn that is the next
15513         use of the original regno.
15515 2018-02-27  Martin Sebor  <msebor@redhat.com>
15517         PR c++/83871
15518         * doc/invoke.texi (-Wmissing-attributes): New option.
15519         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15521 2018-02-27  Martin Sebor  <msebor@redhat.com>
15523         PR translation/84207
15524         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15525         n argument to unsigned HOST_WIDE_INT.
15526         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15527         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15528         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15529         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15531 2018-02-27  Richard Biener  <rguenther@suse.de>
15533         PR tree-optimization/84512
15534         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15535         Do not use the estimate returned from record_stmt_cost for
15536         the scalar iteration cost but sum properly using add_stmt_cost.
15538 2018-02-27  Richard Biener  <rguenther@suse.de>
15540         PR tree-optimization/84466
15541         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15542         Adjust last change to less strictly validate use operands.
15544 2018-02-27  Martin Liska  <mliska@suse.cz>
15546         PR gcov-profile/84548
15547         * gcov.c (process_file): Allow partial overlap and consider it
15548         also as group functions.
15549         (output_lines): Properly calculate range of lines for a group.
15551 2018-02-27  Martin Liska  <mliska@suse.cz>
15553         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15554         'ggc' suffixes.  Change first column width.
15555         (timer::print): Fix formatting of the column.
15557 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15559         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15560         preserve inline entry blocks for the sake of debug inline
15561         entry point markers alone.
15562         (remove_unused_locals): Suggest in comments a better place to
15563         force the preservation of inline entry blocks that are
15564         otherwise unused, but do not preserve them.
15566 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15568         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15570 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15572         PR target/84039
15573         * config/i386/constraints.md (Bs): Replace
15574         ix86_indirect_branch_register with
15575         TARGET_INDIRECT_BRANCH_REGISTER.
15576         (Bw): Likewise.
15577         * config/i386/i386.md (indirect_jump): Likewise.
15578         (tablejump): Likewise.
15579         (*sibcall_memory): Likewise.
15580         (*sibcall_value_memory): Likewise.
15581         Peepholes of indirect call and jump via memory: Likewise.
15582         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15583         (*sibcall_value_GOT_32): Likewise.
15584         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15585         (GOT_memory_operand): Likewise.
15586         (call_insn_operand): Likewise.
15587         (sibcall_insn_operand): Likewise.
15588         (GOT32_symbol_operand): Likewise.
15589         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15591 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15593         PR rtl-optimization/83496
15594         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15595         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15596         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15597         redundant insn, if any.
15598         (relax_delay_slots): Likewise.
15599         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15601 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15603         PR tree-optimization/83965
15604         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15605         that grouped statements are part of a reduction chain.  Return
15606         true if the statement is not marked as a reduction itself but
15607         is part of a group.
15608         (vect_recog_dot_prod_pattern): Don't check whether the statement
15609         is part of a group here.
15610         (vect_recog_sad_pattern): Likewise.
15611         (vect_recog_widen_sum_pattern): Likewise.
15613 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15615         PR debug/84545
15616         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15618 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15620         PR target/84530
15621         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15622         the bool argument.
15623         (ix86_output_indirect_function_return): New prototype.
15624         (ix86_split_simple_return_pop_internal): Likewise.
15625         * config/i386/i386.c (indirect_return_via_cx): New.
15626         (indirect_return_via_cx_bnd): Likewise.
15627         (indirect_thunk_name): Handle return va CX_REG.
15628         (output_indirect_thunk_function): Create alias for
15629         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15630         (ix86_output_indirect_jmp): Remove the bool argument.
15631         (ix86_output_indirect_function_return): New function.
15632         (ix86_split_simple_return_pop_internal): Likewise.
15633         * config/i386/i386.md (*indirect_jump): Don't pass false
15634         to ix86_output_indirect_jmp.
15635         (*tablejump_1): Likewise.
15636         (simple_return_pop_internal): Change it to define_insn_and_split.
15637         Call ix86_split_simple_return_pop_internal to split it for
15638         -mfunction-return=.
15639         (simple_return_indirect_internal): Call
15640         ix86_output_indirect_function_return instead of
15641         ix86_output_indirect_jmp.
15643 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15645         PR bootstrap/84405
15646         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15647         memset and value initialization afterwards.
15649 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15651         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15653 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15655         PR target/84521
15656         * common/config/aarch64/aarch64-common.c
15657         (aarch_option_optimization_table[]): Switch
15658         off fomit-frame-pointer
15660 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15661             Chung-Ju Wu  <jasonwucj@gmail.com>
15663         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15664         volatile memory.
15665         (store_multiple): Ditto.
15667 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15669         * config.gcc: Add --with-cpu support for nds32 target.
15670         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15671         * config/nds32/nds32.opt: Add -mcpu= option.
15673 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15675         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15676         isel=yes): Warn for these deprecated options.
15678 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15680         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15681         ISA_2_5_MASKS_EMBEDDED.
15683 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15685         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15686         p->max as pointers rather than using iterative_hash_expr.
15688 2018-02-23  Carl Love  <cel@us.ibm.com>
15690         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15691         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15692         BU_P8V_OVERLOAD_2.
15693         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15694         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15695         P8V_BUILTIN_VEC_VUNSIGNED2.
15697 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15699         PR target/81572
15700         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15701         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15702         LRA_UNKNOWN_ALT.
15703         * lra-constraints.c (curr_insn_transform): Set up
15704         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15705         LRA_UNKNOWN_ALT.
15706         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15707         * lra-eliminations.c (spill_pseudos): Ditto.
15708         (process_insn_for_elimination): Ditto.
15709         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15710         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15711         LRA_NON_CLOBBERED_ALT.
15713 2018-02-22  Martin Sebor  <msebor@redhat.com>
15715         PR tree-optimization/84480
15716         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15717         to maybe_diag_stxncpy_trunc.  Call it.
15718         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15719         from gimple_fold_builtin_strcpy.  Print inlining stack.
15720         (handle_builtin_stxncpy): Print inlining stack.
15721         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15723 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15725         PR target/84176
15726         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15727         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15728         and -fcheck-pointer-bounds are used together.
15729         (indirect_thunk_prefix): New enum.
15730         (indirect_thunk_need_prefix): New function.
15731         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15732         "_nt" instead of "_bnd" for NOTRACK prefix.
15733         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15734         (output_indirect_thunk_function): Likewise.
15735         (): Likewise.
15736         (ix86_code_end): Update output_indirect_thunk_function calls.
15737         (ix86_output_indirect_branch_via_reg): Replace
15738         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15739         (ix86_output_indirect_branch_via_push): Likewise.
15740         (ix86_output_function_return): Likewise.
15741         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15742         incompatible with -fcf-protection=branch and
15743         -fcheck-pointer-bounds.
15745 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15747         PR target/83335
15748         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15749         Change gcc_assert call to output_operand_lossage.
15751 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15753         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15755 2018-02-22  DJ Delorie  <dj@redhat.com>
15756             Sebastian Perta  <sebastian.perta@renesas.com>
15757             Oleg Endo  <olegendo@gcc.gnu.org>
15759         * config/rx/rx.c (rx_rtx_costs): New function.
15760         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15762 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15764         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15766 2018-02-22  Martin Liska  <mliska@suse.cz>
15768         PR driver/83193
15769         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15770         Add "native" as a possible value.
15772 2018-02-22  Martin Liska  <mliska@suse.cz>
15774         PR driver/83193
15775         * config/i386/i386.c (ix86_option_override_internal):
15776         Add "native" as a possible value for -march and -mtune.
15778 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15780         PR target/84502
15781         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15782         to all type variants.
15784         PR tree-optimization/84503
15785         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15786         width as info->bitpos + info->bitsize - start.
15787         (merged_store_group::merge_overlapping): Simplify width computation.
15788         (check_no_overlap): New function.
15789         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15790         start + width and last_order of the group, fail if check_no_overlap
15791         fails.
15792         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15793         to group if check_no_overlap fails.
15795 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15797         * config/rs6000/altivec.md: Delete contraint arguments to
15798         define_expand, define_split, and define_peephole2, and in
15799         define_insn_and_split if always unused.
15800         * config/rs6000/darwin.md: Ditto.
15801         * config/rs6000/dfp.md: Ditto.
15802         * config/rs6000/rs6000.md: Ditto.
15803         * config/rs6000/sync.md: Ditto.
15804         * config/rs6000/vector.md: Ditto.
15805         * config/rs6000/vsx.md: Ditto.
15807 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15809         * config/rs6000/altivec.md: Write output control strings as braced
15810         blocks instead of double-quoted strings.
15811         * config/rs6000/darwin.md: Ditto.
15812         * config/rs6000/rs6000.md: Ditto.
15813         * config/rs6000/vector.md: Ditto.
15814         * config/rs6000/vsx.md: Ditto.
15816 2018-02-21  Jason Merrill  <jason@redhat.com>
15818         PR c++/84314 - ICE with templates and fastcall attribute.
15819         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15821 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15823         * ipa-cp.c (determine_versionability): Fix comment typos.
15825 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15827         PR c/84229
15828         * ipa-cp.c (determine_versionability): Do not version functions caling
15829         va_arg_pack.
15831 2018-02-21  Martin Liska  <mliska@suse.cz>
15833         PR driver/83193
15834         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15835         Add "native" as a possible value.
15836         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15837         the macro when native cpu detection is available.
15839 2018-02-21  Martin Liska  <mliska@suse.cz>
15841         PR driver/83193
15842         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15843         Add "native" as a possible value.
15844         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15845         when native cpu detection is available.
15847 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15848             Martin Sebor  <msebor@redhat.com>
15850         PR tree-optimization/84478
15851         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15852         false.
15853         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15854         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15855         support which is conservatively correct, for 2 only stay conservative
15856         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15857         argument to the 2 argument get_range_strlen, adjust 6 arg
15858         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15859         false.
15860         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15861         (gimple_fold_builtin_strlen): Pass true as last argument to
15862         get_range_strlen.
15864 2018-02-20  Martin Sebor  <msebor@redhat.com>
15866         PR middle-end/84095
15867         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15868         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15869         (builtin_memref::builtin_memref): Factor out parts into
15870         set_base_and_offset and call it.
15872 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15874         PR middle-end/84406
15875         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15876         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15877         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15878         search at the associated MODE_INT.
15880 2018-02-20  Jeff Law  <law@redhat.com>
15882         PR middle-end/82123
15883         PR tree-optimization/81592
15884         PR middle-end/79257
15885         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15886         for range data rather than using global data.
15887         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15888         range data rather than using global data.
15889         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15890         pass it to children as needed.
15891         (struct directive::fmtresult): Similarly.
15892         (struct directive::set_width): Similarly.
15893         (struct directive::set_precision): Similarly.
15894         (format_integer, format_directive, parse_directive): Similarly.
15895         (format_none): Accept unnamed vr_values parameter.
15896         (format_percent, format_floating, format_character): Similarly.
15897         (format_string, format_plain): Similarly.
15898         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15899         the EVRP range analyzer for range data rather than using global data.
15900         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15901         gimple-ssa-evrp-analyze.h
15902         (class sprintf_dom_walker): Add after_dom_children member function.
15903         Add evrp_range_analyzer member.
15904         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15905         range analyzer as needed.
15906         (sprintf_dom_walker::after_dom_children): New member function.
15907         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15908         if not optimizing.
15909         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15910         (evrp_range_analyzer::pop_to_marker): Likewise.
15912 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15914         PR tree-optimization/84419
15915         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15916         with the required type if its current type is compatible but
15917         different.
15919 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15921         PR middle-end/82004
15922         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15923         after vectorization.
15925 2018-02-20  Martin Liska  <mliska@suse.cz>
15927         PR driver/83193
15928         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15929         possible values if we don't have a hint.
15931 2018-02-20  Martin Liska  <mliska@suse.cz>
15933         PR c/84310
15934         PR target/79747
15935         * final.c (shorten_branches): Build align_tab array with one
15936         more element.
15937         * opts.c (finish_options): Add alignment option limit check.
15938         (MAX_CODE_ALIGN): Likewise.
15939         (MAX_CODE_ALIGN_VALUE): Likewise.
15940         * doc/invoke.texi: Document maximum allowed option value for
15941         all -falign-* options.
15943 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15945         PR target/84146
15946         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15947         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15948         * var-tracking.c (emit_note_insn_var_location): Remove all references
15949         to NOTE_INSN_CALL_ARG_LOCATION.
15950         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15951         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15952         Use copy_rtx_if_shared.
15953         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15954         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15955         (dwarf2out_var_location): Remove handling of
15956         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15957         on call_insn.
15958         * final.c (final_scan_insn): Remove all references to
15959         NOTE_INSN_CALL_ARG_LOCATION.
15960         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15961         before dumping final insns.
15962         * except.c (emit_note_eh_region_end): Remove all references to
15963         NOTE_INSN_CALL_ARG_LOCATION.
15964         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15965         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15966         * config/arc/arc.c (hwloop_optimize): Likewise.
15967         * config/arm/arm.c (create_fix_barrier): Likewise.
15968         * config/s390/s390.c (s390_chunkify_start): Likewise.
15969         * config/sh/sh.c (find_barrier): Likewise.
15970         * config/i386/i386.c (rest_of_insert_endbranch,
15971         ix86_seh_fixup_eh_fallthru): Likewise.
15972         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15973         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15974         * config/frv/frv.c (frv_function_prologue): Likewise.
15975         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15976         reg note.
15977         (note_outside_basic_block_p): Remove all references to
15978         NOTE_INSN_CALL_ARG_LOCATION.
15979         * gengtype.c (adjust_field_rtx_def): Likewise.
15980         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15981         Likewise.
15982         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15983         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15985         PR c++/84444
15986         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15987         is ADDR_EXPR.
15989         PR tree-optimization/84452
15990         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15991         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15992         is NULL.
15994 2018-02-19  Martin Liska  <mliska@suse.cz>
15996         PR sanitizer/82183
15997         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15999 2018-02-19  Martin Liska  <mliska@suse.cz>
16000             Richard Sandiford  <richard.sandiford@linaro.org>
16002         PR tree-optimization/82491
16003         * gimple-fold.c (get_base_constructor): Make earlier bail out
16004         to prevent ubsan.
16006 2018-02-19  Carl Love  <cel@us.ibm.com>
16008         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16009         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16010         BU_P8V_OVERLOAD_1.
16011         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16012         P8V_BUILTIN_VEC_NEG.
16014 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16016         * config/rl78/rl78.md (movdf): New define expand.
16018 2018-02-19  Martin Liska  <mliska@suse.cz>
16020         PR other/80589
16021         * doc/invoke.texi: Fix typo.
16022         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16024 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16026         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16027         handle rs6000_single_float and rs6000_double_float specially for
16028         e500 family CPUs.
16030 2018-02-16  Jeff Law  <law@redhat.com>
16032         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16033         (pop_regs): Use it.
16035 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16037         PR ipa/84425
16038         * ipa-inline.c (inline_small_functions): Fix a typo.
16040 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16042         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16044 2018-02-16  Carl Love  <cel@us.ibm.com>
16046         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16047         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16048         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16049         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16050         expansion to P8V_BUILTIN_VEC_FLOAT2.
16052 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16054         PR rtl-optimization/70023
16055         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16056         src_regno into account.
16058 2018-02-16  Carl Love  <cel@us.ibm.com>
16060         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16061         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16062         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16063         * config/rs6000/rs6000.c: Remove case statements for
16064         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16065         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16066         and P9V_BUILTIN_VEC_VINSERT4B.
16067         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16068         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16069         * config/rs6000/vsx.md:
16070         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16071         vec_insert4b.
16073 2018-02-16  Carl Love  <cel@us.ibm.com>
16075         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16076         vec_insert4b.
16077         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16078         definitions.
16079         * config/rs6000/rs6000-c.c: Add the definitions for
16080         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16081         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16082         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16083         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16084         definition for insert4b and define insn *insert3b_internal.
16085         * doc/extend.texi: Add documentation for vec_extract4b.
16087 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16089         * doc/extend.texi (Backwards Compatibility): Mention friend
16090         injection.  Note for-scope is deprecated.
16091         * doc/invoke.texi (-ffriend-injection): Deprecate.
16093 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16095         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16096         that moved to I2, also allow destinations that are a paradoxical
16097         subreg (instead of a normal reg).
16099 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16101         PR target/83831
16102         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16103         to QImode.
16105 2018-02-16  Richard Biener  <rguenther@suse.de>
16107         PR tree-optimization/84037
16108         PR tree-optimization/84016
16109         PR target/82862
16110         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16111         Adjust vec_construct for the fact we need additional higher latency
16112         128bit inserts for AVX256 and AVX512 vector builds.
16113         (ix86_add_stmt_cost): Scale vector construction cost for
16114         elementwise loads.
16116 2018-02-16  Richard Biener  <rguenther@suse.de>
16118         PR tree-optimization/84417
16119         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16120         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16121         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16123 2018-02-16  Martin Liska  <mliska@suse.cz>
16125         PR sanitizer/84307
16126         * internal-fn.def (ASAN_CHECK): Set proper flags.
16127         (ASAN_MARK): Likewise.
16129 2018-02-16  Julia Koval  <julia.koval@intel.com>
16131         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16132         from PTA_CANNONLAKE.
16134 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16136         PR target/84272
16137         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16138         Use ++iter rather than iter++ for std::list iterators.
16139         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16140         defer deleting them until all nodes in the forest are processed.  Do
16141         free even leaf nodes.  Change to_process into auto_vec.
16143         PR bootstrap/84405
16144         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16145         * vec.h (vec_default_construct): Use memset instead of placement new
16146         if BROKEN_VALUE_INITIALIZATION is defined.
16147         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16148         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16149         is defined.
16151         PR rtl-optimization/83723
16152         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16153         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16154         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16155         recursive calls.
16156         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16157         callers.
16158         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16160 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16162         PR rtl-optimization/81443
16163         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16164         from inner REGs to paradoxical SUBREGs.
16166 2018-02-16  Richard Biener  <rguenther@suse.de>
16168         PR tree-optimization/84399
16169         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16170         For operands we can analyze at their definition make sure we can
16171         analyze them at each use as well.
16173 2018-02-16  Richard Biener  <rguenther@suse.de>
16175         PR tree-optimization/84190
16176         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16177         volatile accesses if the decl isn't volatile.
16179 2018-02-15  Jason Merrill  <jason@redhat.com>
16181         PR c++/84314 - ICE with templates and fastcall attribute.
16182         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16183         TYPE_CANONICAL on an existing type.
16185 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16187         PR tree-optimization/84383
16188         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16189         dstoff nor call operand_equal_p if dstbase is NULL.
16191         PR tree-optimization/84334
16192         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16193         also a CONSTANT_CLASS_P, punt.
16195 2018-02-14  Jim Wilson  <jimw@sifive.com>
16197         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16198         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16199         to where locals are set.  Add TARGET_RVC support.
16200         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16202 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16204         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16206 2018-02-14  Martin Sebor  <msebor@redhat.com>
16208         PR tree-optimization/83698
16209         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16210         arrays constrain the offset range to their bounds.
16211         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16212         (builtin_access::overlap): Avoid setting the size of overlap if it's
16213         already been set.
16214         (maybe_diag_overlap): Also consider arrays when deciding what values
16215         of offsets to include in diagnostics.
16217 2018-02-14  Martin Sebor  <msebor@redhat.com>
16219         PR c/84108
16220         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16221         that correspond to the kind of a declaration.
16223 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16225         PR target/83984
16226         * config/pa/pa.md: Load address of PIC label using the linkage table
16227         if the label is nonlocal.
16229 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16231         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16232         warning message if user requests -maltivec=be.
16233         * doc/invoke.texi: Document deprecation of -maltivec=be.
16235 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16237         PR target/84220
16238         * config/rs6000/rs6000-c.c: Update definitions for
16239         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16240         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16242 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16244         PR target/84239
16245         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16246         add _get_ssp intrinsics. Remove argument from
16247         __builtin_ia32_rdssp[d|q].
16248         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16249         * config/i386/i386-builtin.def: Remove argument from
16250         __builtin_ia32_rdssp[d|q].
16251         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16252         ix86_expand_special_args_builtin for _rdssp[d|q].
16253         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16254         Clear register before usage.
16255         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16256         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16258 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16260         PR tree-optimization/84357
16261         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16262         operand 1 of an ARRAY_REF too.
16264 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16266         PR target/83831
16267         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16268         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16269         declarations.
16270         (set_of_reg): New struct.
16271         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16272         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16273         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16274         functions.
16275         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16276         Split into bitclr, bitset, bitinvert patterns if appropriate.
16277         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16278         use rx_fuse_in_memory_bitop.
16279         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16280         to named insn, correct maximum insn length.
16282 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16284         PR target/79242
16285         * machmode.def: Define a complex mode for PARTIAL_INT.
16286         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16287         MODE_PARTIAL_INT.
16288         * doc/rtl.texi: Document CSPImode.
16289         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16290         handling.
16291         (msp430_hard_regno_nregs_with_padding): Likewise.
16293 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16295         PR target/84279
16296         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16298 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16300         PR rtl-optimization/84169
16301         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16302         we generated a parallel as new i3 and we split that to new i2 and i3
16303         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16304         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16305         those to i2, not i1.  Partially rewrite this scan code.
16307 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16309         PR c/82210
16310         * stor-layout.c (place_field): For variable length fields, adjust
16311         offset_align afterwards not just based on the field's alignment,
16312         but also on the size.
16314         PR middle-end/84309
16315         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16316         of exps and logs in the use_exp2 case.
16318 2018-02-13  Jeff Law  <law@redhat.com>
16320         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16321         entry for "vector".
16323         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16324         ARGS as unused.
16326 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16328         PR debug/84342
16329         PR debug/84319
16330         * common.opt (gas-loc-support, gas-locview-support): New.
16331         (ginline-points, ginternal-reset-location-views): New.
16332         * doc/invoke.texi: Document them.  Use @itemx where intended.
16333         (gvariable-location-views): Adjust.
16334         * target.def (reset_location_view): New.
16335         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16336         (TARGET_RESET_LOCATION_VIEW): New.
16337         * doc/tm.texi: Rebuilt.
16338         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16339         (dwarf2out_default_as_locview_support): New.
16340         (output_asm_line_debug_info): Use option variables.
16341         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16342         (output_loc_list): Likewise.
16343         (add_high_low_attributes): Check option variables.
16344         Don't output entry view attribute in strict mode.
16345         (gen_inlined_subroutine_die): Check option variables.
16346         (dwarf2out_inline_entry): Likewise.
16347         (init_sections_and_labels): Likewise.
16348         (dwarf2out_early_finish): Likewise.
16349         (maybe_reset_location_view): New, from...
16350         (dwarf2out_var_location): ... here.  Call it.
16351         * debug.h (dwarf2out_default_as_loc_support): Declare.
16352         (dwarf2out_default_as_locview_support): Declare.
16353         * hooks.c (hook_int_rtx_insn_0): New.
16354         * hooks.h (hook_int_rtx_insn_0): Declare.
16355         * toplev.c (process_options): Take -gas-loc-support and
16356         -gas-locview-support from dwarf2out.  Enable
16357         -gvariable-location-views by default only with locview
16358         assembler support.  Enable -ginternal-reset-location-views by
16359         default only if the target defines the corresponding hook.
16360         Enable -ginline-points by default if location views are
16361         enabled; force it disabled if statement frontiers are
16362         disabled.
16363         * tree-inline.c (expand_call_inline): Check option variables.
16364         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16366 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16368         PR tree-optimization/84321
16369         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16370         handling.  Also check whether the anti-range contains any values
16371         that satisfy the mask; switch to a VR_RANGE if not.
16373 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16375         PR sanitizer/84340
16376         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16378 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16380         PR c++/83990
16381         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16382         of call statements, also set location of a load to a temporary.
16384 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16386         * config/rl78/rl78.c (add_vector_labels): New function.
16387         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16388         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16389         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16390         which checks that no arguments are passed.
16391         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16392         * doc/extend.texi: Documentation for the new attribute.
16394 2018-02-13  Andreas Schwab  <schwab@suse.de>
16396         * config/riscv/linux.h (CPP_SPEC): Define.
16398 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16400         PR target/84335
16401         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16402         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16403         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16404         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16405         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16406         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16407         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16408         temporarily for AES and PCLMUL builtins.
16410         PR tree-optimization/84339
16411         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16412         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16413         Formatting fixes.
16415         PR middle-end/84309
16416         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16417         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16418         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16419         inline function.
16420         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16421         inline function.
16422         * omp-simd-clone.h: New file.
16423         * omp-simd-clone.c: Include omp-simd-clone.h.
16424         (expand_simd_clones): No longer static.
16425         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16426         cgraph.h and omp-simd-clone.h.
16427         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16428         (vect_recog_widen_shift_pattern): Formatting fix.
16429         (vect_pattern_recog_1): Don't check optab for calls.
16431         PR target/84336
16432         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16433         operands[2] into a REG before using gen_lowpart on it.
16435 2018-02-12  Jeff Law  <law@redhat.com>
16437         PR target/83760
16438         * config/sh/sh.c (find_barrier): Consider a sibling call
16439         a barrier as well.
16441         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16442         successfully back substituting a reg.
16444 2018-02-12  Richard Biener  <rguenther@suse.de>
16446         PR tree-optimization/84037
16447         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16448         parameter, move visited init to caller.
16449         (vect_slp_analyze_operations): Separate cost from validity
16450         check, initialize visited once for all instances.
16451         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16452         for all instances.
16453         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16454         out an assert.
16455         (vect_model_promotion_demotion_cost): Likewise.
16456         (vectorizable_bswap): Guard cost modeling with !slp_node
16457         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16458         SLP stmts.
16459         (vectorizable_call): Likewise.
16460         (vectorizable_conversion): Likewise.
16461         (vectorizable_assignment): Likewise.
16462         (vectorizable_shift): Likewise.
16463         (vectorizable_operation): Likewise.
16464         (vectorizable_store): Likewise.
16465         (vectorizable_load): Likewise.
16466         (vectorizable_condition): Likewise.
16467         (vectorizable_comparison): Likewise.
16469 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16471         PR sanitizer/84307
16472         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16473         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16474         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16476 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16478         PR middle-end/83665
16479         * params.def (inline-min-speedup): Increase from 8 to 15.
16480         (max-inline-insns-auto): Decrease from 40 to 30.
16481         * ipa-split.c (consider_split): Add some buffer for function to
16482         be considered inlining candidate.
16483         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16484         default values.
16486 2018-02-12  Richard Biener  <rguenther@suse.de>
16488         PR tree-optimization/84037
16489         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16490         matched stmts if we cannot swap the non-matched ones.
16492 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16494         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16495         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16496         _mm_maskz_scalef_round_ss): New intrinsics.
16497         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16498         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16499         __builtin_ia32_scalefss_round): Remove.
16500         (__builtin_ia32_scalefsd_mask_round,
16501         __builtin_ia32_scalefss_mask_round): New intrinsics.
16502         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16503         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16504         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16505         "<round_constraint>")): Changed to ...
16506         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16507         "<round_scalar_constraint>")): ... this.
16508         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16509         %0, %1, %2<round_op3>}"): Changed to ...
16510         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16511         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16512         %2<round_scalar_mask_op3>}"): ... this.
16513         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16515 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16517         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16518         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16519         (_mm_maskz_sqrt_round_ss): New intrinsics.
16520         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16521         (__builtin_ia32_sqrtsd_mask_round)
16522         (__builtin_ia32_sqrtss_mask_round): New builtins.
16523         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16524         (__builtin_ia32_sqrtss_round): Remove.
16525         (__builtin_ia32_sqrtsd_mask_round)
16526         (__builtin_ia32_sqrtss_mask_round): New builtins.
16527         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16528         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16529         ((match_operand:VF_128 1 "vector_operand"
16530         "xBm,<round_constraint>")): Changed to ...
16531         ((match_operand:VF_128 1 "vector_operand"
16532         "xBm,<round_scalar_constraint>")): ... this.
16533         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16534         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16535         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16536         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16537         %<iptr>1<round_scalar_mask_op3>}): ... this.
16538         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16539         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16541 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16543         PR target/84266
16544         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16545         Cast vec_cmpeq result to correct type.
16546         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16547         Cast vec_cmpgt result to correct type.
16549 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16551         * final.c (final_scan_insn_1): Renamed from...
16552         (final_scan_insn): ... this.  New wrapper, to recover
16553         seen from the outermost call in recursive ones.
16554         * config/sparc/sparc.c (output_return): Drop seen from call.
16555         (output_sibcall): Likewise.
16556         * config/visium/visium.c (output_branch): Likewise.
16558 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16560         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16561         function label.
16563 2018-02-10  Alan Modra  <amodra@gmail.com>
16565         PR target/84300
16566         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16567         Specify LR as an input.
16569 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16571         PR sanitizer/83987
16572         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16573         remove_member_access_dummy_vars): New functions.
16574         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16575         lower_omp_1, execute_lower_omp): Use them.
16577         PR rtl-optimization/84308
16578         * shrink-wrap.c (spread_components): Release todo vector.
16580 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16582         PR rtl-optimization/57193
16583         * ira-color.c (struct allocno_color_data): Add member
16584         conflict_allocno_hard_prefs.
16585         (update_conflict_allocno_hard_prefs): New.
16586         (bucket_allocno_compare_func): Add a preference based on
16587         conflict_allocno_hard_prefs.
16588         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16589         (color_allocnos): Remove a dead code.  Initiate
16590         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16592 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16594         PR target/84226
16595         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16596         constraint from =wa to wa.  Avoid a subreg on the output operand,
16597         instead use a pseudo and subreg it in a move.
16598         (p9_xxbrd_<mode>): Changed to ...
16599         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16600         (p9_xxbrd_v2df): New expander.
16601         (p9_xxbrw_<mode>): Changed to ...
16602         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16603         (p9_xxbrw_v4sf): New expander.
16605 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16607         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16609 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16611         PR target/83926
16612         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16613         multiply in 32-bit mode.
16614         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16615         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16616         mode.
16618 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16620         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16621         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16622         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16623         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16625 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16627         PR lto/84213
16628         * dwarf2out.c (is_trivial_indirect_ref): New function.
16629         (dwarf2out_late_global_decl): Do not generate a location
16630         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16631         and that are not defined in the current unit.
16633 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16635         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16636         instead of a libcall for UNORDERED.
16638 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16640         PR target/82641
16641         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16642         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16644 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16646         PR target/PR84295
16647         * config/s390/s390.c (s390_set_current_function): Invoke
16648         s390_indirect_branch_settings also if fndecl didn't change.
16650 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16652         * config/rs6000/rs6000.md (blockage): Set length to zero.
16654 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16656         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16658 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16660         PR sanitizer/84285
16661         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16662         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16663         -static-lib*san.
16665         PR debug/84252
16666         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16667         PARALLEL incoming that failed vt_get_decl_and_offset check.
16669         PR middle-end/84237
16670         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16671         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16672         TREE_READONLY bit.
16673         (get_variable_section): For decls in named .bss* sections pass true as
16674         second argument to bss_initializer_p.
16676 2018-02-09  Marek Polacek  <polacek@redhat.com>
16677             Jakub Jelinek  <jakub@redhat.com>
16679         PR c++/83659
16680         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16681         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16682         Sync some changes from cxx_fold_indirect_ref.
16684 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16686         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16687         markers.
16688         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16689         (BLOCK_INLINE_ENTRY_LABEL): New.
16690         (dwarf2out_var_location): Disregard inline entry markers.
16691         (inline_entry_data): New struct.
16692         (inline_entry_data_hasher): New hashtable type.
16693         (inline_entry_data_hasher::hash): New.
16694         (inline_entry_data_hasher::equal): New.
16695         (inline_entry_data_table): New variable.
16696         (add_high_low_attributes): Add DW_AT_entry_pc and
16697         DW_AT_GNU_entry_view attributes if a pending entry is found
16698         in inline_entry_data_table.  Add old entry_pc attribute only
16699         if debug nonbinding markers are disabled.
16700         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16701         markers are enabled.
16702         (block_within_block_p, dwarf2out_inline_entry): New.
16703         (dwarf2out_finish): Check that no entries remained in
16704         inline_entry_data_table.
16705         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16706         (final_scan_insn, notice_source_line): Likewise.
16707         (rest_of_clean_state): Skip inline entry markers.
16708         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16709         markers.
16710         * gimple.c (gimple_build_debug_inline_entry): New.
16711         * gimple.h (enum gimple_debug_subcode): Add
16712         GIMPLE_DEBUG_INLINE_ENTRY.
16713         (gimple_build_debug_inline_entry): Declare.
16714         (gimple_debug_inline_entry_p): New.
16715         (gimple_debug_nonbind_marker_p): Adjust.
16716         * insn-notes.def (INLINE_ENTRY): New.
16717         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16718         inline entry marker notes.
16719         (print_insn): Likewise.
16720         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16721         (INSN_DEBUG_MARKER_KIND): Likewise.
16722         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16723         * tree-inline.c (expand_call_inline): Build and insert
16724         debug_inline_entry stmt.
16725         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16726         inline entry blocks early, if nonbind markers are enabled.
16727         (dump_scope_block): Dump fragment info.
16728         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16729         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16730         (gimple_build_debug_inline_entry): New.
16731         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16732         Enable/disable inline entry points too.
16733         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16734         (DEBUG_INSN): Describe inline entry markers.
16736         * common.opt (gvariable-location-views): New.
16737         (gvariable-location-views=incompat5): New.
16738         * config.in: Rebuilt.
16739         * configure: Rebuilt.
16740         * configure.ac: Test assembler for view support.
16741         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16742         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16743         * dwarf2out.c (var_loc_view): New typedef.
16744         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16745         (dwarf2out_locviews_in_attribute): New.
16746         (dwarf2out_locviews_in_loclist): New.
16747         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16748         (enum dw_line_info_opcode): Add LI_adv_address.
16749         (struct dw_line_info_table): Add view.
16750         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16751         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16752         (zero_view_p): New variable.
16753         (ZERO_VIEW_P): New macro.
16754         (output_asm_line_debug_info): New.
16755         (struct var_loc_node): Add view.
16756         (add_AT_view_list, AT_loc_list): New.
16757         (add_var_loc_to_decl): Add view param.  Test it against last.
16758         (new_loc_list): Add view params.  Record them.
16759         (AT_loc_list_ptr): Handle loc and view lists.
16760         (view_list_to_loc_list_val_node): New.
16761         (print_dw_val): Handle dw_val_class_view_list.
16762         (size_of_die): Likewise.
16763         (value_format): Likewise.
16764         (loc_list_has_views): New.
16765         (gen_llsym): Set vl_symbol too.
16766         (maybe_gen_llsym, skip_loc_list_entry): New.
16767         (dwarf2out_maybe_output_loclist_view_pair): New.
16768         (output_loc_list): Output view list or entries too.
16769         (output_view_list_offset): New.
16770         (output_die): Handle dw_val_class_view_list.
16771         (output_dwarf_version): New.
16772         (output_compilation_unit_header): Use it.
16773         (output_skeleton_debug_sections): Likewise.
16774         (output_rnglists, output_line_info): Likewise.
16775         (output_pubnames, output_aranges): Update version comments.
16776         (output_one_line_info_table): Output view numbers in asm comments.
16777         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16778         Call maybe_gen_llsym.
16779         (loc_list_from_tree_1): Adjust.
16780         (add_AT_location_description): Create view list attribute if
16781         needed, check it's absent otherwise.
16782         (convert_cfa_to_fb_loc_list): Adjust.
16783         (maybe_emit_file): Call output_asm_line_debug_info for test.
16784         (dwarf2out_var_location): Reset views as needed.  Precompute
16785         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16786         attribute.  Set view.
16787         (new_line_info_table): Reset next view.
16788         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16789         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16790         the assembler, or select appropriate line info opcodes.
16791         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16792         (optimize_string_length): Catch it.  Adjust.
16793         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16794         dw_val_class_view_list, and remove it if no longer needed.
16795         (hash_loc_list): Hash view numbers.
16796         (loc_list_hasher::equal): Compare them.
16797         (optimize_location_lists): Check whether a view list symbol is
16798         needed, and whether the locview attribute is present, and
16799         whether they match.  Remove the locview attribute if no longer
16800         needed.
16801         (index_location_lists): Call skip_loc_list_entry for test.
16802         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16803         Use output_dwarf_version.
16804         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16805         (struct dw_val_node): Add val_view_list.
16806         * final.c (SEEN_NEXT_VIEW): New.
16807         (set_next_view_needed): New.
16808         (clear_next_view_needed): New.
16809         (maybe_output_next_view): New.
16810         (final_start_function): Rename to...
16811         (final_start_function_1): ... this.  Take pointer to FIRST,
16812         add SEEN parameter.  Emit param bindings in the initial view.
16813         (final_start_function): Reintroduce SEEN-less interface.
16814         (final): Rename to...
16815         (final_1): ... this.  Take SEEN parameter.  Output final pending
16816         next view at the end.
16817         (final): Reintroduce seen-less interface.
16818         (final_scan_insn): Output pending next view before switching
16819         sections or ending a block.  Mark the next view as needed when
16820         outputting variable locations.  Notify debug backend of section
16821         changes, and of location view changes.
16822         (rest_of_handle_final): Adjust.
16823         * toplev.c (process_options): Autodetect value for debug variable
16824         location views option.  Warn on incompat5 without -gdwarf-5.
16825         * doc/invoke.texi (gvariable-location-views): New.
16826         (gvariable-location-views=incompat5): New.
16827         (gno-variable-location-views): New.
16829 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16831         PR tree-optimization/84136
16832         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16833         that the result of find_edge is non-NULL.
16835 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16837         PR target/83008
16838         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16839         storing integer register in SImode.  Fix cost of 256 and 512
16840         byte aligned SSE register store.
16842 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16844         * config/i386/i386.c (ix86_multiplication_cost): Fix
16845         multiplication cost for TARGET_AVX512DQ.
16847 2018-02-08  Marek Polacek  <polacek@redhat.com>
16849         PR tree-optimization/84238
16850         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16851         get_range_strlen.
16853 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16855         PR tree-optimization/84265
16856         * tree-vect-stmts.c (vectorizable_store): Don't treat
16857         VMAT_CONTIGUOUS accesses as grouped.
16858         (vectorizable_load): Likewise.
16860 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16862         PR tree-optimization/81635
16863         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16864         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16865         (test_round_for_mask): New functions.
16866         (wide_int_cc_tests): Call test_round_for_mask.
16867         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16868         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16869         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16870         range returned by get_range_info.
16872 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16874         PR ipa/81360
16875         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16876         * symtab.c: Include builtins.h
16877         (symtab_node::output_to_lto_symbol_table_p): Move here
16878         from lto-streamer-out.c:output_symbol_p.
16879         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16880         (output_symbol_p): Move all logic to symtab.c
16881         (produce_symtab): Update.
16883 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16885         * config/s390/s390-opts.h (enum indirect_branch): Define.
16886         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16887         (s390_indirect_branch_via_thunk)
16888         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16889         (enum s390_indirect_branch_type): Define.
16890         * config/s390/s390.c (struct s390_frame_layout, struct
16891         machine_function): Remove.
16892         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16893         (indirect_branch_table_label_no, indirect_branch_table_name):
16894         Define variables.
16895         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16896         (enum s390_indirect_branch_option): Define.
16897         (s390_return_addr_from_memory): New function.
16898         (s390_handle_string_attribute): New function.
16899         (s390_attribute_table): Add new attribute handler.
16900         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16901         (s390_indirect_branch_via_thunk): New function.
16902         (s390_indirect_branch_via_inline_thunk): New function.
16903         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16904         sibling call optimization for non z10 compiles.
16905         (s390_emit_call): Force indirect branch target to be a single
16906         register.  Add r1 clobber for non-z10 compiles.
16907         (s390_emit_epilogue): Emit return jump via return_use expander.
16908         (s390_reorg): Handle JUMP_INSNs as execute targets.
16909         (s390_option_override_internal): Perform validity checks for the
16910         new command line options.
16911         (s390_indirect_branch_attrvalue): New function.
16912         (s390_indirect_branch_settings): New function.
16913         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16914         (s390_output_indirect_thunk_function):  New function.
16915         (s390_code_end): Implement target hook.
16916         (s390_case_values_threshold): Implement target hook.
16917         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16918         macros.
16919         * config/s390/s390.h (struct s390_frame_layout)
16920         (struct machine_function): Move here from s390.c.
16921         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16922         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16923         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16924         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16925         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16926         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16927         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16928         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16929         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16930         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16931         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16932         (mnemonic attribute): Add values which aren't recognized
16933         automatically.
16934         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16935         pattern for branch conversion.  Fix mnemonic attribute.
16936         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16937         indirect branch via thunk if requested.
16938         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16939         ("*indirect_jump"): Disable for branch conversion using out of
16940         line thunks.
16941         ("indirect_jump_via_thunk<mode>_z10")
16942         ("indirect_jump_via_thunk<mode>")
16943         ("indirect_jump_via_inlinethunk<mode>_z10")
16944         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16945         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16946         ("casesi_jump_via_inlinethunk<mode>_z10")
16947         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16948         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16949         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16950         ("*indirect2_jump"): Disable for branch conversion.
16951         ("casesi_jump"): Turn into expander and expand patterns for branch
16952         conversion.
16953         ("return_use"): New expander.
16954         ("*return"): Emit return via thunk and rename it to ...
16955         ("*return<mode>"): ... this one.
16956         * config/s390/s390.opt: Add new options and and enum for the
16957         option values.
16959 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16961         * lra-constraints.c (match_reload): Unconditionally use
16962         gen_lowpart_SUBREG, rather than selecting between that
16963         and equivalent gen_rtx_SUBREG code.
16965 2018-02-08  Richard Biener  <rguenther@suse.de>
16967         PR tree-optimization/84233
16968         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16969         changed flag instead of boguously re-using phi_inserted.
16971 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16973         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16974         static local variables.
16976 2018-02-08  Richard Biener  <rguenther@suse.de>
16978         PR tree-optimization/84278
16979         * tree-vect-stmts.c (vectorizable_store): When looking for
16980         smaller vector types to perform grouped strided loads/stores
16981         make sure the mode is supported by the target.
16982         (vectorizable_load): Likewise.
16984 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16986         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16987         Increase LDP/STP opportunities by adding adjacent callee-saves.
16989 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16991         PR rtl-optimization/84068
16992         PR rtl-optimization/83459
16993         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16995 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16997         PR tree-optimization/84224
16998         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16999         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17000         non-zero arguments.
17002 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17004         PR target/84113
17005         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17006         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17007         count, remove one USE.
17009 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17011         * doc/install.texi (Configuration): Document the
17012         --with-long-double-format={ibm,ieee} PowerPC configuration
17013         options.
17015         PR target/84154
17016         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17017         Convert from define_expand to be define_insn_and_split.  Rework
17018         float/double/_Float128 conversions to QI/HI/SImode to work with
17019         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17020         conversions to QI/HImode types did a store and then a load to
17021         truncate the value.  For conversions to VSX registers, don't split
17022         the insn, instead emit the code directly.  Use the code iterator
17023         any_fix to combine signed and unsigned conversions.
17024         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17025         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17026         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17027         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17028         (fix_<mode>di2_hw): Likewise.
17029         (fixuns_<mode>di2_hw): Likewise.
17030         (fix_<mode>si2_hw): Likewise.
17031         (fixuns_<mode>si2_hw): Likewise.
17032         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17033         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17034         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17035         fix<uns>_trunc<SFDF:mode>si2_p8.
17036         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17037         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17038         (fix<uns>_<mode>_mem): Likewise.
17039         (fctiw<u>z_<mode>_mem): Likewise.
17040         (fix<uns>_<mode>_mem): Likewise.
17041         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17042         the register allocator from doing a direct move to the GPRs to do
17043         a store, and instead use the ISA 3.0 store byte/half-word from
17044         vector register instruction.  For IEEE 128-bit floating point,
17045         also optimize stores of 32-bit ints.
17046         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17048 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17050         * genextract.c (push_pathstr_operand): New function to support
17051         [a-zA-Z].
17052         (walk_rtx): Call push_pathstr_operand.
17053         (print_path): Support [a-zA-Z].
17055 2018-02-07  Richard Biener  <rguenther@suse.de>
17057         PR tree-optimization/84037
17058         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17059         (cse_and_gimplify_to_preheader): Declare.
17060         (vect_get_place_in_interleaving_chain): Likewise.
17061         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17062         ivexpr_map.
17063         (_loop_vec_info::~_loop_vec_info): Delete it.
17064         (cse_and_gimplify_to_preheader): New function.
17065         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17066         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17067         (vectorizable_load): Likewise.  For grouped stores always base
17068         the IV on the first element.
17069         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17070         condition before gimplifying.
17072 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17074         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17075         *DIV_EXPR and *MOD_EXPR.
17077 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17079         PR target/84248
17080         * config/i386/i386.c (ix86_option_override_internal): Mask out
17081         the CF_SET bit when checking -fcf-protection.
17083 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17085         PR libgomp/84217
17086         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17087         enough.
17089 2018-02-07  Richard Biener  <rguenther@suse.de>
17091         PR tree-optimization/84204
17092         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17093         this place.
17095         PR tree-optimization/84205
17096         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17097         special-case isl_ast_op_zdiv_r.
17099         PR tree-optimization/84223
17100         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17101         Only add conditions from within the region.
17102         (gather_bbs::after_dom_children): Adjust.
17104 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17106         PR target/84209
17107         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17108         * config/avr/avr.md: Only post-reload split REG-REG moves if
17109         either register is GENERAL_REG_P.
17111 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17113         PR tree-optimization/84235
17114         * tree-ssa-scopedtables.c
17115         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17116         if the subtraction is performed in floating point type where NaNs are
17117         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17118         build 1.  Formatting fix.
17120 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17122         PR target/84146
17123         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17124         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17125         and skip it regardless of bb boundaries.  Use CALL_P macro,
17126         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17127         unnecessarily, formatting fix.
17129 2018-02-06  Michael Collison  <michael.collison@arm.com>
17131         * config/arm/thumb2.md:
17132         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17133         (*thumb_mov_notscc): Ditto.
17135 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17137         PR target/84154
17138         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17139         unsigned_fix, not "s".
17141 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17143         * configure.ac (gcc_fn_eh_frame_ro): New function.
17144         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17145         correct .eh_frame permissions.
17146         * configure: Regenerate.
17148 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17150         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17151         irrelevant options.
17153 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17155         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17156         Display warning message for -mno-speculate-indirect-jumps.
17158 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17160         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17161         Undocumented.
17162         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17164 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17166         PR tree-optimization/84225
17167         * tree-eh.c (find_trapping_overflow): Only call
17168         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17170 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17172         PR target/84145
17173         * config/i386/i386.c: Reimplement the check of possible options
17174         -mibt/-mshstk conbination. Change error messages.
17175         * doc/invoke.texi: Fix a typo: remove extra '='.
17177 2018-02-06  Marek Polacek  <polacek@redhat.com>
17179         PR tree-optimization/84228
17180         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17182 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17184         PR target/82641
17185         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17186         emitted arch directives.
17187         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17188         __ARM_FEATURE_COPROC before changing architectures.
17190 2018-02-06  Richard Biener  <rguenther@suse.de>
17192         * config/i386/i386.c (print_reg): Fix typo.
17193         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17195 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17197         * configure: Regenerate.
17199 2018-02-05  Martin Sebor  <msebor@redhat.com>
17201         PR tree-optimization/83369
17202         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17203         inlining context.
17205 2018-02-05  Martin Liska  <mliska@suse.cz>
17207         * doc/invoke.texi: Cherry-pick upstream r323995.
17209 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17211         * ira.c (ira_init_register_move_cost): Adjust comment.
17213 2018-02-05  Martin Liska  <mliska@suse.cz>
17215         PR gcov-profile/84137
17216         * doc/gcov.texi: Fix typo in documentation.
17218 2018-02-05  Martin Liska  <mliska@suse.cz>
17220         PR gcov-profile/83879
17221         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17222         using dlopen functionality.
17224 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17226         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17227         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17228         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17229         _mm_maskz_range_round_ss): New intrinsics.
17230         (__builtin_ia32_rangesd128_round)
17231         (__builtin_ia32_rangess128_round): Remove.
17232         (__builtin_ia32_rangesd128_mask_round,
17233         __builtin_ia32_rangess128_mask_round): New builtins.
17234         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17235         __builtin_ia32_rangess128_round): Remove.
17236         (__builtin_ia32_rangesd128_mask_round,
17237         __builtin_ia32_rangess128_mask_round): New builtins.
17238         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17239         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17240         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17241         "<round_saeonly_constraint>")): Changed to ...
17242         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17243         "<round_saeonly_scalar_constraint>")): ... this.
17244         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17245         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17246         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17247         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17248         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17250 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17252         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17253         options.
17254         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17255         Remove all values except native, 8540 and 8548.
17257 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17259         * config/i386/i386.c (ix86_output_function_return): Pass
17260         INVALID_REGNUM, instead of -1, as invalid register number to
17261         indirect_thunk_name and output_indirect_thunk.
17263 2018-02-02  Julia Koval  <julia.koval@intel.com>
17265         * config.gcc: Add -march=icelake.
17266         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17267         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17268         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17269         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17270         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17271         (processor_target_table): Add icelake.
17272         (ix86_option_override_internal): Handle new PTAs.
17273         (get_builtin_code_for_version): Handle icelake.
17274         (M_INTEL_COREI7_ICELAKE): New.
17275         (fold_builtin_cpu): Handle icelake.
17276         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17277         * doc/invoke.texi: Add -march=icelake.
17279 2018-02-02  Julia Koval  <julia.koval@intel.com>
17281         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17282         to wide_int_bitmask.
17283         * wide-int-bitmask.h: New.
17285 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17287         PR target/84066
17288         * config/i386/i386.md: Replace Pmode with word_mode in
17289         builtin_setjmp_setup and builtin_longjmp to support x32.
17291 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17293         PR target/56010
17294         PR target/83743
17295         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17296         #include "opts.h".
17297         (rs6000_supported_cpu_names): New static variable.
17298         (linux_cpu_translation_table): Likewise.
17299         (elf_platform) <cpu>: Define new static variable and use it.
17300         Translate kernel AT_PLATFORM name to canonical name if needed.
17301         Error if platform name is unknown.
17303 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17305         PR target/84089
17306         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17308 2018-02-01  Jeff Law  <law@redhat.com>
17310         PR target/84128
17311         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17312         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17313         the scratch if RELEASE_VIA_POP is false.
17314         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17315         If we have to save a temporary register, decrement SIZE appropriately.
17316         Pass new arguments to release_scratch_register_on_entry.
17317         (ix86_adjust_stack_and_probe): Likewise.
17318         (ix86_emit_probe_stack_range): Pass new arguments to
17319         release_scratch_register_on_entry.
17321 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17323         PR rtl-optimization/84157
17324         * combine.c (change_zero_ext): Use REG_P predicate in
17325         front of HARD_REGISTER_P predicate.
17327 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17329         * config/avr/avr.c (avr_option_override): Move disabling of
17330         -fdelete-null-pointer-checks to...
17331         * common/config/avr/avr-common.c (avr_option_optimization_table):
17332         ...here.
17334 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17336         PR tree-optimization/81635
17337         * tree-data-ref.c (split_constant_offset_1): For types that
17338         wrap on overflow, try to use range info to prove that wrapping
17339         cannot occur.
17341 2018-02-01  Renlin Li  <renlin.li@arm.com>
17343         PR target/83370
17344         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17345         TAILCALL_ADDR_REGS.
17346         (aarch64_register_move_cost): Likewise.
17347         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17348         TAILCALL_ADDR_REGS.
17349         (REG_CLASS_NAMES): Likewise.
17350         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17351         TAILCALL_ADDR_REGS. Remove IP registers.
17352         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17354 2018-02-01  Richard Biener  <rguenther@suse.de>
17356         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17357         for specifying RPO order and allow NULL for that.
17358         * domwalk.c (dom_walker::dom_walker): Likewise.
17359         (dom_walker::walk): Handle NULL RPO order.
17360         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17361         in RPO order.
17362         (rewrite_update_dom_walker): Likewise.
17363         (mark_def_dom_walker): Likewise.
17365 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17367         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17368         (aarch64_maybe_expand_sve_subreg_move): Declare.
17369         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17370         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17371         predicate.
17372         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17373         that are semantically a reverse operation.
17374         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17375         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17376         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17377         functions.
17378         (aarch64_can_change_mode_class): For big-endian, forbid changes
17379         between two SVE modes if they have different element sizes.
17381 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17383         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17384         the TImode handling for big-endian targets.
17386 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17388         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17389         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17390         not just bytes.
17391         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17392         Remove BSWAP handing for big-endian targets and use the form of
17393         LD1RQ appropariate for the mode.
17395 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17397         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17398         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17399         duplicated element.
17401 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17403         PR tearget/83845
17404         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17405         check for operands that need to go through aarch64_sve_reload_be.
17407 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17409         PR tree-optimization/81661
17410         PR tree-optimization/84117
17411         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17412         * tree-eh.c: Include gimplify.h.
17413         (find_trapping_overflow, replace_trapping_overflow,
17414         rewrite_to_non_trapping_overflow): New functions.
17415         * tree-vect-loop.c: Include tree-eh.h.
17416         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17417         * tree-data-ref.c: Include tree-eh.h.
17418         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17420 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17422         PR rtl-optimization/84123
17423         * combine.c (change_zero_ext): Check if hard register satisfies
17424         can_change_dest_mode before calling gen_lowpart_SUBREG.
17426 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17428         PR target/82444
17429         * ira.c (ira_init_register_move_cost): Remove assert.
17431 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17433         PR rtl-optimization/84071
17434         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17435         * doc/tm.texi: Regenerate.
17437 2018-01-31  Richard Biener  <rguenther@suse.de>
17439         PR tree-optimization/84132
17440         * tree-data-ref.c (analyze_miv_subscript): Properly
17441         check whether evolution_function_is_affine_multivariate_p
17442         before calling gcd_of_steps_may_divide_p.
17444 2018-01-31  Julia Koval  <julia.koval@intel.com>
17446         PR target/83618
17447         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17448         * config/i386/i386.md (rdpid_rex64) New.
17449         (rdpid): Make 32bit only.
17451 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17453         PR lto/84105
17454         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17455         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17457 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17459         Revert
17460         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17462         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17464 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17466         PR rtl-optimization/84071
17467         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17468         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17470 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17472         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17473         (arc_attribute_table): Add 'aux' attribute.
17474         (arc_in_small_data_p): Consider aux like variables.
17475         (arc_is_aux_reg_p): New function.
17476         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17477         (arc_get_aux_arg): New function.
17478         (prepare_move_operands): Handle aux-register access.
17479         (arc_handle_aux_attribute): New function.
17480         * doc/extend.texi (ARC Variable attributes): Add subsection.
17482 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17484         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17485         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17486         (arc_attribute_table): Add 'uncached' attribute.
17487         (arc_print_operand): Print '.di' flag for uncached memory
17488         accesses.
17489         (arc_in_small_data_p): Do not consider for small data the uncached
17490         types.
17491         (arc_is_uncached_mem_p): New function.
17492         * config/arc/predicates.md (compact_store_memory_operand): Check
17493         for uncached memory accesses.
17494         (nonvol_nonimm_operand): Likewise.
17495         * doc/extend.texi (ARC Type Attribute): New subsection.
17497 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17499         PR c/84100
17500         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17501         falign-loops=): Add Optimization flag.
17503 2018-01-30  Jeff Law  <law@redhat.com>
17505         PR target/84064
17506         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17507         INT_REGISTERS_SAVED.  Check it prior to calling
17508         get_scratch_register_on_entry.
17509         (ix86_adjust_stack_and_probe): Similarly.
17510         (ix86_emit_probe_stack_range): Similarly.
17511         (ix86_expand_prologue): Corresponding changes.
17513 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17515         PR target/40411
17516         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17517         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17519 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17521         PR target/84112
17522         * lra-constraints.c (curr_insn_transform): Process AND in the
17523         address.
17525 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17527         PR rtl-optimization/83986
17528         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17529         dependence against last_pending_memory_flush in addition to
17530         pending_jump_insns.
17532 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17534         PR tree-optimization/81611
17535         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17536         copies.
17538 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17540         PR target/83758
17541         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17542         a reg rtx.
17544 2018-01-30  Richard Biener  <rguenther@suse.de>
17545             Jakub Jelinek  <jakub@redhat.com>
17547         PR tree-optimization/84111
17548         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17549         inner loops added during recursion, as they don't have up-to-date
17550         SSA form.
17552 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17554         PR ipa/81360
17555         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17556         (can_inline_edge_by_limits_p): ... here.
17557         (can_early_inline_edge_p, check_callers,
17558         update_caller_keys, update_callee_keys, recursive_inlining,
17559         add_new_edges_to_heap, speculation_useful_p,
17560         inline_small_functions,
17561         inline_small_functions, flatten_function,
17562         inline_to_all_callers_1): Update.
17564 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17566         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17567         zeros correctly.
17569 2018-01-30  Richard Biener  <rguenther@suse.de>
17571         PR tree-optimization/83008
17572         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17573         invariant and constant vector uses in stmts when they need
17574         more than one stmt.
17576 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17578         PR bootstrap/84017
17579         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17580         * configure: Regenerate.
17582 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17584         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17585         pattern.
17586         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17587         Use gen_rtx_REG rather than gen_lowpart.
17589 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17591         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17592         rather than 0 when creating partial subregs.
17594 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17596         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17597         of usage.
17599 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17601         PR target/81550
17602         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17603         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17604         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17605         flags.  This restores the settings used before the 2017-07-24.
17606         Turning off pre increment/decrement/modify allows IVOPTS to
17607         optimize DF/SF loops where the index is an int.
17609 2018-01-29  Richard Biener  <rguenther@suse.de>
17610             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17612         PR bootstrap/80867
17613         * tree-vect-stmts.c (vectorizable_call): Don't call
17614         targetm.vectorize_builtin_md_vectorized_function if callee is
17615         NULL.
17617 2018-01-22  Carl Love  <cel@us.ibm.com>
17619         * doc/extend.tex: Fix typo in second arg in
17620         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17622 2018-01-29  Richard Biener  <rguenther@suse.de>
17624         PR tree-optimization/84086
17625         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17626         (flush_ssaname_freelist): When SSA names were released reset
17627         the SCEV hash table.
17629 2018-01-29  Richard Biener  <rguenther@suse.de>
17631         PR tree-optimization/84057
17632         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17633         removed paths when removing edges.
17635 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17637         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17638         -mfunction-return=@var{choice}.
17640 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17642         PR diagnostic/84034
17643         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17644         Handle CR like TAB.
17645         (layout::print_source_line): Likewise.
17646         (test_get_line_width_without_trailing_whitespace): Add test cases.
17648 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17650         PR middle-end/84040
17651         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17652         debug insns.
17654 2018-01-26  Jim Wilson  <jimw@sifive.com>
17656         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17658         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17659         specified.
17661 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17663         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17664         and CMP + SUB-immediate -> SUBS.
17666 2018-01-26  Martin Sebor  <msebor@redhat.com>
17668         PR tree-optimization/83896
17669         * tree-ssa-strlen.c (get_string_len): Rename...
17670         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17671         Avoid assuming length is constant.
17672         (handle_char_store): Use HOST_WIDE_INT for string length.
17674 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17676         PR target/81763
17677         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17678         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17680 2018-01-26  Richard Biener  <rguenther@suse.de>
17682         PR rtl-optimization/84003
17683         * dse.c (record_store): Only record redundant stores when
17684         the earlier store aliases at least all accesses the later one does.
17686 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17688         PR rtl-optimization/83985
17689         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17690         REG_CFA_RESTORE insns.
17691         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17692         REG_CFA_RESTORE insns here.
17694         PR c/83989
17695         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17696         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17698 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17700         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17701         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17702         (arc_init): Likewise.
17703         (arc_override_options): Likewise.
17704         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17705         value.
17706         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17707         support.
17708         * config/arc/arc.h (TARGET_DBNZ): Define.
17709         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17710         properly set the tune attribute.
17711         (dbnz): Use TARGET_DBNZ guard.
17712         * config/arc/arc.opt (mtune): Add core3 option.
17714 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17716         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17717         recognize new pic like addresses.
17718         (arc_delegitimize_address): Clean up.
17720 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17722         * config/arc/arc-arches.def: Option mrf16 valid for all
17723         architectures.
17724         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17725         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17726         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17727         * config/arc/arc-tables.opt: Regenerate.
17728         * config/arc/arc.c (arc_conditional_register_usage): Handle
17729         reduced register file case.
17730         (arc_file_start): Set must have build attributes.
17731         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17732         mrf16 option value.
17733         * config/arc/arc.opt (mrf16): Add new option.
17734         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17735         * config/arc/genmultilib.awk: Handle new mrf16 option.
17736         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17737         * config/arc/t-multilib: Regenerate.
17738         * doc/invoke.texi (ARC Options): Document mrf16 option.
17740 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17742         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17743         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17744         (arc_attribute_table): Add 'secure_call' attribute.
17745         (arc_print_operand): Print secure call operand.
17746         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17747         secure.
17748         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17749         (call_i): Add support for sjli instruction.
17750         (call_value_i): Likewise.
17751         * config/arc/constraints.md (Csc): New constraint.
17753 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17754             John Eric Martin  <John.Martin@emmicro-us.com>
17756         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17757         * config/arc/arc.c (_arc_jli_section): New struct.
17758         (arc_jli_section): New type.
17759         (rc_jli_sections): New static variable.
17760         (arc_handle_jli_attribute): New function.
17761         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17762         (arc_file_end): New function.
17763         (TARGET_ASM_FILE_END): Define.
17764         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17765         (arc_add_jli_section): New function.
17766         (jli_call_scan): Likewise.
17767         (arc_reorg): Call jli_call_scan.
17768         (arc_output_addsi): Remove 'S' from printing asm operand.
17769         (arc_is_jli_call_p): New function.
17770         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17771         operand.
17772         (movhi_insn): Likewise.
17773         (movsi_insn): Likewise.
17774         (movsi_set_cc_insn): Likewise.
17775         (loadqi_update): Likewise.
17776         (load_zeroextendqisi_update): Likewise.
17777         (load_signextendqisi_update): Likewise.
17778         (loadhi_update): Likewise.
17779         (load_zeroextendhisi_update): Likewise.
17780         (load_signextendhisi_update): Likewise.
17781         (loadsi_update): Likewise.
17782         (loadsf_update): Likewise.
17783         (movsicc_insn): Likewise.
17784         (bset_insn): Likewise.
17785         (bxor_insn): Likewise.
17786         (bclr_insn): Likewise.
17787         (bmsk_insn): Likewise.
17788         (bicsi3_insn): Likewise.
17789         (cmpsi_cc_c_insn): Likewise.
17790         (movsi_ne): Likewise.
17791         (movsi_cond_exec): Likewise.
17792         (clrsbsi2): Likewise.
17793         (norm_f): Likewise.
17794         (normw): Likewise.
17795         (swap): Likewise.
17796         (divaw): Likewise.
17797         (flag): Likewise.
17798         (sr): Likewise.
17799         (kflag): Likewise.
17800         (ffs): Likewise.
17801         (ffs_f): Likewise.
17802         (fls): Likewise.
17803         (call_i): Remove 'S' asm letter, add jli instruction.
17804         (call_value_i): Likewise.
17805         * config/arc/arc.op (mjli-always): New option.
17806         * config/arc/constraints.md (Cji): New constraint.
17807         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17808         operand.
17809         (subsf3_fpx): Likewise.
17810         (mulsf3_fpx): Likewise.
17811         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17812         asm operand.
17813         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17814         function attrbutes.
17815         * doc/invoke.texi (ARC): Document mjli-always option.
17817 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17819         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17820         avoid addition with 0 and use incw and decw where possible.
17822 2018-01-26  Richard Biener  <rguenther@suse.de>
17824         PR tree-optimization/81082
17825         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17826         association if it requires casting to unsigned.
17827         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17828         from fold_plusminus_mult_expr to catch important cases late when
17829         range info is available.
17831 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17833         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17834         * configure.ac (hidden_linkonce): New test.
17835         * configure: Regenerate.
17836         * config.in: Regenerate.
17838 2018-01-26  Julia Koval  <julia.koval@intel.com>
17840         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17841         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17842         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17843         _mm_mask_bitshuffle_epi64_mask): Fix type.
17844         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17845         USI_FTYPE_V4DI_V4DI_USI): Remove.
17846         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17847         __builtin_ia32_vpshufbitqmb256_mask,
17848         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17849         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17850         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17852 2018-01-26  Alan Modra  <amodra@gmail.com>
17854         PR target/84033
17855         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17856         UNSPEC_VBPERMQ.  Sort other unspecs.
17858 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17860         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17862 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17864         PR middle-end/83055
17865         * predict.c (drop_profile): Do not push/pop cfun; update also
17866         node->count.
17867         (handle_missing_profiles): Fix logic looking for zero profiles.
17869 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17871         PR middle-end/83977
17872         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17873         on functions with #pragma omp declare simd or functions with simd
17874         attribute.
17875         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17876         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17877         Remove trailing \n from warning_at calls.
17879 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17881         PR target/84028
17882         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17883         for neutered workers.
17885 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17887         PR target/68467
17888         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17889         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17891 2018-01-24  Jeff Law  <law@redhat.com>
17893         PR target/83994
17894         * i386.c (get_probe_interval): Move to earlier point.
17895         (ix86_compute_frame_layout): If -fstack-clash-protection and
17896         the frame is larger than the probe interval, then use pushes
17897         to save registers rather than reg->mem moves.
17898         (ix86_expand_prologue): Remove conditional for int_registers_saved
17899         assertion.
17901 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17903         PR target/84014
17904         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17905         min/max for never referenced object.
17907 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17909         PR middle-end/83977
17910         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17911         here.
17912         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17913         attributes from DECL_ATTRIBUTES (decl) without affecting
17914         DECL_ATTRIBUTES (current_function_decl).
17915         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17916         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17918 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17920         PR tree-optimization/83979
17921         * fold-const.c (fold_comparison): Use constant_boolean_node
17922         instead of boolean_{true,false}_node.
17924 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17926         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17927         with zero counts.
17929 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17931         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17932         Simplify the clause that sets the length attribute.
17933         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17934         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17935         clause that sets the length attribute.
17936         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17938 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17940         PR target/83589
17941         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17942         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17943         Add strict parameter.
17944         (prevent_branch_around_nothing): Insert dummy insn between branch to
17945         label and label with no ptx insn inbetween.
17946         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17948 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17950         PR target/81352
17951         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17952         for neutered threads in warp.
17953         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17955 2018-01-24  Richard Biener  <rguenther@suse.de>
17957         PR tree-optimization/83176
17958         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17959         operands.
17961 2018-01-24  Richard Biener  <rguenther@suse.de>
17963         PR tree-optimization/82819
17964         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17965         code generating pluses that are no-ops in the target precision.
17967 2018-01-24  Richard Biener  <rguenther@suse.de>
17969         PR middle-end/84000
17970         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17972 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17974         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17975         to merge probabilities.
17976         * predict.c (probably_never_executed): Also mark as cold functions
17977         with global 0 profile and guessed local profile.
17978         * profile-count.c (profile_probability::combine_with_count): New
17979         member function.
17980         * profile-count.h (profile_probability::operator*,
17981         profile_probability::operator*=, profile_probability::operator/,
17982         profile_probability::operator/=): Reduce precision to adjusted
17983         and set value to guessed on contradictory divisions.
17984         (profile_probability::combine_with_freq): Remove.
17985         (profile_probability::combine_wiht_count): Declare.
17986         (profile_count::force_nonzero):: Set to adjusted.
17987         (profile_count::probability_in):: Set quality to adjusted.
17988         * tree-ssa-tail-merge.c (replace_block_by): Use
17989         combine_with_count.
17991 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17992             Jim Wilson  <jimw@sifive.com>
17994         * config/riscv/riscv.c (riscv_stack_boundary): New.
17995         (riscv_option_override): Set riscv_stack_boundary.  Handle
17996         riscv_preferred_stack_boundary_arg.
17997         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17998         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17999         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18000         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18001         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18002         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18004 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18006         PR target/83905
18007         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18008         of struct ix86_frame.
18009         (ix86_expand_epilogue): Likewise.  Add a local variable for
18010         the reg_save_offset field in struct ix86_frame.
18012 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18014         PR tree-optimization/82604
18015         * tree-loop-distribution.c (enum partition_kind): New enum item
18016         PKIND_PARTIAL_MEMSET.
18017         (partition_builtin_p): Support above new enum item.
18018         (generate_code_for_partition): Ditto.
18019         (compute_access_range): Differentiate cases that equality can be
18020         proven at all loops, the innermost loops or no loops.
18021         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18022         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18023         (finalize_partitions, distribute_loop): Don't fuse partition of
18024         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18025         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18026         parloop is enabled.
18028 2018-01-23  Martin Liska  <mliska@suse.cz>
18030         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18031         order to ignore the predictor.
18032         (PRED_POLYMORPHIC_CALL): Likewise.
18033         (PRED_RECURSIVE_CALL): Likewise.
18035 2018-01-23  Martin Liska  <mliska@suse.cz>
18037         * tree-profile.c (tree_profiling): Print function header to
18038         aware reader which function we are working on.
18039         * value-prof.c (gimple_find_values_to_profile): Do not print
18040         not interesting value histograms.
18042 2018-01-23  Martin Liska  <mliska@suse.cz>
18044         * profile-count.h (enum profile_quality): Add
18045         profile_uninitialized as the first value. Do not number values
18046         as they are zero based.
18047         (profile_count::verify): Update sanity check.
18048         (profile_probability::verify): Likewise.
18050 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18052         * doc/invoke.texi (ffor-scope): Deprecate.
18054 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18056         PR tree-optimization/83510
18057         * domwalk.c (set_all_edges_as_executable): New function.
18058         (dom_walker::dom_walker): Convert bool param
18059         "skip_unreachable_blocks" to enum reachability.  Move setup of
18060         edge flags to set_all_edges_as_executable and only do it when
18061         reachability is REACHABLE_BLOCKS.
18062         * domwalk.h (enum dom_walker::reachability): New enum.
18063         (dom_walker::dom_walker): Convert bool param
18064         "skip_unreachable_blocks" to enum reachability.
18065         (set_all_edges_as_executable): New decl.
18066         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18067         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18068         "reachability".
18069         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18070         but converting true to REACHABLE_BLOCKS.
18071         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18072         * tree-vrp.c
18073         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18074         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18075         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18076         REACHABLE_BLOCKS.
18077         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18078         if check_all_array_refs will be called.
18080 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18082         * tree.c (selftest::test_location_wrappers): Add more test
18083         coverage.
18085 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18087         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18088         (selftest::test_bit_in_range): Likewise.
18090 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18092         PR testsuite/83888
18093         * doc/sourcebuild.texi (vect_float): Say that the selector
18094         only describes the situation when -funsafe-math-optimizations is on.
18095         (vect_float_strict): Document.
18097 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18099         PR tree-optimization/83965
18100         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18101         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18102         instead of checking only for a reduction.
18103         (vect_recog_widen_sum_pattern): Likewise.
18105 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18107         * predict.c (probably_never_executed): Only use precise profile info.
18108         (compute_function_frequency): Skip after inlining hack since we now
18109         have quality checking.
18111 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18113         * profile-count.h (profile_probability::very_unlikely,
18114         profile_probability::unlikely, profile_probability::even): Set
18115         precision to guessed.
18117 2018-01-23  Richard Biener  <rguenther@suse.de>
18119         PR tree-optimization/83963
18120         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18121         Properly terminate dominator walk when crossing the exit edge not
18122         when visiting its source block.
18124 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18126         PR c++/83918
18127         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18128         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18130 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18132         PR tree-optimization/83957
18133         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18134         semicolon after for body surrounded by braces.
18136         PR tree-optimization/83081
18137         * profile-count.h (profile_probability::split): New method.
18138         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18139         Use profile_probability::split.
18140         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18141         when splitting a single conditional jump into 2.
18143 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18145         PR tree-optimization/69452
18146         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18147         decl.
18149 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18151         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18152         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18153         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18155 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18157         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18158         declaration.
18159         * config/rl78/rl78.md (movdi): New define_expand.
18160         * config/rl78/rl78.c (rl78_split_movdi): New function.
18162 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18164         PR target/83862
18165         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18166         no longer used.
18167         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18168         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18169         128-bit to produce an UNSPEC move to get the double word with the
18170         signbit and then a shift directly to do signbit.
18171         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18172         implementation with a new version that just does either a direct
18173         move or a regular move.  Move memory interface to separate insns.
18174         Move insns so they are next to the expander.
18175         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18176         with signbit move.  Split big and little endian case.
18177         (signbit<mode>2_dm_mem_le): Likewise.
18178         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18179         (signbit<mode>2_dm2): Likewise.
18181 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18183         * config/rl78/rl78.md (anddi3): New define_expand.
18185 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18187         * config/rl78/rl78.md (umindi3): New define_expand.
18189 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18191         * config/rl78/rl78.md (smindi3): New define_expand.
18193 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18195         * config/rl78/rl78.md (smaxdi3): New define_expand.
18197 2018-01-22  Carl Love  <cel@us.ibm.com>
18199         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18200         LVX_V1TI): Add macro expansion.
18201         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18202         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18203         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18204         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18205         Change check to determine if the instruction is a byte reversing
18206         entry.  Fix typo in comment.
18207         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18208         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18209         Add def_builtin calls for new builtins.
18210         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18211         Add define_insn expansion.
18213 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18215         * config/rl78/rl78.md (umaxdi3): New define_expand.
18217 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18219         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18220         for non-QImode registers.
18222 2018-01-22  Richard Biener  <rguenther@suse.de>
18224         PR tree-optimization/83963
18225         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18226         including the loop exit block.
18227         (scop_detection::merge_sese): Likewise.
18228         (scop_detection::add_scop): Do it here instead.
18230 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18232         * doc/sourcebuild.texi (arm_softfloat): Document.
18234 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18236         PR gcc/77734
18237         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18238         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18239         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18241 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18242             David Edelsohn  <dje.gcc@gmail.com>
18244         PR target/83946
18245         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18246         Change "crset eq" to "crset 2".
18247         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18248         (*call_indirect_aix<mode>_nospec): Likewise.
18249         (*call_value_indirect_aix<mode>_nospec): Likewise.
18250         (*call_indirect_elfv2<mode>_nospec): Likewise.
18251         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18252         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18253         change assembly output from . to $.
18254         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18255         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18256         (*tablejump<mode>_internal1_nospec): Likewise.
18258 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18260         PR target/80870
18261         * config/sh/sh_optimize_sett_clrt.cc:
18262         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18264 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18266         PR tree-optimization/83940
18267         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18268         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18269         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18270         use it to pass back the definition type.
18271         (vect_check_store_rhs): Likewise rhs_dt_out.
18272         (vect_build_gather_load_calls): Add a mask_dt argument and use
18273         it instead of a call to vect_is_simple_use.
18274         (vectorizable_store): Update calls to vect_check_load_store_mask
18275         and vect_check_store_rhs.  Use the dt returned by the latter instead
18276         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18277         instead of calls to vect_is_simple_use.  Pass the scalar rather
18278         than the vector operand to vect_is_simple_use when handling
18279         second and subsequent copies of an rhs value.
18280         (vectorizable_load): Update calls to vect_check_load_store_mask
18281         and vect_build_gather_load_calls.  Use the cached mask_dt and
18282         gs_info.offset_dt instead of calls to vect_is_simple_use.
18284 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18286         PR middle-end/83945
18287         * tree-emutls.c: Include gimplify.h.
18288         (lower_emutls_2): New function.
18289         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18290         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18291         it before further processing.
18293         PR target/83930
18294         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18295         UINTVAL (trueop1) instead of INTVAL (op1).
18297 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18299         PR debug/81570
18300         PR debug/83728
18301         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18302         INCOMING_FRAME_SP_OFFSET if not defined.
18303         (scan_trace): Add ENTRY argument.  If true and
18304         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18305         emit a note to adjust the CFA offset.
18306         (create_cfi_notes): Adjust scan_trace callers.
18307         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18308         INCOMING_FRAME_SP_OFFSET in the CIE.
18309         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18310         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18311         Likewise.
18312         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18313         * doc/tm.texi: Regenerated.
18315 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18317         PR rtl-optimization/83147
18318         * lra-constraints.c (remove_inheritance_pseudos): Use
18319         lra_substitute_pseudo_within_insn.
18321 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18322             Cesar Philippidis  <cesar@codesourcery.com>
18324         PR target/83920
18325         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18327 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18329         PR target/83790
18330         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18331         spaces for function labels.
18333 2018-01-19  Martin Liska  <mliska@suse.cz>
18335         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18336         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18337         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18338         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18339         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18340         (PRED_CONST_RETURN): Change from 69 to 65.
18341         (PRED_NULL_RETURN): Change from 91 to 71.
18342         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18343         (PRED_LOOP_GUARD): Change from 66 to 73.
18345 2018-01-19  Martin Liska  <mliska@suse.cz>
18347         * predict.c (predict_insn_def): Add new assert.
18348         (struct branch_predictor): Change type to signed integer.
18349         (test_prediction_value_range): Amend test to cover
18350         PROB_UNINITIALIZED.
18351         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18352         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18353         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18354         (PRED_LOOP_IV_COMPARE): Likewise.
18355         * predict.h (PROB_UNINITIALIZED): Define new constant.
18357 2018-01-19  Martin Liska  <mliska@suse.cz>
18359         * predict.c (dump_prediction): Add new format for
18360         analyze_brprob.py script which is enabled with -details
18361         suboption.
18362         * profile-count.h (precise_p): New function.
18364 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18366         PR tree-optimization/83922
18367         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18368         there are no statements that need masking.
18369         (vect_active_double_reduction_p): New function.
18370         (vect_analyze_loop_operations): Use it when handling phis that
18371         are not in the loop header.
18373 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18375         PR tree-optimization/83914
18376         * tree-vect-loop.c (vectorizable_induction): Don't convert
18377         init_expr or apply the peeling adjustment for inductions
18378         that are nested within the vectorized loop.
18380 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18382         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18383         instead of NEG.
18385 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18387         PR sanitizer/81715
18388         PR testsuite/83882
18389         * function.h (gimplify_parameters): Add gimple_seq * argument.
18390         * function.c: Include gimple.h and options.h.
18391         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18392         for the added local temporaries if needed.
18393         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18394         if there are any parameter cleanups, wrap whole body into a
18395         try/finally with the cleanups.
18397 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18399         PR target/82964
18400         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18401         Use GET_MODE_CLASS for scalar floating point.
18403 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18405         PR ipa/82256
18406         patch by PaX Team
18407         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18408         Fix call of call_cgraph_insertion_hooks.
18410 2018-01-18  Martin Sebor  <msebor@redhat.com>
18412         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18414 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18416         PR ipa/83619
18417         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18418         frequencies.
18420 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18422         PR other/70268
18423         * common.opt: (-ffile-prefix-map): New option.
18424         * opts.c (common_handle_option): Defer it.
18425         * opts-global.c (handle_common_deferred_options): Handle it.
18426         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18427         * file-prefix-map.h: New file.
18428         (remap_debug_filename, add_debug_prefix_map): ...here.
18429         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18430         * final.c (debug_prefix_map, add_debug_prefix_map
18431         remap_debug_filename): Move to...
18432         * file-prefix-map.c: New file.
18433         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18434         generalize, get rid of alloca(), use strrchr() instead of strchr().
18435         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18436         Implement in terms of add_prefix_map().
18437         (remap_macro_filename, remap_debug_filename): Implement in term of
18438         remap_filename().
18439         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18440         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18441         * dbxout.c: Include file-prefix-map.h.
18442         * varasm.c: Likewise.
18443         * vmsdbgout.c: Likewise.
18444         * xcoffout.c: Likewise.
18445         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18446         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18447         * doc/invoke.texi (-ffile-prefix-map): Document.
18448         (-fdebug-prefix-map): Update description.
18450 2018-01-18  Martin Liska  <mliska@suse.cz>
18452         * config/i386/i386.c (indirect_thunk_name): Document that also
18453         lfence is emitted.
18454         (output_indirect_thunk): Document why both instructions
18455         (pause and lfence) are generated.
18457 2018-01-18  Richard Biener  <rguenther@suse.de>
18459         PR tree-optimization/83887
18460         * graphite-scop-detection.c
18461         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18462         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18463         (scop_detection::merge_sese): Re-implement with a flood-fill
18464         algorithm that properly finds a SESE region if it exists.
18466 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18468         PR c/61240
18469         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18470         pointer_diff optimizations use view_convert instead of convert.
18472 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18474         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18475         Generate different code for -mno-speculate-indirect-jumps.
18476         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18477         (*call_indirect_aix<mode>): Disable for
18478         -mno-speculate-indirect-jumps.
18479         (*call_indirect_aix<mode>_nospec): New define_insn.
18480         (*call_value_indirect_aix<mode>): Disable for
18481         -mno-speculate-indirect-jumps.
18482         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18483         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18484         -mno-speculate-indirect-jumps.
18485         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18487 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18489         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18490         long double type, set the flags for noting the default long double
18491         type, even if we don't pass or return a long double type.
18493 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18495         PR ipa/83051
18496         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18497         failure.
18499 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18501         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18502         support for merge[hl].
18503         (fold_mergehl_helper): New helper function.
18504         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18505         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18506         (altivec_vmrglw_direct): Add xxmrglw insn.
18508 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18510         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18511         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18513 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18515         PR lto/83121
18516         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18517         call the lto_location_cache before reading the
18518         DECL_SOURCE_LOCATION of the types.
18520 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18521             Richard Sandiford  <richard.sandiford@linaro.org>
18523         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18524         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18525         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18526         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18527         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18528         Add declaration.
18529         * config/aarch64/constraints.md (aarch64_movti_operand):
18530         Limit immediates.
18531         * config/aarch64/predicates.md (Uti): Add new constraint.
18533 2018-01-17  Carl Love  <cel@us.ibm.com>
18535         * config/rs6000/vsx.md (define_expand xl_len_r,
18536         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18537         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18538         lxvll.
18539         (define_expand, define_insn): Move the shift left from  the
18540         define_insn to the define_expand for lxvl and stxvl instructions.
18541         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18542         and XL_LEN_R definitions to PURE.
18544 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18546         * config/i386/i386.c (indirect_thunk_name): Declare regno
18547         as unsigned int.  Compare regno with INVALID_REGNUM.
18548         (output_indirect_thunk): Ditto.
18549         (output_indirect_thunk_function): Ditto.
18550         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18551         in the call to output_indirect_thunk_function.
18553 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18555         PR middle-end/83884
18556         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18557         rather than the size of inner_type to determine the stack slot size
18558         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18560 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18562         PR target/83546
18563         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18564         to PTA_SILVERMONT.
18566 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18568         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18569         endian Linux systems to optionally enable multilibs for selecting
18570         the long double type if the user configured an explicit type.
18571         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18572         have no long double multilibs if not defined.
18573         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18574         warn if the user used -mabi={ieee,ibm}longdouble and we built
18575         multilibs for long double.
18576         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18577         appropriate multilib option.
18578         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18579         multilib options.
18580         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18581         for building long double multilibs.
18582         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18584 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18586         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18587         copies.
18589         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18590         64 bits.
18591         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18592         128 bits.
18594         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18595         variables.
18597         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18598         return value.
18600 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18602         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18603         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18605 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18607         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18608         different rtl trees depending on TARGET_64BIT.
18609         (rs6000_gen_lvx): Likewise.
18611 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18613         * config/visium/visium.md (nop): Tweak comment.
18614         (hazard_nop): Likewise.
18616 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18618         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18619         -mspeculate-indirect-jumps.
18620         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18621         for -mno-speculate-indirect-jumps.
18622         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18623         (*call_value_indirect_elfv2<mode>): Disable for
18624         -mno-speculate-indirect-jumps.
18625         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18626         (indirect_jump): Emit different RTL for
18627         -mno-speculate-indirect-jumps.
18628         (*indirect_jump<mode>): Disable for
18629         -mno-speculate-indirect-jumps.
18630         (*indirect_jump<mode>_nospec): New define_insn.
18631         (tablejump): Emit different RTL for
18632         -mno-speculate-indirect-jumps.
18633         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18634         (tablejumpsi_nospec): New define_expand.
18635         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18636         (tablejumpdi_nospec): New define_expand.
18637         (*tablejump<mode>_internal1): Disable for
18638         -mno-speculate-indirect-jumps.
18639         (*tablejump<mode>_internal1_nospec): New define_insn.
18640         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18641         option.
18643 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18645         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18646         callers updated.
18648 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18649             Richard Biener  <rguenth@suse.de>
18651         PR libgomp/83590
18652         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18653         return early, inline manually is_gimple_sizepos.  Make sure if we
18654         call gimplify_expr we don't end up with a gimple constant.
18655         * tree.c (variably_modified_type_p): Don't return true for
18656         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18657         * gimplify.h (is_gimple_sizepos): Remove.
18659 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18661         PR tree-optimization/83857
18662         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18663         vectorizable_live_operation for pure SLP statements.
18664         (vectorizable_live_operation): Handle PHIs.
18666 2018-01-16  Richard Biener  <rguenther@suse.de>
18668         PR tree-optimization/83867
18669         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18670         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18672 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18674         PR c/83844
18675         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18676         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18677         If off is not INTEGER_CST, issue a may not be aligned warning
18678         rather than isn't aligned.  Use isn%'t rather than isn't.
18679         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18680         into MULT_EXPR.
18681         <case MULT_EXPR>: Improve the case when bottom and one of the
18682         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18683         operand, in that case check if the other operand is multiple of
18684         bottom divided by the INTEGER_CST operand.
18686 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18688         PR target/83858
18689         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18690         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18691         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18692         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18693         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18694         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18695         (pa_function_arg_size): New function.
18697 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18699         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18700         in a separate statement.
18702 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18704         PR tree-optimization/83847
18705         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18706         group gathers and scatters.
18708 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18710         PR rtl-optimization/86620
18711         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18713         PR rtl-optimization/83213
18714         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18715         to last if both are JUMP_INSNs.
18717         PR tree-optimization/83843
18718         * gimple-ssa-store-merging.c
18719         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18720         store_immediate_info for bswap/nop orig_stores.
18722 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18724         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18725         !TARGET_MUL.
18726         <UDIV>: Increase cost if !TARGET_DIV.
18728 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18730         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18731         (define_attr "cr_logical_3op"): New.
18732         (cceq_ior_compare): Adjust.
18733         (cceq_ior_compare_complement): Adjust.
18734         (*cceq_rev_compare): Adjust.
18735         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18736         (is_cracked_insn): Adjust.
18737         (insn_must_be_first_in_group): Adjust.
18738         * config/rs6000/40x.md: Adjust.
18739         * config/rs6000/440.md: Adjust.
18740         * config/rs6000/476.md: Adjust.
18741         * config/rs6000/601.md: Adjust.
18742         * config/rs6000/603.md: Adjust.
18743         * config/rs6000/6xx.md: Adjust.
18744         * config/rs6000/7450.md: Adjust.
18745         * config/rs6000/7xx.md: Adjust.
18746         * config/rs6000/8540.md: Adjust.
18747         * config/rs6000/cell.md: Adjust.
18748         * config/rs6000/e300c2c3.md: Adjust.
18749         * config/rs6000/e500mc.md: Adjust.
18750         * config/rs6000/e500mc64.md: Adjust.
18751         * config/rs6000/e5500.md: Adjust.
18752         * config/rs6000/e6500.md: Adjust.
18753         * config/rs6000/mpc.md: Adjust.
18754         * config/rs6000/power4.md: Adjust.
18755         * config/rs6000/power5.md: Adjust.
18756         * config/rs6000/power6.md: Adjust.
18757         * config/rs6000/power7.md: Adjust.
18758         * config/rs6000/power8.md: Adjust.
18759         * config/rs6000/power9.md: Adjust.
18760         * config/rs6000/rs64.md: Adjust.
18761         * config/rs6000/titan.md: Adjust.
18763 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18765         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18766         ix86_indirect_branch_register logic.
18768 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18770         * config/i386/constraints.md (Bs): Update
18771         ix86_indirect_branch_register check.  Don't check
18772         ix86_indirect_branch_register with GOT_memory_operand.
18773         (Bw): Likewise.
18774         * config/i386/predicates.md (GOT_memory_operand): Don't check
18775         ix86_indirect_branch_register here.
18776         (GOT32_symbol_operand): Likewise.
18778 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18780         * config/i386/predicates.md (constant_call_address_operand):
18781         Rewrite ix86_indirect_branch_register logic.
18782         (sibcall_insn_operand): Likewise.
18784 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18786         * config/i386/constraints.md (Bs): Replace
18787         ix86_indirect_branch_thunk_register with
18788         ix86_indirect_branch_register.
18789         (Bw): Likewise.
18790         * config/i386/i386.md (indirect_jump): Likewise.
18791         (tablejump): Likewise.
18792         (*sibcall_memory): Likewise.
18793         (*sibcall_value_memory): Likewise.
18794         Peepholes of indirect call and jump via memory: Likewise.
18795         * config/i386/i386.opt: Likewise.
18796         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18797         (GOT_memory_operand): Likewise.
18798         (call_insn_operand): Likewise.
18799         (sibcall_insn_operand): Likewise.
18800         (GOT32_symbol_operand): Likewise.
18802 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18804         PR middle-end/83837
18805         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18806         type rather than type addr's type points to.
18807         (expand_omp_atomic_mutex): Likewise.
18808         (expand_omp_atomic): Likewise.
18810 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18812         PR target/83839
18813         * config/i386/i386.c (output_indirect_thunk_function): Use
18814         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18815         for  __x86_return_thunk.
18817 2018-01-15  Richard Biener  <rguenther@suse.de>
18819         PR middle-end/83850
18820         * expmed.c (extract_bit_field_1): Fix typo.
18822 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18824         PR target/83687
18825         * config/arm/iterators.md (VF): New mode iterator.
18826         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18827         Remove integer-related logic from pattern.
18828         (neon_vabd<mode>_3): Likewise.
18830 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18832         PR middle-end/82694
18833         * common.opt (fstrict-overflow): No longer an alias.
18834         (fwrapv-pointer): New option.
18835         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18836         also for pointer types based on flag_wrapv_pointer.
18837         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18838         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18839         opts->x_flag_wrapv got set.
18840         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18841         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18842         POINTER_TYPE_OVERFLOW_UNDEFINED.
18843         * match.pd: Likewise in address comparison pattern.
18844         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18846 2018-01-15  Richard Biener  <rguenther@suse.de>
18848         PR lto/83804
18849         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18850         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18851         Reset type names to their identifier if their TYPE_DECL doesn't
18852         have linkage (and thus is used for ODR and devirt).
18853         (save_debug_info_for_decl): Remove.
18854         (save_debug_info_for_type): Likewise.
18855         (add_tree_to_fld_list): Adjust.
18856         * tree-pretty-print.c (dump_generic_node): Make dumping of
18857         type names more robust.
18859 2018-01-15  Richard Biener  <rguenther@suse.de>
18861         * BASE-VER: Bump to 8.0.1.
18863 2018-01-14  Martin Sebor  <msebor@redhat.com>
18865         PR other/83508
18866         * builtins.c (check_access): Avoid warning when the no-warning bit
18867         is set.
18869 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18871         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18872         * ira-color (allocno_hard_regs_compare): Likewise.
18874 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18876         PR target/83013
18877         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18878         Use .pushsection/.popsection.
18880 2018-01-14  Martin Sebor  <msebor@redhat.com>
18882         PR c++/81327
18883         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18885 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18887         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18888         entry from extra_headers.
18889         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18890         extra_headers, make the list bitwise identical to the i?86-*-* one.
18892 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18894         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18895         -mcmodel=large with -mindirect-branch=thunk,
18896         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18897         -mfunction-return=thunk-extern.
18898         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18899         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18900         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18902 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18904         * config/i386/i386.c (print_reg): Print the name of the full
18905         integer register without '%'.
18906         (ix86_print_operand): Handle 'V'.
18907         * doc/extend.texi: Document 'V' modifier.
18909 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18911         * config/i386/constraints.md (Bs): Disallow memory operand for
18912         -mindirect-branch-register.
18913         (Bw): Likewise.
18914         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18915         (GOT_memory_operand): Likewise.
18916         (call_insn_operand): Likewise.
18917         (sibcall_insn_operand): Likewise.
18918         (GOT32_symbol_operand): Likewise.
18919         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18920         for -mindirect-branch-register.
18921         (tablejump): Likewise.
18922         (*sibcall_memory): Likewise.
18923         (*sibcall_value_memory): Likewise.
18924         Disallow peepholes of indirect call and jump via memory for
18925         -mindirect-branch-register.
18926         (*call_pop): Replace m with Bw.
18927         (*call_value_pop): Likewise.
18928         (*sibcall_pop_memory): Replace m with Bs.
18929         * config/i386/i386.opt (mindirect-branch-register): New option.
18930         * doc/invoke.texi: Document -mindirect-branch-register option.
18932 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18934         * config/i386/i386-protos.h (ix86_output_function_return): New.
18935         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18936         set function_return_type.
18937         (indirect_thunk_name): Add ret_p to indicate thunk for function
18938         return.
18939         (output_indirect_thunk_function): Pass false to
18940         indirect_thunk_name.
18941         (ix86_output_indirect_branch_via_reg): Likewise.
18942         (ix86_output_indirect_branch_via_push): Likewise.
18943         (output_indirect_thunk_function): Create alias for function
18944         return thunk if regno < 0.
18945         (ix86_output_function_return): New function.
18946         (ix86_handle_fndecl_attribute): Handle function_return.
18947         (ix86_attribute_table): Add function_return.
18948         * config/i386/i386.h (machine_function): Add
18949         function_return_type.
18950         * config/i386/i386.md (simple_return_internal): Use
18951         ix86_output_function_return.
18952         (simple_return_internal_long): Likewise.
18953         * config/i386/i386.opt (mfunction-return=): New option.
18954         (indirect_branch): Mention -mfunction-return=.
18955         * doc/extend.texi: Document function_return function attribute.
18956         * doc/invoke.texi: Document -mfunction-return= option.
18958 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18960         * config/i386/i386-opts.h (indirect_branch): New.
18961         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18962         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18963         with local indirect jump when converting indirect call and jump.
18964         (ix86_set_indirect_branch_type): New.
18965         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18966         (indirectlabelno): New.
18967         (indirect_thunk_needed): Likewise.
18968         (indirect_thunk_bnd_needed): Likewise.
18969         (indirect_thunks_used): Likewise.
18970         (indirect_thunks_bnd_used): Likewise.
18971         (INDIRECT_LABEL): Likewise.
18972         (indirect_thunk_name): Likewise.
18973         (output_indirect_thunk): Likewise.
18974         (output_indirect_thunk_function): Likewise.
18975         (ix86_output_indirect_branch_via_reg): Likewise.
18976         (ix86_output_indirect_branch_via_push): Likewise.
18977         (ix86_output_indirect_branch): Likewise.
18978         (ix86_output_indirect_jmp): Likewise.
18979         (ix86_code_end): Call output_indirect_thunk_function if needed.
18980         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18981         needed.
18982         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18983         (ix86_attribute_table): Add indirect_branch.
18984         * config/i386/i386.h (machine_function): Add indirect_branch_type
18985         and has_local_indirect_jump.
18986         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18987         to true.
18988         (tablejump): Likewise.
18989         (*indirect_jump): Use ix86_output_indirect_jmp.
18990         (*tablejump_1): Likewise.
18991         (simple_return_indirect_internal): Likewise.
18992         * config/i386/i386.opt (mindirect-branch=): New option.
18993         (indirect_branch): New.
18994         (keep): Likewise.
18995         (thunk): Likewise.
18996         (thunk-inline): Likewise.
18997         (thunk-extern): Likewise.
18998         * doc/extend.texi: Document indirect_branch function attribute.
18999         * doc/invoke.texi: Document -mindirect-branch= option.
19001 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19003         PR ipa/83051
19004         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19006 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19008         * ipa-inline.c (want_inline_small_function_p): Return false if
19009         inlining has already failed with CIF_FINAL_ERROR.
19010         (update_caller_keys): Call want_inline_small_function_p before
19011         can_inline_edge_p.
19012         (update_callee_keys): Likewise.
19014 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19016         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19017         New function.
19018         (rs6000_quadword_masked_address_p): Likewise.
19019         (quad_aligned_load_p): Likewise.
19020         (quad_aligned_store_p): Likewise.
19021         (const_load_sequence_p): Add comment to describe the outer-most loop.
19022         (mimic_memory_attributes_and_flags): New function.
19023         (rs6000_gen_stvx): Likewise.
19024         (replace_swapped_aligned_store): Likewise.
19025         (rs6000_gen_lvx): Likewise.
19026         (replace_swapped_aligned_load): Likewise.
19027         (replace_swapped_load_constant): Capitalize argument name in
19028         comment describing this function.
19029         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19030         and stores that access quad-word aligned addresses and replace
19031         with stvx or lvx instructions when appropriate.
19032         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19033         New function prototype.
19034         (rs6000_quadword_masked_address_p): Likewise.
19035         (rs6000_gen_lvx): Likewise.
19036         (rs6000_gen_stvx): Likewise.
19037         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19038         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19039         when memory address is aligned.
19040         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19041         this split to select lvx instruction when memory address is aligned.
19042         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19043         instruction when memory address is aligned.
19044         (*vsx_le_perm_load_v16qi): Likewise.
19045         (four unnamed splitters): Modify to select the stvx instruction
19046         when memory is aligned.
19048 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19050         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19051         which appears in the queue multiple times.
19053 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19054             Alan Hayward  <alan.hayward@arm.com>
19055             David Sherwood  <david.sherwood@arm.com>
19057         * tree-vectorizer.h (vec_lower_bound): New structure.
19058         (_loop_vec_info): Add check_nonzero and lower_bounds.
19059         (LOOP_VINFO_CHECK_NONZERO): New macro.
19060         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19061         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19062         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19063         fields.  Make seg_len the distance travelled, not including the
19064         access size.
19065         (dr_direction_indicator): Declare.
19066         (dr_zero_step_indicator): Likewise.
19067         (dr_known_forward_stride_p): Likewise.
19068         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19069         tree-ssanames.h.
19070         (runtime_alias_check_p): Allow runtime alias checks with
19071         variable strides.
19072         (operator ==): Compare access_size and align.
19073         (prune_runtime_alias_test_list): Rework for new distinction between
19074         the access_size and seg_len.
19075         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19076         segment lengths.
19077         (get_segment_min_max): New function.
19078         (create_intersect_range_checks): Use it.
19079         (dr_step_indicator): New function.
19080         (dr_direction_indicator): Likewise.
19081         (dr_zero_step_indicator): Likewise.
19082         (dr_known_forward_stride_p): Likewise.
19083         * tree-loop-distribution.c (data_ref_segment_size): Return
19084         DR_STEP * (niters - 1).
19085         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19086         constructor.
19087         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19088         (vect_preserves_scalar_order_p): New function, split out from...
19089         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19090         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19091         (vect_vfa_access_size): New function.
19092         (vect_vfa_align): Likewise.
19093         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19094         (dump_lower_bound): New function.
19095         (vect_check_lower_bound): Likewise.
19096         (vect_small_gap_p): Likewise.
19097         (vectorizable_with_step_bound_p): Likewise.
19098         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19099         depencies if the vectorization factor is 1.  Convert the checks
19100         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19101         a bunds check for variable steps if the minimum required step is
19102         relatively small. Update calls to the dr_with_seg_len
19103         constructor and to vect_compile_time_alias.
19104         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19105         function.
19106         (vect_loop_versioning): Call it.
19107         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19108         when retrying.
19109         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19111 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19112             Alan Hayward  <alan.hayward@arm.com>
19113             David Sherwood  <david.sherwood@arm.com>
19115         * doc/sourcebuild.texi (vect_scatter_store): Document.
19116         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19117         optabs.
19118         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19119         Document.
19120         * genopinit.c (main): Add supports_vec_scatter_store and
19121         supports_vec_scatter_store_cached to target_optabs.
19122         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19123         IFN_MASK_SCATTER_STORE.
19124         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19125         functions.
19126         * internal-fn.h (internal_store_fn_p): Declare.
19127         (internal_fn_stored_value_index): Likewise.
19128         * internal-fn.c (scatter_store_direct): New macro.
19129         (expand_scatter_store_optab_fn): New function.
19130         (direct_scatter_store_optab_supported_p): New macro.
19131         (internal_store_fn_p): New function.
19132         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19133         IFN_MASK_SCATTER_STORE.
19134         (internal_fn_mask_index): Likewise.
19135         (internal_fn_stored_value_index): New function.
19136         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19137         for scatter stores.
19138         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19139         * optabs-query.c (supports_vec_scatter_store_p): New function.
19140         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19141         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19142         true for scatter stores.
19143         (vect_gather_scatter_fn_p): Handle scatter stores too.
19144         (vect_check_gather_scatter): Consider using scatter stores if
19145         supports_vec_scatter_store_p.
19146         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19147         scatter stores too.
19148         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19149         internal_fn_stored_value_index.
19150         (check_load_store_masking): Handle scatter stores too.
19151         (vect_get_store_rhs): Make public.
19152         (vectorizable_call): Use internal_store_fn_p.
19153         (vectorizable_store): Handle scatter store internal functions.
19154         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19155         when deciding whether the end of the group has been reached.
19156         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19157         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19158         (mask_scatter_store<mode>): New insns.
19160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19161             Alan Hayward  <alan.hayward@arm.com>
19162             David Sherwood  <david.sherwood@arm.com>
19164         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19165         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19166         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19167         function.
19168         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19169         Use vect_truncate_gather_scatter_offset if we can't treat the
19170         operation as a normal gather load or scatter store.
19171         (get_group_load_store_type): Take the gather_scatter_info
19172         as argument.  Try using a gather load or scatter store for
19173         single-element groups.
19174         (get_load_store_type): Update calls to get_group_load_store_type
19175         and vect_use_strided_gather_scatters_p.
19177 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19178             Alan Hayward  <alan.hayward@arm.com>
19179             David Sherwood  <david.sherwood@arm.com>
19181         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19182         optional tree argument.
19183         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19184         null target hooks.
19185         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19186         but continue to use the current value as a fallback.
19187         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19188         to compare the updates.
19189         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19190         (get_load_store_type): Use it when handling a strided access.
19191         (vect_get_strided_load_store_ops): New function.
19192         (vect_get_data_ptr_increment): Likewise.
19193         (vectorizable_load): Handle strided gather loads.  Always pass
19194         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19196 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19197             Alan Hayward  <alan.hayward@arm.com>
19198             David Sherwood  <david.sherwood@arm.com>
19200         * doc/md.texi (gather_load@var{m}): Document.
19201         (mask_gather_load@var{m}): Likewise.
19202         * genopinit.c (main): Add supports_vec_gather_load and
19203         supports_vec_gather_load_cached to target_optabs.
19204         * optabs-tree.c (init_tree_optimization_optabs): Use
19205         ggc_cleared_alloc to allocate target_optabs.
19206         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19207         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19208         functions.
19209         * internal-fn.h (internal_load_fn_p): Declare.
19210         (internal_gather_scatter_fn_p): Likewise.
19211         (internal_fn_mask_index): Likewise.
19212         (internal_gather_scatter_fn_supported_p): Likewise.
19213         * internal-fn.c (gather_load_direct): New macro.
19214         (expand_gather_load_optab_fn): New function.
19215         (direct_gather_load_optab_supported_p): New macro.
19216         (direct_internal_fn_optab): New function.
19217         (internal_load_fn_p): Likewise.
19218         (internal_gather_scatter_fn_p): Likewise.
19219         (internal_fn_mask_index): Likewise.
19220         (internal_gather_scatter_fn_supported_p): Likewise.
19221         * optabs-query.c (supports_at_least_one_mode_p): New function.
19222         (supports_vec_gather_load_p): Likewise.
19223         * optabs-query.h (supports_vec_gather_load_p): Declare.
19224         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19225         and memory_type field.
19226         (NUM_PATTERNS): Bump to 15.
19227         * tree-vect-data-refs.c: Include internal-fn.h.
19228         (vect_gather_scatter_fn_p): New function.
19229         (vect_describe_gather_scatter_call): Likewise.
19230         (vect_check_gather_scatter): Try using internal functions for
19231         gather loads.  Recognize existing calls to a gather load function.
19232         (vect_analyze_data_refs): Consider using gather loads if
19233         supports_vec_gather_load_p.
19234         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19235         (vect_get_gather_scatter_offset_type): Likewise.
19236         (vect_convert_mask_for_vectype): Likewise.
19237         (vect_add_conversion_to_patterm): Likewise.
19238         (vect_try_gather_scatter_pattern): Likewise.
19239         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19240         (vect_vect_recog_func_ptrs): Add it.
19241         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19242         internal_fn_mask_index and internal_gather_scatter_fn_p.
19243         (check_load_store_masking): Take the gather_scatter_info as an
19244         argument and handle gather loads.
19245         (vect_get_gather_scatter_ops): New function.
19246         (vectorizable_call): Check internal_load_fn_p.
19247         (vectorizable_load): Likewise.  Handle gather load internal
19248         functions.
19249         (vectorizable_store): Update call to check_load_store_masking.
19250         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19251         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19252         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19253         (aarch64_gather_scale_operand_d): New predicates.
19254         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19255         (mask_gather_load<mode>): New insns.
19257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19258             Alan Hayward  <alan.hayward@arm.com>
19259             David Sherwood  <david.sherwood@arm.com>
19261         * optabs.def (fold_left_plus_optab): New optab.
19262         * doc/md.texi (fold_left_plus_@var{m}): Document.
19263         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19264         * internal-fn.c (fold_left_direct): Define.
19265         (expand_fold_left_optab_fn): Likewise.
19266         (direct_fold_left_optab_supported_p): Likewise.
19267         * fold-const-call.c (fold_const_fold_left): New function.
19268         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19269         * tree-parloops.c (valid_reduction_p): New function.
19270         (gather_scalar_reductions): Use it.
19271         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19272         (vect_finish_replace_stmt): Declare.
19273         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19274         (needs_fold_left_reduction_p): New function, split out from...
19275         (vect_is_simple_reduction): ...here.  Accept reductions that
19276         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19277         (vect_force_simple_reduction): Also store the reduction type in
19278         the assignment's STMT_VINFO_REDUC_TYPE.
19279         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19280         (merge_with_identity): New function.
19281         (vect_expand_fold_left): Likewise.
19282         (vectorize_fold_left_reduction): Likewise.
19283         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19284         scalar phi in place for it.  Check for target support and reject
19285         cases that would reassociate the operation.  Defer the transform
19286         phase to vectorize_fold_left_reduction.
19287         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19288         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19289         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19291 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19293         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19294         call to ifc_temp_var.
19296 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19297             Alan Hayward  <alan.hayward@arm.com>
19298             David Sherwood  <david.sherwood@arm.com>
19300         * target.def (legitimize_address_displacement): Take the original
19301         offset as a poly_int.
19302         * targhooks.h (default_legitimize_address_displacement): Update
19303         accordingly.
19304         * targhooks.c (default_legitimize_address_displacement): Likewise.
19305         * doc/tm.texi: Regenerate.
19306         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19307         as an argument, moving assert of ad->disp == ad->disp_term to...
19308         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19309         Try calling targetm.legitimize_address_displacement before expanding
19310         the address rather than afterwards, and adjust for the new interface.
19311         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19312         Match the new hook interface.  Handle SVE addresses.
19313         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19314         new hook interface.
19316 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19318         * Makefile.in (OBJS): Add early-remat.o.
19319         * target.def (select_early_remat_modes): New hook.
19320         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19321         * doc/tm.texi: Regenerate.
19322         * targhooks.h (default_select_early_remat_modes): Declare.
19323         * targhooks.c (default_select_early_remat_modes): New function.
19324         * timevar.def (TV_EARLY_REMAT): New timevar.
19325         * passes.def (pass_early_remat): New pass.
19326         * tree-pass.h (make_pass_early_remat): Declare.
19327         * early-remat.c: New file.
19328         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19329         function.
19330         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19332 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19333             Alan Hayward  <alan.hayward@arm.com>
19334             David Sherwood  <david.sherwood@arm.com>
19336         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19337         vfm1 with a bound_epilog parameter.
19338         (vect_do_peeling): Update calls accordingly, and move the prologue
19339         call earlier in the function.  Treat the base bound_epilog as 0 for
19340         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19341         this base when peeling for gaps.
19342         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19343         with fully-masked loops.
19344         (vect_estimate_min_profitable_iters): Handle the single peeled
19345         iteration in that case.
19347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19348             Alan Hayward  <alan.hayward@arm.com>
19349             David Sherwood  <david.sherwood@arm.com>
19351         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19352         single-element interleaving even if the size is not a power of 2.
19353         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19354         accesses for single-element interleaving if the group size is
19355         not a power of 2.
19357 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19358             Alan Hayward  <alan.hayward@arm.com>
19359             David Sherwood  <david.sherwood@arm.com>
19361         * doc/md.texi (fold_extract_last_@var{m}): Document.
19362         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19363         * optabs.def (fold_extract_last_optab): New optab.
19364         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19365         * internal-fn.c (fold_extract_direct): New macro.
19366         (expand_fold_extract_optab_fn): Likewise.
19367         (direct_fold_extract_optab_supported_p): Likewise.
19368         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19369         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19370         EXTRACT_LAST_REDUCTION.
19371         (get_initial_def_for_reduction): Do not create an initial vector
19372         for EXTRACT_LAST_REDUCTION reductions.
19373         (vectorizable_reduction): Leave the scalar phi in place for
19374         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19375         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19376         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19377         transform phase to vectorizable_condition.
19378         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19379         split out from...
19380         (vect_finish_stmt_generation): ...here.
19381         (vect_finish_replace_stmt): New function.
19382         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19383         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19384         pattern.
19385         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19387 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19388             Alan Hayward  <alan.hayward@arm.com>
19389             David Sherwood  <david.sherwood@arm.com>
19391         * doc/md.texi (extract_last_@var{m}): Document.
19392         * optabs.def (extract_last_optab): New optab.
19393         * internal-fn.def (EXTRACT_LAST): New internal function.
19394         * internal-fn.c (cond_unary_direct): New macro.
19395         (expand_cond_unary_optab_fn): Likewise.
19396         (direct_cond_unary_optab_supported_p): Likewise.
19397         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19398         loops using EXTRACT_LAST.
19399         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19400         (extract_last_<mode>): ...this optab.
19401         (vec_extract<mode><Vel>): Update accordingly.
19403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19404             Alan Hayward  <alan.hayward@arm.com>
19405             David Sherwood  <david.sherwood@arm.com>
19407         * target.def (empty_mask_is_expensive): New hook.
19408         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19409         * doc/tm.texi: Regenerate.
19410         * targhooks.h (default_empty_mask_is_expensive): Declare.
19411         * targhooks.c (default_empty_mask_is_expensive): New function.
19412         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19413         if the target says that empty masks are expensive.
19414         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19415         New function.
19416         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19418 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19419             Alan Hayward  <alan.hayward@arm.com>
19420             David Sherwood  <david.sherwood@arm.com>
19422         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19423         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19424         (vect_use_loop_mask_for_alignment_p): New function.
19425         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19426         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19427         niters_skip argument.  Make sure that the first niters_skip elements
19428         of the first iteration are inactive.
19429         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19430         Update call to vect_set_loop_masks_directly.
19431         (get_misalign_in_elems): New function, split out from...
19432         (vect_gen_prolog_loop_niters): ...here.
19433         (vect_update_init_of_dr): Take a code argument that specifies whether
19434         the adjustment should be added or subtracted.
19435         (vect_update_init_of_drs): Likewise.
19436         (vect_prepare_for_masked_peels): New function.
19437         (vect_do_peeling): Skip prologue peeling if we're using a mask
19438         instead.  Update call to vect_update_inits_of_drs.
19439         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19440         mask_skip_niters.
19441         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19442         alignment.  Do not include the number of peeled iterations in
19443         the minimum threshold in that case.
19444         (vectorizable_induction): Adjust the start value down by
19445         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19446         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19447         Take the number of skipped iterations into account when calculating
19448         the loop bounds.
19449         * tree-vect-stmts.c (vect_gen_while_not): New function.
19451 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19452             Alan Hayward  <alan.hayward@arm.com>
19453             David Sherwood  <david.sherwood@arm.com>
19455         * doc/sourcebuild.texi (vect_fully_masked): Document.
19456         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19457         default value to 0.
19458         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19459         split out from...
19460         (vect_analyze_loop_2): ...here. Don't check the vectorization
19461         factor against the number of loop iterations if the loop is
19462         fully-masked.
19464 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19465             Alan Hayward  <alan.hayward@arm.com>
19466             David Sherwood  <david.sherwood@arm.com>
19468         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19469         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19470         (dump_groups): Update accordingly.
19471         (iv_use::mem_type): New member variable.
19472         (address_p): New function.
19473         (record_use): Add a mem_type argument and initialize the new
19474         mem_type field.
19475         (record_group_use): Add a mem_type argument.  Use address_p.
19476         Remove obsolete null checks of base_object.  Update call to record_use.
19477         (find_interesting_uses_op): Update call to record_group_use.
19478         (find_interesting_uses_cond): Likewise.
19479         (find_interesting_uses_address): Likewise.
19480         (get_mem_type_for_internal_fn): New function.
19481         (find_address_like_use): Likewise.
19482         (find_interesting_uses_stmt): Try find_address_like_use before
19483         calling find_interesting_uses_op.
19484         (addr_offset_valid_p): Use the iv mem_type field as the type
19485         of the addressed memory.
19486         (add_autoinc_candidates): Likewise.
19487         (get_address_cost): Likewise.
19488         (split_small_address_groups_p): Use address_p.
19489         (split_address_groups): Likewise.
19490         (add_iv_candidate_for_use): Likewise.
19491         (autoinc_possible_for_pair): Likewise.
19492         (rewrite_groups): Likewise.
19493         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19494         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19495         (get_alias_ptr_type_for_ptr_address): New function.
19496         (rewrite_use_address): Rewrite address uses in calls that were
19497         identified by find_address_like_use.
19499 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19500             Alan Hayward  <alan.hayward@arm.com>
19501             David Sherwood  <david.sherwood@arm.com>
19503         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19504         TARGET_MEM_REFs.
19505         * gimple-expr.h (is_gimple_addressable: Likewise.
19506         * gimple-expr.c (is_gimple_address): Likewise.
19507         * internal-fn.c (expand_call_mem_ref): New function.
19508         (expand_mask_load_optab_fn): Use it.
19509         (expand_mask_store_optab_fn): Likewise.
19511 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19512             Alan Hayward  <alan.hayward@arm.com>
19513             David Sherwood  <david.sherwood@arm.com>
19515         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19516         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19517         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19518         (cond_umax@var{mode}): Document.
19519         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19520         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19521         (cond_umin_optab, cond_umax_optab): New optabs.
19522         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19523         (COND_IOR, COND_XOR): New internal functions.
19524         * internal-fn.h (get_conditional_internal_fn): Declare.
19525         * internal-fn.c (cond_binary_direct): New macro.
19526         (expand_cond_binary_optab_fn): Likewise.
19527         (direct_cond_binary_optab_supported_p): Likewise.
19528         (get_conditional_internal_fn): New function.
19529         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19530         Cope with reduction statements that are vectorized as calls rather
19531         than assignments.
19532         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19533         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19534         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19535         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19536         (UNSPEC_COND_EOR): New unspecs.
19537         (optab): Add mappings for them.
19538         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19539         (sve_int_op, sve_fp_op): New int attributes.
19541 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19542             Alan Hayward  <alan.hayward@arm.com>
19543             David Sherwood  <david.sherwood@arm.com>
19545         * optabs.def (while_ult_optab): New optab.
19546         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19547         * internal-fn.def (WHILE_ULT): New internal function.
19548         * internal-fn.h (direct_internal_fn_supported_p): New override
19549         that takes two types as argument.
19550         * internal-fn.c (while_direct): New macro.
19551         (expand_while_optab_fn): New function.
19552         (convert_optab_supported_p): Likewise.
19553         (direct_while_optab_supported_p): New macro.
19554         * wide-int.h (wi::udiv_ceil): New function.
19555         * tree-vectorizer.h (rgroup_masks): New structure.
19556         (vec_loop_masks): New typedef.
19557         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19558         and fully_masked_p.
19559         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19560         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19561         (vect_max_vf): New function.
19562         (slpeel_make_loop_iterate_ntimes): Delete.
19563         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19564         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19565         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19566         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19567         internal-fn.h, stor-layout.h and optabs-query.h.
19568         (vect_set_loop_mask): New function.
19569         (add_preheader_seq): Likewise.
19570         (add_header_seq): Likewise.
19571         (interleave_supported_p): Likewise.
19572         (vect_maybe_permute_loop_masks): Likewise.
19573         (vect_set_loop_masks_directly): Likewise.
19574         (vect_set_loop_condition_masked): Likewise.
19575         (vect_set_loop_condition_unmasked): New function, split out from
19576         slpeel_make_loop_iterate_ntimes.
19577         (slpeel_make_loop_iterate_ntimes): Rename to..
19578         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19579         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19580         (vect_do_peeling): Update call accordingly.
19581         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19582         loops.
19583         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19584         mask_compare_type, can_fully_mask_p and fully_masked_p.
19585         (release_vec_loop_masks): New function.
19586         (_loop_vec_info): Use it to free the loop masks.
19587         (can_produce_all_loop_masks_p): New function.
19588         (vect_get_max_nscalars_per_iter): Likewise.
19589         (vect_verify_full_masking): Likewise.
19590         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19591         retries, and free the mask rgroups before retrying.  Check loop-wide
19592         reasons for disallowing fully-masked loops.  Make the final decision
19593         about whether use a fully-masked loop or not.
19594         (vect_estimate_min_profitable_iters): Do not assume that peeling
19595         for the number of iterations will be needed for fully-masked loops.
19596         (vectorizable_reduction): Disable fully-masked loops.
19597         (vectorizable_live_operation): Likewise.
19598         (vect_halve_mask_nunits): New function.
19599         (vect_double_mask_nunits): Likewise.
19600         (vect_record_loop_mask): Likewise.
19601         (vect_get_loop_mask): Likewise.
19602         (vect_transform_loop): Handle the case in which the final loop
19603         iteration might handle a partial vector.  Call vect_set_loop_condition
19604         instead of slpeel_make_loop_iterate_ntimes.
19605         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19606         (check_load_store_masking): New function.
19607         (prepare_load_store_mask): Likewise.
19608         (vectorizable_store): Handle fully-masked loops.
19609         (vectorizable_load): Likewise.
19610         (supportable_widening_operation): Use vect_halve_mask_nunits for
19611         booleans.
19612         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19613         (vect_gen_while): New function.
19614         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19615         (aarch64_uqdec<mode>): New insn.
19617 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19618             Alan Hayward  <alan.hayward@arm.com>
19619             David Sherwood  <david.sherwood@arm.com>
19621         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19622         (reduc_xor_scal_optab): New optabs.
19623         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19624         (reduc_xor_scal_@var{m}): Document.
19625         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19626         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19627         internal functions.
19628         * fold-const-call.c (fold_const_call): Handle them.
19629         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19630         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19631         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19632         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19633         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19634         (UNSPEC_XORV): New unspecs.
19635         (optab): Add entries for them.
19636         (BITWISEV): New int iterator.
19637         (bit_reduc_op): New int attributes.
19639 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19640             Alan Hayward  <alan.hayward@arm.com>
19641             David Sherwood  <david.sherwood@arm.com>
19643         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19644         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19645         * optabs.def (vec_shl_insert_optab): New optab.
19646         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19647         (duplicate_and_interleave): Likewise.
19648         * tree-vect-loop.c: Include internal-fn.h.
19649         (neutral_op_for_slp_reduction): New function, split out from
19650         get_initial_defs_for_reduction.
19651         (get_initial_def_for_reduction): Handle option 2 for variable-length
19652         vectors by loading the neutral value into a vector and then shifting
19653         the initial value into element 0.
19654         (get_initial_defs_for_reduction): Replace the code argument with
19655         the neutral value calculated by neutral_op_for_slp_reduction.
19656         Use gimple_build_vector for constant-length vectors.
19657         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19658         but the first group_size elements have a neutral value.
19659         Use duplicate_and_interleave otherwise.
19660         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19661         Update call to get_initial_defs_for_reduction.  Handle SLP
19662         reductions for variable-length vectors by creating one vector
19663         result for each scalar result, with the elements associated
19664         with other scalar results stubbed out with the neutral value.
19665         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19666         Require IFN_VEC_SHL_INSERT for double reductions on
19667         variable-length vectors, or SLP reductions that have
19668         a neutral value.  Require can_duplicate_and_interleave_p
19669         support for variable-length unchained SLP reductions if there
19670         is no neutral value, such as for MIN/MAX reductions.  Also require
19671         the number of vector elements to be a multiple of the number of
19672         SLP statements when doing variable-length unchained SLP reductions.
19673         Update call to vect_create_epilog_for_reduction.
19674         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19675         and remove initial values.
19676         (duplicate_and_interleave): Make public.
19677         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19678         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19681             Alan Hayward  <alan.hayward@arm.com>
19682             David Sherwood  <david.sherwood@arm.com>
19684         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19685         (can_duplicate_and_interleave_p): New function.
19686         (vect_get_and_check_slp_defs): Take the vector of statements
19687         rather than just the current one.  Remove excess parentheses.
19688         Restriction rejectinon of vect_constant_def and vect_external_def
19689         for variable-length vectors to boolean types, or types for which
19690         can_duplicate_and_interleave_p is false.
19691         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19692         (duplicate_and_interleave): New function.
19693         (vect_get_constant_vectors): Use gimple_build_vector for
19694         constant-length vectors and suitable variable-length constant
19695         vectors.  Use duplicate_and_interleave for other variable-length
19696         vectors.  Don't defer the update when inserting new statements.
19698 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19699             Alan Hayward  <alan.hayward@arm.com>
19700             David Sherwood  <david.sherwood@arm.com>
19702         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19703         min_profitable_iters doesn't go negative.
19705 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19706             Alan Hayward  <alan.hayward@arm.com>
19707             David Sherwood  <david.sherwood@arm.com>
19709         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19710         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19711         * optabs.def (vec_mask_load_lanes_optab): New optab.
19712         (vec_mask_store_lanes_optab): Likewise.
19713         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19714         (MASK_STORE_LANES): Likewise.
19715         * internal-fn.c (mask_load_lanes_direct): New macro.
19716         (mask_store_lanes_direct): Likewise.
19717         (expand_mask_load_optab_fn): Handle masked operations.
19718         (expand_mask_load_lanes_optab_fn): New macro.
19719         (expand_mask_store_optab_fn): Handle masked operations.
19720         (expand_mask_store_lanes_optab_fn): New macro.
19721         (direct_mask_load_lanes_optab_supported_p): Likewise.
19722         (direct_mask_store_lanes_optab_supported_p): Likewise.
19723         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19724         parameter.
19725         (vect_load_lanes_supported): Likewise.
19726         * tree-vect-data-refs.c (strip_conversion): New function.
19727         (can_group_stmts_p): Likewise.
19728         (vect_analyze_data_ref_accesses): Use it instead of checking
19729         for a pair of assignments.
19730         (vect_store_lanes_supported): Take a masked_p parameter.
19731         (vect_load_lanes_supported): Likewise.
19732         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19733         vect_store_lanes_supported and vect_load_lanes_supported.
19734         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19735         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19736         parameter.  Don't allow gaps for masked accesses.
19737         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19738         and vect_load_lanes_supported.
19739         (get_load_store_type): Take a masked_p parameter and update
19740         call to get_group_load_store_type.
19741         (vectorizable_store): Update call to get_load_store_type.
19742         Handle IFN_MASK_STORE_LANES.
19743         (vectorizable_load): Update call to get_load_store_type.
19744         Handle IFN_MASK_LOAD_LANES.
19746 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19747             Alan Hayward  <alan.hayward@arm.com>
19748             David Sherwood  <david.sherwood@arm.com>
19750         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19751         modes for SVE.
19752         * config/aarch64/aarch64-protos.h
19753         (aarch64_sve_struct_memory_operand_p): Declare.
19754         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19755         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19756         (VPRED, vpred): Handle SVE structure modes.
19757         * config/aarch64/constraints.md (Utx): New constraint.
19758         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19759         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19760         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19761         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19762         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19763         structure modes.  Split into pieces after RA.
19764         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19765         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19766         New patterns.
19767         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19768         SVE structure modes.
19769         (aarch64_classify_address): Likewise.
19770         (sizetochar): Move earlier in file.
19771         (aarch64_print_operand): Handle SVE register lists.
19772         (aarch64_array_mode): New function.
19773         (aarch64_sve_struct_memory_operand_p): Likewise.
19774         (TARGET_ARRAY_MODE): Redefine.
19776 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19777             Alan Hayward  <alan.hayward@arm.com>
19778             David Sherwood  <david.sherwood@arm.com>
19780         * target.def (array_mode): New target hook.
19781         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19782         * doc/tm.texi: Regenerate.
19783         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19784         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19785         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19786         targetm.array_mode.
19787         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19788         type sizes.
19790 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19791             Alan Hayward  <alan.hayward@arm.com>
19792             David Sherwood  <david.sherwood@arm.com>
19794         * fold-const.c (fold_binary_loc): Check the argument types
19795         rather than the result type when testing for a vector operation.
19797 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19799         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19800         * doc/tm.texi: Regenerate.
19802 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19803             Alan Hayward  <alan.hayward@arm.com>
19804             David Sherwood  <david.sherwood@arm.com>
19806         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19807         (sve): Document new AArch64 extension.
19808         * doc/md.texi (w): Extend the description of the AArch64
19809         constraint to include SVE vectors.
19810         (Upl, Upa): Document new AArch64 predicate constraints.
19811         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19812         enum.
19813         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19814         (msve-vector-bits=): New option.
19815         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19816         SVE when these are disabled.
19817         (sve): New extension.
19818         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19819         modes.  Adjust their number of units based on aarch64_sve_vg.
19820         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19821         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19822         aarch64_addr_query_type.
19823         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19824         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19825         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19826         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19827         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19828         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19829         (aarch64_simd_imm_zero_p): Delete.
19830         (aarch64_check_zero_based_sve_index_immediate): Declare.
19831         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19832         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19833         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19834         (aarch64_sve_float_mul_immediate_p): Likewise.
19835         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19836         rather than an rtx.
19837         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19838         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19839         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19840         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19841         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19842         (aarch64_regmode_natural_size): Likewise.
19843         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19844         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19845         left one place.
19846         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19847         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19848         for VG and the SVE predicate registers.
19849         (V_ALIASES): Add a "z"-prefixed alias.
19850         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19851         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19852         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19853         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19854         (REG_CLASS_NAMES): Add entries for them.
19855         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19856         and the predicate registers.
19857         (aarch64_sve_vg): Declare.
19858         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19859         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19860         (REGMODE_NATURAL_SIZE): Define.
19861         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19862         SVE macros.
19863         * config/aarch64/aarch64.c: Include cfgrtl.h.
19864         (simd_immediate_info): Add a constructor for series vectors,
19865         and an associated step field.
19866         (aarch64_sve_vg): New variable.
19867         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19868         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19869         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19870         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19871         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19872         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19873         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19874         (aarch64_get_mask_mode): New functions.
19875         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19876         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19877         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19878         predicate modes and predicate registers.  Explicitly restrict
19879         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19880         to store a vector mode if it is recognized by
19881         aarch64_classify_vector_mode.
19882         (aarch64_regmode_natural_size): New function.
19883         (aarch64_hard_regno_caller_save_mode): Return the original mode
19884         for predicates.
19885         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19886         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19887         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19888         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19889         functions.
19890         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19891         does not overlap dest if the function is frame-related.  Handle
19892         SVE constants.
19893         (aarch64_split_add_offset): New function.
19894         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19895         them aarch64_add_offset.
19896         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19897         and update call to aarch64_sub_sp.
19898         (aarch64_add_cfa_expression): New function.
19899         (aarch64_expand_prologue): Pass extra temporary registers to the
19900         functions above.  Handle the case in which we need to emit new
19901         DW_CFA_expressions for registers that were originally saved
19902         relative to the stack pointer, but now have to be expressed
19903         relative to the frame pointer.
19904         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19905         functions above.
19906         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19907         IP0 and IP1 values for SVE frames.
19908         (aarch64_expand_vec_series): New function.
19909         (aarch64_expand_sve_widened_duplicate): Likewise.
19910         (aarch64_expand_sve_const_vector): Likewise.
19911         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19912         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19913         into the register, rather than emitting a SET directly.
19914         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19915         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19916         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19917         (offset_9bit_signed_scaled_p): New functions.
19918         (aarch64_replicate_bitmask_imm): New function.
19919         (aarch64_bitmask_imm): Use it.
19920         (aarch64_cannot_force_const_mem): Reject expressions involving
19921         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19922         (aarch64_classify_index): Handle SVE indices, by requiring
19923         a plain register index with a scale that matches the element size.
19924         (aarch64_classify_address): Handle SVE addresses.  Assert that
19925         the mode of the address is VOIDmode or an integer mode.
19926         Update call to aarch64_classify_symbol.
19927         (aarch64_classify_symbolic_expression): Update call to
19928         aarch64_classify_symbol.
19929         (aarch64_const_vec_all_in_range_p): New function.
19930         (aarch64_print_vector_float_operand): Likewise.
19931         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19932         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19933         and the FP immediates 1.0 and 0.5.
19934         (aarch64_print_address_internal): Handle SVE addresses.
19935         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19936         (aarch64_regno_regclass): Handle predicate registers.
19937         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19938         data modes.
19939         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19940         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19941         (aarch64_convert_sve_vector_bits): New function.
19942         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19943         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19944         rather than an rtx.
19945         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19946         Handle SVE vector and predicate modes.  Accept VL-based constants
19947         that need only one temporary register, and VL offsets that require
19948         no temporary registers.
19949         (aarch64_conditional_register_usage): Mark the predicate registers
19950         as fixed if SVE isn't available.
19951         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19952         Return true for SVE vector and predicate modes.
19953         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19954         rather than an unsigned int.  Handle SVE modes.
19955         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19956         SVE modes.
19957         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19958         if SVE is enabled.
19959         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19960         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19961         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19962         (aarch64_sve_float_mul_immediate_p): New functions.
19963         (aarch64_sve_valid_immediate): New function.
19964         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19965         Explicitly reject structure modes.  Check for INDEX constants.
19966         Handle PTRUE and PFALSE constants.
19967         (aarch64_check_zero_based_sve_index_immediate): New function.
19968         (aarch64_simd_imm_zero_p): Delete.
19969         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19970         vector modes.  Accept constants in the range of CNT[BHWD].
19971         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19972         ask for an Advanced SIMD mode.
19973         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19974         (aarch64_simd_vector_alignment): Handle SVE predicates.
19975         (aarch64_vectorize_preferred_vector_alignment): New function.
19976         (aarch64_simd_vector_alignment_reachable): Use it instead of
19977         the vector size.
19978         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19979         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19980         functions.
19981         (MAX_VECT_LEN): Delete.
19982         (expand_vec_perm_d): Add a vec_flags field.
19983         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19984         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19985         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19986         for SVE modes.
19987         (aarch64_evpc_rev): Rename to...
19988         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19989         (aarch64_evpc_rev_global): New function.
19990         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19991         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19992         MAX_VECT_LEN.
19993         (aarch64_evpc_sve_tbl): New function.
19994         (aarch64_expand_vec_perm_const_1): Update after rename of
19995         aarch64_evpc_rev.  Handle SVE permutes too, trying
19996         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19997         than aarch64_evpc_tbl.
19998         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19999         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20000         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20001         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20002         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20003         (aarch64_expand_sve_vcond): New functions.
20004         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20005         of aarch64_vector_mode_p.
20006         (aarch64_dwarf_poly_indeterminate_value): New function.
20007         (aarch64_compute_pressure_classes): Likewise.
20008         (aarch64_can_change_mode_class): Likewise.
20009         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20010         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20011         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20012         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20013         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20014         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20015         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20016         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20017         constraints.
20018         (Dn, Dl, Dr): Accept const as well as const_vector.
20019         (Dz): Likewise.  Compare against CONST0_RTX.
20020         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20021         of "vector" where appropriate.
20022         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20023         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20024         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20025         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20026         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20027         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20028         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20029         (v_int_equiv): Extend to SVE modes.
20030         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20031         mode attributes.
20032         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20033         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20034         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20035         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20036         (SVE_COND_FP_CMP): New int iterators.
20037         (perm_hilo): Handle the new unpack unspecs.
20038         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20039         attributes.
20040         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20041         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20042         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20043         (aarch64_equality_operator, aarch64_constant_vector_operand)
20044         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20045         (aarch64_sve_nonimmediate_operand): Likewise.
20046         (aarch64_sve_general_operand): Likewise.
20047         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20048         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20049         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20050         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20051         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20052         (aarch64_sve_float_arith_immediate): Likewise.
20053         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20054         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20055         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20056         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20057         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20058         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20059         (aarch64_sve_float_arith_operand): Likewise.
20060         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20061         (aarch64_sve_float_mul_operand): Likewise.
20062         (aarch64_sve_vec_perm_operand): Likewise.
20063         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20064         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20065         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20066         as well as const_vector.
20067         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20068         in file.  Use CONST0_RTX and CONSTM1_RTX.
20069         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20070         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20071         Use aarch64_simd_imm_zero.
20072         * config/aarch64/aarch64-sve.md: New file.
20073         * config/aarch64/aarch64.md: Include it.
20074         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20075         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20076         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20077         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20078         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20079         (sve): New attribute.
20080         (enabled): Disable instructions with the sve attribute unless
20081         TARGET_SVE.
20082         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20083         aarch64_expand_mov_immediate.
20084         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20085         CNT[BHSD] immediates.
20086         (movti): Split CONST_POLY_INT moves into two halves.
20087         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20088         Split additions that need a temporary here if the destination
20089         is the stack pointer.
20090         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20091         (*add<mode>3_poly_1): New instruction.
20092         (set_clobber_cc): New expander.
20094 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20096         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20097         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20098         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20099         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20100         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20101         Change innermode from fixed_mode_size to machine_mode.
20102         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20103         subreg of a variable-length CONST_VECTOR.
20105 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20106             Alan Hayward  <alan.hayward@arm.com>
20107             David Sherwood  <david.sherwood@arm.com>
20109         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20110         (add_offset_to_base): New function, split out from...
20111         (create_mem_ref): ...here.  When handling a scale other than 1,
20112         check first whether the address is valid without the offset.
20113         Add it into the base if so, leaving the index and scale as-is.
20115 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20117         PR c++/83778
20118         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20119         fold_for_warn before checking if arg2 is INTEGER_CST.
20121 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20123         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20124         (store_multiple_operation): Delete.
20125         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20126         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20127         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20128         guarded by TARGET_STRING.
20129         (rs6000_output_load_multiple): Delete.
20130         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20131         OPTION_MASK_STRING / TARGET_STRING handling.
20132         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20133         (const rs6000_opt_masks) <"string">: Change mask to 0.
20134         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20135         (MASK_STRING): Delete.
20136         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20137         parts.  Simplify.
20138         (load_multiple): Delete.
20139         (*ldmsi8): Delete.
20140         (*ldmsi7): Delete.
20141         (*ldmsi6): Delete.
20142         (*ldmsi5): Delete.
20143         (*ldmsi4): Delete.
20144         (*ldmsi3): Delete.
20145         (store_multiple): Delete.
20146         (*stmsi8): Delete.
20147         (*stmsi7): Delete.
20148         (*stmsi6): Delete.
20149         (*stmsi5): Delete.
20150         (*stmsi4): Delete.
20151         (*stmsi3): Delete.
20152         (movmemsi_8reg): Delete.
20153         (corresponding unnamed define_insn): Delete.
20154         (movmemsi_6reg): Delete.
20155         (corresponding unnamed define_insn): Delete.
20156         (movmemsi_4reg): Delete.
20157         (corresponding unnamed define_insn): Delete.
20158         (movmemsi_2reg): Delete.
20159         (corresponding unnamed define_insn): Delete.
20160         (movmemsi_1reg): Delete.
20161         (corresponding unnamed define_insn): Delete.
20162         * config/rs6000/rs6000.opt (mno-string): New.
20163         (mstring): Replace by deprecation warning stub.
20164         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20166 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20168         * regrename.c (regrename_do_replace): If replacing the same
20169         reg multiple times, try to reuse last created gen_raw_REG.
20171         PR debug/81155
20172         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20173         main to workaround a bug in GDB.
20175 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20177         PR target/83737
20178         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20180 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20182         PR rtl-optimization/80481
20183         * ira-color.c (get_cap_member): New function.
20184         (allocnos_conflict_by_live_ranges_p): Use it.
20185         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20186         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20188 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20190         PR target/83628
20191         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20192         (*saddl_se_1): Ditto.
20193         (*ssubsi_1): Ditto.
20194         (*ssubl_se_1): Ditto.
20196 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20198         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20199         rather than wi::to_widest for DR_INITs.
20200         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20201         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20202         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20203         INTEGER_CSTs.
20204         (vect_analyze_group_access_1): Note that here.
20206 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20208         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20209         polynomial type sizes.
20211 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20213         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20214         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20215         (gimple_add_tmp_var): Likewise.
20217 2018-01-12  Martin Liska  <mliska@suse.cz>
20219         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20220         (gimple_alloc_sizes): Likewise.
20221         (dump_gimple_statistics): Use PRIu64 in printf format.
20222         * gimple.h: Change uint64_t to int.
20224 2018-01-12  Martin Liska  <mliska@suse.cz>
20226         * tree-core.h: Use uint64_t instead of int.
20227         * tree.c (tree_node_counts): Likewise.
20228         (tree_node_sizes): Likewise.
20229         (dump_tree_statistics): Use PRIu64 in printf format.
20231 2018-01-12  Martin Liska  <mliska@suse.cz>
20233         * Makefile.in: As qsort_chk is implemented in vec.c, add
20234         vec.o to linkage of gencfn-macros.
20235         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20236         passing the info to record_node_allocation_statistics.
20237         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20238         and pass the info.
20239         * ggc-common.c (struct ggc_usage): Add operator== and use
20240         it in operator< and compare function.
20241         * mem-stats.h (struct mem_usage): Likewise.
20242         * vec.c (struct vec_usage): Remove operator< and compare
20243         function. Can be simply inherited.
20245 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20247         PR target/81616
20248         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20249         * tree-ssa-math-opts.c: Include domwalk.h.
20250         (convert_mult_to_fma_1): New function.
20251         (fma_transformation_info): New type.
20252         (fma_deferring_state): Likewise.
20253         (cancel_fma_deferring): New function.
20254         (result_of_phi): Likewise.
20255         (last_fma_candidate_feeds_initial_phi): Likewise.
20256         (convert_mult_to_fma): Added deferring logic, split actual
20257         transformation to convert_mult_to_fma_1.
20258         (math_opts_dom_walker): New type.
20259         (math_opts_dom_walker::after_dom_children): New method, body moved
20260         here from pass_optimize_widening_mul::execute, added deferring logic
20261         bits.
20262         (pass_optimize_widening_mul::execute): Moved most of code to
20263         math_opts_dom_walker::after_dom_children.
20264         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20265         * config/i386/i386.c (ix86_option_override_internal): Added
20266         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20268 2018-01-12  Richard Biener  <rguenther@suse.de>
20270         PR debug/83157
20271         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20272         inline instance vars.
20274 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20276         PR target/81819
20277         * config/rx/rx.c (rx_is_restricted_memory_address):
20278         Handle SUBREG case.
20280 2018-01-12  Richard Biener  <rguenther@suse.de>
20282         PR tree-optimization/80846
20283         * target.def (split_reduction): New target hook.
20284         * targhooks.c (default_split_reduction): New function.
20285         * targhooks.h (default_split_reduction): Declare.
20286         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20287         target requests first reduce vectors by combining low and high
20288         parts.
20289         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20290         (get_vectype_for_scalar_type_and_size): Export.
20291         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20292         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20293         * doc/tm.texi: Regenerate.
20294         * config/i386/i386.c (ix86_split_reduction): Implement
20295         TARGET_VECTORIZE_SPLIT_REDUCTION.
20297 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20299         PR target/83368
20300         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20301         in PIC mode except for TARGET_VXWORKS_RTP.
20302         * config/sparc/sparc.c: Include cfgrtl.h.
20303         (TARGET_INIT_PIC_REG): Define.
20304         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20305         (sparc_pic_register_p): New predicate.
20306         (sparc_legitimate_address_p): Use it.
20307         (sparc_legitimize_pic_address): Likewise.
20308         (sparc_delegitimize_address): Likewise.
20309         (sparc_mode_dependent_address_p): Likewise.
20310         (gen_load_pcrel_sym): Remove 4th parameter.
20311         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20312         (sparc_expand_prologue): Do not call load_got_register here.
20313         (sparc_flat_expand_prologue): Likewise.
20314         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20315         (sparc_use_pseudo_pic_reg): New function.
20316         (sparc_init_pic_reg): Likewise.
20317         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20318         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20320 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20322         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20323         Add item for branch_cost.
20325 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20327         PR rtl-optimization/83565
20328         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20329         not extend the result to a larger mode for rotate operations.
20330         (num_sign_bit_copies1): Likewise.
20332 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20334         PR target/40411
20335         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20336         -symbolic.
20337         Use values-Xc.o for -pedantic.
20338         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20340 2018-01-12  Martin Liska  <mliska@suse.cz>
20342         PR ipa/83054
20343         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20344         New function.
20345         (possible_polymorphic_call_targets): Use it.
20346         (ipa_devirt): Likewise.
20348 2018-01-12  Martin Liska  <mliska@suse.cz>
20350         * profile-count.h (enum profile_quality): Use 0 as invalid
20351         enum value of profile_quality.
20353 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20355         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20356         -mext-string options.
20358 2018-01-12  Richard Biener  <rguenther@suse.de>
20360         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20361         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20362         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20363         Likewise.
20364         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20366 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20368         * configure.ac (--with-long-double-format): Add support for the
20369         configuration option to change the default long double format on
20370         PowerPC systems.
20371         * config.gcc (powerpc*-linux*-*): Likewise.
20372         * configure: Regenerate.
20373         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20374         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20375         used without modification.
20377 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20379         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20380         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20381         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20382         MISC_BUILTIN_SPEC_BARRIER.
20383         (rs6000_init_builtins): Likewise.
20384         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20385         enum value.
20386         (speculation_barrier): New define_insn.
20387         * doc/extend.texi: Document __builtin_speculation_barrier.
20389 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20391         PR target/83203
20392         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20393         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20394         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20395         iterators.
20396         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20397         integral modes instead of "ss" and "sd".
20398         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20399         vectors with 32-bit and 64-bit elements.
20400         (vecdupssescalarmodesuffix): New mode attribute.
20401         (vec_dup<mode>): Use it.
20403 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20405         PR target/83330
20406         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20407         frame if argument is passed on stack.
20409 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20411         PR target/82682
20412         * ree.c (combine_reaching_defs): Optimize also
20413         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20414         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20416 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20418         PR middle-end/83189
20419         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20421 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20423         PR middle-end/83718
20424         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20425         after they are computed.
20427 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20429         PR tree-optimization/83695
20430         * gimple-loop-linterchange.cc
20431         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20432         reset cached scev information after interchange.
20433         (pass_linterchange::execute): Remove call to scev_reset_htab.
20435 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20437         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20438         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20439         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20440         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20441         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20442         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20443         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20444         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20445         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20446         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20447         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20448         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20449         (V_lane_reg): Likewise.
20450         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20451         New define_expand.
20452         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20453         (vfmal_lane_low<mode>_intrinsic,
20454         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20455         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20456         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20457         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20458         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20459         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20461 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20463         * config/arm/arm-cpus.in (fp16fml): New feature.
20464         (ALL_SIMD): Add fp16fml.
20465         (armv8.2-a): Add fp16fml as an option.
20466         (armv8.3-a): Likewise.
20467         (armv8.4-a): Add fp16fml as part of fp16.
20468         * config/arm/arm.h (TARGET_FP16FML): Define.
20469         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20470         when appropriate.
20471         * config/arm/arm-modes.def (V2HF): Define.
20472         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20473         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20474         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20475         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20476         vfmsl_low, vfmsl_high): New set of builtins.
20477         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20478         (vfml_op): New code attribute.
20479         (VFMLHALVES): New int iterator.
20480         (VFML, VFMLSEL): New mode attributes.
20481         (V_reg): Define mapping for V2HF.
20482         (V_hi, V_lo): New mode attributes.
20483         (VF_constraint): Likewise.
20484         (vfml_half, vfml_half_selector): New int attributes.
20485         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20486         define_expand.
20487         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20488         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20489         New define_insn.
20490         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20491         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20492         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20493         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20494         documentation.
20495         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20496         Document new effective target and option set.
20498 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20500         * config/arm/arm-cpus.in (armv8_4): New feature.
20501         (ARMv8_4a): New fgroup.
20502         (armv8.4-a): New arch.
20503         * config/arm/arm-tables.opt: Regenerate.
20504         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20505         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20506         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20507         Add matching rules for -march=armv8.4-a and extensions.
20508         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20510 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20512         PR target/81821
20513         * config/rx/rx.md (BW): New mode attribute.
20514         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20516 2018-01-11  Richard Biener  <rguenther@suse.de>
20518         PR tree-optimization/83435
20519         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20520         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20521         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20523 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20524             Alan Hayward  <alan.hayward@arm.com>
20525             David Sherwood  <david.sherwood@arm.com>
20527         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20528         field.
20529         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20530         (aarch64_print_address_internal): Use it to check for a zero offset.
20532 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20533             Alan Hayward  <alan.hayward@arm.com>
20534             David Sherwood  <david.sherwood@arm.com>
20536         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20537         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20538         Return a poly_int64 rather than a HOST_WIDE_INT.
20539         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20540         rather than a HOST_WIDE_INT.
20541         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20542         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20543         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20544         final_offset from HOST_WIDE_INT to poly_int64.
20545         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20546         to_constant when getting the number of units in an Advanced SIMD
20547         mode.
20548         (aarch64_builtin_vectorized_function): Check for a constant number
20549         of units.
20550         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20551         GET_MODE_SIZE.
20552         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20553         attribute instead of GET_MODE_NUNITS.
20554         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20555         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20556         GET_MODE_SIZE for fixed-size registers.
20557         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20558         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20559         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20560         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20561         (aarch64_print_operand, aarch64_print_address_internal)
20562         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20563         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20564         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20565         Handle polynomial GET_MODE_SIZE.
20566         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20567         wider than SImode without modification.
20568         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20569         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20570         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20571         passing and returning SVE modes.
20572         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20573         rather than GEN_INT.
20574         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20575         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20576         (aarch64_allocate_and_probe_stack_space): Likewise.
20577         (aarch64_layout_frame): Cope with polynomial offsets.
20578         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20579         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20580         polynomial offsets.
20581         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20582         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20583         poly_int64 rather than a HOST_WIDE_INT.
20584         (aarch64_get_separate_components, aarch64_process_components)
20585         (aarch64_expand_prologue, aarch64_expand_epilogue)
20586         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20587         (aarch64_anchor_offset): New function, split out from...
20588         (aarch64_legitimize_address): ...here.
20589         (aarch64_builtin_vectorization_cost): Handle polynomial
20590         TYPE_VECTOR_SUBPARTS.
20591         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20592         GET_MODE_NUNITS.
20593         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20594         number of elements from the PARALLEL rather than the mode.
20595         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20596         rather than GET_MODE_BITSIZE.
20597         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20598         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20599         (aarch64_expand_vec_perm_const_1): Handle polynomial
20600         d->perm.length () and d->perm elements.
20601         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20602         Apply to_constant to d->perm elements.
20603         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20604         polynomial CONST_VECTOR_NUNITS.
20605         (aarch64_move_pointer): Take amount as a poly_int64 rather
20606         than an int.
20607         (aarch64_progress_pointer): Avoid temporary variable.
20608         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20609         the mode attribute instead of GET_MODE.
20611 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20612             Alan Hayward  <alan.hayward@arm.com>
20613             David Sherwood  <david.sherwood@arm.com>
20615         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20616         x exists before using it.
20617         (aarch64_add_constant_internal): Rename to...
20618         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20619         src and dest rtxes.  Handle the case in which they're different,
20620         including when the offset is zero.  Replace scratchreg with an rtx.
20621         Use 2 additions if there is no spare register into which we can
20622         move a 16-bit constant.
20623         (aarch64_add_constant): Delete.
20624         (aarch64_add_offset): Replace reg with separate src and dest
20625         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20626         Use aarch64_add_offset_1.
20627         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20628         an rtx rather than an int.  Take the delta as a poly_int64
20629         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20630         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20631         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20632         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20633         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20634         and aarch64_add_sp.
20635         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20636         aarch64_add_constant.
20638 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20640         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20641         Use scalar_float_mode.
20643 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20645         * config/aarch64/aarch64-simd.md
20646         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20647         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20648         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20649         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20650         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20651         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20652         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20653         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20654         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20655         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20657 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20659         PR target/83514
20660         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20661         targ_options->x_arm_arch_string is non NULL.
20663 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20665         * config/aarch64/aarch64.h
20666         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20668 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20670         PR target/82096
20671         * expmed.c (emit_store_flag_force): Swap if const op0
20672         and change VOIDmode to mode of op0.
20674 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20676         PR rtl-optimization/83761
20677         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20678         than bytes to mode_for_size.
20680 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20682         PR middle-end/83189
20683         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20684         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20685         profile.
20687 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20689         PR middle-end/83575
20690         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20691         when in layout mode.
20692         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20693         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20694         partition fixup.
20696 2018-01-10  Michael Collison  <michael.collison@arm.com>
20698         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20699         * config/aarch64/aarch64-option-extension.def: Add
20700         AARCH64_OPT_EXTENSION of 'fp16fml'.
20701         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20702         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20703         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20704         * config/aarch64/constraints.md (Ui7): New constraint.
20705         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20706         (VFMLA_SEL_W): Ditto.
20707         (f16quad): Ditto.
20708         (f16mac1): Ditto.
20709         (VFMLA16_LOW): New int iterator.
20710         (VFMLA16_HIGH): Ditto.
20711         (UNSPEC_FMLAL): New unspec.
20712         (UNSPEC_FMLSL): Ditto.
20713         (UNSPEC_FMLAL2): Ditto.
20714         (UNSPEC_FMLSL2): Ditto.
20715         (f16mac): New code attribute.
20716         * config/aarch64/aarch64-simd-builtins.def
20717         (aarch64_fmlal_lowv2sf): Ditto.
20718         (aarch64_fmlsl_lowv2sf): Ditto.
20719         (aarch64_fmlalq_lowv4sf): Ditto.
20720         (aarch64_fmlslq_lowv4sf): Ditto.
20721         (aarch64_fmlal_highv2sf): Ditto.
20722         (aarch64_fmlsl_highv2sf): Ditto.
20723         (aarch64_fmlalq_highv4sf): Ditto.
20724         (aarch64_fmlslq_highv4sf): Ditto.
20725         (aarch64_fmlal_lane_lowv2sf): Ditto.
20726         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20727         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20728         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20729         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20730         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20731         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20732         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20733         (aarch64_fmlal_lane_highv2sf): Ditto.
20734         (aarch64_fmlsl_lane_highv2sf): Ditto.
20735         (aarch64_fmlal_laneq_highv2sf): Ditto.
20736         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20737         (aarch64_fmlalq_lane_highv4sf): Ditto.
20738         (aarch64_fmlsl_lane_highv4sf): Ditto.
20739         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20740         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20741         * config/aarch64/aarch64-simd.md:
20742         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20743         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20744         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20745         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20746         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20747         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20748         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20749         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20750         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20751         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20752         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20753         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20754         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20755         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20756         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20757         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20758         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20759         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20760         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20761         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20762         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20763         (vfmlsl_low_u32): Ditto.
20764         (vfmlalq_low_u32): Ditto.
20765         (vfmlslq_low_u32): Ditto.
20766         (vfmlal_high_u32): Ditto.
20767         (vfmlsl_high_u32): Ditto.
20768         (vfmlalq_high_u32): Ditto.
20769         (vfmlslq_high_u32): Ditto.
20770         (vfmlal_lane_low_u32): Ditto.
20771         (vfmlsl_lane_low_u32): Ditto.
20772         (vfmlal_laneq_low_u32): Ditto.
20773         (vfmlsl_laneq_low_u32): Ditto.
20774         (vfmlalq_lane_low_u32): Ditto.
20775         (vfmlslq_lane_low_u32): Ditto.
20776         (vfmlalq_laneq_low_u32): Ditto.
20777         (vfmlslq_laneq_low_u32): Ditto.
20778         (vfmlal_lane_high_u32): Ditto.
20779         (vfmlsl_lane_high_u32): Ditto.
20780         (vfmlal_laneq_high_u32): Ditto.
20781         (vfmlsl_laneq_high_u32): Ditto.
20782         (vfmlalq_lane_high_u32): Ditto.
20783         (vfmlslq_lane_high_u32): Ditto.
20784         (vfmlalq_laneq_high_u32): Ditto.
20785         (vfmlslq_laneq_high_u32): Ditto.
20786         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20787         (AARCH64_FL_FOR_ARCH8_4): New.
20788         (AARCH64_ISA_F16FML): New ISA flag.
20789         (TARGET_F16FML): New feature flag for fp16fml.
20790         (doc/invoke.texi): Document new fp16fml option.
20792 2018-01-10  Michael Collison  <michael.collison@arm.com>
20794         * config/aarch64/aarch64-builtins.c:
20795         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20796         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20797         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20798         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20799         (AARCH64_ISA_SHA3): New ISA flag.
20800         (TARGET_SHA3): New feature flag for sha3.
20801         * config/aarch64/iterators.md (sha512_op): New int attribute.
20802         (CRYPTO_SHA512): New int iterator.
20803         (UNSPEC_SHA512H): New unspec.
20804         (UNSPEC_SHA512H2): Ditto.
20805         (UNSPEC_SHA512SU0): Ditto.
20806         (UNSPEC_SHA512SU1): Ditto.
20807         * config/aarch64/aarch64-simd-builtins.def
20808         (aarch64_crypto_sha512hqv2di): New builtin.
20809         (aarch64_crypto_sha512h2qv2di): Ditto.
20810         (aarch64_crypto_sha512su0qv2di): Ditto.
20811         (aarch64_crypto_sha512su1qv2di): Ditto.
20812         (aarch64_eor3qv8hi): Ditto.
20813         (aarch64_rax1qv2di): Ditto.
20814         (aarch64_xarqv2di): Ditto.
20815         (aarch64_bcaxqv8hi): Ditto.
20816         * config/aarch64/aarch64-simd.md:
20817         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20818         (aarch64_crypto_sha512su0qv2di): Ditto.
20819         (aarch64_crypto_sha512su1qv2di): Ditto.
20820         (aarch64_eor3qv8hi): Ditto.
20821         (aarch64_rax1qv2di): Ditto.
20822         (aarch64_xarqv2di): Ditto.
20823         (aarch64_bcaxqv8hi): Ditto.
20824         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20825         (vsha512h2q_u64): Ditto.
20826         (vsha512su0q_u64): Ditto.
20827         (vsha512su1q_u64): Ditto.
20828         (veor3q_u16): Ditto.
20829         (vrax1q_u64): Ditto.
20830         (vxarq_u64): Ditto.
20831         (vbcaxq_u16): Ditto.
20832         * config/arm/types.md (crypto_sha512): New type attribute.
20833         (crypto_sha3): Ditto.
20834         (doc/invoke.texi): Document new sha3 option.
20836 2018-01-10  Michael Collison  <michael.collison@arm.com>
20838         * config/aarch64/aarch64-builtins.c:
20839         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20840         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20841         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20842         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20843         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20844         (AARCH64_ISA_SM4): New ISA flag.
20845         (TARGET_SM4): New feature flag for sm4.
20846         * config/aarch64/aarch64-simd-builtins.def
20847         (aarch64_sm3ss1qv4si): Ditto.
20848         (aarch64_sm3tt1aq4si): Ditto.
20849         (aarch64_sm3tt1bq4si): Ditto.
20850         (aarch64_sm3tt2aq4si): Ditto.
20851         (aarch64_sm3tt2bq4si): Ditto.
20852         (aarch64_sm3partw1qv4si): Ditto.
20853         (aarch64_sm3partw2qv4si): Ditto.
20854         (aarch64_sm4eqv4si): Ditto.
20855         (aarch64_sm4ekeyqv4si): Ditto.
20856         * config/aarch64/aarch64-simd.md:
20857         (aarch64_sm3ss1qv4si): Ditto.
20858         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20859         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20860         (aarch64_sm4eqv4si): Ditto.
20861         (aarch64_sm4ekeyqv4si): Ditto.
20862         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20863         (sm3part_op): Ditto.
20864         (CRYPTO_SM3TT): Ditto.
20865         (CRYPTO_SM3PART): Ditto.
20866         (UNSPEC_SM3SS1): New unspec.
20867         (UNSPEC_SM3TT1A): Ditto.
20868         (UNSPEC_SM3TT1B): Ditto.
20869         (UNSPEC_SM3TT2A): Ditto.
20870         (UNSPEC_SM3TT2B): Ditto.
20871         (UNSPEC_SM3PARTW1): Ditto.
20872         (UNSPEC_SM3PARTW2): Ditto.
20873         (UNSPEC_SM4E): Ditto.
20874         (UNSPEC_SM4EKEY): Ditto.
20875         * config/aarch64/constraints.md (Ui2): New constraint.
20876         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20877         * config/arm/types.md (crypto_sm3): New type attribute.
20878         (crypto_sm4): Ditto.
20879         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20880         (vsm3tt1aq_u32): Ditto.
20881         (vsm3tt1bq_u32): Ditto.
20882         (vsm3tt2aq_u32): Ditto.
20883         (vsm3tt2bq_u32): Ditto.
20884         (vsm3partw1q_u32): Ditto.
20885         (vsm3partw2q_u32): Ditto.
20886         (vsm4eq_u32): Ditto.
20887         (vsm4ekeyq_u32): Ditto.
20888         (doc/invoke.texi): Document new sm4 option.
20890 2018-01-10  Michael Collison  <michael.collison@arm.com>
20892         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20893         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20894         (AARCH64_FL_FOR_ARCH8_4): New.
20895         (AARCH64_FL_V8_4): New flag.
20896         (doc/invoke.texi): Document new armv8.4-a option.
20898 2018-01-10  Michael Collison  <michael.collison@arm.com>
20900         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20901         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20902         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20903         * config/aarch64/aarch64-option-extension.def: Add
20904         AARCH64_OPT_EXTENSION of 'sha2'.
20905         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20906         (crypto): Disable sha2 and aes if crypto disabled.
20907         (crypto): Enable aes and sha2 if enabled.
20908         (simd): Disable sha2 and aes if simd disabled.
20909         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20910         New flags.
20911         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20912         (TARGET_SHA2): New feature flag for sha2.
20913         (TARGET_AES): New feature flag for aes.
20914         * config/aarch64/aarch64-simd.md:
20915         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20916         conditional on TARGET_AES.
20917         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20918         (aarch64_crypto_sha1hsi): Make pattern conditional
20919         on TARGET_SHA2.
20920         (aarch64_crypto_sha1hv4si): Ditto.
20921         (aarch64_be_crypto_sha1hv4si): Ditto.
20922         (aarch64_crypto_sha1su1v4si): Ditto.
20923         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20924         (aarch64_crypto_sha1su0v4si): Ditto.
20925         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20926         (aarch64_crypto_sha256su0v4si): Ditto.
20927         (aarch64_crypto_sha256su1v4si): Ditto.
20928         (doc/invoke.texi): Document new aes and sha2 options.
20930 2018-01-10  Martin Sebor  <msebor@redhat.com>
20932         PR tree-optimization/83781
20933         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20934         as string arrays.
20936 2018-01-11  Martin Sebor  <msebor@gmail.com>
20937             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20939         PR tree-optimization/83501
20940         PR tree-optimization/81703
20942         * tree-ssa-strlen.c (get_string_cst): Rename...
20943         (get_string_len): ...to this.  Handle global constants.
20944         (handle_char_store): Adjust.
20946 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20947             Jim Wilson  <jimw@sifive.com>
20949         * config/riscv/riscv-protos.h (riscv_output_return): New.
20950         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20951         (riscv_attribute_table, riscv_output_return),
20952         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20953         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20954         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20955         function.
20956         (riscv_expand_prologue): Add early return for naked function.
20957         (riscv_expand_epilogue): Likewise.
20958         (riscv_function_ok_for_sibcall): Return false for naked function.
20959         (riscv_set_current_function): New.
20960         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20961         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20962         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20963         * doc/extend.texi (RISC-V Function Attributes): New.
20965 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20967         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20968         check for 128-bit long double before checking TCmode.
20969         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20970         128-bit long doubles before checking TFmode or TCmode.
20971         (FLOAT128_IBM_P): Likewise.
20973 2018-01-10  Martin Sebor  <msebor@redhat.com>
20975         PR tree-optimization/83671
20976         * builtins.c (c_strlen): Unconditionally return zero for the empty
20977         string.
20978         Use -Warray-bounds for warnings.
20979         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20980         for non-constant array indices with COMPONENT_REF, arrays of
20981         arrays, and pointers to arrays.
20982         (gimple_fold_builtin_strlen): Determine and set length range for
20983         non-constant character arrays.
20985 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20987         PR middle-end/81897
20988         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20989         empty blocks.
20991 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20993         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20995 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20997         PR target/83399
20998         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20999         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21000         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21001         indexed_or_indirect_operand predicate.
21002         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21003         (*vsx_le_perm_load_v8hi): Likewise.
21004         (*vsx_le_perm_load_v16qi): Likewise.
21005         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21006         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21007         (*vsx_le_perm_store_v8hi): Likewise.
21008         (*vsx_le_perm_store_v16qi): Likewise.
21009         (eight unnamed splitters): Likewise.
21011 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21013         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21014         * config/rs6000/emmintrin.h: Likewise.
21015         * config/rs6000/mmintrin.h: Likewise.
21016         * config/rs6000/xmmintrin.h: Likewise.
21018 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21020         PR c++/43486
21021         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21022         "public_flag".
21023         * tree.c (tree_nop_conversion): Return true for location wrapper
21024         nodes.
21025         (maybe_wrap_with_location): New function.
21026         (selftest::check_strip_nops): New function.
21027         (selftest::test_location_wrappers): New function.
21028         (selftest::tree_c_tests): Call it.
21029         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21030         (maybe_wrap_with_location): New decl.
21031         (EXPR_LOCATION_WRAPPER_P): New macro.
21032         (location_wrapper_p): New inline function.
21033         (tree_strip_any_location_wrapper): New inline function.
21035 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21037         PR target/83735
21038         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21039         stack_realign_offset for the largest alignment of stack slot
21040         actually used.
21041         (ix86_find_max_used_stack_alignment): New function.
21042         (ix86_finalize_stack_frame_flags): Use it.  Set
21043         max_used_stack_alignment if we don't realign stack.
21044         * config/i386/i386.h (machine_function): Add
21045         max_used_stack_alignment.
21047 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21049         * config/arm/arm.opt (-mbranch-cost): New option.
21050         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21051         account.
21053 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21055         PR target/83629
21056         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21057         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21059 2018-01-10  Richard Biener  <rguenther@suse.de>
21061         PR debug/83765
21062         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21063         early out so it also covers the case where we have a non-NULL
21064         origin.
21066 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21068         PR tree-optimization/83753
21069         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21070         for non-strided grouped accesses if the number of elements is 1.
21072 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21074         PR target/81616
21075         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21076         * i386.h (TARGET_USE_GATHER): Define.
21077         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21079 2018-01-10  Martin Liska  <mliska@suse.cz>
21081         PR bootstrap/82831
21082         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21083         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21084         partitioning.
21085         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21086         CLEANUP_NO_PARTITIONING is not set.
21088 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21090         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21091         for vectors, as a partial revert of r254296.
21092         * rtl.h (const_vec_p): Delete.
21093         (const_vec_duplicate_p): Don't test for vector CONSTs.
21094         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21095         * expmed.c (make_tree): Likewise.
21097         Revert:
21098         * common.md (E, F): Use CONSTANT_P instead of checking for
21099         CONST_VECTOR.
21100         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21101         checking for CONST_VECTOR.
21103 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21105         PR middle-end/83575
21106         * predict.c (force_edge_cold): Handle in more sane way edges
21107         with no prediction.
21109 2018-01-09  Carl Love  <cel@us.ibm.com>
21111         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21112         V4SI, V4SF types.
21113         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21114         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21115         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21116         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21117         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21118         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21119         * config/rs6000/rs6000-protos.h: Add extern defition for
21120         rs6000_generate_float2_double_code.
21121         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21122         function.
21123         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21124         (float2_v2df): Add define_expand.
21126 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21128         PR target/83628
21129         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21130         op_mode in the force_to_mode call.
21132 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21134         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21135         instead of checking each element individually.
21136         (aarch64_evpc_uzp): Likewise.
21137         (aarch64_evpc_zip): Likewise.
21138         (aarch64_evpc_ext): Likewise.
21139         (aarch64_evpc_rev): Likewise.
21140         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21141         instead of checking each element individually.  Return true without
21142         generating rtl if
21143         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21144         whether all selected elements come from the same input, instead of
21145         checking each element individually.  Remove calls to gen_rtx_REG,
21146         start_sequence and end_sequence and instead assert that no rtl is
21147         generated.
21149 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21151         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21152         order of HIGH and CONST checks.
21154 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21156         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21157         if the destination isn't an SSA_NAME.
21159 2018-01-09  Richard Biener  <rguenther@suse.de>
21161         PR tree-optimization/83668
21162         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21163         move prologue...
21164         (canonicalize_loop_form): ... here, renamed from ...
21165         (canonicalize_loop_closed_ssa_form): ... this and amended to
21166         swap successor edges for loop exit blocks to make us use
21167         the RPO order we need for initial schedule generation.
21169 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21171         PR tree-optimization/64811
21172         * match.pd: When optimizing comparisons with Inf, avoid
21173         introducing or losing exceptions from comparisons with NaN.
21175 2018-01-09  Martin Liska  <mliska@suse.cz>
21177         PR sanitizer/82517
21178         * asan.c (shadow_mem_size): Add gcc_assert.
21180 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21182         Don't save registers in main().
21184         PR target/83738
21185         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21186         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21187         * config/avr/avr.c (avr_set_current_function): Don't error if
21188         naked, OS_task or OS_main are specified at the same time.
21189         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21190         OS_main.
21191         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21192         attribute.
21193         * common/config/avr/avr-common.c (avr_option_optimization_table):
21194         Switch on -mmain-is-OS_task for optimizing compilations.
21196 2018-01-09  Richard Biener  <rguenther@suse.de>
21198         PR tree-optimization/83572
21199         * graphite.c: Include cfganal.h.
21200         (graphite_transform_loops): Connect infinite loops to exit
21201         and remove fake edges at the end.
21203 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21205         * ipa-inline.c (edge_badness): Revert accidental checkin.
21207 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21209         PR ipa/80763
21210         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21211         symbols; not inline clones.
21213 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21215         PR target/83507
21216         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21217         hard registers.  Formatting fixes.
21219         PR preprocessor/83722
21220         * gcc.c (try_generate_repro): Pass
21221         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21222         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21223         do_report_bug.
21225 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21226             Kito Cheng  <kito.cheng@gmail.com>
21228         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21229         (riscv_leaf_function_p): Delete.
21230         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21232 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21234         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21235         function.
21236         (do_ifelse): New function.
21237         (do_isel): New function.
21238         (do_sub3): New function.
21239         (do_add3): New function.
21240         (do_load_mask_compare): New function.
21241         (do_overlap_load_compare): New function.
21242         (expand_compare_loop): New function.
21243         (expand_block_compare): Call expand_compare_loop() when appropriate.
21244         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21245         option description.
21246         (-mblock-compare-inline-loop-limit): New option.
21248 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21250         PR target/83677
21251         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21252         Reverse order of second and third operands in first alternative.
21253         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21254         of first and second elements in UNSPEC_VPERMR vector.
21255         (altivec_expand_vec_perm_le): Likewise.
21257 2018-01-08  Jeff Law  <law@redhat.com>
21259         PR rtl-optimizatin/81308
21260         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21261         (process_switch): If group_case_labels makes a change, then set
21262         cfg_altered.
21263         (pass_convert_switch::execute): If a switch is converted, then
21264         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21266         PR rtl-optimization/81308
21267         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21268         splitting insns.
21270 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21272         PR target/83663 - Revert r255946
21273         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21274         generation for cases where splatting a value is not useful.
21275         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21276         across a vec_duplicate and a paradoxical subreg forming a vector
21277         mode to a vec_concat.
21279 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21281         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21282         -march=armv8.3-a variants.
21283         * config/arm/t-multilib: Likewise.
21284         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21286 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21288         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21289         to generate rtl.
21290         (cceq_ior_compare_complement): Give it a name so I can use it, and
21291         change boolean_or_operator predicate to boolean_operator so it can
21292         be used to generate a crand.
21293         (eqne): New code iterator.
21294         (bd/bd_neg): New code_attrs.
21295         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21296         a single define_insn.
21297         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21298         decrement (bdnzt/bdnzf/bdzt/bdzf).
21299         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21300         with the new names of the branch decrement patterns, and added the
21301         names of the branch decrement conditional patterns.
21303 2018-01-08  Richard Biener  <rguenther@suse.de>
21305         PR tree-optimization/83563
21306         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21307         cache.
21309 2018-01-08  Richard Biener  <rguenther@suse.de>
21311         PR middle-end/83713
21312         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21314 2018-01-08  Richard Biener  <rguenther@suse.de>
21316         PR tree-optimization/83685
21317         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21318         references to abnormals.
21320 2018-01-08  Richard Biener  <rguenther@suse.de>
21322         PR lto/83719
21323         * dwarf2out.c (output_indirect_strings): Handle empty
21324         skeleton_debug_str_hash.
21325         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21327 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21329         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21330         (emit_store_direct): Likewise.
21331         (arc_trampoline_adjust_address): Likewise.
21332         (arc_asm_trampoline_template): New function.
21333         (arc_initialize_trampoline): Use asm_trampoline_template.
21334         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21335         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21336         * config/arc/arc.md (flush_icache): Delete pattern.
21338 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21340         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21341         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21342         munaligned-access.
21344 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21346         PR target/83681
21347         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21348         by not USED_FOR_TARGET.
21349         (make_pass_resolve_sw_modes): Likewise.
21351 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21353         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21354         USED_FOR_TARGET.
21356 2018-01-08  Richard Biener  <rguenther@suse.de>
21358         PR middle-end/83580
21359         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21361 2018-01-08  Richard Biener  <rguenther@suse.de>
21363         PR middle-end/83517
21364         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21366 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21368         PR middle-end/81897
21369         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21370         basic blocks with a small number of successors.
21371         (convert_control_dep_chain_into_preds): Improve handling of
21372         forwarder blocks.
21373         (dump_predicates): Split apart into...
21374         (dump_pred_chain): ...here...
21375         (dump_pred_info): ...and here.
21376         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21377         (can_chain_union_be_invalidated_p): Improve check for invalidation
21378         of paths.
21379         (uninit_uses_cannot_happen): Avoid unnecessary if
21380         convert_control_dep_chain_into_preds yielded nothing.
21382 2018-01-06  Martin Sebor  <msebor@redhat.com>
21384         PR tree-optimization/83640
21385         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21386         subtracting negative offset from size.
21387         (builtin_access::overlap): Adjust offset bounds of the access to fall
21388         within the size of the object if possible.
21390 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21392         PR rtl-optimization/83699
21393         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21394         extract_bit_field_as_subreg to cases in which the extracted
21395         value is also a vector.
21397         * lra-constraints.c (process_alt_operands): Test for the equivalence
21398         substitutions when detecting a possible reload cycle.
21400 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21402         PR debug/83480
21403         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21404         by default if flag_selective_schedling{,2}.  Formatting fixes.
21406         PR rtl-optimization/83682
21407         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21408         if it has non-VECTOR_MODE element mode.
21409         (vec_duplicate_p): Likewise.
21411         PR middle-end/83694
21412         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21413         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21415 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21417         PR target/83604
21418         * config/i386/i386-builtin.def
21419         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21420         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21421         Require also OPTION_MASK_ISA_AVX512F in addition to
21422         OPTION_MASK_ISA_GFNI.
21423         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21424         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21425         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21426         to OPTION_MASK_ISA_GFNI.
21427         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21428         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21429         OPTION_MASK_ISA_AVX512BW.
21430         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21431         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21432         addition to OPTION_MASK_ISA_GFNI.
21433         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21434         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21435         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21436         to OPTION_MASK_ISA_GFNI.
21437         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21438         a requirement for all ISAs rather than any of them with a few
21439         exceptions.
21440         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21441         processing.
21442         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21443         bitmasks to be enabled with 3 exceptions, instead of requiring any
21444         enabled ISA with lots of exceptions.
21445         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21446         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21447         Change avx512bw in isa attribute to avx512f.
21448         * config/i386/sgxintrin.h: Add license boilerplate.
21449         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21450         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21451         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21452         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21453         defined.
21454         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21455         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21456         temporarily sse2 rather than sse if not enabled already.
21458         PR target/83604
21459         * config/i386/sse.md (VI248_VLBW): Rename to ...
21460         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21461         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21462         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21463         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21464         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21465         mode iterator instead of VI248_VLBW.
21467 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21469         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21470         (record_modified): Skip clobbers; add debug output.
21471         (param_change_prob): Use sreal frequencies.
21473 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21475         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21476         punt for user-aligned variables.
21478 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21480         * tree-chrec.c (chrec_contains_symbols): Return true for
21481         POLY_INT_CST.
21483 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21485         PR target/82439
21486         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21487         of (x|y) == x for BICS pattern.
21489 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21491         PR tree-optimization/83605
21492         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21493         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21494         can throw.
21496 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21498         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21499         * config/epiphany/rtems.h: New file.
21501 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21502             Uros Bizjak  <ubizjak@gmail.com>
21504         PR target/83554
21505         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21506         QIreg_operand instead of register_operand predicate.
21507         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21508         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21509         comments instead of -fmitigate[-_]rop.
21511 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21513         PR bootstrap/81926
21514         * cgraphunit.c (symbol_table::compile): Switch to text_section
21515         before calling assembly_start debug hook.
21516         * run-rtl-passes.c (run_rtl_passes): Likewise.
21517         Include output.h.
21519 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21521         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21522         range_int_cst_p rather than !symbolic_range_p before calling
21523         extract_range_from_multiplicative_op_1.
21525 2018-01-04  Jeff Law  <law@redhat.com>
21527         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21528         redundant test in assertion.
21530 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21532         * doc/rtl.texi: Document machine_mode wrapper classes.
21534 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21536         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21537         using tree_to_uhwi.
21539 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21541         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21542         the VEC_PERM_EXPR fold to fail.
21544 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21546         PR debug/83585
21547         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21548         to switched_sections.
21550 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21552         PR target/83680
21553         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21554         test for d.testing.
21556 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21558         PR target/83387
21559         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21560         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21562 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21564         PR debug/83666
21565         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21566         is BLKmode and bitpos not zero or mode change is needed.
21568 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21570         PR target/83675
21571         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21572         TARGET_VIS2.
21574 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21576         PR target/83628
21577         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21578         instead of MULT rtx.  Update all corresponding splitters.
21579         (*saddl_se): Ditto.
21580         (*ssub<modesuffix>): Ditto.
21581         (*ssubl_se): Ditto.
21582         (*cmp_sadd_di): Update split patterns.
21583         (*cmp_sadd_si): Ditto.
21584         (*cmp_sadd_sidi): Ditto.
21585         (*cmp_ssub_di): Ditto.
21586         (*cmp_ssub_si): Ditto.
21587         (*cmp_ssub_sidi): Ditto.
21588         * config/alpha/predicates.md (const23_operand): New predicate.
21589         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21590         Look for ASHIFT, not MULT inner operand.
21591         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21593 2018-01-04  Martin Liska  <mliska@suse.cz>
21595         PR gcov-profile/83669
21596         * gcov.c (output_intermediate_file): Add version to intermediate
21597         gcov file.
21598         * doc/gcov.texi: Document new field 'version' in intermediate
21599         file format. Fix location of '-k' option of gcov command.
21601 2018-01-04  Martin Liska  <mliska@suse.cz>
21603         PR ipa/82352
21604         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21606 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21608         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21610 2018-01-03  Martin Sebor  <msebor@redhat.com>
21612         PR tree-optimization/83655
21613         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21614         checking calls with invalid arguments.
21616 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21618         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21619         (vectorizable_mask_load_store): Delete.
21620         (vectorizable_call): Return false for masked loads and stores.
21621         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21622         instead of gimple_assign_rhs1.
21623         (vectorizable_load): Handle IFN_MASK_LOAD.
21624         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21628         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21629         split out from..,
21630         (vectorizable_mask_load_store): ...here.
21631         (vectorizable_load): ...and here.
21633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21635         * tree-vect-stmts.c (vect_build_all_ones_mask)
21636         (vect_build_zero_merge_argument): New functions, split out from...
21637         (vectorizable_load): ...here.
21639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21641         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21642         split out from...
21643         (vectorizable_mask_load_store): ...here.
21644         (vectorizable_store): ...and here.
21646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21648         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21649         split out from...
21650         (vectorizable_mask_load_store): ...here.
21652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21654         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21655         (vect_model_store_cost): Take a vec_load_store_type instead of a
21656         vect_def_type.
21657         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21658         (vect_model_store_cost): Take a vec_load_store_type instead of a
21659         vect_def_type.
21660         (vectorizable_mask_load_store): Update accordingly.
21661         (vectorizable_store): Likewise.
21662         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21666         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21667         IFN_MASK_LOAD calls here rather than...
21668         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21671             Alan Hayward  <alan.hayward@arm.com>
21672             David Sherwood  <david.sherwood@arm.com>
21674         * expmed.c (extract_bit_field_1): For vector extracts,
21675         fall back to extract_bit_field_as_subreg if vec_extract
21676         isn't available.
21678 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21679             Alan Hayward  <alan.hayward@arm.com>
21680             David Sherwood  <david.sherwood@arm.com>
21682         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21683         they are variable or constant sized.
21684         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21685         slots for constant-sized data.
21687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21688             Alan Hayward  <alan.hayward@arm.com>
21689             David Sherwood  <david.sherwood@arm.com>
21691         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21692         handling COND_EXPRs with boolean comparisons, try to find a better
21693         basis for the mask type than the boolean itself.
21695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21697         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21698         is calculated and how it can be overridden.
21699         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21700         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21701         if defined.
21702         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21703         if nonzero.
21705 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21706             Alan Hayward  <alan.hayward@arm.com>
21707             David Sherwood  <david.sherwood@arm.com>
21709         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21710         Remove the mode argument.
21711         (aarch64_simd_valid_immediate): Remove the mode and inverse
21712         arguments.
21713         * config/aarch64/iterators.md (bitsize): New iterator.
21714         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21715         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21716         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21717         aarch64_simd_valid_immediate.
21718         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21719         (aarch64_reg_or_bic_imm): Likewise.
21720         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21721         with an insn_type enum and msl with a modifier_type enum.
21722         Replace element_width with a scalar_mode.  Change the shift
21723         to unsigned int.  Add constructors for scalar_float_mode and
21724         scalar_int_mode elements.
21725         (aarch64_vect_float_const_representable_p): Delete.
21726         (aarch64_can_const_movi_rtx_p)
21727         (aarch64_simd_scalar_immediate_valid_for_move)
21728         (aarch64_simd_make_constant): Update call to
21729         aarch64_simd_valid_immediate.
21730         (aarch64_advsimd_valid_immediate_hs): New function.
21731         (aarch64_advsimd_valid_immediate): Likewise.
21732         (aarch64_simd_valid_immediate): Remove mode and inverse
21733         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21734         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21735         and aarch64_float_const_representable_p on the result.
21736         (aarch64_output_simd_mov_immediate): Remove mode argument.
21737         Update call to aarch64_simd_valid_immediate and use of
21738         simd_immediate_info.
21739         (aarch64_output_scalar_simd_mov_immediate): Update call
21740         accordingly.
21742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21743             Alan Hayward  <alan.hayward@arm.com>
21744             David Sherwood  <david.sherwood@arm.com>
21746         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21747         (mode_nunits): Likewise CONST_MODE_NUNITS.
21748         * machmode.def (ADJUST_NUNITS): Document.
21749         * genmodes.c (mode_data::need_nunits_adj): New field.
21750         (blank_mode): Update accordingly.
21751         (adj_nunits): New variable.
21752         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21753         parameter.
21754         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21755         listed in adj_nunits.
21756         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21757         listed in adj_nunits.  Don't emit case statements for such modes.
21758         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21759         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21760         nothing if adj_nunits is nonnull.
21761         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21762         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21763         (emit_mode_fbit): Update use of print_maybe_const_decl.
21764         (emit_move_size): Likewise.  Treat the array as non-const
21765         if adj_nunits.
21766         (emit_mode_adjustments): Handle adj_nunits.
21768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21770         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21771         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21772         (VECTOR_MODES): Use it.
21773         (make_vector_modes): Take the prefix as an argument.
21775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21776             Alan Hayward  <alan.hayward@arm.com>
21777             David Sherwood  <david.sherwood@arm.com>
21779         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21780         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21781         for MODE_VECTOR_BOOL.
21782         * machmode.def (VECTOR_BOOL_MODE): Document.
21783         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21784         (make_vector_bool_mode): New function.
21785         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21786         MODE_VECTOR_BOOL.
21787         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21788         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21789         Likewise.
21790         * stor-layout.c (int_mode_for_mode): Likewise.
21791         * tree.c (build_vector_type_for_mode): Likewise.
21792         * varasm.c (output_constant_pool_2): Likewise.
21793         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21794         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21795         for MODE_VECTOR_BOOL.
21796         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21797         of mode class checks.
21798         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21799         instead of a list of mode class checks.
21800         (expand_vector_scalar_condition): Likewise.
21801         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21804             Alan Hayward  <alan.hayward@arm.com>
21805             David Sherwood  <david.sherwood@arm.com>
21807         * machmode.h (mode_size): Change from unsigned short to
21808         poly_uint16_pod.
21809         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21810         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21811         or if measurement_type is not polynomial.
21812         (fixed_size_mode::includes_p): Check for constant-sized modes.
21813         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21814         return a poly_uint16 rather than an unsigned short.
21815         (emit_mode_size): Change the type of mode_size from unsigned short
21816         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21817         (emit_mode_adjustments): Cope with polynomial vector sizes.
21818         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21819         for GET_MODE_SIZE.
21820         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21821         for GET_MODE_SIZE.
21822         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21823         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21824         * caller-save.c (setup_save_areas): Likewise.
21825         (replace_reg_with_saved_mem): Likewise.
21826         * calls.c (emit_library_call_value_1): Likewise.
21827         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21828         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21829         (gen_lowpart_for_combine): Likewise.
21830         * convert.c (convert_to_integer_1): Likewise.
21831         * cse.c (equiv_constant, cse_insn): Likewise.
21832         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21833         (cselib_subst_to_values): Likewise.
21834         * dce.c (word_dce_process_block): Likewise.
21835         * df-problems.c (df_word_lr_mark_ref): Likewise.
21836         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21837         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21838         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21839         (rtl_for_decl_location): Likewise.
21840         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21841         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21842         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21843         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21844         (expand_expr_real_1): Likewise.
21845         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21846         (pad_below): Likewise.
21847         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21848         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21849         * ira.c (get_subreg_tracking_sizes): Likewise.
21850         * ira-build.c (ira_create_allocno_objects): Likewise.
21851         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21852         (ira_sort_regnos_for_alter_reg): Likewise.
21853         * ira-costs.c (record_operand_costs): Likewise.
21854         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21855         (resolve_simple_move): Likewise.
21856         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21857         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21858         (lra_constraints): Likewise.
21859         (CONST_POOL_OK_P): Reject variable-sized modes.
21860         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21861         (add_pseudo_to_slot, lra_spill): Likewise.
21862         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21863         * optabs-query.c (get_best_extraction_insn): Likewise.
21864         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21865         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21866         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21867         * recog.c (offsettable_address_addr_space_p): Likewise.
21868         * regcprop.c (maybe_mode_change): Likewise.
21869         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21870         * regrename.c (build_def_use): Likewise.
21871         * regstat.c (dump_reg_info): Likewise.
21872         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21873         (find_reloads, find_reloads_subreg_address): Likewise.
21874         * reload1.c (eliminate_regs_1): Likewise.
21875         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21876         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21877         (simplify_binary_operation_1, simplify_subreg): Likewise.
21878         * targhooks.c (default_function_arg_padding): Likewise.
21879         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21880         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21881         (verify_gimple_assign_ternary): Likewise.
21882         * tree-inline.c (estimate_move_cost): Likewise.
21883         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21884         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21885         (get_address_cost_ainc): Likewise.
21886         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21887         (vect_supportable_dr_alignment): Likewise.
21888         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21889         (vectorizable_reduction): Likewise.
21890         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21891         (vectorizable_operation, vectorizable_load): Likewise.
21892         * tree.c (build_same_sized_truth_vector_type): Likewise.
21893         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21894         * var-tracking.c (emit_note_insn_var_location): Likewise.
21895         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21896         (ADDR_VEC_ALIGN): Likewise.
21898 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21899             Alan Hayward  <alan.hayward@arm.com>
21900             David Sherwood  <david.sherwood@arm.com>
21902         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21903         unsigned short.
21904         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21905         or if measurement_type is polynomial.
21906         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21907         * combine.c (make_extraction): Likewise.
21908         * dse.c (find_shift_sequence): Likewise.
21909         * dwarf2out.c (mem_loc_descriptor): Likewise.
21910         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21911         (extract_bit_field, extract_low_bits): Likewise.
21912         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21913         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21914         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21915         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21916         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21917         * reload.c (find_reloads): Likewise.
21918         * reload1.c (alter_reg): Likewise.
21919         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21920         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21921         * tree-if-conv.c (predicate_mem_writes): Likewise.
21922         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21923         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21924         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21925         * valtrack.c (dead_debug_insert_temp): Likewise.
21926         * varasm.c (mergeable_constant_section): Likewise.
21927         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21930             Alan Hayward  <alan.hayward@arm.com>
21931             David Sherwood  <david.sherwood@arm.com>
21933         * expr.c (expand_assignment): Cope with polynomial mode sizes
21934         when assigning to a CONCAT.
21936 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21937             Alan Hayward  <alan.hayward@arm.com>
21938             David Sherwood  <david.sherwood@arm.com>
21940         * machmode.h (mode_precision): Change from unsigned short to
21941         poly_uint16_pod.
21942         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21943         short.
21944         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21945         or if measurement_type is not polynomial.
21946         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21947         in which the mode is already known to be a scalar_int_mode.
21948         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21949         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21950         initializer.
21951         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21952         for GET_MODE_PRECISION.
21953         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21954         for GET_MODE_PRECISION.
21955         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21956         as polynomial.
21957         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21958         (expand_field_assignment, make_extraction): Likewise.
21959         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21960         (get_last_value): Likewise.
21961         * convert.c (convert_to_integer_1): Likewise.
21962         * cse.c (cse_insn): Likewise.
21963         * expr.c (expand_expr_real_1): Likewise.
21964         * lra-constraints.c (simplify_operand_subreg): Likewise.
21965         * optabs-query.c (can_atomic_load_p): Likewise.
21966         * optabs.c (expand_atomic_load): Likewise.
21967         (expand_atomic_store): Likewise.
21968         * ree.c (combine_reaching_defs): Likewise.
21969         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21970         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21971         * tree.h (type_has_mode_precision_p): Likewise.
21972         * ubsan.c (instrument_si_overflow): Likewise.
21974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21975             Alan Hayward  <alan.hayward@arm.com>
21976             David Sherwood  <david.sherwood@arm.com>
21978         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21979         polynomial numbers of units.
21980         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21981         (valid_vector_subparts_p): New function.
21982         (build_vector_type): Remove temporary shim and take the number
21983         of units as a poly_uint64 rather than an int.
21984         (build_opaque_vector_type): Take the number of units as a
21985         poly_uint64 rather than an int.
21986         * tree.c (build_vector_from_ctor): Handle polynomial
21987         TYPE_VECTOR_SUBPARTS.
21988         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21989         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21990         (build_vector_from_val): If the number of units is variable,
21991         use build_vec_duplicate_cst for constant operands and
21992         VEC_DUPLICATE_EXPR otherwise.
21993         (make_vector_type): Remove temporary is_constant ().
21994         (build_vector_type, build_opaque_vector_type): Take the number of
21995         units as a poly_uint64 rather than an int.
21996         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21997         VECTOR_CST_NELTS.
21998         * cfgexpand.c (expand_debug_expr): Likewise.
21999         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22000         (store_constructor, expand_expr_real_1): Likewise.
22001         (const_scalar_mask_from_tree): Likewise.
22002         * fold-const-call.c (fold_const_reduction): Likewise.
22003         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22004         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22005         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22006         (fold_relational_const): Likewise.
22007         (native_interpret_vector): Likewise.  Change the size from an
22008         int to an unsigned int.
22009         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22010         TYPE_VECTOR_SUBPARTS.
22011         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22012         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22013         duplicating a non-constant operand into a variable-length vector.
22014         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22015         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22016         * ipa-icf.c (sem_variable::equals): Likewise.
22017         * match.pd: Likewise.
22018         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22019         * print-tree.c (print_node): Likewise.
22020         * stor-layout.c (layout_type): Likewise.
22021         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22022         * tree-cfg.c (verify_gimple_comparison): Likewise.
22023         (verify_gimple_assign_binary): Likewise.
22024         (verify_gimple_assign_ternary): Likewise.
22025         (verify_gimple_assign_single): Likewise.
22026         * tree-pretty-print.c (dump_generic_node): Likewise.
22027         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22028         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22029         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22030         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22031         (vect_shift_permute_load_chain): Likewise.
22032         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22033         (expand_vector_condition, optimize_vector_constructor): Likewise.
22034         (lower_vec_perm, get_compute_type): Likewise.
22035         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22036         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22037         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22038         (vect_recog_mask_conversion_pattern): Likewise.
22039         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22040         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22041         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22042         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22043         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22044         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22045         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22046         (supportable_widening_operation): Likewise.
22047         (supportable_narrowing_operation): Likewise.
22048         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22049         Likewise.
22050         * varasm.c (output_constant): Likewise.
22052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22053             Alan Hayward  <alan.hayward@arm.com>
22054             David Sherwood  <david.sherwood@arm.com>
22056         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22057         so that both the length == 3 and length != 3 cases set up their
22058         own permute vectors.  Add comments explaining why we know the
22059         number of elements is constant.
22060         (vect_permute_load_chain): Likewise.
22062 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22063             Alan Hayward  <alan.hayward@arm.com>
22064             David Sherwood  <david.sherwood@arm.com>
22066         * machmode.h (mode_nunits): Change from unsigned char to
22067         poly_uint16_pod.
22068         (ONLY_FIXED_SIZE_MODES): New macro.
22069         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22070         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22071         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22072         New typedefs.
22073         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22074         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22075         or if measurement_type is not polynomial.
22076         * genmodes.c (ZERO_COEFFS): New macro.
22077         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22078         poly_uint16.
22079         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22080         Use ZERO_COEFFS when emitting initializers.
22081         * data-streamer.h (bp_pack_poly_value): New function.
22082         (bp_unpack_poly_value): Likewise.
22083         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22084         for GET_MODE_NUNITS.
22085         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22086         for GET_MODE_NUNITS.
22087         * tree.c (make_vector_type): Remove temporary shim and make
22088         the real function take the number of units as a poly_uint64
22089         rather than an int.
22090         (build_vector_type_for_mode): Handle polynomial nunits.
22091         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22092         * emit-rtl.c (const_vec_series_p_1): Likewise.
22093         (gen_rtx_CONST_VECTOR): Likewise.
22094         * fold-const.c (test_vec_duplicate_folding): Likewise.
22095         * genrecog.c (validate_pattern): Likewise.
22096         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22097         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22098         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22099         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22100         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22101         * rtlanal.c (subreg_get_info): Likewise.
22102         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22103         (vect_grouped_load_supported): Likewise.
22104         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22105         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22106         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22107         (simplify_const_unary_operation, simplify_binary_operation_1)
22108         (simplify_const_binary_operation, simplify_ternary_operation)
22109         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22110         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22111         instead of CONST_VECTOR_NUNITS.
22112         * varasm.c (output_constant_pool_2): Likewise.
22113         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22114         explicit-encoded elements in the XVEC for variable-length vectors.
22116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22118         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22120 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22121             Alan Hayward  <alan.hayward@arm.com>
22122             David Sherwood  <david.sherwood@arm.com>
22124         * coretypes.h (fixed_size_mode): Declare.
22125         (fixed_size_mode_pod): New typedef.
22126         * builtins.h (target_builtins::x_apply_args_mode)
22127         (target_builtins::x_apply_result_mode): Change type to
22128         fixed_size_mode_pod.
22129         * builtins.c (apply_args_size, apply_result_size, result_vector)
22130         (expand_builtin_apply_args_1, expand_builtin_apply)
22131         (expand_builtin_return): Update accordingly.
22133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22135         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22136         * cselib.c (cselib_hash_rtx): Likewise.
22137         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22138         CONST_VECTOR encoding.
22140 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22141             Jeff Law  <law@redhat.com>
22143         PR target/83641
22144         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22145         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22146         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22147         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22149         PR target/83641
22150         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22151         explicitly probe *sp in a noreturn function if there were any callee
22152         register saves or frame pointer is needed.
22154 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22156         PR debug/83621
22157         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22158         BLKmode for ternary, binary or unary expressions.
22160         PR debug/83645
22161         * var-tracking.c (delete_vta_debug_insn): New inline function.
22162         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22163         insns from get_insns () to NULL instead of each bb separately.
22164         Use delete_vta_debug_insn.  No longer static.
22165         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22166         delete_vta_debug_insns callers.
22167         * rtl.h (delete_vta_debug_insns): Declare.
22168         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22169         instead of variable_tracking_main.
22171 2018-01-03  Martin Sebor  <msebor@redhat.com>
22173         PR tree-optimization/83603
22174         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22175         arguments past the endof the argument list in functions declared
22176         without a prototype.
22177         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22178         Avoid checking when arguments are null.
22180 2018-01-03  Martin Sebor  <msebor@redhat.com>
22182         PR c/83559
22183         * doc/extend.texi (attribute const): Fix a typo.
22184         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22185         issuing -Wsuggest-attribute for void functions.
22187 2018-01-03  Martin Sebor  <msebor@redhat.com>
22189         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22190         offset_int::from instead of wide_int::to_shwi.
22191         (maybe_diag_overlap): Remove assertion.
22192         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22193         * gimple-ssa-sprintf.c (format_directive): Same.
22194         (parse_directive): Same.
22195         (sprintf_dom_walker::compute_format_length): Same.
22196         (try_substitute_return_value): Same.
22198 2018-01-03  Jeff Law  <law@redhat.com>
22200         PR middle-end/83654
22201         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22202         non-constant residual for zero at runtime and avoid probing in
22203         that case.  Reorganize code for trailing problem to mirror handling
22204         of the residual.
22206 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22208         PR tree-optimization/83501
22209         * tree-ssa-strlen.c (get_string_cst): New.
22210         (handle_char_store): Call get_string_cst.
22212 2018-01-03  Martin Liska  <mliska@suse.cz>
22214         PR tree-optimization/83593
22215         * tree-ssa-strlen.c: Include tree-cfg.h.
22216         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22217         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22218         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22219         to false.
22220         (strlen_dom_walker::before_dom_children): Call
22221         gimple_purge_dead_eh_edges. Dump tranformation with details
22222         dump flags.
22223         (strlen_dom_walker::before_dom_children): Update call by adding
22224         new argument cleanup_eh.
22225         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22227 2018-01-03  Martin Liska  <mliska@suse.cz>
22229         PR ipa/83549
22230         * cif-code.def (VARIADIC_THUNK): New enum value.
22231         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22232         thunks.
22234 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22236         * sse.md (mov<mode>_internal): Tighten condition for when to use
22237         vmovdqu<ssescalarsize> for TI and OI modes.
22239 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22241         Update copyright years.
22243 2018-01-03  Martin Liska  <mliska@suse.cz>
22245         PR ipa/83594
22246         * ipa-visibility.c (function_and_variable_visibility): Skip
22247         functions with noipa attribure.
22249 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22251         * gcc.c (process_command): Update copyright notice dates.
22252         * gcov-dump.c (print_version): Ditto.
22253         * gcov.c (print_version): Ditto.
22254         * gcov-tool.c (print_version): Ditto.
22255         * gengtype.c (create_file): Ditto.
22256         * doc/cpp.texi: Bump @copying's copyright year.
22257         * doc/cppinternals.texi: Ditto.
22258         * doc/gcc.texi: Ditto.
22259         * doc/gccint.texi: Ditto.
22260         * doc/gcov.texi: Ditto.
22261         * doc/install.texi: Ditto.
22262         * doc/invoke.texi: Ditto.
22264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22266         * vector-builder.h (vector_builder::m_full_nelts): Change from
22267         unsigned int to poly_uint64.
22268         (vector_builder::full_nelts): Update prototype accordingly.
22269         (vector_builder::new_vector): Likewise.
22270         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22271         (vector_builder::operator ==): Likewise.
22272         (vector_builder::finalize): Likewise.
22273         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22274         Take the number of elements as a poly_uint64 rather than an
22275         unsigned int.
22276         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22277         from unsigned int to poly_uint64.
22278         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22279         (vec_perm_indices::new_vector): Likewise.
22280         (vec_perm_indices::length): Likewise.
22281         (vec_perm_indices::nelts_per_input): Likewise.
22282         (vec_perm_indices::input_nelts): Likewise.
22283         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22284         number of elements per input as a poly_uint64 rather than an
22285         unsigned int.  Use the original encoding for variable-length
22286         vectors, rather than clamping each individual element.
22287         For the second and subsequent elements in each pattern,
22288         clamp the step and base before clamping their sum.
22289         (vec_perm_indices::series_p): Handle polynomial element counts.
22290         (vec_perm_indices::all_in_range_p): Likewise.
22291         (vec_perm_indices_to_tree): Likewise.
22292         (vec_perm_indices_to_rtx): Likewise.
22293         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22294         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22295         (tree_vector_builder::new_binary_operation): Handle polynomial
22296         element counts.  Return false if we need to know the number
22297         of elements at compile time.
22298         * fold-const.c (fold_vec_perm): Punt if the number of elements
22299         isn't known at compile time.
22301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22303         * vec-perm-indices.h (vec_perm_builder): Change element type
22304         from HOST_WIDE_INT to poly_int64.
22305         (vec_perm_indices::element_type): Update accordingly.
22306         (vec_perm_indices::clamp): Handle polynomial element_types.
22307         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22308         (vec_perm_indices::all_in_range_p): Likewise.
22309         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22310         than shwi trees.
22311         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22312         polynomial vec_perm_indices element types.
22313         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22314         * fold-const.c (fold_vec_perm): Likewise.
22315         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22316         * tree-vect-generic.c (lower_vec_perm): Likewise.
22317         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22318         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22319         element type to HOST_WIDE_INT.
22321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22322             Alan Hayward  <alan.hayward@arm.com>
22323             David Sherwood  <david.sherwood@arm.com>
22325         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22326         rather than an int.  Use plus_constant.
22327         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22328         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22330 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22331             Alan Hayward  <alan.hayward@arm.com>
22332             David Sherwood  <david.sherwood@arm.com>
22334         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22335         a HOST_WIDE_INT to a poly_int64.
22337 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22338             Alan Hayward  <alan.hayward@arm.com>
22339             David Sherwood  <david.sherwood@arm.com>
22341         * calls.c (load_register_parameters): Cope with polynomial
22342         mode sizes.  Require a constant size for BLKmode parameters
22343         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22344         forces a parameter to be padded at the lsb end in order to
22345         fill a complete number of words, require the parameter size
22346         to be ordered wrt UNITS_PER_WORD.
22348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22349             Alan Hayward  <alan.hayward@arm.com>
22350             David Sherwood  <david.sherwood@arm.com>
22352         * reload1.c (spill_stack_slot_width): Change element type
22353         from unsigned int to poly_uint64_pod.
22354         (alter_reg): Treat mode sizes as polynomial.
22356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22357             Alan Hayward  <alan.hayward@arm.com>
22358             David Sherwood  <david.sherwood@arm.com>
22360         * reload.c (complex_word_subreg_p): New function.
22361         (reload_inner_reg_of_subreg, push_reload): Use it.
22363 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22364             Alan Hayward  <alan.hayward@arm.com>
22365             David Sherwood  <david.sherwood@arm.com>
22367         * lra-constraints.c (process_alt_operands): Reject matched
22368         operands whose sizes aren't ordered.
22369         (match_reload): Refer to this check here.
22371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22372             Alan Hayward  <alan.hayward@arm.com>
22373             David Sherwood  <david.sherwood@arm.com>
22375         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22376         that the mode size is in the set {1, 2, 4, 8, 16}.
22378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22379             Alan Hayward  <alan.hayward@arm.com>
22380             David Sherwood  <david.sherwood@arm.com>
22382         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22383         Use plus_constant instead of gen_rtx_PLUS.
22385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22386             Alan Hayward  <alan.hayward@arm.com>
22387             David Sherwood  <david.sherwood@arm.com>
22389         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22390         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22391         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22392         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22393         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22394         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22395         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22396         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22397         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22398         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22399         a poly_int64.
22400         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22401         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22402         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22403         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22404         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22405         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22406         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22407         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22408         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22409         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22410         function.
22411         * expr.c (emit_move_resolve_push): Treat the input and result
22412         of PUSH_ROUNDING as a poly_int64.
22413         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22414         (emit_push_insn): Likewise.
22415         * lra-eliminations.c (mark_not_eliminable): Likewise.
22416         * recog.c (push_operand): Likewise.
22417         * reload1.c (elimination_effects): Likewise.
22418         * rtlanal.c (nonzero_bits1): Likewise.
22419         * calls.c (store_one_arg): Likewise.  Require the padding to be
22420         known at compile time.
22422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22423             Alan Hayward  <alan.hayward@arm.com>
22424             David Sherwood  <david.sherwood@arm.com>
22426         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22427         Use plus_constant instead of gen_rtx_PLUS.
22429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22430             Alan Hayward  <alan.hayward@arm.com>
22431             David Sherwood  <david.sherwood@arm.com>
22433         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22434         rather than an int.
22436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22437             Alan Hayward  <alan.hayward@arm.com>
22438             David Sherwood  <david.sherwood@arm.com>
22440         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22441         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22442         via stack temporaries.  Treat the mode size as polynomial too.
22444 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22445             Alan Hayward  <alan.hayward@arm.com>
22446             David Sherwood  <david.sherwood@arm.com>
22448         * expr.c (expand_expr_real_2): When handling conversions involving
22449         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22450         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22451         as a poly_uint64 too.
22453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22454             Alan Hayward  <alan.hayward@arm.com>
22455             David Sherwood  <david.sherwood@arm.com>
22457         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22460             Alan Hayward  <alan.hayward@arm.com>
22461             David Sherwood  <david.sherwood@arm.com>
22463         * combine.c (can_change_dest_mode): Handle polynomial
22464         REGMODE_NATURAL_SIZE.
22465         * expmed.c (store_bit_field_1): Likewise.
22466         * expr.c (store_constructor): Likewise.
22467         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22468         and polynomial REGMODE_NATURAL_SIZE.
22469         (gen_lowpart_common): Likewise.
22470         * reginfo.c (record_subregs_of_mode): Likewise.
22471         * rtlanal.c (read_modify_subreg_p): Likewise.
22473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22474             Alan Hayward  <alan.hayward@arm.com>
22475             David Sherwood  <david.sherwood@arm.com>
22477         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22478         numbers of elements.
22480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22481             Alan Hayward  <alan.hayward@arm.com>
22482             David Sherwood  <david.sherwood@arm.com>
22484         * match.pd: Cope with polynomial numbers of vector elements.
22486 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22487             Alan Hayward  <alan.hayward@arm.com>
22488             David Sherwood  <david.sherwood@arm.com>
22490         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22491         in a POINTER_PLUS_EXPR.
22493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22494             Alan Hayward  <alan.hayward@arm.com>
22495             David Sherwood  <david.sherwood@arm.com>
22497         * omp-simd-clone.c (simd_clone_subparts): New function.
22498         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22499         (ipa_simd_modify_function_body): Likewise.
22501 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22502             Alan Hayward  <alan.hayward@arm.com>
22503             David Sherwood  <david.sherwood@arm.com>
22505         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22506         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22507         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22508         (expand_vector_condition, vector_element): Likewise.
22509         (subparts_gt): New function.
22510         (get_compute_type): Use subparts_gt.
22511         (count_type_subparts): Delete.
22512         (expand_vector_operations_1): Use subparts_gt instead of
22513         count_type_subparts.
22515 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22516             Alan Hayward  <alan.hayward@arm.com>
22517             David Sherwood  <david.sherwood@arm.com>
22519         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22520         (vect_compile_time_alias): ...this new function.  Do the calculation
22521         on poly_ints rather than trees.
22522         (vect_prune_runtime_alias_test_list): Update call accordingly.
22524 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22525             Alan Hayward  <alan.hayward@arm.com>
22526             David Sherwood  <david.sherwood@arm.com>
22528         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22529         numbers of units.
22530         (vect_schedule_slp_instance): Likewise.
22532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22533             Alan Hayward  <alan.hayward@arm.com>
22534             David Sherwood  <david.sherwood@arm.com>
22536         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22537         constant and extern definitions for variable-length vectors.
22538         (vect_get_constant_vectors): Note that the number of units
22539         is known to be constant.
22541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22542             Alan Hayward  <alan.hayward@arm.com>
22543             David Sherwood  <david.sherwood@arm.com>
22545         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22546         of units as polynomial.  Choose between WIDE and NARROW based
22547         on multiple_p.
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         * tree-vect-stmts.c (simd_clone_subparts): New function.
22554         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22556 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22557             Alan Hayward  <alan.hayward@arm.com>
22558             David Sherwood  <david.sherwood@arm.com>
22560         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22561         vectors as polynomial.  Use build_index_vector for
22562         IFN_GOMP_SIMD_LANE.
22564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22565             Alan Hayward  <alan.hayward@arm.com>
22566             David Sherwood  <david.sherwood@arm.com>
22568         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22569         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22570         for variable-length vectors.
22571         (vectorizable_mask_load_store): Treat the number of units as
22572         polynomial, asserting that it is constant if the condition has
22573         already been enforced.
22574         (vectorizable_store, vectorizable_load): Likewise.
22576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22577             Alan Hayward  <alan.hayward@arm.com>
22578             David Sherwood  <david.sherwood@arm.com>
22580         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22581         of units as polynomial.  Punt if we can't tell at compile time
22582         which vector contains the final result.
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-loop.c (vectorizable_induction): Treat the number
22589         of units as polynomial.  Punt on SLP inductions.  Use an integer
22590         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22591         cast of such a series for variable-length floating-point
22592         reductions.
22594 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22595             Alan Hayward  <alan.hayward@arm.com>
22596             David Sherwood  <david.sherwood@arm.com>
22598         * tree.h (build_index_vector): Declare.
22599         * tree.c (build_index_vector): New function.
22600         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22601         of units as polynomial, forcibly converting it to a constant if
22602         vectorizable_reduction has already enforced the condition.
22603         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22604         to create a {1,2,3,...} vector.
22605         (vectorizable_reduction): Treat the number of units as polynomial.
22606         Choose vectype_in based on the largest scalar element size rather
22607         than the smallest number of units.  Enforce the restrictions
22608         relied on above.
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-data-refs.c (vector_alignment_reachable_p): Treat the
22615         number of units as polynomial.
22617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22618             Alan Hayward  <alan.hayward@arm.com>
22619             David Sherwood  <david.sherwood@arm.com>
22621         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22622         * target.def (autovectorize_vector_sizes): Return the vector sizes
22623         by pointer, using vector_sizes rather than a bitmask.
22624         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22625         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22626         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22627         Likewise.
22628         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22629         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22630         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22631         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22632         * omp-general.c (omp_max_vf): Likewise.
22633         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22634         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22635         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22636         * tree-vect-slp.c (vect_slp_bb): Likewise.
22637         * doc/tm.texi: Regenerate.
22638         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22639         to a poly_uint64.
22640         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22641         the vector size as a poly_uint64 rather than an unsigned int.
22642         (current_vector_size): Change from an unsigned int to a poly_uint64.
22643         (get_vectype_for_scalar_type): Update accordingly.
22644         * tree.h (build_truth_vector_type): Take the size and number of
22645         units as a poly_uint64 rather than an unsigned int.
22646         (build_vector_type): Add a temporary overload that takes
22647         the number of units as a poly_uint64 rather than an unsigned int.
22648         * tree.c (make_vector_type): Likewise.
22649         (build_truth_vector_type): Take the number of units as a poly_uint64
22650         rather than an unsigned int.
22652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22653             Alan Hayward  <alan.hayward@arm.com>
22654             David Sherwood  <david.sherwood@arm.com>
22656         * target.def (get_mask_mode): Take the number of units and length
22657         as poly_uint64s rather than unsigned ints.
22658         * targhooks.h (default_get_mask_mode): Update accordingly.
22659         * targhooks.c (default_get_mask_mode): Likewise.
22660         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22661         * doc/tm.texi: Regenerate.
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         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22668         * omp-general.c (omp_max_vf): Likewise.
22669         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22670         (expand_omp_simd): Handle polynomial safelen.
22671         * omp-low.c (omplow_simd_context): Add a default constructor.
22672         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22673         (lower_rec_simd_input_clauses): Update accordingly.
22674         (lower_rec_input_clauses): Likewise.
22676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22677             Alan Hayward  <alan.hayward@arm.com>
22678             David Sherwood  <david.sherwood@arm.com>
22680         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22681         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22682         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22683         (vect_analyze_slp_cost): Likewise.
22684         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22685         (vect_model_load_cost): Likewise.
22687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22688             Alan Hayward  <alan.hayward@arm.com>
22689             David Sherwood  <david.sherwood@arm.com>
22691         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22692         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22693         from an unsigned int * to a poly_uint64_pod *.
22694         (calculate_unrolling_factor): New function.
22695         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22698             Alan Hayward  <alan.hayward@arm.com>
22699             David Sherwood  <david.sherwood@arm.com>
22701         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22702         from an unsigned int to a poly_uint64.
22703         (_loop_vec_info::slp_unrolling_factor): Likewise.
22704         (_loop_vec_info::vectorization_factor): Change from an int
22705         to a poly_uint64.
22706         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22707         (vect_get_num_vectors): New function.
22708         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22709         (vect_get_num_copies): Use vect_get_num_vectors.
22710         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22711         to an unsigned int *.
22712         (vect_analyze_data_refs): Change min_vf from an int * to a
22713         poly_uint64 *.
22714         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22715         than an unsigned HOST_WIDE_INT.
22716         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22717         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22718         to an unsigned int *.
22719         (vect_analyze_data_ref_dependences): Likewise.
22720         (vect_compute_data_ref_alignment): Handle polynomial vf.
22721         (vect_enhance_data_refs_alignment): Likewise.
22722         (vect_prune_runtime_alias_test_list): Likewise.
22723         (vect_shift_permute_load_chain): Likewise.
22724         (vect_supportable_dr_alignment): Likewise.
22725         (dependence_distance_ge_vf): Take the vectorization factor as a
22726         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22727         (vect_analyze_data_refs): Change min_vf from an int * to a
22728         poly_uint64 *.
22729         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22730         vfm1 as a poly_uint64 rather than an int.  Make the same change
22731         for the returned bound_scalar.
22732         (vect_gen_vector_loop_niters): Handle polynomial vf.
22733         (vect_do_peeling): Likewise.  Update call to
22734         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22735         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22736         be constant.
22737         * tree-vect-loop.c (vect_determine_vectorization_factor)
22738         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22739         (vect_get_known_peeling_cost): Likewise.
22740         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22741         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22742         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22743         updating the upper bounds of the loop.
22744         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22745         rather than an int.
22746         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22747         polynomial unroll factors.
22748         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22749         (vect_make_slp_decision): Likewise.
22750         (vect_supported_load_permutation_p): Likewise, and polynomial
22751         vf too.
22752         (vect_analyze_slp_cost): Handle polynomial vf.
22753         (vect_slp_analyze_node_operations): Likewise.
22754         (vect_slp_analyze_bb_1): Likewise.
22755         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22756         than an unsigned HOST_WIDE_INT.
22757         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22758         (vectorizable_load): Handle polynomial vf.
22759         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22760         a poly_uint64.
22761         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22764             Alan Hayward  <alan.hayward@arm.com>
22765             David Sherwood  <david.sherwood@arm.com>
22767         * match.pd: Handle bit operations involving three constants
22768         and try to fold one pair.
22770 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22772         * tree-vect-loop-manip.c: Include gimple-fold.h.
22773         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22774         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22775         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22776         Add a path that uses a step of VF instead of 1, but disable it
22777         for now.
22778         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22779         and niters_no_overflow parameters.  Update calls to
22780         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22781         Create a new SSA name if the latter choses to use a ste other
22782         than zero, and return it via niters_vector_mult_vf_var.
22783         * tree-vect-loop.c (vect_transform_loop): Update calls to
22784         vect_do_peeling, vect_gen_vector_loop_niters and
22785         slpeel_make_loop_iterate_ntimes.
22786         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22787         (vect_gen_vector_loop_niters): Update declarations after above changes.
22789 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22791         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22792         128-bit round to integer instructions.
22793         (ceil<mode>2): Likewise.
22794         (btrunc<mode>2): Likewise.
22795         (round<mode>2): Likewise.
22797 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22799         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22800         unaligned VSX load/store on P8/P9.
22801         (expand_block_clear): Allow the use of unaligned VSX
22802         load/store on P8/P9.
22804 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22806         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22807         New function.
22808         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22809         swap associated with both a load and a store.
22811 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22813         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22814         * config/riscv/riscv.md (clear_cache): Use it.
22816 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22818         * web.c: Remove out-of-date comment.
22820 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22822         * expr.c (fixup_args_size_notes): Check that any existing
22823         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22824         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22825         (emit_single_push_insn): ...here.
22827 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22829         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22830         (const_vector_encoded_nelts): New function.
22831         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22832         (const_vector_int_elt, const_vector_elt): Declare.
22833         * emit-rtl.c (const_vector_int_elt_1): New function.
22834         (const_vector_elt): Likewise.
22835         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22836         of CONST_VECTOR_ELT.
22838 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22840         * expr.c: Include rtx-vector-builder.h.
22841         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22842         directly on the tree encoding.
22843         (const_vector_from_tree): Likewise.
22844         * optabs.c: Include rtx-vector-builder.h.
22845         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22846         sequence of "u" values.
22847         * vec-perm-indices.c: Include rtx-vector-builder.h.
22848         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22849         directly on the vec_perm_indices encoding.
22851 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22853         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22854         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22855         * rtx-vector-builder.h: New file.
22856         * rtx-vector-builder.c: Likewise.
22857         * rtl.h (rtx_def::u2): Add a const_vector field.
22858         (CONST_VECTOR_NPATTERNS): New macro.
22859         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22860         (CONST_VECTOR_DUPLICATE_P): Likewise.
22861         (CONST_VECTOR_STEPPED_P): Likewise.
22862         (CONST_VECTOR_ENCODED_ELT): Likewise.
22863         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22864         (unwrap_const_vec_duplicate): Likewise.
22865         (const_vec_series_p): Check for a non-duplicated vector encoding.
22866         Say that the function only returns true for integer vectors.
22867         * emit-rtl.c: Include rtx-vector-builder.h.
22868         (gen_const_vec_duplicate_1): Delete.
22869         (gen_const_vector): Call gen_const_vec_duplicate instead of
22870         gen_const_vec_duplicate_1.
22871         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22872         (gen_const_vec_duplicate): Use rtx_vector_builder.
22873         (gen_const_vec_series): Likewise.
22874         (gen_rtx_CONST_VECTOR): Likewise.
22875         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22876         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22877         Build a new vector rather than modifying a CONST_VECTOR in-place.
22878         (handle_special_swappables): Update call accordingly.
22879         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22880         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22881         Build a new vector rather than modifying a CONST_VECTOR in-place.
22882         (handle_special_swappables): Update call accordingly.
22884 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22886         * simplify-rtx.c (simplify_const_binary_operation): Use
22887         CONST_VECTOR_ELT instead of XVECEXP.
22889 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22891         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22892         the selector elements to be different from the data elements
22893         if the selector is a VECTOR_CST.
22894         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22895         ssizetype for the selector.
22897 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22899         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22900         before testing each element individually.
22901         * tree-vect-generic.c (lower_vec_perm): Likewise.
22903 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22905         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22906         * selftest-run-tests.c (selftest::run_tests): Call it.
22907         * vector-builder.h (vector_builder::operator ==): New function.
22908         (vector_builder::operator !=): Likewise.
22909         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22910         (vec_perm_indices::all_from_input_p): New function.
22911         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22912         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22913         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22914         instead of reading the VECTOR_CST directly.  Detect whether both
22915         vector inputs are the same before constructing the vec_perm_indices,
22916         and update the number of inputs argument accordingly.  Use the
22917         utility functions added above.  Only construct sel2 if we need to.
22919 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22921         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22922         the broadcast of the low byte.
22923         (expand_mult_highpart): Use an explicit encoding for the permutes.
22924         * optabs-query.c (can_mult_highpart_p): Likewise.
22925         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22926         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22927         (vectorizable_bswap): Likewise.
22928         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22929         explicit encoding for the power-of-2 permutes.
22930         (vect_permute_store_chain): Likewise.
22931         (vect_grouped_load_supported): Likewise.
22932         (vect_permute_load_chain): Likewise.
22934 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22936         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22937         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22938         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22939         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22940         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22941         (vect_gen_perm_mask_any): Likewise.
22943 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22945         * int-vector-builder.h: New file.
22946         * vec-perm-indices.h: Include int-vector-builder.h.
22947         (vec_perm_indices): Redefine as an int_vector_builder.
22948         (auto_vec_perm_indices): Delete.
22949         (vec_perm_builder): Redefine as a stand-alone class.
22950         (vec_perm_indices::vec_perm_indices): New function.
22951         (vec_perm_indices::clamp): Likewise.
22952         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22953         (vec_perm_indices::new_vector): New function.
22954         (vec_perm_indices::new_expanded_vector): Update for new
22955         vec_perm_indices class.
22956         (vec_perm_indices::rotate_inputs): New function.
22957         (vec_perm_indices::all_in_range_p): Operate directly on the
22958         encoded form, without computing elided elements.
22959         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22960         encoding.  Update for new vec_perm_indices class.
22961         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22962         the given vec_perm_builder.
22963         (expand_vec_perm_var): Update vec_perm_builder constructor.
22964         (expand_mult_highpart): Use vec_perm_builder instead of
22965         auto_vec_perm_indices.
22966         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22967         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22968         or double series encoding as appropriate.
22969         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22970         vec_perm_indices instead of auto_vec_perm_indices.
22971         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22972         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22973         (vect_permute_store_chain): Likewise.
22974         (vect_grouped_load_supported): Likewise.
22975         (vect_permute_load_chain): Likewise.
22976         (vect_shift_permute_load_chain): Likewise.
22977         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22978         (vect_transform_slp_perm_load): Likewise.
22979         (vect_schedule_slp_instance): Likewise.
22980         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22981         (vectorizable_mask_load_store): Likewise.
22982         (vectorizable_bswap): Likewise.
22983         (vectorizable_store): Likewise.
22984         (vectorizable_load): Likewise.
22985         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22986         vec_perm_indices instead of auto_vec_perm_indices.  Use
22987         tree_to_vec_perm_builder to read the vector from a tree.
22988         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22989         vec_perm_builder instead of a vec_perm_indices.
22990         (have_whole_vector_shift): Use vec_perm_builder and
22991         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22992         truncation to calc_vec_perm_mask_for_shift.
22993         (vect_create_epilog_for_reduction): Likewise.
22994         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22995         from auto_vec_perm_indices to vec_perm_indices.
22996         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22997         instead of changing individual elements.
22998         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22999         the vector in d.perm.
23000         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23001         from auto_vec_perm_indices to vec_perm_indices.
23002         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23003         instead of changing individual elements.
23004         (arm_vectorize_vec_perm_const): Use new_vector to install
23005         the vector in d.perm.
23006         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23007         Update vec_perm_builder constructor.
23008         (rs6000_expand_interleave): Likewise.
23009         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23010         (rs6000_expand_interleave): Likewise.
23012 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23014         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23015         to qimode could truncate the indices.
23016         * optabs.c (expand_vec_perm_var): Likewise.
23018 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23020         * Makefile.in (OBJS): Add vec-perm-indices.o.
23021         * vec-perm-indices.h: New file.
23022         * vec-perm-indices.c: Likewise.
23023         * target.h (vec_perm_indices): Replace with a forward class
23024         declaration.
23025         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23026         * optabs.h: Include vec-perm-indices.h.
23027         (expand_vec_perm): Delete.
23028         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23029         (expand_vec_perm_const): Declare.
23030         * target.def (vec_perm_const_ok): Replace with...
23031         (vec_perm_const): ...this new hook.
23032         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23033         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23034         * doc/tm.texi: Regenerate.
23035         * optabs.def (vec_perm_const): Delete.
23036         * doc/md.texi (vec_perm_const): Likewise.
23037         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23038         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23039         expand_vec_perm for constant permutation vectors.  Assert that
23040         the mode of variable permutation vectors is the integer equivalent
23041         of the mode that is being permuted.
23042         * optabs-query.h (selector_fits_mode_p): Declare.
23043         * optabs-query.c: Include vec-perm-indices.h.
23044         (selector_fits_mode_p): New function.
23045         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23046         is defined, instead of checking whether the vec_perm_const_optab
23047         exists.  Use targetm.vectorize.vec_perm_const instead of
23048         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23049         fit in the vector mode before using a variable permute.
23050         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23051         vec_perm_indices instead of an rtx.
23052         (expand_vec_perm): Replace with...
23053         (expand_vec_perm_const): ...this new function.  Take the selector
23054         as a vec_perm_indices rather than an rtx.  Also take the mode of
23055         the selector.  Update call to shift_amt_for_vec_perm_mask.
23056         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23057         Use vec_perm_indices::new_expanded_vector to expand the original
23058         selector into bytes.  Check whether the indices fit in the vector
23059         mode before using a variable permute.
23060         (expand_vec_perm_var): Make global.
23061         (expand_mult_highpart): Use expand_vec_perm_const.
23062         * fold-const.c: Includes vec-perm-indices.h.
23063         * tree-ssa-forwprop.c: Likewise.
23064         * tree-vect-data-refs.c: Likewise.
23065         * tree-vect-generic.c: Likewise.
23066         * tree-vect-loop.c: Likewise.
23067         * tree-vect-slp.c: Likewise.
23068         * tree-vect-stmts.c: Likewise.
23069         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23070         Delete.
23071         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23072         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23073         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23074         (aarch64_vectorize_vec_perm_const): ...this new function.
23075         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23076         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23077         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23078         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23079         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23080         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23081         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23082         into...
23083         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23084         check for NEON modes.
23085         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23086         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23087         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23088         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23089         into...
23090         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23091         the old VEC_PERM_CONST conditions.
23092         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23093         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23094         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23095         (ia64_vectorize_vec_perm_const_ok): Merge into...
23096         (ia64_vectorize_vec_perm_const): ...this new function.
23097         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23098         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23099         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23100         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23101         * config/mips/mips.c (mips_expand_vec_perm_const)
23102         (mips_vectorize_vec_perm_const_ok): Merge into...
23103         (mips_vectorize_vec_perm_const): ...this new function.
23104         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23105         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23106         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23107         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23108         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23109         (rs6000_expand_vec_perm_const): Delete.
23110         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23111         Delete.
23112         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23113         (altivec_expand_vec_perm_const_le): Take each operand individually.
23114         Operate on constant selectors rather than rtxes.
23115         (altivec_expand_vec_perm_const): Likewise.  Update call to
23116         altivec_expand_vec_perm_const_le.
23117         (rs6000_expand_vec_perm_const): Delete.
23118         (rs6000_vectorize_vec_perm_const_ok): Delete.
23119         (rs6000_vectorize_vec_perm_const): New function.
23120         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23121         an element count and rtx array.
23122         (rs6000_expand_extract_even): Update call accordingly.
23123         (rs6000_expand_interleave): Likewise.
23124         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23125         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23126         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23127         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23128         (rs6000_expand_vec_perm_const): Delete.
23129         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23130         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23131         (altivec_expand_vec_perm_const_le): Take each operand individually.
23132         Operate on constant selectors rather than rtxes.
23133         (altivec_expand_vec_perm_const): Likewise.  Update call to
23134         altivec_expand_vec_perm_const_le.
23135         (rs6000_expand_vec_perm_const): Delete.
23136         (rs6000_vectorize_vec_perm_const_ok): Delete.
23137         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23138         reference to the SPE evmerge intructions.
23139         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23140         an element count and rtx array.
23141         (rs6000_expand_extract_even): Update call accordingly.
23142         (rs6000_expand_interleave): Likewise.
23143         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23144         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23145         new function.
23146         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23148 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23150         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23151         vector mode and that that mode matches the mode of the data
23152         being permuted.
23153         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23154         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23155         directly using expand_vec_perm_1 when forcing selectors into
23156         registers.
23157         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23159 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23161         * optabs-query.h (can_vec_perm_p): Delete.
23162         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23163         * optabs-query.c (can_vec_perm_p): Split into...
23164         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23165         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23166         particular selector is valid.
23167         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23168         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23169         (vect_grouped_load_supported): Likewise.
23170         (vect_shift_permute_load_chain): Likewise.
23171         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23172         (vect_transform_slp_perm_load): Likewise.
23173         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23174         (vectorizable_bswap): Likewise.
23175         (vect_gen_perm_mask_checked): Likewise.
23176         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23177         implementations of variable permutation vectors into account
23178         when deciding which selector to use.
23179         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23180         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23181         with a false third argument.
23182         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23183         to test whether the constant selector is valid and can_vec_perm_var_p
23184         to test whether a variable selector is valid.
23186 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23188         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23189         * optabs-query.c (can_vec_perm_p): Likewise.
23190         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23191         instead of vec_perm_indices.
23192         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23193         (vect_gen_perm_mask_checked): Likewise,
23194         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23195         (vect_gen_perm_mask_checked): Likewise,
23197 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23199         * optabs-query.h (qimode_for_vec_perm): Declare.
23200         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23201         (qimode_for_vec_perm): ...this new function.
23202         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23204 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23206         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23207         does not have a conditional at the top.
23209 2018-01-02  Richard Biener  <rguenther@suse.de>
23211         * ipa-inline.c (big_speedup_p): Fix expression.
23213 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23215         PR target/81616
23216         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23217         for generic 4->6.
23219 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23221         PR target/81616
23222         Generic tuning.
23223         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23224         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23225         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23226         cond_taken_branch_cost 3->4.
23228 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23230         PR tree-optimization/83581
23231         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23232         TODO_cleanup_cfg if any changes have been made.
23234         PR middle-end/83608
23235         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23236         convert_modes if target mode has the right side, but different mode
23237         class.
23239         PR middle-end/83609
23240         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23241         last argument when extracting from CONCAT.  If either from_real or
23242         from_imag is NULL, use expansion through memory.  If result is not
23243         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23244         the parts directly to inner mode, if even that fails, use expansion
23245         through memory.
23247         PR middle-end/83623
23248         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23249         check for bswap in mode rather than HImode and use that in expand_unop
23250         too.
23252 Copyright (C) 2018 Free Software Foundation, Inc.
23254 Copying and distribution of this file, with or without modification,
23255 are permitted in any medium without royalty provided the copyright
23256 notice and this notice are preserved.