diagnostics: tweak to line-insertion fix-it hints with line-numbering
[official-gcc.git] / gcc / ChangeLog
blobc776f6dc952c83910eec27f20a9b9b3a552326aa
1 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4         "margin_char" parameter, defaulting to space.  Use it in place
5         of pp_space for the initial part of the margin.
6         (layout::print_leading_fixits): Use '+' when filling the margin
7         of line-insertion fix-it hints.
9 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
12         Delete.
14 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
16         * config/rs6000/altivec.md: Don't set length attribute to the default
17         value.
18         * config/rs6000/darwin.md: Ditto.
19         * config/rs6000/dfp.md: Ditto.
20         * config/rs6000/htm.md: Ditto.
21         * config/rs6000/rs6000.md: Ditto.
22         * config/rs6000/sync.md: Ditto.
23         * config/rs6000/vsx.md: Ditto.
25 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
27         * config/rs6000/altivec.md: Don't set length attribute to the default
28         value, for branch instructions.
29         * config/rs6000/darwin.md: Ditto.
30         * config/rs6000/rs6000.md: Ditto.
32 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
34         * config/rs6000/rs6000.md (length): Always define as const_int 4.
35         (unnamed conditional branch define_insn): Set length to 4 or 8
36         depending on offset.
37         (<bd>_<mode>): Similar, for alternative 0.
38         (<bd>tf_<mode>): Ditto.
40 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
42         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
44 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
46         * doc/rtl.texi: Replace old RTX class names with new names.
49 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
51         * expmed.h (canonicalize_comparison): New declaration.
52         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
53         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
54         * optabs.c (prepare_cmp_insn): Likewise.
55         * rtl.h (unsigned_condition_p): New function which checks if a
56         comparison operator is unsigned.
58 2018-08-16  Nathan Sidwell  <nathan@acm.org>
60         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
61         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
63 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
65         PR target/84711
66         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
67         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
68         (mov<mov>): ..this and enable unconditionally.
70 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
72         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
74 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
76         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
77         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
78         "Common" with "Target".
80 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
82         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
83         * doc/invoke.texi (mmitigate-rop): Remove.
84         * config/i386/i386.c: Do not include "regrename.h".
85         (ix86_rop_should_change_byte_p, reg_encoded_number)
86         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
87         Remove.
88         (ix86_reorg): Remove call to ix86_mitigate_rop.
89         * config/i386/i386.md (attr "modrm_class"): Remove.
90         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
91         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
92         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
94 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
96         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
97         allow folding of mergeh() and mergel() for the float and double types.
98         (fold_mergehl_helper): Rework to handle building a permute tree
99         for float vectors.
101 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
103         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
104         for TARGET_SSE.
106 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
108         * common.opt (fdiagnostics-show-labels): New option.
109         * diagnostic-show-locus.c (class layout_range): Add field
110         "m_label".
111         (class layout): Add field "m_show_labels_p".
112         (layout_range::layout_range): Add param "label" and use it to
113         initialize m_label.
114         (make_range): Pass in NULL for new "label" param of layout_range's
115         ctor.
116         (layout::layout): Initialize m_show_labels_p.
117         (layout::maybe_add_location_range): Pass in loc_range->m_label
118         when constructing layout_range instances.
119         (struct line_label): New struct.
120         (layout::print_any_labels): New member function.
121         (layout::print_line): Call it if label-printing is enabled.
122         (selftest::test_one_liner_labels): New test.
123         (selftest::test_diagnostic_show_locus_one_liner): Call it.
124         * diagnostic.c (diagnostic_initialize): Initialize
125         context->show_labels_p.
126         * diagnostic.h (struct diagnostic_context): Add field
127         "show_labels_p".
128         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
129         -fno-diagnostics-show-labels.
130         * dwarf2out.c (gen_producer_string): Add
131         OPT_fdiagnostics_show_labels to the ignored options.
132         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
133         param.
134         (gcc_rich_location::maybe_add_expr): Likewise.
135         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
136         label" param, defaulting to NULL.
137         (gcc_rich_location::add_expr): Add "label" param.
138         (gcc_rich_location::maybe_add_expr): Likewise.
139         (class text_range_label): New class.
140         (class range_label_for_type_mismatch): New class.
141         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
142         of format_warning_va.
143         (fmtwarn_n): Likewise for new params of format_warning_n_va.
144         * lto-wrapper.c (merge_and_complain): Add
145         OPT_fdiagnostics_show_labels to the "pick one setting" options.
146         (append_compiler_options): Likewise to the dropped options.
147         (append_diag_options): Likewise to the passed-on options.
148         * opts.c (common_handle_option): Handle the new option.
149         * selftest-diagnostic.c
150         (test_diagnostic_context::test_diagnostic_context): Enable
151         show_labels_p.
152         * substring-locations.c: Include "gcc-rich-location.h".
153         (format_warning_n_va): Add "fmt_label" and "param_label" params
154         and use them as appropriate.
155         (format_warning_va): Add "fmt_label" and "param_label" params,
156         passing them on to format_warning_n_va.
157         (format_warning_at_substring): Likewise.
158         (format_warning_at_substring_n): Likewise.
159         * substring-locations.h (format_warning_va): Add "fmt_label" and
160         "param_label" params.
161         (format_warning_n_va): Likewise.
162         (format_warning_at_substring): Likewise.
163         (format_warning_at_substring_n): Likewise.
164         * toplev.c (general_init): Initialize global_dc->show_labels_p.
166 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
168         PR testsuite/86519
169         * builtins.c (expand_builtin_memcmp): Do not expand the call
170         when overflow is detected.
172 2018-08-15  Martin Sebor  <msebor@redhat.com>
174         PR tree-optimization/71625
175         * config/aarch64/aarch64-builtins.c
176         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
178 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
180         * config/s390/s390.c (s390_reorg): Remove loop.
182 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
184         * config/darwin.c
185          (darwin_function_switched_text_sections): Delete.
186         * gcc/config/darwin.h
187          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
189 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
191         PR target/81685
192         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
193         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
194         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
196 2018-08-15  Martin Liska  <mliska@suse.cz>
198         PR tree-optimization/86925
199         * predict.c (expr_expected_value_1): When taking
200         later predictor, assign also probability.
201         Use fold_build2_initializer_loc in order to fold
202         the expression in -frounding-math.
204 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
206         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
207         patterns.
208         (expand_vec_perm_1): Try the new method.
210 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
212         PR target/86547
213         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
214         Check whether lra_live_max_point is 0 before dividing.
216 2018-08-14  Martin Sebor  <msebor@redhat.com>
218         PR tree-optimization/86650
219         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
220         (vrp_prop::check_mem_ref): Same.
222 2018-08-13  Liu Hao <lh_mouse@126.com>
224         * pretty-print.c (eat_esc_sequence): Swap the foreground and
225         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
226         and clear it thereafter, as it only works for DBCS.
228 2018-08-13  Liu Hao <lh_mouse@126.com>
230         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
231         handle returned by _get_osf_handle().
233 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
235         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
236         for folding vec_perm.
238 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
240         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
241         Add support for gimple-folding of vec_pack() and vec_unpack()
242         intrinsics.
244 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
246         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
247         vec_xst variants to the list.
248         (rs6000_gimple_fold_builtin): Add support for folding unaligned
249         vector loads and stores.
251 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
253         * config.gcc (rs6000-ibm-aix4.x): Delete.
254         (rs6000-ibm-aix5.1): Delete.
255         (rs6000-ibm-aix5.2): Delete.
256         (rs6000-ibm-aix5.3): Delete.
257         * config/rs6000/aix43.h: Delete.
258         * config/rs6000/aix51.h: Delete.
259         * config/rs6000/aix52.h: Delete.
260         * config/rs6000/t-aix43: Delete.
262 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
264         * config/s390/s390.c (s390_decompose_constant_pool_ref):
265         New function.
266         (s390_decompose_address): Factor out constant pool ref
267         decomposition.
269 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
271         * config/nds32/nds32-predicates.c
272         (nds32_can_use_bclr_p): Change return type as bool.
273         (nds32_can_use_bset_p): Ditto.
274         (nds32_can_use_btgl_p): Ditto.
275         (nds32_can_use_bitci_p): Ditto.
276         * config/nds32/nds32-protos.h
277         (nds32_can_use_bclr_p): Change declaration.
278         (nds32_can_use_bset_p): Ditto.
279         (nds32_can_use_btgl_p): Ditto.
280         (nds32_can_use_bitci_p): Ditto.
282 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
284         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
285         Support -msched-prolog-epilog option.
286         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
288 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
290         * common/config/nds32/nds32-common.c
291         (nds32_option_optimization_table): Enalbe -malways-align.
293 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
295         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
296         extra_headers.
297         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
298         OPT_misr_secure_ case.
299         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
300         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
301         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
302         secure attribute.
303         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
304         (nds32_isr_info): New field security_level.
305         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
306         * config/nds32/nds32.md (return_internal): Consider critical attribute.
307         * config/nds32/nds32.opt (misr-secure): New option.
308         * config/nds32/nds32_init.inc: New file.
309         * config/nds32/nds32_isr.h: New file.
311 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
313         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
314         Update comment for atomic instructions.
315         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
316         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
317         Remove.
318         (atomic_loaddi): Revise fence expansion to only emit fence prior to
319         load for __ATOMIC_SEQ_CST model.
320         (atomic_loaddi_1): Remove float register target.
321         (atomic_storedi): Handle CONST_INT values.
322         (atomic_storedi_1): Remove float register source.  Add special case
323         for zero value.
324         (memory_barrier): New expander and insn.
326 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
328         PR tree-optimization/86835
329         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
330         new_stmt after def_gsi, make sure to insert new_square_stmt after
331         that stmt, not 2 stmts before it.
333 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
335         PR target/82418
336         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
337         instead of SWI48.
339 2018-08-10  Martin Liska  <mliska@suse.cz>
341         PR target/83610
342         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
343         function type.
344         * builtins.c (expand_builtin_expect_with_probability):
345         New function.
346         (expand_builtin_expect_with_probability): New function.
347         (build_builtin_expect_predicate): Add new argumnet probability
348         for BUILT_IN_EXPECT_WITH_PROBABILITY.
349         (fold_builtin_expect):
350         (fold_builtin_2):
351         (fold_builtin_3):
352         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
353         * builtins.h (fold_builtin_expect): Set new argument.
354         * doc/extend.texi: Document __builtin_expect_with_probability.
355         * doc/invoke.texi: Likewise.
356         * gimple-fold.c (gimple_fold_call): Pass new argument.
357         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
358         also BUILT_IN_EXPECT_WITH_PROBABILITY.
359         * predict.c (get_predictor_value): New function.
360         (expr_expected_value): Add new argument probability. Assume
361         that predictor and probability are always non-null.
362         (expr_expected_value_1): Likewise.  For __builtin_expect and
363         __builtin_expect_with_probability set probability.  Handle
364         combination in binary expressions.
365         (tree_predict_by_opcode): Simplify code by simply calling
366         get_predictor_value.
367         (pass_strip_predict_hints::execute): Add handling of
368         BUILT_IN_EXPECT_WITH_PROBABILITY.
369         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
370         new predictor.
371         * tree.h (DECL_BUILT_IN_P): New function.
373 2018-08-10  Martin Liska  <mliska@suse.cz>
375         PR tree-optimization/85799
376         * passes.def: Add argument for pass_strip_predict_hints.
377         * predict.c (class pass_strip_predict_hints): Add new argument
378         early_p.
379         (strip_predictor_early): New function.
380         (pass_strip_predict_hints::execute): Call the function to
381         strip predictors.
382         (strip_predict_hints): New function.
383         * predict.def: Fix comment.
385 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
387         * Makefile.in: Clarify which tm.texi to copy over to assert the
388         right to grant a GFDL license for all.
390 2018-08-09  Jeff Law  <law@redhat.com>
392         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
393         unused variable.
395 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
397         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
398         prototype.
400 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
402         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
403         reductions for variable-length vectors.
405 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
407         PR other/84889
408         * common.opt (fdiagnostics-show-line-numbers): New option.
409         * diagnostic-show-locus.c (class layout): Add fields
410         "m_show_line_numbers_p" and "m_linenum_width";
411         (num_digits): New function.
412         (test_num_digits): New function.
413         (layout::layout): Initialize new fields.  Update m_x_offset
414         logic to handle any left margin.
415         (layout::print_source_line): Print line number when requested.
416         (layout::start_annotation_line): New member function.
417         (layout::print_annotation_line): Call it.
418         (layout::print_leading_fixits): Likewise.
419         (layout::print_trailing_fixits): Likewise.  Update calls to
420         move_to_column for new parameter.
421         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
422         it to potentially call start_annotation_line.
423         (layout::show_ruler): Call start_annotation_line.
424         (selftest::test_line_numbers_multiline_range): New selftest.
425         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
426         and selftest::test_line_numbers_multiline_range.
427         * diagnostic.c (diagnostic_initialize): Initialize
428         show_line_numbers_p.
429         * diagnostic.h (struct diagnostic_context): Add field
430         "show_line_numbers_p".
431         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
432         -fno-diagnostics-show-line-numbers.
433         * dwarf2out.c (gen_producer_string): Add
434         OPT_fdiagnostics_show_line_numbers to the ignored options.
435         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
436         one setting" options.
437         (append_compiler_options): Likewise to the dropped options.
438         (append_diag_options): Likewise to the passed-on options.
439         * opts.c (common_handle_option): Handle the new option.
440         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
442 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
444         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
445         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
446         third argument of type "const signed char" to descriptions of
447         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
448         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
449         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
450         __builtin_bcdsub_ov functions.
452 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
454         PR tree-optimization/86858
455         * tree-vect-loop.c (vect_is_simple_reduction): Restore
456         flow_bb_inside_loop_p calls.
458 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
460         PR tree-optimization/86871
461         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
462         instead of gimple_assign_lhs.
464 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
466         PR target/86887
467         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
468         register constraint to operand 0.
469         (add<mode>3_carryinC): Likewise.
470         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
472 2018-08-09  Martin Liska  <mliska@suse.cz>
474         PR c/86895
475         * common.opt: Remove extra line.
477 2018-08-09  Martin Liska  <mliska@suse.cz>
479         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
480         at the end of a line, make first letter capital and end up
481         a sentence with a dot.
482         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
483         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
484         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
485         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
486         (PARAM_MAX_ISL_OPERATIONS): Likewise.
487         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
488         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
489         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
490         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
491         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
492         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
493         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
494         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
495         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
496         (PARAM_TREE_REASSOC_WIDTH): Likewise.
497         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
498         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
499         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
501 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
503         PR target/84332
504         * config/s390/s390.c (s390_option_override_internal): Reduce the
505         stack-clash-protection-probe-interval param if it would be too big
506         for z900.
508 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
510         PR target/46179
511         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
512         * config/m68k/m68k.c (handle_move_double): Don't call
513         m68k_final_prescan_insn.
514         (m68k_adjust_decorated_operand): Renamed from
515         m68k_final_prescan_insn, remove first and third operand and
516         simplify.
517         (print_operand): Call it.
518         (print_operand_address): Call it.
520 2018-08-08  Nathan Sidwell  <nathan@acm.org>
522         * diagnostic.c (diagnostic_report_current_module): Use
523         linemap_included_from & linemap_included_from_linemap.
525 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
527         * config/aarch64/aarch64-cores.def: Add phecda core.
528         * config/aarch64/aarch64-tune.md: Regenerate.
529         * doc/invoke.texi: Add phecda core.
531 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
533         PR target/85295
534         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
535         definitions.
536         * config/s390/s390.md ("movti"): Add more alternatives for
537         constant to GPR copies.
539 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
541         * config/s390/s390.c: Fix whitespace damage throughout the file.
542         * config/s390/s390.h: Likewise.
543         * config/s390/tpf.h: Likewise.
545 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
547         * config/s390/s390.c (s390_loadrelative_operand_p):
548         Remove TARGET_CPU_ZARCH usages.
549         (s390_rtx_costs): Likewise.
550         (s390_legitimate_constant_p): Likewise.
551         (s390_cannot_force_const_mem): Likewise.
552         (legitimate_reload_constant_p): Likewise.
553         (s390_preferred_reload_class): Likewise.
554         (legitimize_pic_address): Likewise.
555         (legitimize_tls_address): Likewise.
556         (s390_split_branches): Removed.
557         (s390_add_execute): Removed.
558         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
559         (s390_mainpool_start): Likewise.
560         (s390_mainpool_finish): Likewise.
561         (s390_mainpool_cancel): Removed.
562         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
563         (s390_chunkify_cancel): Likewise.
564         (s390_return_addr_rtx): Likewise.
565         (s390_register_info): Remove split_branches_pending_p uages.
566         (s390_optimize_register_info): Likewise.
567         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
568         split_branches_pending_p usages.
569         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
570         (s390_load_got): Likewise.
571         (s390_expand_split_stack_prologue): Likewise.
572         (output_asm_nops): Likewise.
573         (s390_function_profiler): Likewise.
574         (s390_emit_call): Likewise.
575         (s390_conditional_register_usage): Likewise.
576         (s390_optimize_prologue): Likewise.
577         (s390_reorg): Remove TARGET_CPU_ZARCH and
578         split_branches_pending_p usages.
579         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
580         usages.
581         (s390_output_indirect_thunk_function): Likewise.
582         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
583         (TARGET_CPU_ZARCH_P): Removed.
584         (struct machine_function): Remove split_branches_pending_p.
585         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
587 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
589         * common/config/s390/s390-common.c (processor_flags_table):
590         Remove flags.
591         * config.gcc: Remove with_arch/with_tune support.
592         * config/s390/2064.md: Remove cpu attribute comparisons.
593         * config/s390/driver-native.c (s390_host_detect_local_cpu):
594         Remove MTN.
595         * config/s390/linux.h (ASM_SPEC):
596         Remove -march support.
597         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
598         Use a table to get an arch level.
599         * config/s390/s390-opts.h (enum processor_type):
600         Remove enum values.
601         * config/s390/s390.c
602         (processor_table): Remove entries, add arch_level values.
603         (s390_issue_rate): Remove cases.
604         (s390_option_override): Adjust
605         s390_option_override_internal() call.
606         (s390_option_override_internal): Remove deprecation warning.
607         (s390_valid_target_attribute_tree): Adjust
608         s390_option_override_internal() call.
609         * config/s390/s390.h (struct s390_processor):
610         Share with s390-c.c, add arch_level field.
611         * config/s390/s390.md:
612         Remove occurrences in cpu attribute.
613         * config/s390/s390.opt: Remove -march/-mtune support.
614         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
615         * doc/invoke.texi: Remove deprecation warning.
617 2018-08-08  Luis Machado  <luis.machado@linaro.org>
619         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
620         global.
621         (qdf24xx_tunings): Set vector cost structure to
622         qdf24xx_vector_cost.
624         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
625         <register_sextend>: Set to 3.
627 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
629         PR target/86838
630         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
631         * config/aarch64/aarch64-simd.md
632         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
633         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
634         (aarch64_frecpx<mode>): ...this new pattern.
635         * config/aarch64/aarch64-simd-builtins.def: Remove comment
636         about aarch64_frecp<FRECP:frecp_suffix><mode>.
638 2018-08-07  Martin Liska  <mliska@suse.cz>
640         PR middle-end/83023
641         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
642         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
643         * predict.def (PRED_MALLOC_NONNULL): New predictor.
644         * doc/extend.texi: Document that malloc attribute adds
645         hit to compiler.
647 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
649         PR target/86785
650         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
651         Define to speculation_safe_value_not_needed.
653 2018-08-06  Jeff Law  <law@redhat.com>
655         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
656         the vr_values instance to cprop_into_stmt.
657         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
658         (cprop_operand): Also query EVRP to determine if OP is a constant.
660 2018-08-06  Nathan Sidwell  <nathan@acm.org>
662         * diagnostic.c (diagnostic_report_current_module): Reroll
663         included-at loop.  Translate text.
665 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
667         * function-tests.c (selftest::test_expansion_to_rtl): Call
668         free_after_compilation.
670 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
672         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
674 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
676         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
677         loops with memory block operations from getting unrolled.
679 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
681         PR target/86807
682         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
683         Define to speculation_safe_value_not_needed.
685 2018-08-06  Jeff Law  <law@redhat.com>
687         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
688         assert.
690 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
692         PR target/86662
693         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
694         with all enabled __intN types.
696         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
698 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
700         * alias.c (record_set): Check for clobber high.
701         * cfgexpand.c (expand_gimple_stmt): Likewise.
702         * combine-stack-adj.c (single_set_for_csa): Likewise.
703         * combine.c (find_single_use_1): Likewise.
704         (set_nonzero_bits_and_sign_copies): Likewise.
705         (get_combine_src_dest): Likewise.
706         (is_parallel_of_n_reg_sets): Likewise.
707         (try_combine): Likewise.
708         (record_dead_and_set_regs_1): Likewise.
709         (reg_dead_at_p_1): Likewise.
710         (reg_dead_at_p): Likewise.
711         * dce.c (deletable_insn_p): Likewise.
712         (mark_nonreg_stores_1): Likewise.
713         (mark_nonreg_stores_2): Likewise.
714         * df-scan.c (df_find_hard_reg_defs): Likewise.
715         (df_uses_record): Likewise.
716         (df_get_call_refs): Likewise.
717         * dwarf2out.c (mem_loc_descriptor): Likewise.
718         * haifa-sched.c (haifa_classify_rtx): Likewise.
719         * ira-build.c (create_insn_allocnos): Likewise.
720         * ira-costs.c (scan_one_insn): Likewise.
721         * ira.c (equiv_init_movable_p): Likewise.
722         (rtx_moveable_p): Likewise.
723         (interesting_dest_for_shprep): Likewise.
724         * jump.c (mark_jump_label_1): Likewise.
725         * postreload-gcse.c (record_opr_changes): Likewise.
726         * postreload.c (reload_cse_simplify): Likewise.
727         (struct reg_use): Add source expr.
728         (reload_combine): Check for clobber high.
729         (reload_combine_note_use): Likewise.
730         (reload_cse_move2add): Likewise.
731         (move2add_note_store): Likewise.
732         * print-rtl.c (print_pattern): Likewise.
733         * recog.c (decode_asm_operands): Likewise.
734         (store_data_bypass_p): Likewise.
735         (if_test_bypass_p): Likewise.
736         * regcprop.c (kill_clobbered_value): Likewise.
737         (kill_set_value): Likewise.
738         * reginfo.c (reg_scan_mark_refs): Likewise.
739         * reload1.c (maybe_fix_stack_asms): Likewise.
740         (eliminate_regs_1): Likewise.
741         (elimination_effects): Likewise.
742         (mark_not_eliminable): Likewise.
743         (scan_paradoxical_subregs): Likewise.
744         (forget_old_reloads_1): Likewise.
745         * reorg.c (find_end_label): Likewise.
746         (try_merge_delay_insns): Likewise.
747         (redundant_insn): Likewise.
748         (own_thread_p): Likewise.
749         (fill_simple_delay_slots): Likewise.
750         (fill_slots_from_thread): Likewise.
751         (dbr_schedule): Likewise.
752         * resource.c (update_live_status): Likewise.
753         (mark_referenced_resources): Likewise.
754         (mark_set_resources): Likewise.
755         * rtl.c (copy_rtx): Likewise.
756         * rtlanal.c (reg_referenced_p): Likewise.
757         (single_set_2): Likewise.
758         (noop_move_p): Likewise.
759         (note_stores): Likewise.
760         * sched-deps.c (sched_analyze_reg): Likewise.
761         (sched_analyze_insn): Likewise.
763 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
765         * cse.c (invalidate_reg): New function extracted from...
766         (invalidate): ...here.
767         (canonicalize_insn): Check for clobber high.
768         (invalidate_from_clobbers): invalidate clobber highs.
769         (invalidate_from_sets_and_clobbers): Likewise.
770         (count_reg_usage): Check for clobber high.
771         (insn_live_p): Likewise.
772         * cselib.c (cselib_expand_value_rtx_1):Likewise.
773         (cselib_invalidate_regno): Check for clobber in setter.
774         (cselib_invalidate_rtx): Pass through setter.
775         (cselib_invalidate_rtx_note_stores):
776         (cselib_process_insn): Check for clobber high.
777         * cselib.h (cselib_invalidate_rtx): Add operand.
779 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
781         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
782         (mark_not_eliminable): Likewise.
783         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
784         * lra-lives.c (process_bb_lives): Check for clobber high.
785         * lra.c (new_insn_reg): Remember clobber highs.
786         (collect_non_operand_hard_regs): Check for clobber high.
787         (lra_set_insn_recog_data): Likewise.
788         (add_regs_to_insn_regno_info): Likewise.
789         (lra_update_insn_regno_info): Likewise.
791 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
793         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
794         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
796 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
798         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
799         (copy_insn_1): Likewise.
800         (gen_hard_reg_clobber_high): New gen function.
801         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
802         * genemit.c (gen_exp): Likewise.
803         (gen_emit_seq): Pass through info.
804         (gen_insn): Check for CLOBBER_HIGH.
805         (gen_expand): Pass through info.
806         (gen_split): Likewise.
807         (output_add_clobbers): Likewise.
808         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
809         (remove_clobbers): Likewise.
810         * rtl.h (gen_hard_reg_clobber_high): New declaration.
812 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
814         * doc/rtl.texi (clobber_high): Add.
815         (parallel): Add in clobber high
816         * rtl.c (rtl_check_failed_code3): Add function.
817         * rtl.def (CLOBBER_HIGH): Add expression.
818         * rtl.h (RTL_CHECKC3): Add macro.
819         (rtl_check_failed_code3): Add declaration.
820         (XC3EXP): Add macro.
822 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
824         PR target/86386
825         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
826         cfun->machine->max_used_stack_alignment if needed.
828 2018-08-04  Martin Sebor  <msebor@redhat.com>
830         PR tree-optimization/86571
831         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
832         NaN output to 4.
834 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
836         PR target/86799
837         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
838         Define.
840 2018-08-03  Jeff Law  <law@redhat.com>
842         PR target/86795
843         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
844         Define to speculation_safe_value_not_needed.
846 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
848         * doc/gcov.texi (-x): Remove duplicate "to".
849         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
850         (-Wif-not-aligned): Remove duplicate "is".
851         (-flto): Remove duplicate "the".
852         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
853         duplicate "v5.00.b".
854         (MSP430 Options): Remove duplicate "and" from the description
855         of "-mgprel-sec=regexp".
856         (x86 Options): Remove duplicate copies of "vmldLog102" and
857         vmlsLog104 from description of "-mveclibabi=type".
859 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
861         * internal-fn.h (first_commutative_argument): Declare.
862         * internal-fn.c (first_commutative_argument): New function.
863         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
864         restrictions for pattern statements.  Use first_commutative_argument
865         to look for commutative operands in calls to internal functions.
867 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
869         * Makefile.in (wide-int-range.o): New.
870         * tree-vrp.c: Move all the wide_int_* functions to...
871         * wide-int-range.cc: ...here.
872         * tree-vrp.h: Move all the wide_int_* prototypes to...
873         * wide-int-range.h: ...here.
875 2018-08-03  Tom de Vries  <tdevries@suse.de>
877         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
878         UI_NONE.
879         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
880         * except.c (output_function_exception_table): Do early exit if
881         targetm_common.except_unwind_info (&global_options) == UI_NONE.
883 2018-08-03  Martin Liska  <mliska@suse.cz>
885         * predict.c (dump_prediction): Change to 2 digits
886         in fraction part.
888 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
890         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
891         neon_dup_q to...
892         (falkor_am_1_gtov_gtov): ... a new insn reservation.
894 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
896         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
897         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
898         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
899         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
900         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
902 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
904         * diagnostic-show-locus.c (diagnostic_show_locus): Use
905         pp_take_prefix when saving the existing prefix.
906         * diagnostic.c (diagnostic_append_note): Likewise.
907         * langhooks.c (lhd_print_error_function): Likewise.
908         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
909         param's type.  Free the existing prefix.
910         (pp_take_prefix): New function.
911         (pretty_printer::pretty_printer): Drop the prefix parameter.
912         Rename the length parameter to match the comment.
913         (pretty_printer::~pretty_printer): Free the prefix.
914         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
915         parameter.
916         (struct pretty_printer): Drop the "const" from "prefix" field's
917         type and clarify memory management.
918         (pp_set_prefix): Drop the "const" from the 2nd param.
919         (pp_take_prefix): New decl.
921 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
923         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
924         for word_mode_ok here instead of passing as argument.
925         (expand_block_compare): Change select_block_compare_mode() call.
926         (expand_strncmp_gpr_sequence): New function.
927         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
929 2018-08-02  Jeff Law  <law@redhat.com>
931         PR target/86790
932         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
933         Define to speculation_safe_value_not_needed.
935         PR target/86784
936         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
937         Define to speculation_safe_value_not_needed.
939 2018-08-02  Tom de Vries  <tdevries@suse.de>
941         PR target/86660
942         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
943         function.  Return UI_TARGET unconditionally.
944         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
945         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
947 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
949         * genemit.c (print_overload_test): Fix typo.
951 2018-08-02  Richard Biener  <rguenther@suse.de>
953         PR tree-optimization/86816
954         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
955         which checks for value availability before querying it.
956         (gvn_uses_equal): Use it.
957         (same_succ_hash): Likewise.
958         (gimple_equal_p): Likewise.
960 2018-08-02  Nick Clifton  <nickc@redhat.com>
962         PR target/86813
963         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
964         Define to speculation_safe_value_not_needed.
966         PR target/86810
967         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
968         Define to speculation_safe_value_not_needed.
970         PR target/86810
971         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
972         Define to speculation_safe_value_not_needed.
974         PR target/86803
975         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
976         Define to speculation_safe_value_not_needed.
978         PR target/86797
979         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
980         Define to speculation_safe_value_not_needed.
982         PR target/86791
983         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
984         Define to speculation_safe_value_not_needed.
986         PR target/86789
987         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
988         Define to speculation_safe_value_not_needed.
990         PR target/86787
991         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
992         Define to speculation_safe_value_not_needed.
994         PR target/86782
995         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
996         speculation_safe_value_not_needed.
998         PR target/86781
999         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1000         to speculation_safe_value_not_needed.
1002 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1004         * doc/md.texi: Expand the documentation of instruction names
1005         to mention port-local uses.  Document '@' in pattern names.
1006         * read-md.h (overloaded_instance, overloaded_name): New structs.
1007         (mapping): Declare.
1008         (md_reader::handle_overloaded_name): New member function.
1009         (md_reader::get_overloads): Likewise.
1010         (md_reader::m_first_overload): New member variable.
1011         (md_reader::m_next_overload_ptr): Likewise.
1012         (md_reader::m_overloads_htab): Likewise.
1013         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1014         m_next_overload_ptr and m_overloads_htab.
1015         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1016         (get_mode_token, get_code_token, get_int_token): New functions.
1017         (map_attr_string): Add an optional argument that passes back
1018         the associated iterator.
1019         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1020         (md_reader::handle_overloaded_name, add_overload_instance): New
1021         functions.
1022         (apply_iterators): Handle '@' names.  Report an error if '@'
1023         is used without iterators.
1024         (initialize_iterators): Initialize the new iterator_group fields.
1025         * genopinit.c (handle_overloaded_code_for)
1026         (handle_overloaded_gen): New functions.
1027         (main): Use them to print declarations of maybe_code_for_* and
1028         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1029         * genemit.c (print_overload_arguments, print_overload_test)
1030         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1031         (main): Use it to print definitions of maybe_code_for_* and
1032         maybe_gen_* functions.
1033         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1034         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1035         instead of explicit mode checks.
1036         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1037         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1038         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1039         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1040         (aarch64_expand_compare_and_swap): Likewise
1041         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1042         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1043         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1044         (aarch64_constant_pool_reload_icode): Delete.
1045         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1046         instead of aarch64_constant_pool_reload_icode.  Use
1047         code_for_aarch64_reload_mov instead of explicit mode checks.
1048         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1049         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1050         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1051         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1052         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1053         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1054         (aarch64_atomic_load_op_code): Delete.
1055         (aarch64_emit_atomic_load_op): Likewise.
1056         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1057         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1058         instead of aarch64_emit_atomic_load_op.
1059         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1060         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1061         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1062         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1063         character before the pattern name.
1064         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1065         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1066         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1067         (aarch64_frecps<mode>): Likewise.
1068         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1069         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1070         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1071         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1072         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1074 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1076         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1077         Allow HFmode constants if TARGET_FP_F16INST.
1079 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1081         PR target/86014
1082         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1083         No longer check last store for clobber of address register.
1085 2018-08-02  Martin Liska  <mliska@suse.cz>
1087         PR gcov-profile/86817
1088         * gcov.c (process_all_functions): New function.
1089         (main): Call it.
1090         (process_file): Move functions processing to
1091         process_all_functions.
1093 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1095         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1096         "const" to the "gimple *" and "rtx_insn *" parameters.
1097         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1098         Likewise.
1099         (dump_location_t::dump_location_t): Likewise.
1101 2018-08-01  Martin Sebor  <msebor@redhat.com>
1103         PR tree-optimization/86650
1104         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1105         rather than a "gcall *".  Directly pass the data of interest
1106         to percent_K_format, rather than building a temporary CALL_EXPR
1107         to hold it.
1108         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1109         (gimple_fold_builtin_strncat): Adjust.
1110         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1111         gcall* argument with gimple*.
1112         * gimple-ssa-warn-restrict.c (check_call): Same.
1113         (wrestrict_dom_walker::before_dom_children): Same.
1114         (builtin_access::builtin_access): Same.
1115         (check_bounds_or_overlap): Same
1116         (maybe_diag_overlap): Same.
1117         (maybe_diag_offset_bounds): Same.
1118         * tree-diagnostic.c (default_tree_printer): Move usage of
1119         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1120         to this callsite.
1121         * tree-pretty-print.c (percent_K_format): Add argument.
1122         * tree-pretty-print.h: Add argument.
1123         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1124         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1125         (maybe_diag_stxncpy_trunc): Same.
1126         (handle_builtin_stxncpy): Same.
1127         (handle_builtin_strcat): Same.
1129 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1131         * match.pd: Optimise pointer range checks.
1133 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1135         PR tree-optimization/86758
1136         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1137         to remove pattern statements.
1139 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1141         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1142         result of dfs_enumerate_from when constructing stmt_vec_infos,
1143         instead of additionally calling get_loop_body.
1145 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1147         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1148         parameter.
1149         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1150         When creating an iv, assert that the step is not known to be zero.
1151         (vect_setup_realignment): Update call accordingly.
1152         * tree-vect-stmts.c (vectorizable_store): Likewise.
1153         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1155 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1157         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1158         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1159         (vectorizable_reduction): Likewise.
1160         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1161         (vect_detect_hybrid_slp_stmts): Likewise.
1162         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1164 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1166         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1167         (wide_int_set_zero_nonzero_bits): ...this.
1168         (zero_nonzero_bits_from_vr): Rename to...
1169         (vrp_set_zero_nonzero_bits): ...this.
1170         (extract_range_from_multiplicative_op_1): Abstract wide int
1171         code...
1172         (wide_int_range_multiplicative_op): ...here.
1173         (extract_range_from_binary_expr_1): Extract wide int binary
1174         operations into their own functions.
1175         (wide_int_range_lshift): New.
1176         (wide_int_range_can_optimize_bit_op): New.
1177         (wide_int_range_shift_undefined_p): New.
1178         (wide_int_range_bit_xor): New.
1179         (wide_int_range_bit_ior): New.
1180         (wide_int_range_bit_and): New.
1181         (wide_int_range_trunc_mod): New.
1182         (extract_range_into_wide_ints): New.
1183         (vrp_shift_undefined_p): New.
1184         (extract_range_from_multiplicative_op): New.
1185         (vrp_can_optimize_bit_op): New.
1186         * tree-vrp.h (value_range::dump): New.
1187         (wide_int_range_multiplicative_op): New.
1188         (wide_int_range_lshift):New.
1189         (wide_int_range_shift_undefined_p): New.
1190         (wide_int_range_bit_xor): New.
1191         (wide_int_range_bit_ior): New.
1192         (wide_int_range_bit_and): New.
1193         (wide_int_range_trunc_mod): New.
1194         (zero_nonzero_bits_from_bounds): Rename to...
1195         (wide_int_set_zero_nonzero_bits): ...this.
1196         (zero_nonzero_bits_from_vr): Rename to...
1197         (vrp_set_zero_nonzero_bits): ...this.
1198         (range_easy_mask_min_max): Rename to...
1199         (wide_int_range_can_optimize_bit_op): this.
1200         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1201         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1203 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1205         * tree-vectorizer.h (vect_orig_stmt): New function.
1206         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1207         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1208         (vect_create_epilog_for_reduction): Likewise.
1209         (vectorizable_live_operation): Likewise.
1210         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1211         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1212         * tree-vect-stmts.c (vectorizable_call): Likewise.
1213         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1215 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1217         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1218         argument.
1219         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1220         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1221         (vect_transform_loop): Likewise.
1222         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1224 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1226         * tree-vectorizer.h (vect_schedule_slp): Return void.
1227         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1228         (vect_schedule_slp): Likewise.
1230 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1232         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1233         argument.
1234         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1235         instances before the main loop, if any exist.
1237 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1239         PR tree-optimization/86749
1240         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1241         If the lhs is used in a COND_EXPR, check that it is being used
1242         as the "then" or "else" value.
1244 2018-08-01  Tom de Vries  <tdevries@suse.de>
1246         PR target/86800
1247         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1248         speculation_safe_value_not_needed.
1250 2018-08-01  Richard Biener  <rguenther@suse.de>
1252         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1253         as base and offset.
1255 2018-08-01  Martin Liska  <mliska@suse.cz>
1257         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1258         format how successful transformation is dumped.
1259         (gimple_mod_pow2_value_transform): Likewise.
1260         (gimple_mod_subtract_transform): Likewise.
1261         (gimple_stringops_transform): Likewise.
1263 2018-08-01  Martin Liska  <mliska@suse.cz>
1265         PR value-prof/35543
1266         * value-prof.c (interesting_stringop_to_profile_p):
1267         Simplify the code and add BUILT_IN_MEMMOVE.
1268         (gimple_stringops_transform): Likewise.
1270 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1272         * config/aarch64/aarch64-simd.md
1273         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1274         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1275         use GPI iterator instead of SI mode.
1277 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1279         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1280         rs6000_speculation_barrier.
1281         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1282         new barrier pattern name.
1284 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1286         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1287         (speculation_barrier): New insn.
1289 2018-08-01  Richard Biener  <rguenther@suse.de>
1291         PR bootstrap/86724
1292         * graphite.h: Include isl/id.h and isl/space.h to allow build
1293         with ISL 0.20.
1295 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1297         PR target/86651
1298         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1299         mode for COFF targets.
1300         * defaults.h (TARGET_COFF): Define.
1301         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1302         TARGET_COFF): Define.
1303         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1304         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1305         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1307 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1309         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1310         * gimple-streamer-out.c (output_bb): Save it.
1311         * lto-streamer-in.c (input_struct_function_base): Restore
1312         instance discriminator if available.  Create map on demand.
1313         * lto-streamer-out.c (output_struct_function_base): Save it if
1314         available.
1315         * final.c (decl_to_instance_map): Document LTO strategy.
1317 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1318             Olivier Hainque  <hainque@adacore.com>
1320         * debug.h (decl_to_instance_map_t): New type.
1321         (decl_to_instance_map): Declare.
1322         (maybe_create_decl_to_instance_map): New inline function.
1323         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1324         to track basic block discriminators.
1325         (final_start_function_1): Initialize them.
1326         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1327         bb_discriminator.
1328         (decl_to_instance_map): New variable.
1329         (map_decl_to_instance, maybe_set_discriminator): New functions.
1330         (notice_source_line): Set discriminator.
1332 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1334         * targhooks.c (default_have_speculation_safe_value): Add
1335         ATTRIBUTE_UNUSED.
1337 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1339         * dump-context.h: Include "pretty-print.h".
1340         (dump_context::refresh_dumps_are_enabled): New decl.
1341         (dump_context::emit_item): New decl.
1342         (class dump_context): Add fields "m_test_pp" and
1343         "m_test_pp_flags".
1344         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1345         (temp_dump_context::get_dumped_text): New decl.
1346         (class temp_dump_context): Add field "m_pp".
1347         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1348         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1349         m_test_pp.
1350         (set_dump_file): Update for above change.
1351         (set_alt_dump_file): Likewise.
1352         (dump_loc): New overload, taking a pretty_printer *.
1353         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1354         to any test pretty-printer.
1355         (make_item_for_dump_gimple_stmt): New function, adapted from
1356         optinfo::add_gimple_stmt.
1357         (dump_context::dump_gimple_stmt): Call it, and use the result,
1358         eliminating the direct usage of dump_file and alt_dump_file in
1359         favor of indirectly using them via emit_item.
1360         (make_item_for_dump_gimple_expr): New function, adapted from
1361         optinfo::add_gimple_expr.
1362         (dump_context::dump_gimple_expr): Call it, and use the result,
1363         eliminating the direct usage of dump_file and alt_dump_file in
1364         favor of indirectly using them via emit_item.
1365         (make_item_for_dump_generic_expr): New function, adapted from
1366         optinfo::add_tree.
1367         (dump_context::dump_generic_expr): Call it, and use the result,
1368         eliminating the direct usage of dump_file and alt_dump_file in
1369         favor of indirectly using them via emit_item.
1370         (make_item_for_dump_printf_va): New function, adapted from
1371         optinfo::add_printf_va.
1372         (make_item_for_dump_printf): New function.
1373         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1374         and use the result, eliminating the direct usage of dump_file and
1375         alt_dump_file in favor of indirectly using them via emit_item.
1376         (make_item_for_dump_dec): New function.
1377         (dump_context::dump_dec): Call it, and use the result,
1378         eliminating the direct usage of dump_file and alt_dump_file in
1379         favor of indirectly using them via emit_item.
1380         (make_item_for_dump_symtab_node): New function, adapted from
1381         optinfo::add_symtab_node.
1382         (dump_context::dump_symtab_node): Call it, and use the result,
1383         eliminating the direct usage of dump_file and alt_dump_file in
1384         favor of indirectly using them via emit_item.
1385         (dump_context::begin_scope): Reimplement, avoiding direct usage
1386         of dump_file and alt_dump_file in favor of indirectly using them
1387         via emit_item.
1388         (dump_context::emit_item): New member function.
1389         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1390         Set up test pretty-printer on the underlying context.  Call
1391         refresh_dumps_are_enabled.
1392         (temp_dump_context::~temp_dump_context): Call
1393         refresh_dumps_are_enabled.
1394         (temp_dump_context::get_dumped_text): New member function.
1395         (selftest::verify_dumped_text): New function.
1396         (ASSERT_DUMPED_TEXT_EQ): New macro.
1397         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1398         and then without optinfo enabled.  Add uses of
1399         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1400         * dumpfile.h: Update comment for the dump_* API.
1401         * optinfo-emit-json.cc
1402         (selftest::test_building_json_from_dump_calls): Update for new
1403         param for temp_dump_context ctor.
1404         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1405         and "m_owned" field.
1406         (optinfo_item::~optinfo_item): Likewise.
1407         (optinfo::add_item): New member function.
1408         (optinfo::emit): Update comment.
1409         (optinfo::add_string): Delete.
1410         (optinfo::add_printf): Delete.
1411         (optinfo::add_printf_va): Delete.
1412         (optinfo::add_gimple_stmt): Delete.
1413         (optinfo::add_gimple_expr): Delete.
1414         (optinfo::add_tree): Delete.
1415         (optinfo::add_symtab_node): Delete.
1416         (optinfo::add_dec): Delete.
1417         * optinfo.h (class dump_context): New forward decl.
1418         (optinfo::add_item): New decl.
1419         (optinfo::add_string): Delete.
1420         (optinfo::add_printf): Delete.
1421         (optinfo::add_printf_va): Delete.
1422         (optinfo::add_gimple_stmt): Delete.
1423         (optinfo::add_gimple_expr): Delete.
1424         (optinfo::add_tree): Delete.
1425         (optinfo::add_symtab_node): Delete.
1426         (optinfo::add_dec): Delete.
1427         (optinfo::add_poly_int): Delete.
1428         (optinfo_item::optinfo_item): Remove "owned" param.
1429         (class optinfo_item): Remove field "m_owned".
1431 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1433         PR middle-end/86705
1434         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1435         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1436         requested variable alignment.
1437         (expand_one_ssa_partition): Likewise.
1438         (expand_one_var): Likewise.
1440 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1442         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1443         to speculation_safe_value_not_needed.
1445 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1447         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1448         * targhooks.c (speculation_safe_value_not_needed): New function.
1449         * target.def (have_speculation_safe_value): Update documentation.
1450         * doc/tm.texi: Regenerated.
1452 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1454         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1455         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1456         expand.
1457         (despeculate_copy<ALLI:mode>_insn): New insn.
1458         (despeculate_copyti_insn): New insn.
1459         (despeculate_simple<ALLI:mode>): New insn
1460         (despeculate_simpleti): New insn.
1461         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1462         function.
1463         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1464         aarch64_speculation_safe_value.
1465         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1467 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1469         * config/aarch64/aarch64-speculation.cc: New file.
1470         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1471         before pass_reorder_blocks.
1472         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1473         prototype.
1474         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1475         X14 and X15 when tracking speculation.
1476         * config/aarch64/aarch64.md (register name constants): Add
1477         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1478         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1479         (speculation_barrier): New insn attribute.
1480         (cmp<mode>): Allow SP in comparisons.
1481         (speculation_tracker): New insn.
1482         (speculation_barrier): Add speculation_barrier attribute.
1483         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1484         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1485         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1487 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1489         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1490         aarch64_track_speculation is true.
1491         (tb<optab><mode>1): Likewise.
1492         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1493         generate CB[N]Z when tracking speculation.
1494         (aarch64_split_compare_and_swap): Likewise.
1495         (aarch64_split_atomic_op): Likewise.
1497 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1499         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1501 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1503         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1504         (speculation_barrier): New insn.
1506 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1508         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1509         * config/arm/arm.md (speculation_barrier): New expand.
1510         (speculation_barrier_insn): New pattern.
1512 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1514         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1515         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1516         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1517         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1518         list.
1519         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1520         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1521         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1522         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1523         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1524         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1525         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1526         * builtins.c (expand_speculation_safe_value): New function.
1527         (expand_builtin): Call it.
1528         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1529         * doc/extend.texi: Document __builtin_speculation_safe_value.
1530         * doc/md.texi: Document "speculation_barrier" pattern.
1531         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1532         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1533         * doc/tm.texi: Regenerated.
1534         * target.def (have_speculation_safe_value, speculation_safe_value): New
1535         hooks.
1536         * targhooks.c (default_have_speculation_safe_value): New function.
1537         (default_speculation_safe_value): New function.
1538         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1539         (default_speculation_safe_value): Add prototype.
1541 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1543         * dump-context.h (dump_context::dump_loc): New decl.
1544         * dumpfile.c (dump_context::dump_loc): New member function.
1545         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1546         and dump_gimple_stmt.
1547         (dump_context::dump_gimple_expr_loc): Likewise, using
1548         dump_gimple_expr.
1549         (dump_context::dump_generic_expr_loc): Likewise, using
1550         dump_generic_expr.
1551         (dump_context::dump_printf_loc_va): Likewise, using
1552         dump_printf_va.
1553         (dump_context::begin_scope): Explicitly using the global function
1554         "dump_loc", rather than the member function.
1556 2018-07-31  Martin Sebor  <msebor@redhat.com>
1558         PR tree-optimization/86741
1559         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1561 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1563         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1564         depend on whether prefetch instructions will be emitted or not.
1565         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1566         will be emitted or not.
1567         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1568         (TARGET_SETMEM_PFD): New macros.
1570 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1572         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1573         (NULL_STMT_VEC_INFO): Delete.
1574         (stmt_vec_info::operator*): Likewise.
1575         (stmt_vec_info::operator gimple *): Likewise.
1576         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1577         of NULL_STMT_VEC_INFO.
1578         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1579         (vect_reassociating_reduction_p): Likewise.
1580         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1581         (vectorizable_store): Likewise.
1582         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1583         (vec_info::free_stmt_vec_infos): Likewise.
1585 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1587         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1588         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1590 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1592         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1593         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1594         (vec_info::free_stmt_vec_info): New private member functions.
1595         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1596         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1597         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1598         set_stmt_vec_info_vec and free_stmt_vec_infos.
1599         * tree-vect-loop.c (_loop_vec_info): Remove call to
1600         set_stmt_vec_info_vec.
1601         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1602         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1603         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1604         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1605         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1606         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1607         with the clearing in the xcalloc.
1608         (stmt_vec_info_vec): Delete.
1609         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1610         (vectorize_loops): Likewise.
1611         (vec_info::~vec_info): Remove argument from call to
1612         free_stmt_vec_infos.
1613         (vec_info::add_stmt): Remove vinfo argument from call to
1614         new_stmt_vec_info.
1616 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1618         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1619         rather than a gimple stmt.
1620         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1621         information for pattern statements when passed the original
1622         statement; instead wait to be passed the pattern statement itself.
1623         Don't call set_vinfo_for_stmt here.
1624         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1625         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1626         stmt_vec_infos here.
1627         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1628         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1629         stmt_vec_infos entry.
1631 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1633         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1634         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1635         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1636         * tree-vect-stmts.c (vectorizable_call): Likewise.
1637         (vectorizable_simd_clone_call): Likewise.
1639 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1641         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1642         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1643         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1644         * tree-vect-loop.c (vect_transform_loop): Likewise.
1645         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1646         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1650         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1651         (vect_dr_stmt): Delete.
1652         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1653         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1654         of DR_VECT_AUX.
1655         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1656         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1657         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1658         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1659         (vect_analyze_data_refs): Likewise.
1660         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1661         argument.
1662         (vect_find_same_alignment_drs): Likewise.
1663         (vect_slp_analyze_node_dependences): Update calls accordingly.
1664         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1665         instead of DR_VECT_AUX.
1666         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1667         of a vector data references.  Use vec_info::lookup_dr instead of
1668         DR_VECT_AUX.
1669         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1670         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1671         instead of DR_VECT_AUX.
1673 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1675         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1676         dr_vec_info.
1677         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1678         accordingly.
1679         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1680         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1681         (vect_gen_prolog_loop_niters): Likewise.
1683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1685         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1686         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1687         (vect_known_alignment_in_bytes, vect_dr_behavior)
1688         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1689         instead of data_references.  Update calls to other routines for
1690         which the same change has been made.
1691         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1692         dr_vec_infos instead of stmt_vec_infos.
1693         (vect_analyze_data_ref_dependence): Update call accordingly.
1694         (vect_slp_analyze_data_ref_dependence)
1695         (vect_record_base_alignments): Use DR_VECT_AUX.
1696         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1697         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1698         (vector_alignment_reachable_p, vect_get_data_access_cost)
1699         (vect_peeling_supportable, vect_analyze_group_access_1)
1700         (vect_analyze_group_access, vect_analyze_data_ref_access)
1701         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1702         (vect_compile_time_alias, vect_small_gap_p)
1703         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1704         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1705         instead of data_references.  Update calls to other routines for
1706         which the same change has been made.
1707         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1708         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1709         (vect_slp_analyze_and_verify_node_alignment)
1710         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1711         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1712         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1713         above changes.
1714         (_vect_peel_info::dr): Replace with...
1715         (_vect_peel_info::dr_info): ...this new field.
1716         (vect_peeling_hash_get_most_frequent)
1717         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1718         (vect_peeling_hash_get_lowest_cost):
1719         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1720         routines for which the same change has been made.
1721         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1722         data_reference.
1723         * tree-vect-loop-manip.c (get_misalign_in_elems)
1724         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1725         above changes.
1726         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1727         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1728         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1729         (get_group_load_store_type, get_negative_load_store_type)
1730         (vect_get_data_ptr_increment, vectorizable_store)
1731         (vectorizable_load): Likewise.
1732         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1733         Update calls to other routines for which the same change has been made.
1735 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1737         * tree-vectorizer.h (vec_info::move_dr): New member function.
1738         (dataref_aux): Rename to...
1739         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1740         (_stmt_vec_info::dr_aux): Update accordingly.
1741         (_stmt_vec_info::data_ref_info): Delete.
1742         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1743         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1744         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1745         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1746         of data_ref.
1747         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1748         (STMT_VINFO_DR_INFO): New macro.
1749         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1750         (set_dr_misalignment): Update after rename of dataref_aux.
1751         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1752         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1753         initialization of STMT_VINFO_DATA_REF.
1754         * tree-vectorizer.c (vec_info::move_dr): New function.
1755         * tree-vect-patterns.c (vect_recog_bool_pattern)
1756         (vect_recog_mask_conversion_pattern)
1757         (vect_recog_gather_scatter_pattern): Use it.
1758         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1759         the "dr" and "stmt" fields of dr_vec_info instead of
1760         STMT_VINFO_DATA_REF.
1762 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1764         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1765         (is_pattern_stmt_p): Use it.
1766         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1767         on pattern statements.
1769 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1771         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1772         original stmt as a stmt_vec_info rather than a gimple stmt.
1773         (vect_pattern_recog_1): Take the statement directly as a
1774         stmt_vec_info, rather than via a gimple_stmt_iterator.
1775         Update call to vect_mark_pattern_stmts.
1776         (vect_pattern_recog): Update calls accordingly.
1778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1780         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1781         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1782         a vect_def_type for the first argument.
1783         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1784         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1785         operand if it isn't defined by a vectorized statement.
1786         (vect_build_gather_load_calls): Remove the mask_dt argument and
1787         update calls to vect_get_vec_def_for_stmt_copy.
1788         (vectorizable_bswap): Likewise the dt argument.
1789         (vectorizable_call): Update calls to vectorizable_bswap and
1790         vect_get_vec_def_for_stmt_copy.
1791         (vectorizable_simd_clone_call, vectorizable_assignment)
1792         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1793         (vectorizable_comparison): Update calls to
1794         vect_get_vec_def_for_stmt_copy.
1795         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1796         vect_is_simple_use.
1797         (vect_get_loop_based_defs): Remove dt argument and update call
1798         to vect_get_vec_def_for_stmt_copy.
1799         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1800         and vect_get_vec_def_for_stmt_copy.
1801         (vectorizable_load): Update calls to vect_build_gather_load_calls
1802         and vect_get_vec_def_for_stmt_copy.
1803         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1804         (vectorizable_reduction, vectorizable_live_operation): Update calls
1805         to vect_get_vec_def_for_stmt_copy.
1807 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1809         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1810         and gimple stmt arguments with a stmt_vec_info.
1811         (vect_record_base_alignments): Update calls accordingly.
1812         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1813         and gimple stmt arguments with a stmt_vec_info.
1814         (vect_build_slp_tree_1): Remove vinfo argument and update call
1815         to vect_record_max_nunits.
1816         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1817         and vect_record_max_nunits.
1819 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1821         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1822         file and take a stmt_vec_info instead of a gimple stmt.
1823         (supportable_widening_operation, vect_finish_replace_stmt)
1824         (vect_finish_stmt_generation, vect_get_store_rhs)
1825         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1826         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1827         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1828         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1829         (vect_create_data_ref_ptr, bump_vector_ptr)
1830         (vect_permute_store_chain, vect_setup_realignment)
1831         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1832         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1833         (vectorizable_reduction, vectorizable_induction)
1834         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1835         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1836         than gimple stmts as arguments.
1837         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1838         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1839         (can_group_stmts_p, vect_check_gather_scatter)
1840         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1841         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1842         (vect_permute_load_chain, vect_shift_permute_load_chain)
1843         (vect_transform_grouped_load)
1844         (vect_record_grouped_load_vectors): Likewise.
1845         * tree-vect-loop.c (vect_fixup_reduc_chain)
1846         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1847         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1848         (vectorizable_reduction, vectorizable_induction)
1849         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1850         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1851         (vect_get_load_store_mask): Likewise.
1852         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1853         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1854         * tree-vect-stmts.c (vect_mark_relevant)
1855         (is_simple_and_all_uses_invariant)
1856         (exist_non_indexing_operands_for_use_p, process_use)
1857         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1858         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1859         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1860         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1861         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1862         (get_negative_load_store_type, get_load_store_type)
1863         (vect_check_load_store_mask, vect_check_store_rhs)
1864         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1865         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1866         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1867         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1868         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1869         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1870         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1871         (supportable_widening_operation): Likewise.
1873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1875         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1876         a stmt_vec_info instead of a gcall.
1877         (vect_check_gather_scatter): Update call accordingly.
1878         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1879         of a gphi.
1880         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1881         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1882         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1883         instead of a gimple stmt.
1884         (vect_transform_loop): Update calls accordingly.
1885         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1886         stmt_vec_infos instead of gimple stmts.
1887         (vect_analyze_slp_instance): Update use accordingly.
1888         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1889         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1890         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1891         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1892         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1893         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1894         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1895         down to subroutines.
1897 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1899         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1900         of the worklist from a vector of gimple stmts to a vector of
1901         stmt_vec_infos.
1902         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1903         (vect_mark_stmts_to_be_vectorized): Likewise
1905 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1907         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1908         statement before passing it to vect_analyze_stmt.
1909         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1910         the chain of phi vector definitions.  Track the exit phi via its
1911         stmt_vec_info.
1912         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1913         STMT_VINFO_REDUC_DEF.
1914         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1915         stmt_vec_infos to handle the statement chains.
1916         (vect_get_slp_defs): Record the first statement in the node
1917         using a stmt_vec_info.
1918         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1919         statements here and pass their stmt_vec_info down to subroutines.
1920         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1921         down to vect_finish_stmt_generation.
1922         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1923         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1924         stmt_vec_infos to subroutines.
1925         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1926         chains.
1928 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1930         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1931         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1932         (vect_permute_store_chain, vect_setup_realignment)
1933         (vect_permute_load_chain, vect_shift_permute_load_chain)
1934         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1935         stmts internally, and when passing values to other vectorizer routines.
1936         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1937         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1938         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1939         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1940         (vectorizable_reduction, vectorizable_induction)
1941         (vectorizable_live_operation, vect_transform_loop_stmt)
1942         (vect_transform_loop): Likewise.
1943         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1944         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1945         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1946         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1947         (vect_slp_analyze_node_operations_1): Likewise.
1948         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1949         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1950         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1951         (vect_finish_stmt_generation_1, get_group_load_store_type)
1952         (get_load_store_type, vect_build_gather_load_calls)
1953         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1954         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1955         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1956         (vectorizable_store, vectorizable_load, vectorizable_condition)
1957         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1958         (supportable_widening_operation): Likewise.
1959         (vect_get_vector_types_for_stmt): Likewise.
1960         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1962 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1964         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1965         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1966         (vect_permute_store_chain, vect_permute_load_chain)
1967         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1968         repeated stmt_vec_info lookups.
1969         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1970         (vect_update_ivs_after_vectorizer): Likewise.
1971         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1972         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1973         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1974         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1975         (vect_bb_slp_scalar_cost): Likewise.
1976         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1978 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1980         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1981         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1982         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1983         to get gassigns and gcalls, rather than operating on generc gimple
1984         stmts.
1985         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1986         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1987         (vectorizable_load, vect_analyze_stmt): Likewise.
1988         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1990 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1992         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1993         return stmt_vec_infos rather than gimple stmts.  Do not accept
1994         null arguments.
1995         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1996         of a gimple stmt.
1997         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1998         Update use of get_later_stmt.
1999         (vect_get_constant_vectors): Update call accordingly.
2000         (vect_schedule_slp_instance): Likewise
2001         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2002         (vect_slp_analyze_instance_dependence): Likewise.
2003         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2005 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2007         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2008         (stmt_info_for_cost::stmt_info): ...this new field.
2009         (add_stmt_costs): Update accordingly.
2010         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2011         (vect_get_known_peeling_cost): Likewise.
2012         (vect_estimate_min_profitable_iters): Likewise.
2013         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2015 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2017         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2018         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2019         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2020         accordingly.
2021         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2023 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2025         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2026         a gimple stmt to a stmt_vec_info.
2027         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2029 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2031         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2032         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2033         (_loop_vec_info::reduction_chains): Likewise.
2034         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2035         accordingly.
2036         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2038 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2040         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2041         a gimple stmt to a stmt_vec_info.
2042         (_stmt_vec_info::next_element): Likewise.
2043         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2044         (vect_slp_analyze_and_verify_node_alignment)
2045         (vect_analyze_group_access_1, vect_analyze_group_access)
2046         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2047         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2048         (vect_supportable_dr_alignment): Update accordingly.
2049         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2050         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2051         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2052         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2053         * tree-vect-slp.c (vect_build_slp_tree_1)
2054         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2055         (vect_split_slp_store_group, vect_analyze_slp_instance)
2056         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2057         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2058         (get_group_load_store_type, get_load_store_type)
2059         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2060         (vect_transform_stmt, vect_remove_stores): Likewise.
2062 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2064         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2065         than a gimple stmt.
2066         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2067         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2068         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2069         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2070         (vector_alignment_reachable_p, vect_get_data_access_cost)
2071         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2072         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2073         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2074         (vect_analyze_group_access_1, vect_analyze_group_access)
2075         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2076         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2077         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2078         result of vect_dr_stmt and use the stmt_vec_info instead of
2079         the associated gimple stmt.
2080         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2081         (vect_gen_prolog_loop_niters): Likewise.
2082         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2084 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2086         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2087         to a vec<stmt_vec_info>.
2088         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2089         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2090         vec<stmt_vec_info>.
2091         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2092         to a vec<stmt_vec_info>.
2093         (bst_traits::value_type, bst_traits::value_type): Likewise.
2094         (bst_traits::hash): Update accordingly.
2095         (vect_get_and_check_slp_defs): Change the stmts parameter from
2096         a vec<gimple *> to a vec<stmt_vec_info>.
2097         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2098         (vect_build_slp_tree): Likewise.
2099         (vect_build_slp_tree_2): Likewise.  Update uses of
2100         SLP_TREE_SCALAR_STMTS.
2101         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2102         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2103         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2104         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2105         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2106         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2107         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2108         (vect_get_constant_vectors, vect_get_slp_defs)
2109         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2110         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2111         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2112         instead of gimple stmts.
2113         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2114         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2115         (vect_slp_analyze_instance_dependence): Update uses of
2116         SLP_TREE_SCALAR_STMTS.
2117         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2118         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2119         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2120         (get_initial_defs_for_reduction): Likewise.
2121         (vect_create_epilog_for_reduction): Likewise.
2122         (vectorize_fold_left_reduction): Likewise.
2123         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2124         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2125         (can_vectorize_live_stmts): Likewise.
2127 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2129         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2130         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2131         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2132         than gimple stmts.
2133         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2134         of a gimple stmt.
2135         (gather_scalar_reductions): Update after above interface changes.
2136         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2137         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2138         than gimple stmts.
2139         (vect_force_simple_reduction): Likewise.
2140         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2141         LOOP_VINFO_REDUCTIONS.
2142         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2144 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2146         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2147         a gimple stmt to a stmt_vec_info.
2148         * tree-vect-loop.c (vect_active_double_reduction_p)
2149         (vect_force_simple_reduction, vectorizable_reduction): Update
2150         accordingly.
2152 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2154         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2155         vec<gimple *> to a vec<stmt_vec_info>.
2156         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2157         the reduction_phis argument from a vec<gimple *> to a
2158         vec<stmt_vec_info>.
2159         (vectorizable_reduction): Likewise the phis local variable that
2160         is passed to vect_create_epilog_for_reduction.  Update for new type
2161         of SLP_TREE_VEC_STMTS.
2162         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2163         (vectorizable_live_operation): Likewise.
2164         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2165         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2167 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2169         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2170         a gimple stmt to a stmt_vec_info.
2171         (vectorizable_condition, vectorizable_live_operation)
2172         (vectorizable_reduction, vectorizable_induction): Pass back the
2173         vectorized statement as a stmt_vec_info.
2174         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2175         use of STMT_VINFO_VEC_STMT.
2176         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2177         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2178         as stmt_vec_infos rather than gimple stmts.
2179         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2180         to a stmt_vec_info.
2181         (vectorizable_live_operation): Likewise.
2182         (vectorizable_reduction, vectorizable_induction): Likewise,
2183         updating use of STMT_VINFO_VEC_STMT.
2184         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2185         of STMT_VINFO_VEC_STMT.
2186         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2187         (vectorizable_simd_clone_call, vectorizable_conversion)
2188         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2189         (vectorizable_store, vectorizable_load, vectorizable_condition)
2190         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2191         from a gimple stmt to a stmt_vec_info.
2192         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2193         pointer to a stmt_vec_info to the vectorizable_* routines.
2195 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2197         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2198         a gimple stmt to a stmt_vec_info.
2199         (is_pattern_stmt_p): Update accordingly.
2200         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2201         (vect_record_grouped_load_vectors): Likewise.
2202         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2203         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2204         (vect_model_reduction_cost): Likewise.
2205         (vect_create_epilog_for_reduction): Likewise.
2206         (vectorizable_reduction, vectorizable_induction): Likewise.
2207         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2208         Return the stmt_vec_info for the pattern statement.
2209         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2210         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2211         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2212         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2213         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2214         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2215         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2216         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2218 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2220         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2221         (vect_finish_stmt_generation): Likewise.
2222         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2223         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2224         (vect_build_gather_load_calls): Use the return value of the above
2225         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2226         scopes for the input gimple stmt and wider scopes for the associated
2227         stmt_vec_info.  Use vec_info::lookup_def when setting these
2228         stmt_vec_infos from an SSA_NAME definition.
2229         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2230         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2231         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2232         (vectorizable_store, vectorizable_load, vectorizable_condition)
2233         (vectorizable_comparison): Likewise.
2234         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2235         (vectorizable_reduction): Likewise.
2237 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2239         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2240         stmt_vec_info * parameter before the optional gimple **.
2241         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2242         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2243         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2244         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2245         (vectorizable_live_operation): Likewise.
2246         * tree-vect-patterns.c (type_conversion_p): Likewise.
2247         (vect_look_through_possible_promotion): Likewise.
2248         (vect_recog_rotate_pattern): Likewise.
2249         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2251 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2253         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2254         a typedef to a wrapper class.
2255         (NULL_STMT_VEC_INFO): New macro.
2256         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2257         (stmt_vec_info::operator*): New function.
2258         (stmt_vec_info::operator gimple *): Likewise.
2259         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2260         (add_stmt_costs): Likewise.
2261         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2262         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2263         (vect_get_known_peeling_cost): Likewise.
2264         (vect_estimate_min_profitable_iters): Likewise.
2265         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2266         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2267         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2268         (vectorizable_store, free_stmt_vec_infos): Likewise.
2269         (new_stmt_vec_info): Change return type of xcalloc to
2270         _stmt_vec_info *.
2272 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2274         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2275         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2276         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2277         a single_imm_use-based sequence.
2278         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2280 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2282         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2283         * tree-vectorizer.c (vec_info::lookup_def): New function.
2284         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2285         (vect_widened_op_tree): Likewise.
2286         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2287         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2288         (vectorizable_reduction): Likewise.
2289         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2290         of a gimple *.
2291         (vect_is_slp_reduction): Update calls accordingly.  Use
2292         vec_info::lookup_def.
2293         (vect_is_simple_reduction): Likewise
2294         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2296 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2298         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2299         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2300         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2301         of vinfo_for_stmt.
2302         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2303         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2304         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2305         (vect_is_slp_reduction, vectorizable_induction)
2306         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2307         * tree-vect-patterns.c (vect_init_pattern_stmt):
2308         (vect_determine_min_output_precision_1, vect_determine_precisions)
2309         (vect_pattern_recog): Likewise.
2310         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2311         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2312         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2313         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2314         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2315         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2316         info field from a loop to a loop_vec_info.
2318 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2320         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2321         (vec_info::add_stmt): Declare.
2322         * tree-vectorizer.c (vec_info::add_stmt): New function.
2323         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2324         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2325         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2326         (vectorizable_induction): Likewise.
2327         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2328         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2329         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2330         (vectorizable_load): Likewise.
2331         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2332         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2333         (vect_recog_gather_scatter_pattern): Likewise.
2334         (append_pattern_def_seq): Likewise.  Remove a check that is
2335         performed by add_stmt itself.
2337 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2339         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2340         which make_ssa_name was called with new_stmt before new_stmt
2341         had been created.
2343 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2345         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2346         split out from...
2347         (vect_is_slp_reduction): ...here...
2348         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2349         that are already known to be false.
2351 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2353         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2354         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2355         STMT_VINFO_NUM_SLP_USES when it's true.
2356         (vect_free_slp_instance): Add a final_p parameter and pass it to
2357         vect_free_slp_tree.
2358         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2359         (vect_analyze_slp_instance): Likewise.
2360         (vect_slp_analyze_operations): Likewise.
2361         (vect_slp_analyze_bb_1): Likewise.
2362         * tree-vectorizer.c (vec_info): Likewise.
2363         * tree-vect-loop.c (vect_transform_loop): Likewise.
2365 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2367         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2368         function is not called for second and subsequent members of
2369         a reduction group.
2371 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2373         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2374         cases for nested loops from here to ...
2375         (vect_create_epilog_for_reduction): ...here.  Only call
2376         vect_is_simple_use for inner-loop reductions.
2378 2018-07-31  Martin Liska  <mliska@suse.cz>
2380         PR gcov-profile/85338
2381         PR gcov-profile/85350
2382         PR gcov-profile/85372
2383         * profile.c (struct location_triplet): New.
2384         (struct location_triplet_hash): Likewise.
2385         (output_location): Do not output a BB that
2386         is already recorded for a line.
2387         (branch_prob): Use streamed_locations.
2389 2018-07-31  Martin Liska  <mliska@suse.cz>
2391         PR gcov-profile/85370
2392         * coverage.c (coverage_begin_function): Do not mark target
2393         clones as artificial functions.
2395 2018-07-31  Martin Liska  <mliska@suse.cz>
2397         PR gcov-profile/83813
2398         PR gcov-profile/84758
2399         PR gcov-profile/85217
2400         PR gcov-profile/85332
2401         * profile.c (branch_prob): Do not record GOTO expressions
2402         for GIMPLE statements which locations are already streamed.
2404 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2406         * gcc.c (handle_spec_function): Accept a soft_matched_part
2407         argument, as do_spec_1.  Pass it down to ...
2408         (eval_spec_function): Accept a soft_matched_part argument,
2409         and pass it down to ...
2410         (do_spec_2): Accept a soft_matched_part argument, and pass
2411         it down to do_spec_1.
2412         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2413         (handle_braces): Update call to handle_spec_function.
2414         (driver::set_up_specs): Update calls to do_spec_2.
2415         (compare_debug_dump_opt_spec_function): Likewise.
2416         (compare_debug_self_opt_spec_function): Likewise.
2418 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2420         * common.opt (nolibc): New option.
2421         * doc/invoke.texi (Link Options): Document it.
2422         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2423         * config/alpha/linux.h: Likewise.
2424         * config/arc/elf.h: Likewise.
2425         * config/arm/uclinux-elf.h: Likewise.
2426         * config/arm/unknown-elf.h: Likewise.
2427         * config/avr/avrlibc.h: Likewise.
2428         * config/bfin/bfin.h: Likewise.
2429         * config/bfin/linux.h: Likewise.
2430         * config/bfin/uclinux.h: Likewise.
2431         * config/darwin.h: Likewise.
2432         * config/darwin10.h: Likewise.
2433         * config/darwin12.h: Likewise.
2434         * config/gnu-user.h: Likewise.
2435         * config/lm32/uclinux-elf.h: Likewise.
2436         * config/pa/pa-hpux11.h: Likewise.
2437         * config/pa/pa64-hpux.h: Likewise.
2438         * config/sparc/sparc.h: Likewise.
2440 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2442         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2443         undefined variables.
2445 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2447         PR target/86640
2448         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2449         instead of GEN_INT.
2451 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2453         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2454         terminated string literal.
2456 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2458         PR rtl-optimization/85160
2459         * combine.c (is_just_move): New function.
2460         (try_combine): Allow combining two instructions into two if neither of
2461         the original instructions was a move.
2463 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2465         PR target/86673
2466         * doc/extend.texi (Global Register Variables): Discourage use of type
2467         qualifiers.
2468         (Local Register Variables): Likewise.
2470 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2472         PR tree-optimization/86506
2473         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2475 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2477         PR target/86547
2478         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2479         hard_regno, make sure no insn between `from` and `to` clobbers it.
2481 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2482             Tom de Vries  <tdevries@suse.de>
2484         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2485         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2486         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2487         PTX_DEFAULT_RUNTIME_DIM.
2488         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2490 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2492         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2493         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2494         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2496 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2498         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2499         used.
2500         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2501         predicate to reflect toc fusion has been deleted.
2502         (toc_fusion_mem_raw): Delete, no longer used.
2503         (toc_fusion_mem_wrapped): Likewise.
2504         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2505         fusion mask bit.
2506         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2507         Delete, no longer used.
2508         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2509         meant to be used for toc fusion.
2510         (rs6000_debug_print_mode): Delete toc fusion debugging.
2511         (rs6000_debug_reg_global): Likewise.
2512         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2513         fusion and secondary reload support that were never used.
2514         (rs6000_option_override_internal): Delete TOC fusion, that was only
2515         partially defined, and it did not work unless you also used the
2516         -mcmodel= switch.
2517         (rs6000_legitimate_address_p): Delete TOC fusion support.
2518         (rs6000_opt_masks): Likewise.
2519         (fusion_wrap_memory_address): Delete function, no longer used.
2520         (fusion_split_address); Delete TOC fusion support.
2521         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2522         longer used with toc fusion being deleted.
2523         (TARGET_TOC_FUSION_FP): Likewise.
2524         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2525         UNSPEC.
2526         (toc fusion spliter): Delete TOC fusion support.
2527         (toc_fusionload_<mode>): Likewise.
2528         (toc_fusionload_di): Likewise.
2529         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2530         longer needs to be named.  Rename predicate to delete TOC fusion.
2531         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2532         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2533         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2534         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2535         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2537 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2539         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2540         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2541         __int128 in built-in function prototypes.
2542         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2543         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2545 2018-07-27  Martin Sebor  <msebor@redhat.com>
2547         PR tree-optimization/86696
2548         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2549         types, including enums.
2550         (handle_char_store): Be prepared for the above function to fail.
2552 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2554         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2555         when optimization level is lower than 2 or optimize for size.
2557 2018-07-26  Martin Sebor  <msebor@redhat.com>
2559         PR tree-optimization/86043
2560         PR tree-optimization/86042
2561         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2562         (get_string_cst_length): Rename...
2563         (get_min_string_length): ...to this.  Add argument.
2564         (handle_char_store): Extend to handle multi-character stores by
2565         MEM_REF.
2566         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2567         * tree.h (initializer_zerop): Add argument.
2569 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2571         PR middle-end/86660
2572         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2573         declare target to variables if they have always,{to,from,tofrom} map
2574         kinds.
2576 2018-07-26  Martin Liska  <mliska@suse.cz>
2578         PR lto/86548
2579         * lto-wrapper.c: Add linker_output as prefix
2580         for ltrans_output_file.
2582 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2584         PR rtl-optimization/85805
2585         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2586         value for hard registers if that was written in the same mode.
2588 2018-07-26  Martin Liska  <mliska@suse.cz>
2590         PR gcov-profile/86536
2591         * gcov.c (format_gcov): Use printf format %.*f directly
2592         and do not handle special values.
2594 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2596         * common/config/arc/arc-common.c (arc_option_optimization_table):
2597         Update default optimizations for size.
2599 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2601         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2602         * config/arc/constraints.md (CfZ): New constraint.
2603         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2604         (subsf3_fpu): Likewise.
2605         (cmpsf_fpu): Likewise.
2606         (cmpsf_fpu_uneq): Likewise.
2608 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2610         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2611         accesses as well.
2612         (arc_is_uncached_mem_p): uncached applies to both the variable and
2613         the pointer.
2615 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2617         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2618         register names.
2620 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2622         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2623         field "m_scopes" from vec to auto_vec.
2625 2018-07-25  Martin Liska  <mliska@suse.cz>
2627         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2628         return type.
2630 2018-07-25  Richard Biener  <rguenther@suse.de>
2632         PR debug/86654
2633         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2634         special wrt context_die late.
2635         (gen_subprogram_die): Re-use DIEs in local scope.
2637 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2639         PR tree-optimization/86644
2640         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2642 2018-07-25  Martin Liska  <mliska@suse.cz>
2644         PR middle-end/86645
2645         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2646         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2648 2018-07-25  Martin Liska  <mliska@suse.cz>
2650         PR sanitizer/79635
2651         * params.def: Explain ASan abbreviation and provide
2652         a documentation link.
2654 2018-07-24  Martin Sebor  <msebor@redhat.com>
2656         PR tree-optimization/86622
2657         PR tree-optimization/86532
2658         * builtins.h (string_length): Declare.
2659         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2660         (check_access): Be prepared for non-constant length ranges.
2661         (string_length): Make extern.
2662         * expr.c (string_constant): Only handle the minor non-constant
2663         array index.  Use string_constant to compute the length of
2664         a generic string constant.
2666 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2668         PR tree-optimization/86618
2669         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2670         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2672 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2674         PR tree-optimization/86636
2675         * json.cc (json::object::set): Fix comment.  Add assertions.
2676         (json::array::append): Move here from json.h.  Add comment and an
2677         assertion.
2678         (json::string::string): Likewise.
2679         * json.h (json::array::append): Move to json.cc.
2680         (json::string::string): Likewise.
2681         * optinfo-emit-json.cc
2682         (optrecord_json_writer::impl_location_to_json): Assert that we
2683         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2684         wrapper around it.  Expand the location once, rather than three
2685         times.
2686         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2687         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2688         wrappers.
2689         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2690         places.  Fix some overlong lines.
2692 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2694         * config/aarch64/aarch64-simd.md
2695         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2696         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2697         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2698         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2699         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2700         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2701         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2702         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2703         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2705 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2707         PR middle-end/86627
2708         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2709         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2710         and abs_d == d, do the power of two handling if profitable.
2712 2018-07-24  Richard Biener  <rguenther@suse.de>
2714         * match.pd: Add BIT_FIELD_REF canonicalizations.
2716 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2718         PR c/86617
2719         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2721 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2723         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2724         terminated STRING_CST object.
2726 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2728         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2730 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2732         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2733         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2734         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2735         the elements into a register.
2736         (rs6000_split_v4si_init_di_reg): Delete.
2737         (rs6000_split_v4si_init): Delete.
2738         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2739         (vsx_init_v4si): Rewrite as a define_expand.
2741 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2743         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2744         zero_extend argument from memory): New.
2746 2018-07-22  Martin Sebor  <msebor@redhat.com>
2748         PR bootstrap/86621
2749         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2750         diagnosing calls with unknown arguments unless -Walloca-larger-than
2751         is restricted to less than PTRDIFF_MAX bytes.
2753 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2755         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2757 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2759         * pretty-print.c (text_info::set_location): Remove redundant
2760         "line_table" parameter from call to rich_location::set_range.
2762 2018-07-20  Martin Sebor  <msebor@redhat.com>
2764         PR middle-end/82063
2765         * builtins.c (expand_builtin_alloca): Adjust.
2766         * calls.c (alloc_max_size): Simplify.
2767         * cgraphunit.c (cgraph_node::expand): Adjust.
2768         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2769         variables.
2770         (frame_larger_than_size): Same.
2771         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2772         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2773         Initialize.
2774         * doc/invoke.texi (GCC Command Options): Document option arguments.
2775         Explain byte-size arguments and suffixes.
2776         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2777         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2778         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2779         * doc/options.texi (UInteger): Expand.
2780         (Host_Wide_Int, ByteSize): Document new properties.
2781         * final.c (final_start_function_1): Include sizes in an error message.
2782         * function.c (frame_offset_overflow): Same.
2783         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2784         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2785         Diagnose unbounded alloca calls only for limits of less than
2786         PTRDIFF_MAX.
2787         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2788         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2789         for alloca(0).
2790         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2791         only for limits of less than PTRDIFF_MAX.
2792         * langhooks-def.h (lhd_handle_option): Change function argument
2793         to HOST_WIDE_INT.
2794         * langhooks.c (lhd_handle_option): Same.
2795         * langhooks.h (handle_option): Same.
2796         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2797         ByteSize flags.
2798         (var_type, var_type_struct): Same.
2799         (var_set): Handle ByteSize flag.
2800         * optc-gen.awk: Add comments to output to ease debugging.  Make
2801         use of HOST_WIDE_INT where appropriate.
2802         * opts-gen-save.awk:  Use %lx to format unsigned long.
2803         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2804         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2805         arguments.  Parse bytes-size suffixes.
2806         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2807         (enum_value_to_arg): Same.
2808         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2809         (handle_option): Adjust.
2810         (generate_option): Change function argument to HOST_WIDE_INT.
2811         (cmdline_handle_error): Adjust.
2812         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2813         (set_option): Change function argument to HOST_WIDE_INT.
2814         (option_enabled): Handle cl_host_wide_int.
2815         (get_option_state): Handle CLVC_SIZE.
2816         (control_warning_option): Same.
2817         * opts.c (common_handle_option): Change function argument to
2818         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2819         OPT_Wvla_larger_than_.
2820         * opts.h (enum cl_var_type): Add an enumerator.
2821         * stor-layout.c (layout_decl): Print a more meaningful warning.
2822         * toplev.c (output_stack_usage): Adjust.
2824 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2826         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2827         call to inline_expand_builtin_string_cmp.
2828         (expand_builtin_strcmp): Likewise.
2829         (expand_builtin_strncmp): Likewise.
2830         (inline_string_cmp): Delete the last parameter, change char_type_node
2831         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2832         two operands.
2833         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2834         the inlining expansion on target where the type of the call has same or
2835         narrower precision than unsigned char.
2837 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2839         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2840         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2841         * common.opt (fsave-optimization-record): New option.
2842         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2843         * doc/invoke.texi (-fsave-optimization-record): New option.
2844         * dumpfile.c: Include "optinfo-emit-json.h".
2845         (struct kv_pair): Move to coretypes.h.
2846         (optgroup_options): Make non-static.
2847         (dump_context::end_scope): Call
2848         optimization_records_maybe_pop_dump_scope.
2849         * dumpfile.h (optgroup_options): New decl.
2850         * json.cc: New file.
2851         * json.h: New file.
2852         * optinfo-emit-json.cc: New file.
2853         * optinfo-emit-json.h: New file.
2854         * optinfo.cc: Include "optinfo-emit-json.h".
2855         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2856         (optinfo_enabled_p): Check optimization_records_enabled_p.
2857         (optinfo_wants_inlining_info_p): Likewise.
2858         * optinfo.h: Update comment.
2859         * profile-count.c (profile_quality_as_string): New function.
2860         * profile-count.h (profile_quality_as_string): New decl.
2861         (profile_count::quality): New accessor.
2862         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2863         and optinfo_emit_json_cc_tests.
2864         * selftest.h (selftest::json_cc_tests): New decl.
2865         (selftest::optinfo_emit_json_cc_tests): New decl.
2866         * toplev.c: Include "optinfo-emit-json.h".
2867         (compile_file): Call optimization_records_finish.
2868         (do_compile): Call optimization_records_start.
2869         * tree-ssa-live.c: Include optinfo.h.
2870         (remove_unused_scope_block_p): Retain inlining information if
2871         optinfo_wants_inlining_info_p returns true.
2873 2018-07-20  Richard Biener  <rguenther@suse.de>
2875         PR debug/86585
2876         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2877         to cover -flto-partition=none.
2879 2018-07-20  Martin Liska  <mliska@suse.cz>
2881         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2882         (get_decl_source_range): Remove unused function.
2884 2018-07-20  Richard Biener  <rguenther@suse.de>
2886         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2887         (struct vn_phi_s): Likewise.
2888         (struct vn_reference_s): Likewise.
2889         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2890         for searching the slot of an entry known to be in the hash itself.
2891         (vn_phi_hasher::equal): Likewise.
2892         (vn_reference_hasher::equal): Likewise.
2893         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2894         globals.
2895         (optimistic_info, current_info): Remove, keeping only valid_info.
2896         (vn_reference_lookup_1): Remove fallback lookup.
2897         (vn_reference_lookup_2): Likewise.
2898         (vn_nary_op_lookup_1): Likewise.
2899         (vn_phi_lookup): Likewise.
2900         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2901         hash element.
2902         (vn_reference_insert): Adjust, chain the inserted hash element
2903         at last_inserted_ref.
2904         (vn_reference_insert_pieces): Likewise.
2905         (visit_reference_op_call): Likewise.
2906         (vn_nary_op_insert_into): Chain the inserted hash element at
2907         last_inserted_nary.
2908         (vn_nary_op_insert_pieces): Adjust.
2909         (vn_nary_op_insert): Likewise.
2910         (vn_nary_op_insert_stmt): Likewise.
2911         (vn_phi_insert): Adjust, chain the inserted hash element at
2912         last_inserted_phi.
2913         (process_scc): Remove clearing and copying the optimistic
2914         table.  Instead remove elements inserted during an optimistic
2915         iteration from the single table we maintain.
2916         (init_scc_vn): Adjust.
2917         (free_scc_vn): Likewise.
2918         (sccvn_dom_walker::record_cond): Likewise.
2919         (sccvn_dom_walker::after_dom_children): Likewise.
2921 2018-07-19  Martin Sebor  <msebor@redhat.com>
2923         PR tree-optimization/84047
2924         PR tree-optimization/83776
2925         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2926         (check_array_bounds): Call it.
2928 2018-07-19  Martin Sebor  <msebor@redhat.com>
2930         * align.h (align_flags): Use member initialization.
2932 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2934         * Makefile.in (OBJS): Add optinfo.o.
2935         * coretypes.h (class symtab_node): New forward decl.
2936         (struct cgraph_node): New forward decl.
2937         (class varpool_node): New forward decl.
2938         * dump-context.h: New file.
2939         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2940         "tree-pass.h".
2941         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2942         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2943         (set_alt_dump_file): Likewise.
2944         (dump_context::~dump_context): New dtor.
2945         (dump_gimple_stmt): Move implementation to...
2946         (dump_context::dump_gimple_stmt): ...this new member function.
2947         Add the stmt to any pending optinfo, creating one if need be.
2948         (dump_gimple_stmt_loc): Move implementation to...
2949         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2950         Start a new optinfo and add the stmt to it.
2951         (dump_gimple_expr): Move implementation to...
2952         (dump_context::dump_gimple_expr): ...this new member function.
2953         Add the stmt to any pending optinfo, creating one if need be.
2954         (dump_gimple_expr_loc): Move implementation to...
2955         (dump_context::dump_gimple_expr_loc): ...this new member function.
2956         Start a new optinfo and add the stmt to it.
2957         (dump_generic_expr): Move implementation to...
2958         (dump_context::dump_generic_expr): ...this new member function.
2959         Add the tree to any pending optinfo, creating one if need be.
2960         (dump_generic_expr_loc): Move implementation to...
2961         (dump_context::dump_generic_expr_loc): ...this new member
2962         function.  Add the tree to any pending optinfo, creating one if
2963         need be.
2964         (dump_printf): Move implementation to...
2965         (dump_context::dump_printf_va): ...this new member function.  Add
2966         the text to any pending optinfo, creating one if need be.
2967         (dump_printf_loc): Move implementation to...
2968         (dump_context::dump_printf_loc_va): ...this new member function.
2969         Start a new optinfo and add the stmt to it.
2970         (dump_dec): Move implementation to...
2971         (dump_context::dump_dec): ...this new member function.  Add the
2972         value to any pending optinfo, creating one if need be.
2973         (dump_context::dump_symtab_node): New member function.
2974         (dump_context::get_scope_depth): New member function.
2975         (dump_context::begin_scope): New member function.
2976         (dump_context::end_scope): New member function.
2977         (dump_context::ensure_pending_optinfo): New member function.
2978         (dump_context::begin_next_optinfo): New member function.
2979         (dump_context::end_any_optinfo): New member function.
2980         (dump_context::s_current): New global.
2981         (dump_context::s_default): New global.
2982         (dump_scope_depth): Delete global.
2983         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2984         (dump_symtab_node): New function.
2985         (get_dump_scope_depth): Reimplement in terms of dump_context.
2986         (dump_begin_scope): Likewise.
2987         (dump_end_scope): Likewise.
2988         (selftest::temp_dump_context::temp_dump_context): New ctor.
2989         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2990         (selftest::verify_item): New function.
2991         (ASSERT_IS_TEXT): New macro.
2992         (ASSERT_IS_TREE): New macro.
2993         (ASSERT_IS_GIMPLE): New macro.
2994         (selftest::test_capture_of_dump_calls): New test.
2995         (selftest::dumpfile_c_tests): Call it.
2996         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2997         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2998         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2999         descriptive comment.
3000         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3001         (dump_node, dump_bb): Move these unrelated decls.
3002         (class dump_manager): Add leading comment.
3003         * optinfo.cc: New file.
3004         * optinfo.h: New file.
3006 2018-07-19  Michael Collison  <michael.collison@arm.com>
3007             Richard Henderson <rth@redhat.com>
3009         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3010         (subti): Handle op1 zero.
3011         (subvti4, usub4ti4): New.
3012         (*sub<GPI>3_compare1_imm): New.
3013         (sub<GPI>3_carryinCV): New.
3014         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3015         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3017 2018-07-19  Michael Collison  <michael.collison@arm.com>
3018             Richard Henderson <rth@redhat.com>
3020         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3021         (addti3): Create simpler code if low part is already known to be 0.
3022         (addvti4, uaddvti4): New.
3023         (*add<GPI>3_compareC_cconly_imm): New.
3024         (*add<GPI>3_compareC_cconly): New.
3025         (*add<GPI>3_compareC_imm): New.
3026         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3027         handle constants within this pattern..
3028         (*add<GPI>3_compareV_cconly_imm): New.
3029         (*add<GPI>3_compareV_cconly): New.
3030         (*add<GPI>3_compareV_imm): New.
3031         (add<GPI>3_compareV): New.
3032         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3033         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3034         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3035         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3036         with 'comparison' operator.
3037         (*add<GPI>3_compareV_cconly_imm): Ditto.
3038         (*add<GPI>3_compareV_cconly): Ditto.
3039         (*add<GPI>3_compareV_imm): Ditto.
3040         (add<GPI>3_compareV): Ditto.
3041         (add<mode>3_carryinC): Ditto.
3042         (*add<mode>3_carryinC_zero): Ditto.
3043         (*add<mode>3_carryinC): Ditto.
3044         (add<mode>3_carryinV): Ditto.
3045         (*add<mode>3_carryinV_zero): Ditto.
3046         (*add<mode>3_carryinV): Ditto.
3048 2018-07-19  Michael Collison  <michael.collison@arm.com>
3049             Richard Henderson <rth@redhat.com>
3051         * config/aarch64/aarch64-modes.def (CC_V): New.
3052         * config/aarch64/aarch64-protos.h
3053         (aarch64_addti_scratch_regs): Declare
3054         (aarch64_subvti_scratch_regs): Declare.
3055         (aarch64_expand_subvti): Declare.
3056         (aarch64_gen_unlikely_cbranch): Declare
3057         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3058         for signed overflow using CC_Vmode.
3059         (aarch64_get_condition_code_1): Handle CC_Vmode.
3060         (aarch64_gen_unlikely_cbranch): New function.
3061         (aarch64_addti_scratch_regs): New function.
3062         (aarch64_subvti_scratch_regs): New function.
3063         (aarch64_expand_subvti): New function.
3065 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3067         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3068         extension.
3069         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3070         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3071         extension.
3073 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3075         PR target/83009
3076         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3077         address check not strict.
3079 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3081         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3082         Umq with Umn.
3083         (store_pair_lanes<mode>): Likewise.
3084         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3085         enum value 'ADDR_QUERY_LDP_STP_N'.
3086         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3087         (aarch64_print_address_internal): Add declaration.
3088         (aarch64_print_ldpstp_address): Remove.
3089         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3090         (aarch64_print_operand): Change printing of 'y'.
3091         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3092         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3093         'true' rather than '1'.
3094         * config/aarch64/constraints.md (Uml): Likewise.
3095         (Uml): Rename to Umn.
3096         (Umq): Remove.
3098 2018-07-19  Richard Biener  <rguenther@suse.de>
3100         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3101         a trailing array.
3102         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3103         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3104         (vn_reference_hasher): Likewise.
3105         (struct vn_tables_s): Remove obstack and alloc-pool members.
3106         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3107         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3108         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3109         (vn_reference_insert_pieces): Likewise.
3110         (alloc_vn_nary_op_noinit): Adjust.
3111         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3112         (vn_phi_eq): Adjust.
3113         (shared_lookup_phiargs): Remove.
3114         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3115         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3116         (visit_reference_op_call): Likewise.
3117         (copy_nary, copy_phi, copy_reference): Remove.
3118         (process_scc): Rewind the obstack when iterating.  Do not
3119         copy the elements to valid_info but just move them from one
3120         hashtable to the other.
3121         (allocate_vn_table): Adjust.
3122         (free_vn_table): Likewise.
3123         (init_scc_vn): Likewise.
3124         (free_scc_vn): Likewise.
3126 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3128         PR target/86560
3129         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3130         indirect_return as function type attribute.
3131         (ix86_attribute_table): Change indirect_return to function
3132         type attribute.
3133         * doc/extend.texi: Update indirect_return attribute.
3135 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3137         * wide-int.h (widest2_int): New.
3138         * gimple-fold.c (arith_overflowed_p): Use it.
3139         * tree.h (widest2_int_cst): New.
3140         * tree-vrp.c (wide_int_binop_overflow): Rename from
3141         vrp_int_const_binop.
3142         Rewrite to work on trees.
3143         (extract_range_from_multiplicative_op_1): Abstract code to...
3144         (wide_int_range_min_max): ...here.
3145         (wide_int_range_cross_product): ...and here.
3146         (extract_range_from_binary_expr_1): Abstract overflow code to...
3147         (wide_int_range_mult_wrapping): ...here.
3148         * tree-vrp.h (wide_int_range_cross_product): New.
3149         (wide_int_range_mult_wrapping): New.
3151 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3152             Julia Koval  <julia.koval@intel.com>
3154         * config/i386/x86-tune-costs.h (skylake_memcpy,
3155         skylake_memset): Replace rep_prefix with unrolling for size 512.
3157 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3159         PR middle-end/86544
3160         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3161         comparision with EQ_EXPR in last stmt.
3163 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3165         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3166         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3167         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3168         previously known as "PowerPC AltiVec Built-in Functions".  Move
3169         some material to new subsubsections "PowerPC AltiVec Built-in
3170         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3171         ISA 2.07".
3172         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3173         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3174         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3175         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3177 2018-07-18  Richard Biener  <rguenther@suse.de>
3179         PR tree-optimization/86557
3180         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3181         EXACT_DIV_EXPR.
3183 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3185         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3187 2018-07-17  Jeff Law  <law@redhat.com>
3189         * config/arm/arm.c (get_label_padding): Update for recent
3190         changes to label_to_alignment.
3192         PR tree-optimization/86010
3193         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3195         * config/mips/mips.c (vr4130_align_insns): Update for recent
3196         changes to label_to_alignment.
3198         * config/frv/frv.c (frv_label_align): Update for recent changes
3199         to label_to_alignment.
3201         * config/nios2/nios2.c (nios2_label_align): Update for recent
3202         changes which dropped ALIGN_LABELS_LOG.
3204 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3206         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3207         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3209 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3211         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3212         deprecated align_labels_log.
3214 2018-07-17  Richard Biener  <rguenther@suse.de>
3216         PR lto/86456
3217         * dwarf2out.c (init_sections_and_labels): Always generate
3218         a debug_line_str_section for early LTO debug.
3219         (dwarf2out_finish): Reset debug_line_str_hash output early.
3220         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3221         with fat LTO part.
3222         (dwarf2out_early_finish): Output debug_line_str.
3224 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3226         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3227         index register on z196 or later.
3229 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3231         * config/s390/s390.c (s390_default_align): Set default function
3232         alignment to 16.
3233         (s390_override_options_after_change): Call s390_default align.
3234         (s390_option_override_internal): Call s390_default_align.
3235         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3237 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3239         PR middle-end/86542
3240         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3241         to _looptemp_ clauses, other than the first two.
3243 2018-07-17  Martin Liska  <mliska@suse.cz>
3245         * opts.c: Do not enable OPT_falign_* for -Os.
3247 2018-07-17  Martin Liska  <mliska@suse.cz>
3249         * align.h (MAX_CODE_ALIGN): New.
3250         (MAX_CODE_ALIGN_VALUE): New.
3251         * common/config/i386/i386-common.c (ix86_handle_option):
3252         (MAX_CODE_ALIGN): Moved to align.h.
3253         * final.c (MAX_CODE_ALIGN): Likewise.
3254         * opts.c (parse_and_check_align_values):
3255         (MAX_CODE_ALIGN): Likewise.
3256         (MAX_CODE_ALIGN_VALUE): Likewise.
3258 2018-07-17  Martin Liska  <mliska@suse.cz>
3260         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3261         in order to fulfil coding style.
3262         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3263         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3264         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3265         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3266         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3267         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3268         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3269         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3270         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3272 2018-07-17  Martin Liska  <mliska@suse.cz>
3274         * align.h: New file.
3275         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3276         directly.
3277         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3278         align_flags of label_to_alignment.
3279         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3280         align_flags class.
3281         * config/m68k/m68k.c: Do not use removed align_labels_value and
3282         align_loops_value.
3283         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3284         (LOOP_ALIGN): Likewise.
3285         (LABEL_ALIGN): Likewise.
3286         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3287         Remove not used macro.
3288         (rs6000_loop_align): Change return type to align_flags.
3289         (rs6000_loop_align_max_skip): Remove.
3290         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3291         Change return type to align_flags.
3292         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3293         Remove not used macro.
3294         (rs6000_loop_align):  Change return type to align_flags.
3295         (rs6000_loop_align_max_skip): Remove.
3296         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3297         * config/rx/rx-protos.h (rx_align_for_label): Make it
3298         static function.
3299         * config/rx/rx.c (rx_align_for_label): Change return type
3300         to align_flags.
3301         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3302         macro definitions.
3303         into align_flags class.
3304         (LABEL_ALIGN): Likewise.
3305         (LOOP_ALIGN): Likewise.
3306         * config/s390/s390.c (s390_label_align): Use align_flags
3307         class member.
3308         (s390_asm_output_function_label): Likewise.
3309         * config/sh/sh.c (sh_override_options_after_change):
3310         Use align_flags class directly without macros.
3311         (find_barrier): Likewise.
3312         (barrier_align): Likewise.
3313         (sh_loop_align): Likewise.
3314         * config/spu/spu.c (spu_option_override):
3315         Use align_flags_tuple::get_value instead of removed macros.
3316         (spu_sched_init): Likewise.
3317         * config/spu/spu.h (GTY): Likewise.
3318         * config/visium/visium.c (visium_option_override):
3319         Set "8" as default secondary alignment.
3320         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3321         in order to guarantee secondary alignment of 8.
3322         * coretypes.h: Include align.h header file.
3323         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3324         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3325         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3326         * doc/tm.texi.in: Likewise.
3327         * final.c (struct label_alignment): Remove not used structure.
3328         (LABEL_ALIGN): Change type to align_flags.
3329         (LOOP_ALIGN): Likewise.
3330         (JUMP_ALIGN): Likewise.
3331         (default_loop_align_max_skip): Remove.
3332         (default_label_align_max_skip): Likewise.
3333         (default_jump_align_max_skip): Likewise.
3334         (default_label_align_after_barrier_max_skip):
3335         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3336         (LABEL_TO_MAX_SKIP): Remove.
3337         (label_to_alignment): Return align_flags type instead of integer.
3338         (label_to_max_skip): Remove.
3339         (align_fuzz): Use align_flags type.
3340         (compute_alignments): Use align_flags type and use align_flags::max
3341         to combine multiple alignments.
3342         (grow_label_align): Grow vec instead of C array.
3343         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3344         (shorten_branches):  Use align_flags type and use align_flags::max
3345         to combine multiple alignments.
3346         (final_scan_insn_1): Remove usage of secondary alignment that comes
3347         from label alignment, but instead use proper secondary alignment
3348         which is computed in grow_label_align.
3349         * flags.h (struct align_flags_tuple): Move to align.h.
3350         (struct align_flags): Likewise.
3351         (state_align_loops): Rename to align_loops.
3352         (state_align_jumps): Rename to align_jumps.
3353         (state_align_labels): Rename to align_labels.
3354         (state_align_functions): Rename to align_functions.
3355         (align_loops_log): Remove.
3356         (align_jumps_log): Remove.
3357         (align_labels_log): Remove.
3358         (align_functions_log): Remove.
3359         (align_loops_max_skip): Remove.
3360         (align_jumps_max_skip): Remove.
3361         (align_labels_max_skip): Remove.
3362         (align_functions_max_skip): Remove.
3363         (align_loops_value): Remove.
3364         (align_jumps_value): Remove.
3365         (align_labels_value): Remove.
3366         (align_functions_value): Remove.
3367         * output.h (label_to_alignment): Change return type to align_flags.
3368         (label_to_max_skip): Remove.
3369         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3370         jump_align_max_skip macros.
3371         * targhooks.h (default_loop_align_max_skip): Remove.
3372         (default_label_align_max_skip): Likewise.
3373         (default_jump_align_max_skip): Likewise.
3374         (default_label_align_after_barrier_max_skip): Remove.
3375         * toplev.c (read_log_maxskip): Use ::normalize function.
3376         (parse_N_M): Remove not used argument and also call ::normalize.
3377         (parse_alignment_opts): Do not pass unused arguments.
3378         * varasm.c (assemble_start_function): Use directly align_functions
3379         instead of removed macros.
3380         * system.h: Do not poison removed macros.
3382 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3384         PR middle-end/86539
3385         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3386         and cond temporaries don't have reference type if iterator has
3387         pointer type.  For init use &for_pre_body instead of pre_p if
3388         for_pre_body is non-empty.
3390 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3392         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3393         double-double modes to SFmode directly directly.
3394         (trunc<mode>sf2_fprs): Delete.
3396 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3398         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3399         for conversions between IFmode and the decimal floating point modes.
3400         (init_float128_ieee): Use the correct names for conversions between
3401         KFmode and the decimal floating point modes.
3403 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3405         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3406         for the conversions between TDmode and IFmode.
3407         (init_float128_ieee): Use more correct names for the conversions
3408         between TDmode and KFmode.
3410 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3412         PR tree-optimization/86526
3413         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3414         (inline_expand_builtin_string_cmp): Likewise.
3415         (inline_string_cmp): Likewise.  Use c_readstr instead of
3416         builtin_memcpy_read_str.  Add unit_mode temporary.
3418 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3420         PR middle-end/86528
3421         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3422         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3424 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3426         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3427         Alphabetize prototypes of built-in functions, separating out
3428         built-in functions that are listed in this section but should be
3429         described elsewhere.
3431 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3433         PR target/86511
3434         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3435         conditional move when trapping comparison was split to a
3436         non-trapping one (and vice versa).
3438 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3440         * config/s390/s390.c (s390_function_profiler): Generate nops
3441         instead of profiler call sequences.
3442         * config/s390/s390.opt: Add the new option.
3444 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3446         * config/s390/s390.c (s390_function_profiler): Generate
3447         __mcount_loc section.
3448         * config/s390/s390.opt: Add the new option.
3450 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3452         * common.opt: Add the new warning.
3453         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3454         %r0,__fentry__" when -mfentry is specified.
3455         (s390_option_override_internal): Disallow -mfentry for 31-bit
3456         CPUs.
3457         * config/s390/s390.opt: Add the new option.
3459 2018-07-16  Richard Biener  <rguenther@suse.de>
3461         PR lto/86523
3462         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3463         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3465 2018-07-16  Martin Liska  <mliska@suse.cz>
3467         PR ipa/86529
3468         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3469         to ::get_create.
3471 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3473         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3475 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3477         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3478         for ARCHS4x.
3479         * config/arc/arc-cpus.def (hs4x): New cpu.
3480         (hs4xd): Likewise.
3481         * config/arc/arc-tables.opt: Regenerate.
3482         * config/arc/arc.c (arc_sched_issue_rate): New function.
3483         (TARGET_SCHED_ISSUE_RATE): Define.
3484         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3485         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3486         fpu_cvt.
3487         (attr tune): Add ARCHS4x tune values.
3488         (attr tune_dspmpy): Define.
3489         (*tst): Correct instruction type.
3490         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3491         * config/arc/arcHS4x.md: New file.
3492         * config/arc/fpu.md: Update instruction type attributes.
3493         * config/arc/t-multilib: Regenerate.
3495 2018-07-16  Tom de Vries  <tdevries@suse.de>
3497         PR debug/86455
3498         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3500 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3502         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3503         early clobber.
3505 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3507         PR tree-optimization/86514
3508         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3509         conversion to a boolean type from a type with greater precision.
3511 2018-07-16  Tom de Vries  <tdevries@suse.de>
3513         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3514         dump_flags request TDF_SLIM.
3516 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3518         * fold-const.c (int_const_binop_1): Abstract...
3519         (wide_int_binop): ...wide int code here.
3520         (poly_int_binop): ...poly int code here.
3521         Abstract the rest of int_const_binop_1 into int_const_binop.
3522         * fold-const.h (wide_int_binop): New.
3523         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3524         Remove useless PLUS/MINUS_EXPR case.
3525         (zero_nonzero_bits_from_vr): Move wide int code...
3526         (zero_nonzero_bits_from_bounds): ...here.
3527         (extract_range_from_binary_expr_1): Move mask optimization code...
3528         (range_easy_mask_min_max): ...here.
3529         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3530         (range_easy_mask_min_max): New.
3532 2018-07-15  Jeff Law  <law@redhat.com>
3534         PR target/85993
3535         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3536         block.
3538 2018-07-14  Jim Wilson  <jimw@sifive.com>
3540         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3542 2018-07-14  Paul Koning  <ni1d@arrl.net>
3544         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3546 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3548         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3549         copying section.
3551 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3552             Steve Munroe  <munroesj52@gmail.com>
3554         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3555         (_mm_andnot_si128): Likewise.
3556         (_mm_or_si128): Likewise.
3557         (_mm_xor_si128): Likewise.
3559 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3561         PR middle-end/78809
3562         * builtins.c (expand_builtin_memcmp): Inline the calls first
3563         when result_eq is false.
3564         (expand_builtin_strcmp): Inline the calls first.
3565         (expand_builtin_strncmp): Likewise.
3566         (inline_string_cmp): New routine. Expand a string compare
3567         call by using a sequence of char comparison.
3568         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3569         a call to str(n)cmp/memcmp.
3570         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3571         New option.
3572         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3574 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3576         * config/arm/driver-arm.c: Include arm-native.h.
3577         (host_detect_local_cpu): Use auto-generated data tables.
3578         (vendors, arm_cpu_table): Delete.  Move part information to ...
3579         * config/arm/arm-cpus.in: ... here.
3580         * config/arm/parsecpu.awk (gen_native): New function.
3581         (vendor, part): New CPU fields.
3582         (END): Add support for building the native CPU detection tables.
3583         * config/arm/t-arm (arm-native.h): Add build rule.
3584         (driver-arm.o): Add dependency on arm-native.h.
3586 2018-07-13  Richard Biener  <rguenther@suse.de>
3588         PR middle-end/85974
3589         * match.pd (addr1 - addr2): Allow either of the operand to
3590         have a conversion.
3592 2018-07-13  Tom de Vries  <tdevries@suse.de>
3594         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3595         in remap_ssa_name.
3597 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3599         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3600         arrays instead of numbered variables.
3602 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3604         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3605         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3607 2018-07-13  Richard Biener  <rguenther@suse.de>
3609         PR debug/86452
3610         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3611         instead of get_context_die.
3613 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3614             Richard Biener  <rguenther@suse.de>
3616         PR middle-end/86489
3617         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3618         that the loop latch destination where phi is defined.
3620 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3622         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3623         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3624         (riscv_set_current_function): Extract getting interrupt type to new
3625         function.
3626         (riscv_get_interrupt_type): New function.
3627         (riscv_merge_decl_attributes): New function, checking interrupt type is
3628         same.
3629         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3631 2018-07-12  Paul Koning  <ni1d@arrl.net>
3633         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3634         directive.
3636 2018-07-12  Paul Koning  <ni1d@arrl.net>
3638         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3639         zero reference, add doloop_end instead.
3640         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3641         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3642         detail for doloop_end.
3644 2018-07-12  Martin Sebor  <msebor@redhat.com>
3646         PR c/86453
3647         * attribs.c (decl_attributes): Reject conflicting attributes before
3648         calling attribute handlers.
3650 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3652         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3653          parameter.
3654         (gcc::dump_manager::get_dump_file_name): likewise.
3655         (dump_begin): Likewise.
3656         * dumpfile.h (dump_begin): Update prototype.
3657         (gcc::dump_manager::get_dump_file_name,
3658         gcc::dump_manager::get_dump_file_name): Update prototype.
3660 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3662         * internal-fn.h (vectorizable_internal_fn_p): New function.
3663         * tree-vect-slp.c (compatible_calls_p): Likewise.
3664         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3665         to internal functions.
3666         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3668 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3670         * fold-const.h (inverse_conditions_p): Declare.
3671         * fold-const.c (inverse_conditions_p): New function.
3672         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3673         that test the inverse condition of a conditional internal function.
3674         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3675         * internal-fn.c (internal_fn_mask_index): Handle conditional
3676         internal functions.
3677         (vectorized_internal_fn_supported_p): New function.
3678         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3679         (any_pred_load_store): Replace with...
3680         (need_to_predicate): ...this new variable.
3681         (redundant_ssa_names): New variable.
3682         (ifcvt_can_use_mask_load_store): Move initial checks to...
3683         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3684         for which a conditional internal function exists.
3685         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3686         instead of ifcvt_can_use_mask_load_store.  Update after variable
3687         name change.
3688         (predicate_load_or_store): New function, split out from
3689         predicate_mem_writes.
3690         (check_redundant_cond_expr): New function.
3691         (value_available_p): Likewise.
3692         (predicate_rhs_code): Likewise.
3693         (predicate_mem_writes): Rename to...
3694         (predicate_statements): ...this.  Use predicate_load_or_store
3695         and predicate_rhs_code.
3696         (combine_blocks, tree_if_conversion): Update after above name changes.
3697         (ifcvt_local_dce): Handle redundant_ssa_names.
3698         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3699         general conditional functions.
3700         * tree-vect-stmts.c (vectorizable_call): Likewise.
3702 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3703             Alan Hayward  <alan.hayward@arm.com>
3704             David Sherwood  <david.sherwood@arm.com>
3706         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3707         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3708         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3709         plus and minus and convert them into IFN_COND_FMA-based sequences.
3710         (convert_mult_to_fma): Handle conditional plus and minus.
3712 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3714         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3715         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3716         (cond_fnms_optab): New optabs.
3717         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3718         internal functions.
3719         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3720         * internal-fn.h (get_conditional_internal_fn): Declare.
3721         (get_unconditional_internal_fn): Likewise.
3722         * internal-fn.c (cond_ternary_direct): New macro.
3723         (expand_cond_ternary_optab_fn): Likewise.
3724         (direct_cond_ternary_optab_supported_p): Likewise.
3725         (FOR_EACH_COND_FN_PAIR): Likewise.
3726         (get_conditional_internal_fn): New function.
3727         (get_unconditional_internal_fn): Likewise.
3728         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3729         (gimple_match_op::gimple_match_op): Add a new overload for 5
3730         operands.
3731         (gimple_match_op::set_op): Likewise.
3732         (gimple_resimplify5): Declare.
3733         * genmatch.c (decision_tree::gen): Generate simplifications for
3734         5 operands.
3735         * gimple-match-head.c (gimple_simplify): Define an overload for
3736         5 operands.  Handle calls with 5 arguments in the top-level overload.
3737         (convert_conditional_op): Handle conversions from unconditional
3738         internal functions to conditional ones.
3739         (gimple_resimplify5): New function.
3740         (build_call_internal): Pass a fifth operand.
3741         (maybe_push_res_to_seq): Likewise.
3742         (try_conditional_simplification): Try converting conditional
3743         internal functions to unconditional internal functions.
3744         Handle 3-operand unconditional forms.
3745         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3746         Define ternary equivalents of the current rules for binary conditional
3747         internal functions.
3748         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3749         ternary operations.
3750         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3751         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3752         (optab): Handle them.
3753         (SVE_COND_FP_TERNARY): New int iterator.
3754         (sve_fmla_op, sve_fmad_op): New int attributes.
3755         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3756         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3757         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3759 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3761         * target.def (preferred_else_value): New target hook.
3762         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3763         * doc/tm.texi: Regenerate.
3764         * targhooks.h (default_preferred_else_value): Declare.
3765         * targhooks.c (default_preferred_else_value): New function.
3766         * internal-fn.h (conditional_internal_fn_code): Declare.
3767         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3768         (get_conditional_internal_fn): Use it.
3769         (conditional_internal_fn_code): New function.
3770         * gimple-match.h (gimple_match_cond): New struct.
3771         (gimple_match_op): Add a cond member function.
3772         (gimple_match_op::gimple_match_op): Update all forms to take a
3773         gimple_match_cond.
3774         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3775         for the suboperation, but don't specify a particular else_value.
3776         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3777         (visit_nary_op, visit_reference_op_load): Pass
3778         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3779         * gimple-match-head.c: Include tree-eh.h
3780         (convert_conditional_op): New function.
3781         (maybe_resimplify_conditional_op): Likewise.
3782         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3783         (gimple_resimplify2): Likewise.
3784         (gimple_resimplify3): Likewise.
3785         (gimple_resimplify4): Likewise.
3786         (maybe_push_res_to_seq): Return null for conditional operations.
3787         (try_conditional_simplification): New function.
3788         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3789         constructor.
3790         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3791         IFN_COND_* call.
3792         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3793         function.
3794         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3796 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3798         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3799         DECL_FCONTEXT
3800         (hash_tree): Do not hash DECL_FCONTEXT
3801         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3802         Do not stream DECL_FCONTEXT.
3803         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3804         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3806 2018-07-12  Richard Biener  <rguenther@suse.de>
3808         PR debug/86462
3809         * dwarf2out.c (gen_block_die): Only output blocks when they have
3810         at least one !DECL_IGNORED_P variable.
3812 2018-07-12  Richard Biener  <rguenther@suse.de>
3814         PR target/84829
3815         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3816         Remove -mieee-fp handling.
3818 2018-07-12  Richard Biener  <rguenther@suse.de>
3820         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3821         left-over from last patch.
3823 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3825         PR tree-optimization/86492
3826         * gimple-ssa-store-merging.c
3827         (imm_store_chain_info::coalesce_immediate_stores): Call
3828         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3830 2018-07-12  Richard Biener  <rguenther@suse.de>
3832         PR middle-end/86479
3833         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3834         move possibly trapping operations into the conditional.
3836 2018-07-12  Richard Biener  <rguenther@suse.de>
3838         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3839         (vn_lookup_simplify_result): Remove recursion limit applied
3840         here.
3841         (vn_nary_build_or_lookup_1): Adjust.
3842         (try_to_simplify): Likewise.
3843         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3844         here.
3845         (gimple_resimplify2): Likewise.
3846         (gimple_resimplify3): Likewise.
3847         (gimple_resimplify4): Likewise.
3849 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3851         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3852         Use __mmask64 type instead of __mmask8 for __M argument.
3853         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3854         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3855         __U argument.
3856         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3857         __mmask16 for __M argument.
3858         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3859         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3860         to __mmask16 instead of __mmask8.
3861         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3862         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3863         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3864         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3865         instead of __mmask16 for __U argument.
3866         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3867         __mmask16 instead of __mmask8 for __U argument.
3868         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3869         __U argument.
3870         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3871         __mmask16.
3872         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3873         argument.
3874         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3875         __U argument.
3876         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3877         __mmask16.
3878         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3879         of __mmask16.
3880         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3881         __U argument.
3882         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3883         __U argument.
3884         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3885         __U argument.
3886         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3887         __U argument.
3888         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3889         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3890         return type as well as __M argument type and all casts from __mmask8
3891         to __mmask32.
3892         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3893         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3894         return type as well as __M argument type and all casts from __mmask8
3895         to __mmask16.
3896         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3897         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3898         return type as well as __M argument type and all casts from __mmask8
3899         to __mmask32.
3900         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3901         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3902         return type as well as __M argument type and all casts from __mmask8
3903         to __mmask16.
3904         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3905         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3906         __mmask16.
3908 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3910         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3911         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3912         for __U argument.
3914 2018-07-11  Paul Koning  <ni1d@arrl.net>
3916         * doc/md.texi (define_subst): Document how multiple occurrences of
3917         the same argument in the replacement pattern are handled.
3919 2018-07-11  Paul Koning  <ni1d@arrl.net>
3921         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3922         alphabetical order.
3923         (Common Type Attributes): Add "mode" attribute.
3925 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3927         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3928         stream DECL_ORIGINAL_TYPE.
3929         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3930         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3931         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3932         Do not walk original type.
3933         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3934         external decls.
3935         (write_ts_decl_non_common_tree_pointers): Do not stream
3936         DECL_ORIGINAL_TYPE
3937         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3938         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3940 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3942         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3943         thread twice from the same starting edge.
3945 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3947         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3948         * gimple.c (gimple_call_nonnull_result_p): ...here...
3949         (gimple_call_nonnull_arg): ...and here.
3950         * gimple.h (gimple_call_nonnull_result_p): New.
3951         (gimple_call_nonnull_arg): New.
3953 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3955         * config/arm/arm-cpus.in: Move information from fpu field of each
3956         cpu definition to the isa field.
3957         * config/arm/parsecpu.awk (fpu): Delete match rule.
3958         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3960 2018-07-11  Richard Biener  <rguenther@suse.de>
3962         PR debug/86457
3963         * dwarf2out.c (init_sections_and_labels): Use
3964         output_asm_line_debug_info consistently.
3965         (dwarf2out_early_finish): Likewise.
3966         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3967         type units.
3969 2018-07-11  Richard Biener  <rguenther@suse.de>
3971         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3972         Rework father_bb setting in a way to avoid propagating constants
3973         multiple times on a loop body.
3975 2018-07-10  Mark Wielaard  <mark@klomp.org>
3977         PR debug/86459
3978         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3980 2018-07-10  Richard Biener  <rguenther@suse.de>
3982         * hash-map.h (hash_map::iterator::operator*): Return
3983         references to key and value.
3985 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3987         PR c++/86443
3988         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3989         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3990         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3991         (gimplify_omp_for): For composite loops, move outer
3992         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3993         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3994         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3995         TREE_LIST for both the original class iterator and the "last" helper
3996         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3997         loop, remember has_decl_expr from outer composite loops for the
3998         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4000 2018-07-09  Martin Sebor  <msebor@redhat.com>
4002         PR middle-end/77357
4003         PR middle-end/86428
4004         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4005         accessing implicitly initialized array elements.
4006         * expr.c (string_constant): Handle string initializers of
4007         character arrays within aggregates.
4008         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4009         Store element offset.  As a special case, handle zero size.
4010         (fold_nonarray_ctor_reference): Same.
4011         (fold_ctor_reference): Add argument.  Store subobject offset.
4012         * gimple-fold.h (fold_ctor_reference): Add argument.
4014 2018-07-09  Paul Koning  <ni1d@arrl.net>
4016         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4017         (pdp11_insn_cost): New function.
4018         (pdp11_md_asm_adjust): New function.
4019         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4020         (pdp11_rtx_costs): Update to match machine better.
4021         (output_addr_const_pdp11): Correct format mismatch warnings.
4022         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4023         * config/pdp11/pdp11.md: General change to add base_cost and/or
4024         length attributes for use by new pdp11_insn_cost function.
4025         (MIN_BRANCH): Correct definition.
4026         (MIN_SOB): Ditto.
4027         (doloop_end): Use standard pattern name for looping pattern.
4028         (doloop_end_nocc): New.
4029         (movsf): Add another constraint alternative.
4030         (zero_extendqihi2): Add constraint alternatives for not in place
4031         extend.
4032         (zero_extendhisi2): Remove.
4033         (shift patterns): Add CC handling variants.
4034         (bswaphi2): New.
4035         (bswapsi2): New.
4036         (rothi3): New.
4037         (define_peephole2): New peephole to recognize mov that sets CC for
4038         subsequent test.
4040 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4042         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4043         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4044         wi::add.
4046 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4048         PR c/86420
4049         * real.c (real_nextafter): Return true if result is denormal.
4051 2018-07-09  Martin Liska  <mliska@suse.cz>
4053         * common.opt: Add back wrongly removed attribute.
4055 2018-07-09  Richard Biener  <rguenther@suse.de>
4057         PR debug/86413
4058         * dwarf2out.c (gen_block_die): For an early generated DIE
4059         always output high/low PC attributes.
4061 2018-07-09  Tom de Vries  <tdevries@suse.de>
4063         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4064         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4065         onto VAR_DECL with abstract origin.
4067 2018-07-07  Jim Wilson  <jimw@sifive.com>
4069         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4071 2018-07-07  Tom de Vries  <tdevries@suse.de>
4073         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4075 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4077         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4078         overflow_type.
4079         (combine_bound): Use wide-int overflow calculation instead of
4080         rolling our own.
4081         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4082         overflow_type.
4083         * fold-const.c (int_const_binop_2): Same.
4084         (extract_muldiv_1): Same.
4085         (fold_div_compare): Same.
4086         (fold_abs_const): Same.
4087         * match.pd: Same.
4088         * poly-int.h (add): Same.
4089         (sub): Same.
4090         (neg): Same.
4091         (mul): Same.
4092         * predict.c (predict_iv_comparison): Same.
4093         * profile-count.c (slow_safe_scale_64bit): Same.
4094         * simplify-rtx.c (simplify_const_binary_operation): Same.
4095         * tree-chrec.c (tree_fold_binomial): Same.
4096         * tree-data-ref.c (split_constant_offset_1): Same.
4097         * tree-if-conv.c (idx_within_array_bound): Same.
4098         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4099         * tree-ssa-phiopt.c (minmax_replacement): Same.
4100         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4101         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4102         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4103         * wide-int.cc (wi::add_large): Same.
4104         (wi::mul_internal): Same.
4105         (wi::sub_large): Same.
4106         (wi::divmod_internal): Same.
4107         * wide-int.h: Change overflow type to overflow_type for neg, add,
4108         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4109         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4110         mul_internal, divmod_internal.
4111         (overflow_type): New enum.
4112         (accumulate_overflow): New.
4114 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4116         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4117         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4119 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4121         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4122         argument is checked for zero before entering loop, avoid checking again.
4124 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4126         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4127         * gimplify.h (generic_expr_could_trap_p): Likwise.
4128         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4130 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4132         PR tree-optimization/86401
4133         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4134         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4135         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4136         * fold-const.h (fold_bit_and_mask): Declare.
4137         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4139 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4141         PR target/86324
4142         * target.def (translate_mode_attribute): New hook.
4143         * targhooks.h (default_translate_mode_attribute): Declare.
4144         * targhooks.c (default_translate_mode_attribute): New function.
4145         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4146         * doc/tm.texi: Regenerate.
4147         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4148         (rs6000_translate_mode_attribute): New function.
4150 2018-07-06  Paul Koning  <ni1d@arrl.net>
4152         * doc/md.texi (define_split): Document DONE and FAIL.
4153         (define_peephole2): Ditto.
4155 2018-07-05  Jeff Law  <law@redhat.com>
4157         PR tree-optimization/86010
4158         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4159         both the head and tail of mem* and str* calls.
4161 2018-07-05  Jim Wilson  <jimw@sifive.com>
4163         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4165 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4167         * config/aarch64/aarch64-simd.md: correct flags text for
4168         MIN_EXPR replacement.
4170 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4172         * configure: Regenerated.
4174 2018-07-05  Carl Love  <cel@us.ibm.com>
4176         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4177         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4178         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4179         VSX_BUILTIN_DOUBLEL_V4SF.
4181 2018-07-05  Martin Sebor  <msebor@redhat.com>
4183         PR c++/86400
4184         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4185         than its domain to compute its the upper bound of a char array.
4187 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4189         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4190         * doc/cpp.texi: Update comment.
4191         * doc/tm.texi: Rebuilt.
4192         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4193         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4194         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4195         headers affected by extern "C".
4196         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4197         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4198         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4199         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4200         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4201         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4202         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4203         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4204         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4205         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4206         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4207         config/sparc/sp64-elf.h, config/spu/spu.h,
4208         config/stormy16/stormy16.h, config/v850/v850.h,
4209         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4210         define NO_IMPLICIT_EXTERN_C.
4211         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4213 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4215         PR target/84711
4216         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4217         instead of GET_MODE_SIZE when comparing Units.
4219 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4221         PR target/84711
4222         * rtlanal.c (set_noop_p): Constrain on mode change,
4223         include hard-reg-set.h
4225 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4227         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4229 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4231         Revert
4232         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4234         PR sanitizer/84250
4235         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4236         libasan.
4237         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4239 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4241         PR sanitizer/84250
4242         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4243         libasan.
4244         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4246 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4248         PR middle-end/86380
4249         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4251 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4253         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4254         neg_*_op* variables.
4256 2018-07-04  Martin Liska  <mliska@suse.cz>
4258         * tree-switch-conversion.c: Define
4259         max_ratio_for_speed and max_ratio_for_size constants.
4261 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4262             Martin Liska  <mliska@suse.cz>
4264         PR middle-end/66240
4265         PR target/45996
4266         PR c/84100
4267         * common.opt: Rename align options with 'str_' prefix.
4268         * common/config/i386/i386-common.c (set_malign_value): New
4269         function.
4270         (ix86_handle_option): Use it to set -falign-* options/
4271         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4272         type from int to string.
4273         * config/aarch64/aarch64.c: Update default values from int
4274         to string.
4275         * config/alpha/alpha.c (alpha_override_options_after_change):
4276         Likewise.
4277         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4278         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4279         max skip conditionally.
4280         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4281         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4282         max skip conditionally.
4283         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4284         max skip conditionally.
4285         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4286         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4287         max skip conditionally.
4288         * config/i386/i386.c (struct ptt): Change type from int to
4289         string.
4290         (ix86_default_align): Set default values.
4291         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4292         max skip conditionally.
4293         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4294         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4295         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4296         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4297         max skip conditionally.
4298         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4299         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4300         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4301         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4302         max skip conditionally.
4303         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4304         * config/ia64/ia64.c (ia64_option_override): Set default values
4305         for alignment options.
4306         * config/m68k/m68k.c: Handle new str_align_* options.
4307         * config/mips/mips.c (mips_set_compression_mode): Change
4308         type of constants.
4309         (mips_option_override): Set default values for options.
4310         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4311         Likewise.
4312         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4313         Likewise.
4314         * config/rx/rx.c (rx_option_override): Likewise.
4315         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4316         (LABEL_ALIGN): Use align_labels_log.
4317         (LOOP_ALIGN): Use align_loops_align.
4318         * config/s390/s390.c (s390_asm_output_function_label): Use new
4319         macros.
4320         * config/sh/sh.c (sh_override_options_after_change):
4321         Change type of constants.
4322         * config/spu/spu.c (spu_sched_init): Likewise.
4323         * config/sparc/sparc.c (sparc_option_override): Set default
4324         values for options.
4325         * config/visium/visium.c (visium_option_override): Likewise.
4326         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4327         emit p2align format with last argument if it's not needed.
4328         * doc/invoke.texi: Document extended format of -falign-*.
4329         * final.c: Use align_labels alignment.
4330         * flags.h (struct target_flag_state): Change type to use
4331         align_flags.
4332         (struct align_flags_tuple): New.
4333         (struct align_flags): Likewise.
4334         (align_loops_log): Redefine macro to use new types.
4335         (align_loops_max_skip): Redefine macro to use new types.
4336         (align_jumps_log): Redefine macro to use new types.
4337         (align_jumps_max_skip): Redefine macro to use new types.
4338         (align_labels_log): Redefine macro to use new types.
4339         (align_labels_max_skip): Redefine macro to use new types.
4340         (align_functions_log): Redefine macro to use new types.
4341         (align_loops): Redefine macro to use new types.
4342         (align_jumps): Redefine macro to use new types.
4343         (align_labels): Redefine macro to use new types.
4344         (align_functions): Redefine macro to use new types.
4345         (align_functions_max_skip): Redefine macro to use new types.
4346         (align_loops_value): New macro.
4347         (align_jumps_value): New macro.
4348         (align_labels_value): New macro.
4349         (align_functions_value): New macro.
4350         * function.c (invoke_set_current_function_hook): Propagate
4351         alignment values from flags to global variables default in
4352         topleev.h.
4353         * ipa-icf.c (sem_function::equals_wpa): Use
4354         cl_optimization_option_eq instead of memcmp.
4355         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4356         of string types.
4357         (cl_optimization_stream_in): Likewise.
4358         * optc-save-gen.awk: Support strings in cl_optimization.
4359         * opth-gen.awk: Likewise.
4360         * opts.c (finish_options): Remove error checking of invalid
4361         value ranges.
4362         (MAX_CODE_ALIGN): Remove.
4363         (MAX_CODE_ALIGN_VALUE): Likewise.
4364         (parse_and_check_align_values): New function.
4365         (check_alignment_argument): Likewise.
4366         (common_handle_option): Use check_alignment_argument.
4367         * opts.h (parse_and_check_align_values): Declare.
4368         * toplev.c (init_alignments): Remove.
4369         (read_log_maxskip): New.
4370         (parse_N_M): Likewise.
4371         (parse_alignment_opts): Likewise.
4372         (backend_init_target): Remove usage of init_alignments.
4373         * toplev.h (parse_alignment_opts): Declare.
4374         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4375         argument.
4376         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4377         * tree.c (cl_option_hasher::equal): New.
4378         * varasm.c: Use new global macros.
4380 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4382         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4383         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4384         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4385         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4386         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4387         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4388         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4389         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4390         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4391         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4392         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4393         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4394         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4396 2018-07-04  Martin Liska  <mliska@suse.cz>
4397             Jonathan Wakely  <jwakely@redhat.com>
4399         * coverage.c: Use correct type.
4400         * doc/invoke.texi: Language correction.
4402 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4404         PR target/85620
4405         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4406         ENDBRANCH for non-tail call which may return via indirect branch.
4407         * doc/extend.texi: Document indirect_return attribute.
4409 2018-07-03  Martin Sebor  <msebor@redhat.com>
4411         PR tree-optimization/86274
4412         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4413         precondition.
4414         (format_floating): Correct handling of infinities and NaNs.
4416 2018-07-03  Martin Sebor  <msebor@redhat.com>
4418         * print-tree.c (print_real_cst): New function.
4419         (print_node_brief): Call it.
4420         (print_node): Ditto.
4422 2018-07-03  Jeff Law  <law@redhat.com>
4424         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4425         into a single pattern.
4427         * config/h8300/h8300.md (ors code_iterator): New.
4428         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4429         a single pattern and single splitter.
4430         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4431         (iorqi3_1, xorqi3_1): Likewise.
4432         (iorqi3, xorqi3 expanders): Similarly.
4434         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4435         (movmd_internal) into a single pattern using the P mode iterator.
4436         (movmd splitters): Similarly.
4437         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4438         (movsd splitters): Similarly.
4440         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4441         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4442         right table based on the size of the operand.
4443         * config/h8300/h8300.md (length_table): Corresponding changes. All
4444         references to "addb", "addw" and "addl" changed to "add".
4445         (btst patterns): Merge two variants into a single pattern.
4446         (tstqi, tsthi): Likewise.
4447         (addhi3_incdec, addsi3_incdec): Likewise.
4448         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4449         (mulhi3, mulsi3): Likewise.
4450         (udivhi3, udivsi3): Likewise.
4451         (divhi3, divsi3): Likewise.
4452         (andorqi3, andorhi3, andorsi3): Likewise.
4454 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4456         PR target/85694
4457         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4458         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4460 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4462         PR tree-optimization/85694
4463         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4464         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4465         UNSPEC_URHADD.
4466         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4467         (<u>avg<mode>3_ceil): New patterns.
4469 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4471         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4472         scan-tree-dump directive.
4473         * gcc.dg/vect/slp-perm-2.c: Likewise.
4474         * gcc.dg/vect/slp-perm-3.c: Likewise.
4475         * gcc.dg/vect/slp-perm-5.c: Likewise.
4476         * gcc.dg/vect/slp-perm-6.c: Likewise.
4477         * gcc.dg/vect/slp-perm-7.c: Likewise.
4478         * gcc.dg/vect/slp-perm-8.c: Likewise.
4480 2018-07-03  Marek Polacek  <polacek@redhat.com>
4482         PR middle-end/86202
4483         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4485 2018-07-03  Richard Biener  <rguenther@suse.de>
4487         PR ipa/86389
4488         * tree-ssa-structalias.c (find_func_clobbers): Properly
4489         handle indirect calls.
4491 2018-07-03  Jeff Law  <law@redhat.com>
4493         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4494         (shifts): New code iterator.
4495         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4496         expander.  Fix HImode handling on H8/SX.
4497         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4498         (subqi3, subhi3, subsi3 expanders): Likewise.
4499         (andqi3, andhi3, andsi3 expanders): Likewise.
4500         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4501         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4502         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4503         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4504         (zero_extendqihi2, zero_extendqisi2): Likewise.
4505         (extendqihi2, extendqisi2): Likewise.
4506         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4507         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4508         (rotlqi3_1, rotlhi3_1): Likewise.
4509         (logicalhi3_sn, logicalsi3_sn): Likewise.
4510         (logicalhi3, logicalsi3): Likewise.
4512 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4514         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4515         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4516         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4517         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4518         type to append_pattern_def_seq instead of creating a stmt_vec_info
4519         directly.
4520         (build_mask_conversion): Likewise.  Remove vinfo argument.
4521         (vect_add_conversion_to_patterm): Likewise, renaming to...
4522         (vect_add_conversion_to_pattern): ...this.
4523         (vect_recog_mask_conversion_pattern): Update call to
4524         build_mask_conversion.  Pass the vector type to
4525         append_pattern_def_seq here too.
4526         (vect_recog_gather_scatter_pattern): Update call to
4527         vect_add_conversion_to_pattern.
4529 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4531         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4532         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4533         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4534         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4535         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4536         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4537         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4538         append_pattern_def_seq instead of new_pattern_def_seq.
4539         (vect_recog_divmod_pattern): Do both of the above.
4540         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4541         is null.
4543 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4545         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4546         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4547         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4548         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4549         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4550         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4551         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4552         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4553         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4554         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4555         parameter with a single stmt_vec_info.
4556         (vect_recog_func_ptr): Likewise.
4557         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4558         (vect_try_gather_scatter_pattern): ...this.
4559         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4560         the stmt_vec_info of the statement to be matched.  Don't clear
4561         STMT_VINFO_RELATED_STMT.
4562         (vect_pattern_recog): Update call accordingly.
4564 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4566         PR tree-optimization/85694
4567         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4568         (uavgM3_ceil): Document new optabs.
4569         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4570         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4571         functions.
4572         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4573         (savg_ceil_optab): New optabs.
4574         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4575         (vect_vect_recog_func_ptrs): Add it.
4576         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4577         constant directly from the associated lhs.
4579 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4581         * tree-vect-patterns.c (vect_split_statement): New function.
4582         (vect_convert_input): Use it to try to split an existing cast.
4584 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4586         * poly-int.h (print_hex): New function.
4587         * dumpfile.h (dump_dec, dump_hex): Declare.
4588         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4589         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4590         min_input_precision, operation_precision and operation_sign.
4591         * tree-vect-patterns.c (vect_get_range_info): New function.
4592         (vect_same_loop_or_bb_p, vect_single_imm_use)
4593         (vect_operation_fits_smaller_type): Delete.
4594         (vect_look_through_possible_promotion): Add an optional
4595         single_use_p parameter.
4596         (vect_recog_over_widening_pattern): Rewrite to use new
4597         stmt_vec_info infomration.  Handle one operation at a time.
4598         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4599         (vect_truncatable_operation_p, vect_set_operation_type)
4600         (vect_set_min_input_precision): New functions.
4601         (vect_determine_min_output_precision_1): Likewise.
4602         (vect_determine_min_output_precision): Likewise.
4603         (vect_determine_precisions_from_range): Likewise.
4604         (vect_determine_precisions_from_users): Likewise.
4605         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4606         (vect_vect_recog_func_ptrs): Put over_widening first.
4607         Add cast_forwprop.
4608         (vect_pattern_recog): Call vect_determine_precisions.
4610 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4612         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4613         statements that have been replaced by further pattern statements.
4614         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4616 2018-07-03  Richard Biener  <rguenther@suse.de>
4618         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4619         always set *dt.  Dump vectype in vectype overload.
4620         * dumpfile.h (dump_gimple_expr): New function.
4621         (dump_gimple_expr_loc): Likewise.
4622         * dumpfile.c (dump_gimple_expr): New function.
4623         (dump_gimple_expr_loc): Likewise.
4625 2018-07-02  Jeff Law  <law@redhat.com>
4627         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4628         the H8/300, H8/300H and H8/S variants into a single pattern.
4629         (movhi_h8300, movqi_h8300hs): Similarly.
4630         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4631         (QHI mode iterator): New.
4633         * config/h8300/h8300.md: Remove trailing whitespace.
4635 2018-07-02  Jim Wilson  <jimw@sifive.com>
4637         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4638         instead of emit_insn for interrupt returns.
4639         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4640         (riscv_sret, riscv_uret): Likewise.
4642 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4644         * pretty-print.c (selftest::test_pp_format): Move save and restore
4645         of quotes to class auto_fix_quotes, and add an instance.
4646         * selftest.c: Include "intl.h".
4647         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4648         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4649         * selftest.h (selftest::auto_fix_quotes): New class.
4651 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4653         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4654         (aarch64_sve_prepare_conditional_op): Remove.
4655         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4656         Allow aarch64_simd_reg_or_zero as select operand; remove
4657         the aarch64_sve_prepare_conditional_op call.
4658         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4659         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4660         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4661         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4662         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4663         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4664         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4665         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4666         and a splitters to match all of the *_any patterns.
4667         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4669         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4670         (SVE_COND_FP_BINARY_REV): Remove.
4671         (sve_int_op_rev, sve_fp_op_rev): New.
4672         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4673         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4674         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4675         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4676         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4677         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4678         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4679         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4680         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4682         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4683         Remove match_dup 1 from the inner unspec.
4684         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4686         * config/aarch64/aarch64.md (movprfx): New attr.
4687         (length): Default movprfx to 8.
4688         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4689         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4690         (*<su>mul<SVE_I>3_highpart): Likewise.
4691         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4692         (*v<ASHIFT><SVE_I>3): Likewise.
4693         (*<su><MAXMIN><SVE_I>3): Likewise.
4694         (*<su><MAXMIN><SVE_F>3): Likewise.
4695         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4696         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4697         (*div<SVE_F>4): Likewise.
4699 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4701         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4702         in dump string.
4704 2018-07-02  Richard Biener  <rguenther@suse.de>
4706         PR tree-optimization/86363
4707         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4708         memset argument refers to a non-variable address.
4710 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4712         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4713         {PLUS,MINUS}_EXPR code to...
4714         (adjust_symbolic_bound): ...here,
4715         (combine_bound): ...here,
4716         (set_value_range_with_overflow): ...and here.
4718 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4720         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4721         code...
4722         (extract_range_from_abs_expr): ...here.
4724 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4726         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4727         -fno-omit-frame-pointer when not optimizing.
4729 2018-07-02  Martin Liska  <mliska@suse.cz>
4731         PR ipa/86279
4732         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4733         (propagate_nothrow): Likewise.
4735 2018-07-02  Martin Liska  <mliska@suse.cz>
4737         PR ipa/86323
4738         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4740 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4742         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4743         function in r262149, changing "loc" param from source_location to
4744         const dump_location_t &.
4745         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4746         declaration, as above.
4748 2018-07-01  Paul Koning  <ni1d@arrl.net>
4750         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4751         -munit-asm, -mgnu-asm, -mdec-asm.
4752         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4753         (pdp11_output_labelref): New.
4754         (pdp11_output_def): New.
4755         (pdp11_output_addr_vec_elt): New.
4756         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4757         %# and %@ format codes.
4758         (pdp11_option_override): New.
4759         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4760         (pdp11_output_ident): New.
4761         (pdp11_asm_named_section): New.
4762         (pdp11_asm_init_sections): New.
4763         (pdp11_file_start): New.
4764         (pdp11_file_end): New.
4765         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4766         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4767         %o, like %c but octal.
4768         (pdp11_option_override): New.
4769         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4770         -mdec-asm.
4771         (DATA_SECTION_ASM_OP): Ditto.
4772         (READONLY_DATA_SECTION_ASM_OP): New.
4773         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4774         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4775         (ASM_OUTPUT_LABELREF): Ditto.
4776         (ASM_OUTPUT_DEF): Ditto.
4777         (ASM_OUTPUT_EXTERNAL): New.
4778         (ASM_OUTPUT_SOURCE_FILENAME): New.
4779         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4780         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4781         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4782         %# and %@ format codes.
4783         * config/pdp11/pdp11.opt (mgnu-asm): New.
4784         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4785         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4786         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4788 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4790         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4791         dereferencing path[] beyond its length.
4792         (debug_path): New.
4793         (debug_all_paths): New.
4794         (rewire_first_differing_edge): New.
4795         (adjust_paths_after_duplication): New.
4796         (duplicate_thread_path): Call adjust_paths_after_duplication.
4797         Add new argument.
4798         (thread_through_all_blocks): Add new argument to
4799         duplicate_thread_path.
4801 2018-06-30  Jim Wilson  <jimw@sifive.com>
4803         * config/riscv/predicates.md (p2m1_shift_operand): New.
4804         (high_mask_shift_operand): New.
4805         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4806         pattern using p2m1_shift_operand.
4807         (lshsi3_zero_extend_3+2): New combiner pattern using
4808         high_mask_shift_operand.
4810 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4812         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4813         split out from...
4814         (vect_recog_rotate_pattern): ...here.
4815         (vect_convert_input): Try to insert casts of invariants in the
4816         preheader.
4817         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4818         preheader to be empty.
4820 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4822         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4823         vector type.  If given, install it in the new statement's
4824         STMT_VINFO_VECTYPE.
4825         (vect_element_precision): New function.
4826         (vect_unpromoted_value): New struct.
4827         (vect_unpromoted_value::vect_unpromoted_value): New function.
4828         (vect_unpromoted_value::set_op): Likewise.
4829         (vect_look_through_possible_promotion): Likewise.
4830         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4831         (vect_widened_op_tree, vect_convert_input): Likewise.
4832         (vect_convert_inputs, vect_convert_output): Likewise.
4833         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4834         to handle the optional cast of the multiplication result and
4835         vect_widened_op_tree to detect the widened multiplication itself.
4836         Do not require the input and output of promotion casts to have
4837         the same sign, but base the signedness of the operation on the
4838         input rather than the result.  If the pattern includes two
4839         promotions, check that those promotions have the same sign.
4840         Do not restrict the MULT_EXPR handling to a double-width result;
4841         handle quadruple-width results and wider.  Use vect_convert_inputs
4842         to convert the inputs to the common type.
4843         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4844         to handle the optional cast of the ABS result.  Also allow a sign
4845         change or a sign extension between the ABS and MINUS.
4846         Use vect_widened_op_tree to detect the widened subtraction and use
4847         vect_convert_inputs to convert the inputs to the common type.
4848         (vect_handle_widen_op_by_const): Delete.
4849         (vect_recog_widen_op_pattern): New function.
4850         (vect_recog_widen_mult_pattern): Use it.
4851         (vect_recog_widen_shift_pattern): Likewise.
4852         (vect_recog_widen_sum_pattern): Use
4853         vect_look_through_possible_promotion to handle the promoted
4854         PLUS_EXPR operand.
4856 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4858         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4859         the containing gimple_seq *.
4860         * gimple-iterator.h (gsi_for_stmt): Declare it.
4861         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4862         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4863         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4864         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4865         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4866         checks.
4867         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4868         split out from...
4869         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4870         statement being replaced is part of an existing pattern
4871         definition sequence, inserting the new pattern statements before
4872         the original one.
4873         (vect_pattern_recog_1): Don't return a bool.  If the statement
4874         is already part of a pattern, instead apply pattern matching
4875         to the pattern definition statements.  Don't clear the
4876         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4877         (vect_pattern_recog): Don't break after the first match;
4878         continue processing the pattern definition statements instead.
4879         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4881 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4883         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4884         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4885         (vect_recog_widen_sum_pattern): Use it.
4887 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4889         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4890         phi is not a pattern statement and has not been replaced by
4891         a pattern statement.
4892         * tree-vect-patterns.c (type_conversion_p): Don't check
4893         STMT_VINFO_IN_PATTERN_P.
4894         (vect_recog_vector_vector_shift_pattern): Likewise.
4895         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4896         the pattern statement rather than the original statement; check
4897         directly for a WIDEN_MULT_EXPR here.
4898         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4899         vect_is_simple_use to return the pattern statement rather
4900         than the original statement; use is_pattern_stmt_p to check
4901         for such a pattern statement.
4902         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4903         to return the pattern statement rather than the original statement;
4904         don't do the same transformation here.
4905         (vect_is_simple_use): If the defining statement has been replaced
4906         by a pattern statement, return the pattern statement instead.
4907         Remove the corresponding (local) transformation from the vectype
4908         overload.
4910 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4912         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4913         end and default to null.
4914         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4915         (vectorizable_reduction): Update calls accordingly, dropping the
4916         gimple ** argument if the passed-back statement isn't needed.
4917         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4918         (vect_recog_rotate_pattern): Likewise.
4919         (vect_recog_mask_conversion_pattern): Likewise.
4920         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4921         (vect_mask_constant_operand_p): Likewise.
4922         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4923         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4924         (get_group_load_store_type, get_load_store_type): Likewise.
4925         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4926         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4927         (vectorizable_conversion, vectorizable_assignment): Likewise.
4928         (vectorizable_shift, vectorizable_operation): Likewise.
4929         (vectorizable_store, vect_is_simple_cond): Likewise.
4930         (vectorizable_condition, vectorizable_comparison): Likewise.
4931         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4932         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4933         and move it to the end.  Cope with null def_stmt_outs.
4935 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4937         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4939 2018-06-29  Jeff Law  <law@redhat.com>
4941         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4942         displacements for TARGET_V850E2V3 and newer.
4943         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4944         * config/v850/v850.md (sign23byte_load): Remove.
4945         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4946         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4948 2018-06-29  Martin Liska  <mliska@suse.cz>
4950         PR lto/85759
4951         * coverage.c (coverage_init): Mangle full path name.
4952         * doc/invoke.texi: Document the change.
4953         * gcov-io.c (mangle_path): New.
4954         * gcov-io.h (mangle_path): Likewise.
4955         * gcov.c (mangle_name): Use mangle_path for path mangling.
4957 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4959         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4960         if starting source register is not even.
4962 2018-06-29  Martin Liska  <mliska@suse.cz>
4964         PR tree-optimization/86263
4965         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4966         Make edge redirection.
4968 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4970         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4971         (dump_scope_depth): New variable.
4972         (get_dump_scope_depth): New function.
4973         (dump_begin_scope): New function.
4974         (dump_end_scope): New function.
4975         * dumpfile.h (get_dump_scope_depth): New declaration.
4976         (dump_begin_scope): New declaration.
4977         (dump_end_scope): New declaration.
4978         (class auto_dump_scope): New class.
4979         (AUTO_DUMP_SCOPE): New macro.
4980         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4981         AUTO_DUMP_SCOPE.
4983 2018-06-29  Richard Biener  <rguenther@suse.de>
4985         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4986         compute_all_dependences succeeds.
4987         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4988         exceed --param loop-max-datarefs-for-datadeps.
4990 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4992         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4994 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4996         PR target/86348
4997         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4998         alternative 0 in preferred_for_speed attribute.
5000 2018-06-28  Paul Koning  <ni1d@arrl.net>
5002         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5003         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5004         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5005         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5006         for shift insn patterns.
5008 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5010         * cgraph.c (cgraph_node::get_body): Replace assignments to
5011         "dump_file" with calls to set_dump_file.
5012         * dumpfile.c (alt_dump_file): Make static, and group with...
5013         (alt_flags): ...this definition.
5014         (dumps_are_enabled): New variable.
5015         (refresh_dumps_are_enabled): New function.
5016         (set_dump_file): New function.
5017         (set_alt_dump_file): New function.
5018         (gcc::dump_manager::dump_start): Replace assignments to
5019         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5020         set_alt_dump_file.
5021         (gcc::dump_manager::dump_finish): Likewise.
5022         * dumpfile.h (alt_dump_file): Delete decl.
5023         (dumps_are_enabled): New variable decl.
5024         (set_dump_file): New function decl.
5025         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5026         global.
5027         * tree-nested.c (lower_nested_functions): Replace assignments to
5028         "dump_file" with calls to set_dump_file.
5030 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5032         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5033         goto_locus of each outgoing edge of each basic block.
5035 2018-06-28  Richard Biener  <rguenther@suse.de>
5037         * dwarf2out.c (decl_scope_table): Remove.
5038         (push_decl_scope): Likewise.
5039         (pop_decl_scope): Likewise.
5040         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5041         (gen_struct_or_union_type_die): Likewise.
5042         (gen_tagged_type_die): Likewise.
5043         (dwarf2out_init): Do not initialize decl_scope_table.
5044         (dwarf2out_c_finalize): Do not free it.
5046 2018-06-28  Richard Biener  <rguenther@suse.de>
5048         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5049         deciding whether to not re-use a DIE.
5051 2018-06-28  Richard Biener  <rguenther@suse.de>
5053         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5054         DW_AT_abstract_origin attribute.
5056 2018-06-28  Martin Liska  <mliska@suse.cz>
5058         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5059         Use newly introduced constants.
5060         * tree-switch-conversion.h (struct jump_table_cluster):
5061         Define max_ratio_for_size and max_ratio_for_speed.
5063 2018-06-28  Martin Liska  <mliska@suse.cz>
5065         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5066         Add new checking assert to catch invalid state.
5067         (jump_table_cluster::can_be_handled): Handle single case
5068         clusters.
5069         (jump_table_cluster::is_beneficial): Bail out for such case.
5070         (bit_test_cluster::find_bit_tests):
5071         Add new checking assert to catch invalid state.
5072         (bit_test_cluster::can_be_handled): Handle single case
5073         clusters.
5074         (bit_test_cluster::is_beneficial): Bail out for such case.
5075         (switch_decision_tree::analyze_switch_statement):
5076         Fix comment.
5078 2018-06-28  Martin Liska  <mliska@suse.cz>
5080         * common.opt: Introduce -completion option.
5081         * gcc.c (driver_handle_option): Handle it.
5082         (driver::main): Print completions if completion
5083         is set.
5084         * opt-suggestions.c (option_proposer::get_completions):
5085         New function.
5086         (option_proposer::suggest_completion): Likewise.
5087         (option_proposer::find_param_completions): Likewise.
5088         (verify_autocompletions): Likewise.
5089         (test_completion_valid_options): Likewise.
5090         (test_completion_valid_params): Likewise.
5091         (in_completion_p): Likewise.
5092         (empty_completion_p): Likewise.
5093         (test_completion_partial_match): Likewise.
5094         (test_completion_garbage): Likewise.
5095         (opt_proposer_c_tests): Likewise.
5096         * opt-suggestions.h: Declare new functions.
5097         * opts.c (common_handle_option): Handle OPT__completion_.
5098         * selftest-run-tests.c (selftest::run_tests): Add
5099         opt_proposer_c_tests.
5100         * selftest.c (assert_str_startswith): New.
5101         * selftest.h (assert_str_startswith): Likewise.
5102         (opt_proposer_c_tests): New.
5103         (ASSERT_STR_STARTSWITH): Likewise.
5105 2018-06-28  Martin Liska  <mliska@suse.cz>
5107         * Makefile.in: Add opt-suggestions.o.
5108         * gcc-main.c: Include opt-suggestions.h.
5109         * gcc.c (driver::driver): Likewise.
5110         (driver::~driver): Remove m_option_suggestions.
5111         (driver::build_option_suggestions): Moved to option_proposer.
5112         (driver::suggest_option): Likewise.
5113         (driver::handle_unrecognized_options): Use option_proposer.
5114         * gcc.h (class driver): Add new memver m_option_proposer.
5115         * opt-suggestions.c: New file.
5116         * opt-suggestions.h: New file.
5118 2018-06-28  Martin Liska  <mliska@suse.cz>
5120         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5121         (auto_string_vec::~auto_string_vec): Likewise.
5123 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5125         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5126         prevent_decl_creation_for_types fields up and add reset_location field.
5127         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5128         statement if id->reset_location is true.
5129         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5130         id->reset_location is true.
5131         (copy_phis_for_bb): Force input_location on the arguments if
5132         id->reset_location is true.
5133         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5134         is set on the function to be inlined.
5136 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5138         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5140 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5142         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5143         registers for Pmode.
5144         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5145         hard registers for the clobbered pseudo.
5147 2018-06-27  Paul Koning  <ni1d@arrl.net>
5149         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5150         mutually exclusive options.
5151         * config/pdp11/constraints.md (h): New constraint.
5152         (O): Update definition to match shift code generation.
5153         (D): New constraint.
5154         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5155         (CCFP): Remove.
5156         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5157         function.
5158         (output_jump): Change arguments.
5159         (pdp11_fixed_cc_regs): New function.
5160         (pdp11_cc_mode): Ditto.
5161         (pdp11_expand_shift): Ditto.
5162         (pdp11_assemble_shift): Ditto.
5163         (pdp11_small_shift): Ditto.
5164         (pdp11_branch_cost): Remove.
5165         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5166         from output.
5167         (pdp11_register_move_cost): Update for CC registers.
5168         (pdp11_rtx_costs): Add case for LSHIFTRT.
5169         (pdp11_output_jump): Add CCNZ mode conditional branches.
5170         (notice_update_cc_on_set): Remove.
5171         (pdp11_cc_mode): New function.
5172         (simple_memory_operand): Correct pre/post decrement case.
5173         (no_side_effect_operand): New function.
5174         (pdp11_regno_reg_class): Add CC_REGS class.
5175         (pdp11_fixed_cc_regs): New function.
5176         (pdp11_small_shift): New function.
5177         (pdp11_expand_shift): New function to expand shift insns.
5178         (pdp11_assemble_shift): New function to output shifts.
5179         (pdp11_branch_cost): Remove.
5180         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5181         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5182         (WCHAR_TYPE): Ditto.
5183         (PTRDIFF_TYPE): Ditto.
5184         (ADJUST_INSN_LENGTH): New macro.
5185         (FIXED_REGISTERS): Add CC registers.
5186         (CALL_USED_REGISTERS): Ditto.
5187         (reg_class): Ditto.
5188         (REG_CLASS_NAMES): Ditto.
5189         (REG_CLASS_CONTENTS): Ditto.
5190         (SELECT_CC_MODE): Use new function.
5191         (TARGET_FLAGS_REGNUM): New macro.
5192         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5193         (cc0_reg_rtx): Remove.
5194         (CC_STATUS_MDEP): Remove.
5195         (CC_STATUS_MDEFP_INIT): Remove.
5196         (CC_IN_FPU): Remove.
5197         (NOTICE_UPDATE_CC): Remove.
5198         (REGISTER_NAMES): Add CC registers.
5199         (BRANCH_COST): Change to constant 1.
5200         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5201         handling.
5202         * config/pdp11/pdp11.opt (mbcopy): Remove.
5203         (mbcopy-builtin): Remove.
5204         (mbranch-cheap): Remove.
5205         (mbranch-expensive): Remove.
5206         * config/pdp11/predicates.md (expand_shift_operand): Update to
5207         match shift code generation.
5208         (ccnz_operator): New predicate.
5209         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5210         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5211         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5212         exclusive options.
5213         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5214         description of O constraint.
5216 2018-06-27  Jeff Law  <law@redhat.com>
5217             Austin Law  <austinklaw@gmail.com>
5219         * config/v850/v850.md (addsi3_set_flags): New pattern.
5220         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5221         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5222         (zero_extendhisi2_v850_set_flags): Likewise.
5223         (zero_extendqisi2_v850_set_flags): Likewise.
5224         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5225         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5226         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5228         * config/v850/v850-protos.h (notice_update_cc): Remove.
5229         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5230         (v850_print_operand): Handle 'D' and "d".
5231         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5232         Add handling of arithmetic/logical operations compared against zero.
5233         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5234         Do not look at v850_compare_op, instead get mode from last argument.
5235         (v850_gen_compare): Remove
5236         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5237         after reload for prologue insns.
5238         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5239         patterns.
5240         (construct_save_jarl): Likewise.
5241         (TARGET_FLAGS_REGNUM): Define.
5242         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5243         (NOTICE_UPDATE_CC): Remove.
5244         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5245         than cc0.  Conditionalize on reload_completed.
5246         (cmpsi_insn, setfcc_insn): Likewise.
5247         (tst1 splitter): Turn into define_and_split which sets the flags
5248         after reload.
5249         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5250         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5251         (cstoresf4, cstoredf4): Clobber the flags.
5252         (cmpsi, cmpsf, cmpdf): Remove expanders.
5253         (setf_insn): Remove pattern.
5254         (addsi3): Turn into define_and_split which clobbers the flags after
5255         reload and a suitable pattern (addsi3_clobber_flags) for use after
5256         reload.
5257         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5258         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5259         (ashrsi3, ashrsi3_v850e2): Likewise.
5260         (bins): Clobber the flags.
5261         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5262         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5263         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5264         (call_value_internal_short, call_value_internal_long): Likewise.
5265         (callt_save_interrupt, callt_return_interrupt): Likewise.
5266         (save_interrupt, return_interrupt): Likewise.
5267         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5268         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5269         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5270         (All FP comparisons): Only allow after reload has completed.
5271         (trfsr): Likewise.
5272         (divh, divhu): Tweak output template.
5273         (branch_z_normal, branch_z_invert): Remove
5274         (branch_nz_normal, branch_nz_invert): Likewise.
5275         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5277         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5278         * config/v850/v850.c (notice_update_cc): Remove.
5279         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5280         (CC_NO_CARRY): Likewise.
5281         (NOTICE_UPDATE_CC): Define to nothing.
5282         * config/v850/v850.md: Remove block comment on cc0 handling
5283         Remove "cc" attribute from all patterns.  Remove cc_status handling
5284         from all patterns.  Minor formatting fixes.
5286 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5288         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5289         (cortex-a76.cortex-a55): Likewise.
5290         * config/aarch64/aarch64-tune.md: Regenerate.
5291         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5292         cortex-a76.cortex-a55.
5294 2018-06-27  Jeff Law  <law@redhat.com>
5296         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5297         (MULTILIB_DIRNAMES): Similarly.
5299 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5301         * gimple.h (gimple_return_retbnd): Delete.
5302         (gimple_return_set_retbnd): Likewise.
5303         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5304         gimple_return_set_retbnd.
5305         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5306         gimple_return_retbnd and adjust.
5307         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5308         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5309         Explicitly return NULL in a couple more cases.  Move assertion
5310         on debug statements and remove unreachable code.
5311         (reset_debug_binding): Do not test id->retbnd.
5312         (expand_call_inline): Do not set it.
5314 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5316         * configure.ac: Add --disable-gcov option.
5317         * configure: Regenerate.
5318         * Makefile.in: Honour @enable_gcov@.
5319         * doc/install.texi: Document --disable-gcov.
5321 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5323         * config/arm/arm-cpus.in (cortex-a76): New entry.
5324         (cortex-a76.cortex-a55): Likewise.
5325         * config/arm/arm-tables.opt: Regenerate.
5326         * config/arm/arm-tune.md: Likewise.
5327         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5328         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5329         cortex-a76.cortex-a55.
5331 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5333         PR target/85769
5334         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5336 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5338         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5339         comment.
5340         (EPILOGUE_USES): Likewise.
5342 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5344         * tree-inline.c (remap_location): New function extracted from...
5345         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5346         (copy_phis_for_bb): ...here.  Call remap_location.
5347         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5349 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5351         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5352         unaligned vsx for 16B memset.
5354 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5356         PR target/86285
5357         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5358         ieee128_float_type_node to long_double_type_node unless
5359         TARGET_LONG_DOUBLE_128 is set.
5361 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5363         * cfgloop.c (get_loop_location): Convert return type from
5364         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5365         by implicit construction from rtx_insn *, and using
5366         dump_user_location_t::from_function_decl for the fallback case.
5367         * cfgloop.h (get_loop_location): Convert return type from
5368         location_t to dump_user_location_t.
5369         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5370         dump_printf_loc to pass in a dump_location_t rather than a
5371         location_t, via the gimple stmt.
5372         * coverage.c (get_coverage_counts): Update calls to
5373         dump_printf_loc to pass in dump_location_t rather than a
5374         location_t.
5375         * doc/optinfo.texi (Dump types): Convert example of
5376         dump_printf_loc from taking "locus" to taking "insn".  Update
5377         description of the "_loc" calls to cover dump_location_t.
5378         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5379         "selftest.h".
5380         (dump_user_location_t::dump_user_location_t): New constructors,
5381         from gimple *stmt and rtx_insn *.
5382         (dump_user_location_t::from_function_decl): New function.
5383         (dump_loc): Make static.
5384         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5385         const dump_location_t &.
5386         (dump_generic_expr_loc): Delete.
5387         (dump_printf_loc): Convert param "loc" from location_t to
5388         const dump_location_t &.
5389         (selftest::test_impl_location): New function.
5390         (selftest::dumpfile_c_tests): New function.
5391         * dumpfile.h: Include "profile-count.h".
5392         (class dump_user_location_t): New class.
5393         (struct dump_impl_location_t): New struct.
5394         (class dump_location_t): New class.
5395         (dump_printf_loc): Convert 2nd param from source_location to
5396         const dump_location_t &.
5397         (dump_generic_expr_loc): Delete.
5398         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5399         const dump_location_t &.
5400         * gimple-fold.c (fold_gimple_assign): Update call to
5401         dump_printf_loc to pass in a dump_location_t rather than a
5402         location_t, via the gimple stmt.
5403         (gimple_fold_call): Likewise.
5404         * gimple-loop-interchange.cc
5405         (loop_cand::analyze_iloop_reduction_var): Update for change to
5406         check_reduction_path.
5407         (tree_loop_interchange::interchange): Update for change to
5408         find_loop_location.
5409         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5410         change in return-type of find_loop_location.
5411         (graphite_regenerate_ast_isl): Likewise.
5412         * graphite-optimize-isl.c (optimize_isl): Likewise.
5413         * graphite.c (graphite_transform_loops): Likewise.
5414         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5415         pass in a dump_location_t rather than a location_t, via the
5416         gimple stmt.
5417         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5418         * ipa.c (walk_polymorphic_call_targets): Likewise.
5419         * loop-unroll.c (report_unroll): Convert "locus" param from
5420         location_t to dump_location_t.
5421         (decide_unrolling): Update for change to get_loop_location's
5422         return type.
5423         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5424         location_t to dump_user_location_t.
5425         (grid_find_single_omp_among_assignments_1): Updates calls to
5426         dump_printf_loc to pass in a dump_location_t rather than a
5427         location_t, via the gimple stmt.
5428         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5429         location_t to dump_location_t.  Updates calls to dump_printf_loc
5430         to pass in a dump_location_t rather than a location_t, via the
5431         gimple stmt.
5432         (grid_inner_loop_gridifiable_p): Likewise.
5433         (grid_dist_follows_simple_pattern): Likewise.
5434         (grid_gfor_follows_tiling_pattern): Likewise.
5435         (grid_target_follows_gridifiable_pattern): Likewise.
5436         (grid_attempt_target_gridification): Convert initialization
5437         of local "grid" from memset to zero-initialization; FIXME: does
5438         this require C++11?  Update call to dump_printf_loc to pass in a
5439         optinfo_location rather than a location_t, via the gimple stmt.
5440         * profile.c (read_profile_edge_counts): Updates call to
5441         dump_printf_loc to pass in a dump_location_t rather than a
5442         location_t
5443         (compute_branch_probabilities): Likewise.
5444         * selftest-run-tests.c (selftest::run_tests): Call
5445         dumpfile_c_tests.
5446         * selftest.h (dumpfile_c_tests): New decl.
5447         * tree-loop-distribution.c (pass_loop_distribution::execute):
5448         Update for change in return type of find_loop_location.
5449         * tree-parloops.c (parallelize_loops): Likewise.
5450         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5451         "locus" from location_t to dump_user_location_t.
5452         (canonicalize_loop_induction_variables): Likewise.
5453         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5454         for change in return type of find_loop_location.
5455         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5456         to dump_printf_loc to pass in a dump_location_t rather than a
5457         location_t, via the stmt.
5458         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5459         Likewise.
5460         * tree-vect-loop-manip.c (find_loop_location): Convert return
5461         type from source_location to dump_user_location_t.
5462         (vect_do_peeling): Update for above change.
5463         (vect_loop_versioning): Update for change in type of
5464         vect_location.
5465         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5466         from location_t to dump_user_location_t.
5467         (vect_estimate_min_profitable_iters): Update for change in type
5468         of vect_location.
5469         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5470         location_t to dump_location_t.
5471         (vect_slp_bb): Update for change in type of vect_location.
5472         * tree-vectorizer.c (vect_location): Convert from source_location
5473         to dump_user_location_t.
5474         (try_vectorize_loop_1): Update for change in vect_location's type.
5475         (vectorize_loops): Likewise.
5476         (increase_alignment): Likewise.
5477         * tree-vectorizer.h (vect_location): Convert from source_location
5478         to dump_user_location_t.
5479         (find_loop_location): Convert return type from source_location to
5480         dump_user_location_t.
5481         (check_reduction_path): Convert 1st param from location_t to
5482         dump_user_location_t.
5483         * value-prof.c (check_counter): Update call to dump_printf_loc to
5484         pass in a dump_user_location_t rather than a location_t; update
5485         call to error_at for change in type of "locus".
5486         (check_ic_target): Update call to dump_printf_loc to
5487         pass in a dump_user_location_t rather than a location_t, via the
5488         call_stmt.
5490 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5492         * config/s390/s390.h (enum processor_flags): Do not use
5493         default tune parameter when -march was specified.
5495 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5497         PR target/86314
5498         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5499         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5500         operands.
5502 2018-06-26  Richard Biener  <rguenther@suse.de>
5504         PR tree-optimization/86287
5505         PR bootstrap/86316
5506         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5507         (vect_analyze_loop): Initialize n_stmts.
5509 2018-06-26  Richard Biener  <rguenther@suse.de>
5511         PR middle-end/86271
5512         * fold-const.c (fold_convertible_p): Pointer extension
5513         isn't valid.
5515 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5517         PR debug/86064
5518         * dwarf2out.c (loc_list_has_views): Adjust comments.
5519         (dw_loc_list): Split single cross-partition range with
5520         nonzero locview.
5522 2018-06-25  Jeff Law  <law@redhat.com>
5524         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5525         on -mbig-switch by default.
5527         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5528         test.
5529         (const_float_0_operand): Remove unused predicate.
5530         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5531         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5532         (recipsf2): New expander.  Original pattern now called
5533         (recipsf2_insn).
5534         (recipdf2, recipdf2_insn): Similarly.
5535         (rsqrtsf2, rsqrtsf2_insn): Similarly
5536         (rsqrtdf2, rsqrtdf2_insn): Similarly
5538 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5540         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5541         Simplify logic for FreeBSD (twice).
5543 2018-06-25  Martin Sebor  <msebor@redhat.com>
5545         PR tree-optimization/86204
5546         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5547         a strnlen result if it's less than the length of the string.
5549 2018-06-25  Martin Sebor  <msebor@redhat.com>
5551         PR tree-optimization/85700
5552         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5553         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5554         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5556 2018-06-25  Martin Sebor  <msebor@redhat.com>
5558         * doc/extend.texi (Zero-length arrays): Update and clarify.
5560 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5562         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5563         added IEEE/IBM long double multilib support on PowerPC little
5564         endian Linux systems.
5565         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5566         (MULTILIB_DEFAULTS): Likewise.
5567         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5568         Likewise.
5569         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5570         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5571         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5573 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5575         PR middle-end/86311
5576         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5577         (REORDER_45): Likewise.
5579 2018-06-25  Jeff Law  <law@redhat.com>
5581         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5582         dividend to 32 bits.  Adjust length.
5583         (udivmodhi4): Cleanup output template.  Fix length.
5585 2018-06-25  Carl Love  <cel@us.ibm.com>
5587         * config/rs6000/vsx.md: Change word selector to prefered location.
5589 2018-06-25  Richard Biener  <rguenther@suse.de>
5591         PR tree-optimization/86304
5592         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5593         epilogue-if-converted loops as well.
5595 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5597         * lto-section-out.c (lto_begin_section): Do not print section
5598         name for noaddr and unnumbered dumps.
5600 2018-06-25  Richard Biener  <rguenther@suse.de>
5602         * tree-vectorizer.h (struct vec_info_shared): New structure
5603         with parts split out from struct vec_info and loop_nest from
5604         struct _loop_vec_info.
5605         (struct vec_info): Adjust accordingly.
5606         (struct _loop_vec_info): Likewise.
5607         (LOOP_VINFO_LOOP_NEST): Adjust.
5608         (LOOP_VINFO_DATAREFS): Likewise.
5609         (LOOP_VINFO_DDRS): Likewise.
5610         (struct _bb_vec_info): Likewise.
5611         (BB_VINFO_DATAREFS): Likewise.
5612         (BB_VINFO_DDRS): Likewise.
5613         (struct _stmt_vec_info): Add dr_aux member.
5614         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5615         (DR_MISALIGNMENT_UNINITIALIZED): New.
5616         (set_dr_misalignment): Adjust.
5617         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5618         (vect_analyze_loop): Adjust prototype.
5619         (vect_analyze_loop_form): Likewise.
5620         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5621         Compute dependences lazily.
5622         (vect_record_base_alignments): Use shared datarefs/ddrs.
5623         (vect_verify_datarefs_alignment): Likewise.
5624         (vect_analyze_data_refs_alignment): Likewise.
5625         (vect_analyze_data_ref_accesses): Likewise.
5626         (vect_analyze_data_refs): Likewise.
5627         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5628         constructor parameter for shared part.
5629         (vect_analyze_loop_form): Pass in shared part and adjust.
5630         (vect_analyze_loop_2): Pass in storage for the number of
5631         stmts.  Move loop nest finding to the caller.  Compute
5632         datarefs lazily.
5633         (vect_analyze_loop): Pass in shared part.
5634         (vect_transform_loop): Verify shared datarefs are unchanged.
5635         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5636         constructor parameter for shared part.
5637         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5638         (vect_slp_bb): Verify shared datarefs are unchanged before
5639         transform.
5640         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5641         change.
5642         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5643         DR_MISALIGNMENT_UNINITIALIZED.
5644         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5645         parameter for shared part.
5646         (vec_info::~vec_info): Adjust.
5647         (vec_info_shared::vec_info_shared): New.
5648         (vec_info_shared::~vec_info_shared): Likewise.
5649         (vec_info_shared::save_datarefs): Likewise.
5650         (vec_info_shared::check_datarefs): Likewise.
5651         (try_vectorize_loop_1): Construct shared part live for analyses
5652         of a single loop for multiple vector sizes.
5653         * tree-parloops.c (gather_scalar_reductions): Adjust.
5655 2018-06-25  Richard Biener  <rguenther@suse.de>
5657         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5658         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5659         (vect_analyze_data_refs): Remove similar code from here and
5660         simplify accordingly.
5662 2018-06-25  Richard Biener  <rguenther@suse.de>
5664         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5665         for reverse storage order accesses rather than asserting
5666         they cannot happen here.
5668 2018-06-25  Tom de Vries  <tdevries@suse.de>
5670         PR debug/86257
5671         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5672         Use data16 instead of .byte for insn prefix.
5674 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5676         PR C++/86082
5677         * parser.c (make_char_string_pack): Pass this literal chars
5678         through cpp_interpret_string.
5679         (cp_parser_userdef_numeric_literal): Check the result of
5680         make_char_string_pack.
5682 2018-06-24  Maya Rashish  <coypu@sdf.org>
5684         * ginclude/stddef.h: Simplify conditions around avoiding
5685         re-definition of __size_t.
5687 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5689         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5690         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5692 2018-06-22  Maya Rashish  <coypu@sdf.org>
5694         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5695         made to OpenBSD and NetBSD through the years.
5697 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5699         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5700         behavior of vec_pack (vector double, vector double) to match
5701         behavior of vec_float2 (vector double, vector double).
5703 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5705         * gimplify.c (gimplify_function_tree): Prevent creation
5706         of a trampoline for the address of the current function
5707         passed to entry/exit instrumentation hooks.
5709 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5711         PR target/86222
5712         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5713         correctly.
5715 2018-06-22  Martin Liska  <mliska@suse.cz>
5717         PR tree-optimization/86263
5718         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5719         Bail out if is_enabled is false.
5720         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5721         New declaration.
5722         (jump_table_cluster::is_enabled): New function.
5724 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5726         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5727         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5728         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5729         (lto_input_ts_binfo_tree_pointers): Likewise.
5730         * tree-streamer-out.c (streamer_write_tree_bitfields,
5731         write_ts_binfo_tree_pointers): Likewise.
5732         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5734 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5736         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5738 2018-06-22  Martin Liska  <mliska@suse.cz>
5740         * symbol-summary.h (get): Make it pure and inline move
5741         functionality from ::get function.
5742         (get): Remove and inline into ::get and ::get_create.
5743         (get_create): Move code from ::get function.
5745 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5747         PR target/85994
5748         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5749         -x assembler-with-cpp.
5751 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5753         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5754         _FILE_OFFSET_BITS=64 for C++.
5756 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5758         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5759         conversion insn that shows up when pr85657-3.c is compiled using
5760         IEEE 128-bit long double.
5761         (neg<mode>2_internal): Use the correct mode to check whether the
5762         mode is IBM extended.
5763         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5764         multiply and divide external functions from being created more
5765         than once.
5767 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5769         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5770         functions.
5771         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5772         the edge can be forwarded.
5773         (cfg_layout_merge_blocks): Likewise.
5775 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5777         * except.c (finish_eh_generation): Commit edge insertions only after
5778         the EH edges have been redirected from post-landing to landing pads.
5780 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5782         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5783         create_tmp_var_for to create the FRAME decl.
5784         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5786 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5788         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5789         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5790         debug statement when resetting its value.
5791         (expand_call_inline): Copy the locus of the call onto the assignment
5792         of the return value, if any.  Use local variable in more cases.
5794 2018-06-21  Martin Liska  <mliska@suse.cz>
5796         * ipa-pure-const.c (propagate_nothrow): Use
5797         funct_state_summaries->get.
5798         (dump_malloc_lattice): Likewise.
5799         (propagate_malloc): Likewise.
5801 2018-06-21  Richard Biener  <rguenther@suse.de>
5803         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5804         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5805         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5806         comment.
5807         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5808         BLOCK_ABSTRACT_ORIGIN unconditionally.
5810 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5812         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5813         deleting it.
5814         * ipa-reference.c (ipa_reference_c_finalize): Delete
5815         ipa_ref_opt_sum_summaries and set it to NULL.
5817 2018-06-21  Tom de Vries  <tdevries@suse.de>
5819         PR tree-optimization/85859
5820         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5821         test with comment from bb_no_side_effects_p.
5823 2018-06-21  Richard Biener  <rguenther@suse.de>
5825         PR tree-optimization/86232
5826         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5827         max for constant niter.
5829 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5831         * config/aarch64/aarch64-simd.md
5832         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5834 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5836         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5837         Make opernads of the unspec commutative.
5839 2018-06-21  Richard Biener  <rguenther@suse.de>
5841         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5842         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5843         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5844         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5845         NULL DR_STEP.
5846         (vect_record_base_alignments): Do not record base alignment
5847         for gathers or scatters.
5848         (vect_compute_data_ref_alignment): Drop return value that is always
5849         true.  Bail out early for gathers or scatters.
5850         (vect_enhance_data_refs_alignment): Bail out early for gathers
5851         or scatters.
5852         (vect_find_same_alignment_drs): Likewise.
5853         (vect_analyze_data_refs_alignment): Remove dead code.
5854         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5855         (vect_analyze_data_refs): For possible gathers or scatters do
5856         not create an alternate DR, just check their possible validity
5857         and mark them.  Adjust DECL_NONALIASED handling to not rely
5858         on DR_BASE_ADDRESS.
5859         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5860         update inits of gathers or scatters.
5861         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5862         Also copy gather/scatter flag to pattern vinfo.
5864 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5866         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5867         behavior of vec_packsu (vector unsigned long long, vector unsigned
5868         long long) to match behavior of vec_packs with same signature.
5870 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5871             Thomas Schwinge <thomas@codesourcery.com>
5872             Cesar Philippidis  <cesar@codesourcery.com>
5874         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5875         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5876         (gimplify_adjust_omp_clauses): Likewise.
5877         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5878         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5879         (gimplify_omp_target_update): Update handling of acc update and
5880         enter/exit data.
5881         * omp-low.c (install_var_field): Remove unused parameter
5882         base_pointers_restrict.
5883         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5884         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5885         FINALIZE}
5886         (omp_target_base_pointers_restrict_p): Delete.
5887         (scan_omp_target): Update call to scan_sharing_clauses.
5888         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5889         FINALIZE}.
5890         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5891         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5892         (convert_local_omp_clauses): Likewise.
5893         * tree-pretty-print.c (dump_omp_clause): Likewise.
5894         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5895         FINALIZE}.
5896         (omp_clause_code_name): Likewise.
5898 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5900         PR debug/86194
5901         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5902         be narrowed.
5904         PR tree-optimization/86231
5905         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5906         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5908 2018-06-20  Tom de Vries  <tdevries@suse.de>
5910         PR tree-optimization/86097
5911         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5912         iv type if signedness of iv type is not the same as that of *nit.
5914 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5916         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5917         EDGE_EH edges, verify they are all EDGE_EH.
5919 2018-06-20  Maya Rashish  <coypu@sdf.org>
5921         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5923 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5925         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5926         * config/aarch64/aarch64.c (xgene1_tunings): Add
5927         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5928         (aarch64_mode_valid_for_sched_fusion_p):
5929         Allow 16-byte modes.
5930         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5931         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5932         128-bit modes.
5933         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5934         New pattern.
5935         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5936         * config/aarch64/iterators.md (VQ2): New mode iterator.
5938 2018-06-20  Martin Liska  <mliska@suse.cz>
5940         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5941         Change default ratio from 10 to 8.
5943 2018-06-20  Martin Liska  <mliska@suse.cz>
5945         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5946         New.
5947         (bit_test_cluster::find_bit_tests): Likewise.
5948         (switch_decision_tree::analyze_switch_statement): Find clusters.
5949         * tree-switch-conversion.h (struct jump_table_cluster): Document
5950         hierarchy.
5952 2018-06-20  Martin Liska  <mliska@suse.cz>
5954         * tree-switch-conversion.c (switch_conversion::collect):
5955         Record m_uniq property.
5956         (switch_conversion::expand): Bail out for special conditions.
5957         (group_cluster::~group_cluster): New.
5958         (group_cluster::group_cluster): Likewise.
5959         (group_cluster::dump): Likewise.
5960         (jump_table_cluster::emit): New.
5961         (switch_decision_tree::fix_phi_operands_for_edges): New.
5962         (struct case_node): Remove struct.
5963         (jump_table_cluster::can_be_handled): New.
5964         (case_values_threshold): Moved to header.
5965         (reset_out_edges_aux): Likewise.
5966         (jump_table_cluster::is_beneficial): New.
5967         (bit_test_cluster::can_be_handled): Likewise.
5968         (add_case_node): Remove.
5969         (bit_test_cluster::is_beneficial): New.
5970         (case_bit_test::cmp): New.
5971         (bit_test_cluster::emit): New.
5972         (expand_switch_as_decision_tree_p): Remove.
5973         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5974         (fix_phi_operands_for_edge): Likewise.
5975         (switch_decision_tree::analyze_switch_statement): New.
5976         (compute_cases_per_edge): Move ...
5977         (switch_decision_tree::compute_cases_per_edge): ... here.
5978         (try_switch_expansion): Likewise.
5979         (switch_decision_tree::try_switch_expansion): Likewise.
5980         (record_phi_operand_mapping): Likewise.
5981         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5982         (emit_case_decision_tree): Likewise.
5983         (switch_decision_tree::emit): Likewise.
5984         (balance_case_nodes): Likewise.
5985         (switch_decision_tree::balance_case_nodes): Likewise.
5986         (dump_case_nodes): Likewise.
5987         (switch_decision_tree::dump_case_nodes): Likewise.
5988         (emit_jump): Likewise.
5989         (switch_decision_tree::emit_jump): Likewise.
5990         (emit_cmp_and_jump_insns): Likewise.
5991         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5992         (emit_case_nodes): Likewise.
5993         (switch_decision_tree::emit_case_nodes): Likewise.
5994         (conditional_probability): Remove.
5995         * tree-switch-conversion.h (enum cluster_type): New.
5996         (PRINT_CASE): New.
5997         (struct cluster): Likewise.
5998         (cluster::cluster): Likewise.
5999         (struct simple_cluster): Likewise.
6000         (simple_cluster::simple_cluster): Likewise.
6001         (struct group_cluster): Likewise.
6002         (struct jump_table_cluster): Likewise.
6003         (struct bit_test_cluster): Likewise.
6004         (struct min_cluster_item): Likewise.
6005         (struct case_tree_node): Likewise.
6006         (case_tree_node::case_tree_node): Likewise.
6007         (jump_table_cluster::case_values_threshold): Likewise.
6008         (struct case_bit_test): Likewise.
6009         (struct switch_decision_tree): Likewise.
6010         (struct switch_conversion): Likewise.
6011         (switch_decision_tree::reset_out_edges_aux): Likewise.
6013 2018-06-20  Martin Liska  <mliska@suse.cz>
6015         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6016         (hoist_edge_and_branch_if_true): Likewise.
6017         (expand_switch_using_bit_tests_p): Likewise.
6018         (struct case_bit_test): Likewise.
6019         (case_bit_test_cmp): Likewise.
6020         (emit_case_bit_tests): Likewise.
6021         (switch_conversion::switch_conversion): New class.
6022         (struct switch_conv_info): Remove old struct.
6023         (collect_switch_conv_info): More to ...
6024         (switch_conversion::collect): ... this.
6025         (check_range): Likewise.
6026         (switch_conversion::check_range): Likewise.
6027         (check_all_empty_except_final): Likewise.
6028         (switch_conversion::check_all_empty_except_final): Likewise.
6029         (check_final_bb): Likewise.
6030         (switch_conversion::check_final_bb): Likewise.
6031         (create_temp_arrays): Likewise.
6032         (switch_conversion::create_temp_arrays): Likewise.
6033         (free_temp_arrays): Likewise.
6034         (gather_default_values): Likewise.
6035         (switch_conversion::gather_default_values): Likewise.
6036         (build_constructors): Likewise.
6037         (switch_conversion::build_constructors): Likewise.
6038         (constructor_contains_same_values_p): Likewise.
6039         (switch_conversion::contains_same_values_p): Likewise.
6040         (array_value_type): Likewise.
6041         (switch_conversion::array_value_type): Likewise.
6042         (build_one_array): Likewise.
6043         (switch_conversion::build_one_array): Likewise.
6044         (build_arrays): Likewise.
6045         (switch_conversion::build_arrays): Likewise.
6046         (gen_def_assigns): Likewise.
6047         (switch_conversion::gen_def_assigns): Likewise.
6048         (prune_bbs): Likewise.
6049         (switch_conversion::prune_bbs): Likewise.
6050         (fix_phi_nodes): Likewise.
6051         (switch_conversion::fix_phi_nodes): Likewise.
6052         (gen_inbound_check): Likewise.
6053         (switch_conversion::gen_inbound_check): Likewise.
6054         (process_switch): Use the newly created class.
6055         (switch_conversion::expand): New.
6056         (switch_conversion::~switch_conversion): New.
6057         * tree-switch-conversion.h: New file.
6059 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6061         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6062         tree-vect-patterns.c.
6063         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6064         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6065         (vect_recog_sad_pattern): Likewise.
6066         (vect_recog_widen_sum_pattern): Likewise.
6067         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6068         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6069         (vect_recog_rotate_pattern): Likewise.
6070         (vect_recog_mult_pattern): Likewise.
6071         (vect_recog_vector_vector_shift_pattern): Likewise.
6072         (vect_recog_divmod_pattern): Likewise.
6073         (vect_recog_mixed_size_cond_pattern): Likewise.
6074         (vect_recog_bool_pattern): Likewise.
6075         (vect_recog_mask_conversion_pattern): Likewise.
6076         (vect_try_gather_scatter_pattern): Likewise.
6077         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6078         (vect_recog_over_widening_pattern): Likewise.
6079         (vect_recog_gather_scatter_pattern): Likewise.
6080         (vect_recog_func_ptr): Move from tree-vectorizer.h
6081         (vect_vect_recog_func_ptrs): Move further down the file.
6082         (vect_recog_func): Likewise.  Remove the third argument.
6083         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6084         (vect_pattern_recog_1): Expect the pattern function to do any
6085         necessary target tests.  Also expect it to provide a vector type.
6086         Remove the type_in handling.
6088 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6090         * tree-vect-patterns.c (vect_pattern_detected): New function.
6091         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6092         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6093         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6094         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6095         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6096         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6097         (vect_recog_mask_conversion_pattern)
6098         (vect_try_gather_scatter_pattern): Likewise.
6100 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6102         * tree-vect-patterns.c (vect_get_internal_def): New function.
6103         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6104         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6105         (search_type_for_mask_1): Use it.
6107 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6109         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6110         redundant WIDEN_SUM_EXPR handling.
6111         (vect_recog_sad_pattern): Likewise.
6113 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6115         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6116         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6117         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6118         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6119         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6121 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6123         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6124         use the stmt_vec_info of the original bb statement for the
6125         new zero assignment, even if the call is part of a pattern.
6127 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6129         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6130         that the sequence is attached to the original statement rather
6131         than the pattern statement.
6132         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6133         PATTERN_DEF_SEQ from the original statement rather than
6134         the main pattern statement.
6135         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6136         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6137         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6139 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6141         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6142         definition statements before the early exit for statements that aren't
6143         live or relevant.
6144         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6145         split out from...
6146         (vect_transform_loop): ...here.  Process pattern definition
6147         statements without first checking whether the main pattern
6148         statement is live or relevant.
6150 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6152         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6153         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6155 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6157         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6158         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6159         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6160         (expand_block_compare): Change select_block_compare_mode call.
6161         (expand_strncmp_align_check): Use new functions, fix comment.
6162         (emit_final_str_compare_gpr): New function.
6163         (expand_strn_compare): Refactor and clean up code.
6164         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6166 2018-06-19  Tony Reix  <tony.reix@atos.com>
6167             Damien Bergamini  <damien.bergamini@atos.com>
6168             David Edelsohn  <dje.gcc@gmail.com>
6170         * collect2.c (static_obj): New variable.
6171         (static_libs): New variable.
6172         (is_in_list): Uncomment declaration.
6173         (main): Track AIX libraries linked statically.
6174         (is_in_list): Uncomment definition.
6175         (scan_prog_file): Don't add AIX shared libraries initializer
6176         to constructor list if linking statically.
6178 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6180         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6181         constant.
6182         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6184 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6186         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6187         blocks.
6189 2018-06-19  Martin Liska  <mliska@suse.cz>
6191         * config/i386/i386.c (ix86_can_inline_p): Do not use
6192         ipa_fn_summaries::get_create.
6193         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6194         get.
6195         (devirtualization_time_bonus): Likewise.
6196         (ipcp_propagate_stage): Likewise.
6197         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6198         (edge_set_predicate): Likewise.
6199         (evaluate_conditions_for_known_args): Likewise.
6200         (evaluate_properties_for_edge): Likewise.
6201         (ipa_call_summary::reset): Tranform to ...
6202         (ipa_call_summary::~ipa_call_summary): ... this.
6203         (ipa_fn_summary::reset): Transform to ...
6204         (ipa_fn_summary::~ipa_fn_summary): ... this.
6205         (ipa_fn_summary_t::remove): Rename to ...
6206         (ipa_fn_summary_t::remove_callees): ... this.
6207         (ipa_fn_summary_t::duplicate): Use placement new
6208         instead of memory copy.
6209         (ipa_call_summary_t::duplicate): Likewise.
6210         (ipa_call_summary_t::remove): Remove.
6211         (dump_ipa_call_summary): Change get_create to get.
6212         (ipa_dump_fn_summary): Dump only when summary exists.
6213         (analyze_function_body): Use symbol_summary::get instead
6214         of get_create.
6215         (compute_fn_summary): Likewise.
6216         (estimate_edge_devirt_benefit): Likewise.
6217         (estimate_edge_size_and_time): Likewise.
6218         (inline_update_callee_summaries): Likewise.
6219         (remap_edge_change_prob): Likewise.
6220         (remap_edge_summaries): Likewise.
6221         (ipa_merge_fn_summary_after_inlining): Likewise.
6222         (write_ipa_call_summary): Likewise.
6223         (ipa_fn_summary_write): Likewise.
6224         (ipa_free_fn_summary): Likewise.
6225         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6226         (struct ipa_call_summary): Likewise.
6227         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6228         of get_create.
6229         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6230         (estimate_size_after_inlining): Likewise.
6231         (estimate_growth): Likewise.
6232         (growth_likely_positive): Likewise.
6233         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6234         (inline_call): Likewise.
6235         * ipa-inline.c (caller_growth_limits): Likewise.
6236         (can_inline_edge_p): Likewise.
6237         (can_inline_edge_by_limits_p): Likewise.
6238         (compute_uninlined_call_time): Likewise.
6239         (compute_inlined_call_time): Likewise.
6240         (want_inline_small_function_p): Likewise.
6241         (edge_badness): Likewise.
6242         (update_caller_keys): Likewise.
6243         (update_callee_keys): Likewise.
6244         (inline_small_functions): Likewise.
6245         (inline_to_all_callers_1): Likewise.
6246         (dump_overall_stats): Likewise.
6247         (early_inline_small_functions): Likewise.
6248         (early_inliner): Likewise.
6249         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6250         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6251         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6252         * ipa-split.c (execute_split_functions): Likewise.
6253         * symbol-summary.h: Likewise.
6254         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6256 2018-06-19  Richard Biener  <rguenther@suse.de>
6258         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6259         (vectorize_loops): ... here.  Fix dbgcnt handling.
6260         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6262 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6264         PR target/86197
6265         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6266         ieee128 argument takes up only one (vector) register, not two (floating
6267         point) registers.
6269 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6271         * gimplify.c (gimplify_init_constructor): Really never clear for an
6272         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6274 2018-06-19  Richard Biener  <rguenther@suse.de>
6276         PR tree-optimization/86179
6277         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6278         after failed recognition.
6280 2018-06-18  Martin Sebor  <msebor@redhat.com>
6282         PR middle-end/85602
6283         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6284         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6285         Handle integer subtraction.
6286         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6287         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6289 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6291         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6292         param from rtx to rtx_insn *.
6293         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6294         param.
6295         (frv_ifcvt_modify_insn): Likwise.
6296         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6297         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6298         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6299         as_a <rtx_insn *> cast to local "unprotected_region" once
6300         it's been established that it's not NULL or pc_rtx.
6301         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6302         param "sethi" from rtx to rtx_insn *.
6303         (nds32_group_float_insns): Likewise for param "insn".
6304         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6305         param.
6306         (vax_output_int_subtract): Likewise.
6307         * config/vax/vax.c (vax_output_int_add): Likewise for param
6308         "insn".
6309         (vax_output_int_subtract): Likewise.
6310         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6311         (emit_pattern_after): Likewise for param "after".
6312         (emit_insn_after): Likewise.
6313         (emit_jump_insn_after): Likewise.
6314         (emit_call_insn_after): Likewise.
6315         (emit_debug_insn_after): Likewise.
6316         (emit_pattern_before): Likewise for param "before".
6317         (emit_insn_before): Likewise.
6318         (emit_jump_insn_before): Likewise.
6319         * final.c (get_insn_template): Likewise for param "insn", removing
6320         a cast.
6321         * output.h (get_insn_template): Likewise for 2nd param.
6322         * rtl.h (emit_insn_before): Likewise.
6323         (emit_jump_insn_before): Likewise.
6324         (emit_debug_insn_before_noloc): Likewise.
6325         (emit_insn_after): Likewise.
6326         (emit_jump_insn_after): Likewise.
6327         (emit_call_insn_after): Likewise.
6328         (emit_debug_insn_after): Likewise.
6329         (set_insn_deleted): Likewise for param.
6331 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6333         PR target/85358
6334         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6335         floating point modes, so that IFmode is numerically greater than
6336         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6337         to declare the ordering.  This prevents IFmode from being
6338         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6339         machine.  Include rs6000-modes.h to share the fractional values
6340         between genmodes* and the rest of the compiler.
6341         (IFmode): Likewise.
6342         (KFmode): Likewise.
6343         (TFmode): Likewise.
6344         * config/rs6000/rs6000-modes.h: New file.
6345         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6346         meaning of rs6000_long_double_size so that 126..128 selects an
6347         appropriate 128-bit floating point type.
6348         (rs6000_option_override_internal): Likewise.
6349         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6350         (TARGET_LONG_DOUBLE_128): Change the meaning of
6351         rs6000_long_double_size so that 126..128 selects an appropriate
6352         128-bit floating point type.
6353         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6354         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6355         source and destination to match the standard usage.
6356         (truncifkf2): Likewise.
6357         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6358         ISA 2.07 to use an explicit clobber, instead of passing in a
6359         temporary.
6360         (copysign<mode>3_soft): Likewise.
6362 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6364         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6365         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6366         (vect_slp_analyze_instance_dependence): Likewise.
6367         (vect_enhance_data_refs_alignment): Likewise.
6368         (vect_analyze_data_refs_alignment): Likewise.
6369         (vect_slp_analyze_and_verify_instance_alignment
6370         (vect_analyze_data_ref_accesses): Likewise.
6371         (vect_prune_runtime_alias_test_list): Likewise.
6372         (vect_analyze_data_refs): Likewise.
6373         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6374         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6375         (vect_analyze_scalar_cycles_1): Likewise.
6376         (vect_get_loop_niters): Likewise.
6377         (vect_analyze_loop_form_1): Likewise.
6378         (vect_update_vf_for_slp): Likewise.
6379         (vect_analyze_loop_operations): Likewise.
6380         (vect_analyze_loop): Likewise.
6381         (vectorizable_induction): Likewise.
6382         (vect_transform_loop): Likewise.
6383         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6384         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6385         (vect_make_slp_decision): Likewise.
6386         (vect_detect_hybrid_slp): Likewise.
6387         (vect_slp_analyze_operations): Likewise.
6388         (vect_slp_bb): Likewise.
6389         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6390         (vectorizable_bswap): Likewise.
6391         (vectorizable_call): Likewise.
6392         (vectorizable_simd_clone_call): Likewise.
6393         (vectorizable_conversion): Likewise.
6394         (vectorizable_assignment): Likewise.
6395         (vectorizable_shift): Likewise.
6396         (vectorizable_operation): Likewise.
6397         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6399 2018-06-18  Martin Sebor  <msebor@redhat.com>
6401         PR tree-optimization/81384
6402         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6403         * builtins.c (expand_builtin_strnlen): New function.
6404         (expand_builtin): Call it.
6405         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6406         * builtins.def (BUILT_IN_STRNLEN): New.
6407         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6408         Warn for bounds in excess of maximum object size.
6409         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6410         single-value ranges.  Handle strnlen.
6411         (handle_builtin_strlen): Handle strnlen.
6412         (strlen_check_and_optimize_stmt): Same.
6413         * doc/extend.texi (Other Builtins): Document strnlen.
6415 2018-06-18  Maya Rashish  <coypu@sdf.org>
6417         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6418         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6419         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6421         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6422         here to ...
6423         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6425 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6427         * tree.c (escaped_string::escape): Replace cast to char * by
6428         const_cast<char *> (unescaped).
6430 2018-06-18  Nick Clifton  <nickc@redhat.com>
6432         PR 84195
6433         * tree.c (escaped_string): New class.  Converts an unescaped
6434         string into its escaped equivalent.
6435         (warn_deprecated_use): Use the new class to convert the
6436         deprecation message, if present.
6437         (test_escaped_strings): New self test.
6438         (test_c_tests): Add test_escaped_strings.
6439         * doc/extend.texi (deprecated): Add a note that the
6440         deprecation message is affected by the -fmessage-length
6441         option, and that control characters will be escaped.
6442         (#pragma GCC error): Document this pragma.
6443         (#pragma GCC warning): Likewise.
6444         * doc/invoke.texi (-fmessage-length): Document this option's
6445         effect on the #warning and #error preprocessor directives and
6446         the deprecated attribute.
6448 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6450         * tree.c (decl_value_expr_lookup): Revert latest change.
6451         (decl_value_expr_insert): Likewise.
6453 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6455         * gimplify.c (nonlocal_vlas): Delete.
6456         (nonlocal_vla_vars): Likewise.
6457         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6458         referenced VLAs.
6459         (gimplify_body): Do not create and destroy nonlocal_vlas.
6460         * tree-nested.c: Include diagnostic.h.
6461         (use_pointer_in_frame): Tweak.
6462         (lookup_field_for_decl): Add assertion and declare the transformation.
6463         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6464         internal error when the reference is in a wrong context.  Do not
6465         create a debug decl by default.
6466         (note_nonlocal_block_vlas): Delete.
6467         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6468         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6469         create a debug decl by default.
6470         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6471         call is in a wrong context.
6472         (fixup_vla_decls): New function.
6473         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6474         debug variables were created.
6475         * tree.c (decl_value_expr_lookup): Add checking assertion.
6476         (decl_value_expr_insert): Likewise.
6478 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6480         PR middle-end/82479
6481         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6482         * tree-scalar-evolution.c (interpret_expr): Likewise.
6483         (expression_expensive_p): Likewise.
6484         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6485         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6486         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6487         (ssa_defined_by_minus_one_stmt_p): New.
6489 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6491         PR middle-end/64946
6492         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6493         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6494         * dojump.c (do_jump): Likewise.
6495         * expr.c (expand_expr_real_2): Check operand type's sign.
6496         * fold-const.c (const_unop): Handle ABSU_EXPR.
6497         (fold_abs_const): Likewise.
6498         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6499         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6500         (strip_sign_op_1): Likesise.
6501         * match.pd: Add new pattern to generate ABSU_EXPR.
6502         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6503         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6504         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6505         * tree-inline.c (estimate_operator_cost): Likewise.
6506         * tree-pretty-print.c (dump_generic_node): Likewise.
6507         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6508         * tree.def (ABSU_EXPR): New.
6510 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6512         PR middle-end/86095
6513         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6514         documented as preserved for backward compatibility only.
6515         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6517         PR rtl-optimization/86108
6518         * bb-reorder.c (create_forwarder_block): Renamed to ...
6519         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6520         jump from new landing pad to the second part.
6521         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6522         Adjust callers.
6524 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6526         PR middle-end/85878
6527         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6528         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6529         Only call store_expr for halves if the mode is the same.
6531         PR middle-end/86123
6532         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6533         Fix up comment formatting.
6535 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6537         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6538         (typed_splay_tree::closure,
6539         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6540         (typed_splay_tree::typed_splay_tree,
6541         typed_splay_tree::operator =): Declared private.
6542         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6543         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6544         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6545         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6546         typed_splay_tree::splay_tree_splay,
6547         typed_splay_tree::splay_tree_foreach_helper,
6548         typed_splay_tree::splay_tree_insert,
6549         typed_splay_tree::splay_tree_remove,
6550         typed_splay_tree::splay_tree_lookup,
6551         typed_splay_tree::splay_tree_predecessor,
6552         typed_splay_tree::splay_tree_successor,
6553         typed_splay_tree::splay_tree_min,
6554         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6555         (typed_splay_tree::root, typed_splay_tree::comp,
6556         typed_splay_tree::delete_key,
6557         typed_splay_tree::delete_value): New data members.
6558         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6559         typed_splay_tree::remove.
6561 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6563         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6564         -mginv and -mno-ginv to the assembler.
6565         * config/mips/mips.opt (-mcrc): New option.
6566         (-mginv): Likewise.
6567         * doc/invoke.text (-mcrc): Document.
6568         (-mginv): Likewise.
6570 2018-06-15  Nick Clifton  <nickc@redhat.com>
6572         PR 84195
6573         * tree.c (escaped_string): New class.  Converts an unescaped
6574         string into its escaped equivalent.
6575         (warn_deprecated_use): Use the new class to convert the
6576         deprecation message, if present.
6577         (test_escaped_strings): New self test.
6578         (test_c_tests): Add test_escaped_strings.
6579         * doc/extend.texi (deprecated): Add a note that the
6580         deprecation message is affected by the -fmessage-length
6581         option, and that control characters will be escaped.
6582         (#pragma GCC error): Document this pragma.
6583         (#pragma GCC warning): Likewise.
6584         * doc/invoke.texi (-fmessage-length): Document this option's
6585         effect on the #warning and #error preprocessor directives and
6586         the deprecated attribute.
6588 2018-06-15  Richard Biener  <rguenther@suse.de>
6590         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6591         here, also noting vector size used.
6592         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6593         size used in MSG_OPTIMIZED_LOCATIONS dump.
6594         (pass_slp_vectorize::execute): Adjust.
6596 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6598         PR target/85968
6599         * config/arc/arc.c (arc_return_address_register): Fix
6600         if-condition.
6602 2018-06-15  Richard Biener  <rguenther@suse.de>
6604         PR middle-end/86159
6605         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6606         leave useless conversion stripping to force_gimple_operand_gsi.
6607         (gimplify_build2): Likewise.
6608         (gimplify_build1): Likewise.
6610 2018-06-15  Richard Biener  <rguenther@suse.de>
6612         PR middle-end/86076
6613         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6614         before adjusting their block.
6616 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6618         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6619         multilibs for *-*-rtems*.
6620         * config/riscv/t-rtems: New file.
6622 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6624         PR middle-end/86122
6625         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6626         unsigned_type_for returns NULL.
6628         PR target/85945
6629         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6630         subregs of multi-word pseudos unless the float mode has word size.
6632 2018-06-14  Richard Biener  <rguenther@suse.de>
6634         PR middle-end/86139
6635         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6636         duplicate and harmful type_hash_canon.
6637         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6639 2018-06-14  Richard Biener  <rguenther@suse.de>
6641         PR ipa/86124
6642         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6643         NULL cgraph_node.
6645 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6647         * config/rtems.h (STDINT_LONG32): Define.
6649 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6650             Prachi Godbole  <prachi.godbole@imgtec.com>
6652         * config/mips/mips-cpus.def: Define P6600.
6653         * config/mips/mips-tables.opt: Regenerate.
6654         * config/mips/mips.c (mips_ucbranch_type): New enum.
6655         (mips_rtx_cost_data): Add support for P6600.
6656         (mips_issue_rate): Likewise.
6657         (mips_multipass_dfa_lookahead): Likewise.
6658         (mips_avoid_hazard): Likewise.
6659         (mips_reorg_process_insns): Likewise.
6660         (mips_classify_branch_p6600): New function.
6661         * config/mips/mips.h (TUNE_P6600): New define.
6662         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6663         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6664         * config/mips/mips.md: Include p6600.md.
6665         (processor): Add p6600.
6666         * config/mips/p6600.md: New file.
6667         * doc/invoke.texi: Add p6600 to supported architectures.
6669 2018-06-13  Martin Sebor  <msebor@redhat.com>
6671         PR tree-optimization/86114
6672         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6673         of integer types.
6674         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6676 2018-06-13  Richard Biener  <rguenther@suse.de>
6678         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6679         Properly set vector type of the intermediate stmt.
6680         * tree-vect-stmts.c (vectorizable_operation): The destination
6681         var always has vectype_out type.
6683 2018-06-13  Jeff Law  <law@redhat.com>
6685         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6686         integer 0 for argument to print_rtl_with_bb.
6687         (rl78_reorg): Likewise.
6689 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6691         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6692         from rtx to rtx_insn *.
6693         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6694         "label".
6695         (add_sched_insns_for_speculation): Likewise for local "target",
6696         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6697         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6698         from rtx_insn ** to rtx_code_label **.
6699         (reorg_emit_nops): Likewise.
6700         (c6x_reorg): Likewise for local "call_labels".
6701         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6702         rtx to rtx_insn *.
6703         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6704         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6705         the loops over LABEL_REFS.
6706         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6707         braf_label.
6708         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6709         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6710         (split_branches): Strengthen local "olabel" from rtx to
6711         rtx_insn *, adding a safe_as_a cast.
6712         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6713         to "rtx_insn *".
6714         (add_insn_after): Likewise for first two params.
6715         (add_insn_before): Likewise.
6716         (remove_insn): Likewise for param.
6717         (emit_pattern_before_noloc): Likewise for second and third params.
6718         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6719         (emit_call_insn_before_noloc): Likewise.
6720         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6721         to "rtx_insn *".
6722         (emit_barrier_before): Likewise.
6723         (emit_label_before): Strengthen "label" param from "rtx" to
6724         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6725         "rtx_insn *".
6726         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6727         "rtx_insn *".
6728         (emit_pattern_after_noloc): Likewise.
6729         (emit_insn_after_noloc): Likewise.
6730         (emit_jump_insn_after_noloc): Likewise.
6731         (emit_call_insn_after_noloc): Likewise.
6732         (emit_debug_insn_after_noloc): Likewise.
6733         (emit_barrier_after): Likewise.
6734         (emit_label_after): Likewise for both params.
6735         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6736         "loc" param from "int" to "location_t".
6737         (emit_insn_after_setloc): Likewise.
6738         (emit_jump_insn_after_setloc): Likewise.
6739         (emit_call_insn_after_setloc): Likewise.
6740         (emit_debug_insn_after_setloc): Likewise.
6741         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6742         "loc" param from "int" to "location_t".
6743         (emit_pattern_before): Convert NULL_RTX to NULL.
6744         (emit_insn_before_setloc): Convert "loc" param from "int" to
6745         "location_t".
6746         (emit_jump_insn_before_setloc): Likewise.
6747         (emit_call_insn_before_setloc): Likewise.
6748         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6749         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6750         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6751         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6752         Convert 3rd param from "int" to "location_t".
6753         (emit_barrier_before, emit_barrier_after, next_real_insn):
6754         Strengthen param from rtx to rtx_insn *.
6755         (emit_label_before): Strengthen 1st param from "rtx" to
6756         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6757         "rtx_insn *".
6758         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6759         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6760         Strengthen 2nd param from "rtx" to "rtx_insn *".
6761         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6762         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6763         Likewise. Convert 3rd param from "int" to "location_t".
6764         (emit_label_after): Strengthen 1st param from "rtx" to
6765         "rtx_code_label *".
6766         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6767         "rtx_insn *".
6768         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6769         from "rtx" to "rtx_insn *".
6771 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6773         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6774         bodies streamed in with -Q.
6775         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6776         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6777         * gimple-streamer-out.c: Include gimple-pretty-print.h
6778         (output_bb): Dump stmts streamed.
6779         * lto-section-out.c: Include print-tree.h
6780         (lto_begin_section): Dump sections created.
6781         (lto_output_decl_index): Dump decl encoded.
6782         * lto-streamer-out.c: Include print-tree.h
6783         (create_output_block): Dump output block created.
6784         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6785         (output_function): Dump function output.
6786         (output_constructor): Dump constructor streamed.
6787         (write_global_stream): Output indexes encoded.
6788         (produce_asm_for_decls): Dump streams encoded.
6789         * lto-streamer.c (streamer_dump_file): New global var.
6790         * lto-streamer.h (streamer_dump_file): Declare.
6791         * passes.c (ipa_write_summaries): Initialize streamer dump.
6792         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6793         in.
6795 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6797         PR target/86048
6798         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6799         offsets for register save directives.  Emit a second batch of save
6800         directives, if need be, when the function accesses prior frames.
6802 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6804         * config/arc/fpu.md (fmasf4): Force operand to register.
6805         (fnmasf4): Likewise.
6807 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6809         * config/arc/arc-protos.h (arc_pad_return): Remove.
6810         * config/arc/arc.c (machine_function): Remove force_short_suffix
6811         and size_reason.
6812         (arc_print_operand): Adjust printing of '&'.
6813         (arc_verify_short): Remove conditional printing of short suffix.
6814         (arc_final_prescan_insn): Remove reference to size_reason.
6815         (pad_return): New function.
6816         (arc_reorg): Call pad_return.
6817         (arc_pad_return): Remove.
6818         (arc_init_machine_status): Remove reference to force_short_suffix.
6819         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6820         (attr length): When attribute iscompact is true force to 2
6821         regardless; in the case of maybe check if we want to force the
6822         instruction to have 4 bytes length.
6823         (nopv): Change it to generate 4 byte long nop as well.
6824         (blockage): New pattern.
6825         (simple_return): Remove call to arc_pad_return.
6826         (p_return_i): Likewise.
6828 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6830         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6832 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6834         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6835         ARC cores.
6837 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6839         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6840         for ARC700 and ARCv2.
6842 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6844         PR target/86076
6845         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6846         operands[2] instead of operands[1].
6849 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6851         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6852         case, check whether the outer register overlaps an unallocatable
6853         register, not just whether it fits the required class.
6855 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6857         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6858         are poly_ints.
6859         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6860         (memrefs_conflict_p): Likewise.
6861         (init_alias_analysis): Likewise.
6862         * cfgexpand.c (expand_debug_expr): Likewise.
6863         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6864         * cse.c (fold_rtx): Likewise.
6865         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6866         * expr.c (emit_block_move_hints): Likewise.
6867         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6868         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6869         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6870         (emit_group_store): Likewise.
6871         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6872         to read the PRE/POST_MODIFY increment.
6873         * calls.c (store_one_arg): Use strip_offset.
6874         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6875         poly_int_rtx_p.
6876         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6877         by a VEC_SELECT.
6878         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6879         (simplify_binary_operation_1): Extend CONST_INT handling to
6880         poly_int_rtx_p.
6881         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6882         than a HOST_WIDE_INT.
6883         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6884         poly_int64.
6885         (adjust_mems, add_stores): Update accodingly.
6886         (vt_canonicalize_addr): Track polynomial offsets.
6887         (emit_note_insn_var_location): Likewise.
6888         (vt_add_function_parameter): Likewise.
6889         (vt_initialize): Likewise.
6891 2018-06-12  Jeff Law  <law@redhat.com>
6893         * config.gcc (alpha*-*-freebsd*): Remove.
6894         * config/alpha/freebsd.h: Remove.
6896 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6898         PR other/69968
6899         * spellcheck-tree.c (levenshtein_distance): Rename to...
6900         (get_edit_distance): ...this, and update for underlying renaming.
6901         * spellcheck-tree.h (levenshtein_distance): Rename to...
6902         (get_edit_distance): ...this.
6903         * spellcheck.c (levenshtein_distance): Rename to...
6904         (get_edit_distance): ...this.  Convert from Levenshtein distance
6905         to Damerau-Levenshtein distance by supporting transpositions of
6906         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6907         "v_one_ago".
6908         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6909         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6910         update for underlying renaming.
6911         (selftest::levenshtein_distance_unit_test): Rename to...
6912         (selftest::test_get_edit_distance_unit): ...this, and update for
6913         underlying renaming.
6914         (selftest::test_find_closest_string): Add example from PR 69968
6915         where transposition helps
6916         (selftest::test_metric_conditions): Update for renaming.
6917         (selftest::test_metric_conditions): Likewise.
6918         (selftest::spellcheck_c_tests): Likewise.
6919         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6920         (get_edit_distance): ...this.
6921         (best_match::consider): Update for renaming.
6923 2018-06-12  Martin Sebor  <msebor@redhat.com>
6925         PR tree-optimization/85259
6926         * builtins.c (compute_objsize): Handle constant offsets.
6927         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6928         true iff a warning has been issued.
6929         * gimple.h (gimple_nonartificial_location): New function.
6930         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6931         gimple_nonartificial_location and handle -Wno-system-headers.
6932         (handle_builtin_stxncpy): Same.
6934 2018-06-12  Martin Sebor  <msebor@redhat.com>
6936         PR c/85931
6937         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6939 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6941         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6942         BUILTIN_VEC_XST entries for pointer to double and long long.
6944 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6946         PR target/85990
6947         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6948         Update comments.
6949         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6950         Likewise.
6952 2018-06-12  Martin Liska  <mliska@suse.cz>
6954         * doc/options.texi: Document IntegerRange.
6956 2018-06-12  Martin Liska  <mliska@suse.cz>
6958         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6959         * opt-functions.awk: Handle Deprecated flag.
6960         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6961         and report error.
6962         (read_cmdline_option): Report warning for a deprecated option.
6963         * opts.h (struct cl_option): Add new field cl_deprecated.
6964         (CL_ERR_DEPRECATED): New.
6966 2018-06-12  Martin Liska  <mliska@suse.cz>
6968         * doc/options.texi: Document Deprecated option flag.
6970 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6972         * config/arc/arc-arch.h (arc_extras): New enum.
6973         (arc_cpu_t):Add field extra.
6974         (arc_cpu_types): Consider the extras.
6975         * config/arc/arc-cpus.def: Add extras info.
6976         * config/arc/arc-opts.h (processor_type): Consider extra field.
6977         * config/arc/arc.c (arc_override_options): Handle extra field.
6979 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6981         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6982         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6983         field.
6984         * config/arc/arc.c (arc_init): Update pic warning.
6985         (irq_range): Update irq range parsing warnings.
6986         (arc_override_options): Update various warning messages.
6987         (arc_handle_aux_attribute): Likewise.
6989 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6991         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6993 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6995         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6996         compiler messages directives.
6998 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7000         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7001         * config/mips/mips-tables.opt: Regenerate.
7002         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7003         mips64r6.
7004         * doc/invoke.texi: Document -march=i6500.
7006 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7008         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7009         (i6400_gpmul): Add cpu_unit.
7010         (i6400_gpdiv): Likewise.
7011         (i6400_msa_add_d): Update reservations.
7012         (i6400_msa_int_add) Likewise.
7013         (i6400_msa_short_logic3) Likewise.
7014         (i6400_msa_short_logic2) Likewise.
7015         (i6400_msa_short_logic) Likewise.
7016         (i6400_msa_move) Likewise.
7017         (i6400_msa_cmp) Likewise.
7018         (i6400_msa_short_float2) Likewise.
7019         (i6400_msa_div_d) Likewise.
7020         (i6400_msa_long_logic1) Likewise.
7021         (i6400_msa_long_logic2) Likewise.
7022         (i6400_msa_mult) Likewise.
7023         (i6400_msa_long_float2) Likewise.
7024         (i6400_msa_long_float4) Likewise.
7025         (i6400_msa_long_float5) Likewise.
7026         (i6400_msa_long_float8) Likewise.
7027         (i6400_fpu_fadd): Include frint type.
7028         (i6400_fpu_store): New define_insn_reservation.
7029         (i6400_fpu_load): Likewise.
7030         (i6400_fpu_move): Likewise.
7031         (i6400_fpu_fcmp): Likewise.
7032         (i6400_fpu_fmadd): Likewise.
7033         (i6400_int_mult): Include imul3nc type and update reservation.
7034         (i6400_int_div): Include idiv3 type and update reservation.
7035         (i6400_int_load): Update to check type not move_type.
7036         (i6400_int_store): Likewise.
7037         (i6400_int_prefetch): Set zero latency.
7039 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7041         * gcc.c: Document new %@{...} sequence.
7042         (LINK_COMMAND_SPEC): Use it for the -L switches.
7043         (cpp_unique_options): Use it for the -I switches.
7044         (at_file_argbuf): New global variable.
7045         (in_at_file): Likewise.
7046         (alloc_args): Create at_file_argbuf.
7047         (clear_args): Truncate at_file_argbuf.
7048         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7049         (open_at_file): New function.
7050         (close_at_file): Likewise.
7051         (create_at_file): Delete.
7052         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7053         <'o'>: Likewise.
7054         <'@'>: New case.
7055         (validate_switches_from_spec): Deal with %@{...} sequence.
7056         (validate_switches): Likewise.
7057         (driver::finalize): Call clear_args.
7059 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7061         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7063 2018-06-11  Martin Sebor  <msebor@redhat.com>
7065         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7066         (Wno-class-memaccess): Add @opindex.
7067         (Wno-templates, Wno-multiple-inheritance): Same.
7068         (Wno-virtual-inheritance, Wno-namespaces): Same.
7069         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7070         (Wno-format-overflow, Wno-format-truncation): Same.
7071         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7072         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7073         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7074         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7075         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7076         (Wno-misspelled-isr): Same.
7078 2018-06-11  Martin Sebor  <msebor@redhat.com>
7080         * PR tree-optimization/86083
7081         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7083 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7085         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7087 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7089         PR target/85755
7090         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7091         on the correct operand.
7092         (*movdi_internal64): Ditto.
7094 2018-06-11  Martin Liska  <mliska@suse.cz>
7096         PR tree-optimization/86089
7097         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7099 2018-06-11  Julia Koval  <julia.koval@intel.com>
7101         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7102         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7103         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7105 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7107         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7108         for Ada with strict dwarf2.
7110 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7112         PR target/85755
7113         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7114         addresses.
7116 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7118         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7120 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7122         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7123         TARGET_ELF.
7125 2018-06-08  Martin Liska  <mliska@suse.cz>
7127         * tree-cfg.h (debug_function): Fix argument type to match
7128         implementation.
7130 2018-06-08  Martin Liska  <mliska@suse.cz>
7132         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7133         Remove usage of MPX-related (and removed) fields.
7134         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7136 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7138         * cfg.c (debug): Use TDF_NONE rather than 0.
7139         * cfghooks.c (debug): Likewise.
7140         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7141         (struct dump_option_value_info): Convert to...
7142         (struct kv_pair): ...this template type.
7143         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7144         rather than 0.
7145         (optinfo_verbosity_options): Likewise.
7146         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7147         OPTGROUP_NONE.
7148         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7149         than int for "optgroup_flags" param.
7150         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7151         "dump_kind" param.
7152         (dump_dec): Likewise.
7153         (dump_finish): Use TDF_NONE rather than 0.
7154         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7155         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7156         than 0.  Update for change to option_ptr.
7157         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7158         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7159         0.  Update for changes to optinfo_verbosity_options and
7160         optgroup_options.
7161         (opt_info_switch_p): Convert optgroup_flags from int to
7162         optgroup_flags_t.
7163         (dump_basic_block): Use dump_flags_t rather than int
7164         for "dump_kind" param.
7165         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7166         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7167         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7168         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7169         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7170         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7171         TDF_NONE): Convert from macros to...
7172         (enum dump_flag): ...this new enum.
7173         (dump_flags_t): Update to use enum.
7174         (operator|, operator&, operator~, operator|=, operator&=):
7175         Implement for dump_flags_t.
7176         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7177         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7178         Convert from macros to...
7179         (enum optgroup_flag): ...this new enum.
7180         (optgroup_flags_t): New typedef.
7181         (operator|, operator|=): Implement for optgroup_flags_t.
7182         (struct dump_file_info): Convert field "alt_flags" to
7183         dump_flags_t.  Convert field "optgroup_flags" to
7184         optgroup_flags_t.
7185         (dump_basic_block): Use dump_flags_t rather than int for param.
7186         (dump_generic_expr_loc): Likewise.
7187         (dump_dec): Likewise.
7188         (dump_register): Convert param "optgroup_flags" to
7189         optgroup_flags_t.
7190         (opt_info_enable_passes): Likewise.
7191         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7192         than 0.
7193         * gimple-pretty-print.c (debug): Likewise.
7194         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7195         (merged_store_group::apply_stores): Likewise.
7196         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7197         * gimple.c (verify_gimple_pp): Likewise.
7198         * graphite-poly.c (print_pbb_body): Likewise.
7199         * passes.c (pass_manager::register_one_dump_file): Convert
7200         local "optgroup_flags" to optgroup_flags_t.
7201         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7202         (debug): Likewise.
7203         (debug_body): Likewise.
7204         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7205         to optgroup_flags_t.
7206         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7207         than 0.
7208         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7209         (convert_mult_to_fma): Likewise.
7210         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7211         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7212         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7213         "dump_kind" to dump_flags_t.
7215 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7217         * config/rs6000/rs6000.c (min, max): Delete.
7219 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7221         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7222         -mabi=spe and -mabi=no-spe.
7224 2018-06-08  Martin Liska  <mliska@suse.cz>
7226         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7227         where we expect an existing summary.
7229 2018-06-08  Martin Liska  <mliska@suse.cz>
7231         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7232         * ipa-inline.h (estimate_edge_growth): Likewise.
7234 2018-06-08  Martin Liska  <mliska@suse.cz>
7236         * cgraph.c (function_version_hasher::hash): Use
7237         cgraph_node::get_uid ().
7238         (function_version_hasher::equal):
7239         * cgraph.h (cgraph_node::get_uid): New method.
7240         * ipa-inline.c (update_caller_keys): Use
7241         cgraph_node::get_uid ().
7242         (update_callee_keys): Likewise.
7243         * ipa-utils.c (searchc): Likewise.
7244         (ipa_reduced_postorder): Likewise.
7245         * lto-cgraph.c (input_node): Likewise.
7246         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7247         * symbol-summary.h (symtab_insertion): Likewise.
7248         (symtab_removal): Likewise.
7249         (symtab_duplication): Likewise.
7250         * tree-pretty-print.c (dump_function_header): Likewise.
7251         * tree-sra.c (convert_callers_for_node): Likewise.
7253 2018-06-08  Martin Liska  <mliska@suse.cz>
7255         * cgraph.c (symbol_table::create_edge): Always assign a new
7256         unique number.
7257         (symbol_table::free_edge): Do not recycle numbers.
7258         * cgraph.h (cgraph_edge::get): New method.
7259         * symbol-summary.h (symtab_removal): Use it.
7260         (symtab_duplication): Likewise.
7261         (call_summary::hashable_uid): Remove.
7263 2018-06-08  Martin Liska  <mliska@suse.cz>
7265         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7266         (initialize_growth_caches): Remove.
7267         (free_growth_caches): Likewise.
7268         (do_estimate_edge_time): Use edge_growth_cache.
7269         (do_estimate_edge_size): Likewise.
7270         (do_estimate_edge_hints): Likewise.
7271         * ipa-inline.c (reset_edge_caches): Likewise.
7272         (recursive_inlining): Likewise.
7273         (inline_small_functions): Likewise.
7274         * ipa-inline.h (initialize_growth_caches): Remove.
7275         (estimate_edge_size): Likewise.
7276         (estimate_edge_time): Likewise.
7277         (estimate_edge_hints): Likewise.
7278         (reset_edge_growth_cache): Likewise.
7279         * symbol-summary.h (call_summary::remove): New method.
7281 2018-06-08  Martin Liska  <mliska@suse.cz>
7283         * ipa-cp.c (class edge_clone_summary): New summary.
7284         (grow_edge_clone_vectors): Remove.
7285         (ipcp_edge_duplication_hook): Remove.
7286         (class edge_clone_summary_t): New call_summary class.
7287         (ipcp_edge_removal_hook): Remove.
7288         (edge_clone_summary_t::duplicate): New function.
7289         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7290         (create_specialized_node): Likewise.
7291         (ipcp_driver): Initialize edge_clone_summaries and do not
7292         register hooks.
7294 2018-06-08  Martin Liska  <mliska@suse.cz>
7296         * symbol-summary.h (get): New function.
7297         (call_summary::m_initialize_when_cloning): New class member.
7299 2018-06-08  Martin Liska  <mliska@suse.cz>
7301         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7302         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7303         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7304         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7305         (remove_cgraph_node_from_order): Use the removed_nodes set.
7306         (do_per_function_toporder): Likwise.
7307         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7308         instead of summary_uid.
7309         (symtab_removal): Likewise.
7310         (symtab_duplication): Likewise.
7312 2018-06-08  Martin Liska  <mliska@suse.cz>
7314         * ipa-cp.c (ipcp_store_bits_results): Use
7315         ipcp_transformation_sum.
7316         (ipcp_store_vr_results): Likewise.
7317         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7318         to ...
7319         (ipcp_transformation_initialize): ... this.
7320         (ipa_set_node_agg_value_chain):
7321         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7322         (write_ipcp_transformation_info): Likewise.
7323         (read_ipcp_transformation_info): Likewise.
7324         (ipcp_update_bits): Likewise.
7325         (ipcp_update_vr): Likewise.
7326         (ipcp_transform_function): Likewise.
7327         * ipa-prop.h: Rename ipcp_transformation_summary to
7328         ipcp_transformation.
7329         (class ipcp_transformation_t): New function summary.
7330         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7331         (ipa_get_agg_replacements_for_node): Likewise.
7333 2018-06-08  Martin Liska  <mliska@suse.cz>
7335         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7336         of struct.
7337         (class funct_state_summary_t): New function_summary class.
7338         (has_function_state): Remove.
7339         (get_function_state): Likewise.
7340         (set_function_state): Likewise.
7341         (add_new_function): Likewise.
7342         (funct_state_summary_t::insert): New function.
7343         (duplicate_node_data): Remove.
7344         (remove_node_data): Remove.
7345         (funct_state_summary_t::duplicate): New function.
7346         (register_hooks): Create new funct_state_summaries.
7347         (pure_const_generate_summary): Use it.
7348         (pure_const_write_summary): Likewise.
7349         (pure_const_read_summary): Likewise.
7350         (propagate_pure_const): Likewise.
7351         (propagate_nothrow): Likewise.
7352         (dump_malloc_lattice): Likewise.
7353         (propagate_malloc): Likewise.
7354         (execute): Do not register hooks, just remove summary
7355         instead.
7356         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7357         constructor.
7359 2018-06-08  Martin Liska  <mliska@suse.cz>
7361         * ipa-reference.c (remove_node_data): Remove.
7362         (duplicate_node_data): Likewise.
7363         (class ipa_ref_var_info_summary_t): New class.
7364         (class ipa_ref_opt_summary_t): Likewise.
7365         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7366         (get_reference_optimization_summary): Use
7367         ipa_ref_opt_sum_summaries.
7368         (set_reference_vars_info): Remove.
7369         (set_reference_optimization_summary): Likewise.
7370         (ipa_init): Create summaries.
7371         (init_function_info): Use function summary.
7372         (ipa_ref_opt_summary_t::duplicate): New function.
7373         (ipa_ref_opt_summary_t::remove): New function.
7374         (get_read_write_all_from_node): Fix GNU coding style.
7375         (propagate): Use function summary.
7376         (write_node_summary_p): Fix GNU coding style.
7377         (stream_out_bitmap): Likewise.
7378         (ipa_reference_read_optimization_summary): Use function summary.
7379         (ipa_reference_c_finalize): Do not release hooks.
7381 2018-06-08  Martin Liska  <mliska@suse.cz>
7383         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7384         (analyze_function_body): Extract multiple calls of get_create.
7385         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7386         * ipa-inline.c (recursive_inlining): Use ::get method.
7387         * ipa-inline.h (estimate_edge_growth): Likewise.
7389 2018-06-08  Martin Liska  <mliska@suse.cz>
7391         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7392         HSA_INVALID.
7393         (hsa_function_summary::hsa_function_summary): Use the new enum
7394         value.
7395         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7396         * hsa-gen.c (hsa_get_host_function): Likewise.
7397         (get_brig_function_name): Likewise.
7398         * ipa-hsa.c (process_hsa_functions): Likewise.
7399         (ipa_hsa_write_summary): Likewise.
7400         * symbol-summary.h (symtab_duplication): Use ::get function/
7401         (get): New function.
7403 2018-06-08  Martin Liska  <mliska@suse.cz>
7405         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7406         of get.
7407         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7408         (hsa_register_kernel): Likewise.
7409         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7410         * hsa-gen.c (hsa_get_host_function): Likewise.
7411         (get_brig_function_name): Likewise.
7412         (generate_hsa): Likewise.
7413         (pass_gen_hsail::execute): Likewise.
7414         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7415         (devirtualization_time_bonus): Likewise.
7416         (ipcp_propagate_stage): Likewise.
7417         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7418         (edge_set_predicate): Likewise.
7419         (evaluate_conditions_for_known_args): Likewise.
7420         (evaluate_properties_for_edge): Likewise.
7421         (ipa_fn_summary::reset): Likewise.
7422         (ipa_fn_summary_t::duplicate): Likewise.
7423         (dump_ipa_call_summary): Likewise.
7424         (ipa_dump_fn_summary): Likewise.
7425         (analyze_function_body): Likewise.
7426         (compute_fn_summary): Likewise.
7427         (estimate_edge_devirt_benefit): Likewise.
7428         (estimate_edge_size_and_time): Likewise.
7429         (estimate_calls_size_and_time): Likewise.
7430         (estimate_node_size_and_time): Likewise.
7431         (inline_update_callee_summaries): Likewise.
7432         (remap_edge_change_prob): Likewise.
7433         (remap_edge_summaries): Likewise.
7434         (ipa_merge_fn_summary_after_inlining): Likewise.
7435         (ipa_update_overall_fn_summary): Likewise.
7436         (read_ipa_call_summary): Likewise.
7437         (inline_read_section): Likewise.
7438         (write_ipa_call_summary): Likewise.
7439         (ipa_fn_summary_write): Likewise.
7440         (ipa_free_fn_summary): Likewise.
7441         * ipa-hsa.c (process_hsa_functions): Likewise.
7442         (ipa_hsa_write_summary): Likewise.
7443         (ipa_hsa_read_section): Likewise.
7444         * ipa-icf.c (sem_function::merge): Likewise.
7445         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7446         (do_estimate_edge_time): Likewise.
7447         (estimate_size_after_inlining): Likewise.
7448         (estimate_growth): Likewise.
7449         (growth_likely_positive): Likewise.
7450         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7451         (inline_call): Likewise.
7452         * ipa-inline.c (caller_growth_limits): Likewise.
7453         (can_inline_edge_p): Likewise.
7454         (can_inline_edge_by_limits_p): Likewise.
7455         (compute_uninlined_call_time): Likewise.
7456         (compute_inlined_call_time): Likewise.
7457         (want_inline_small_function_p): Likewise.
7458         (edge_badness): Likewise.
7459         (update_caller_keys): Likewise.
7460         (update_callee_keys): Likewise.
7461         (recursive_inlining): Likewise.
7462         (inline_small_functions): Likewise.
7463         (inline_to_all_callers_1): Likewise.
7464         (dump_overall_stats): Likewise.
7465         (early_inline_small_functions): Likewise.
7466         (early_inliner): Likewise.
7467         * ipa-inline.h (estimate_edge_growth): Likewise.
7468         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7469         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7470         * ipa-prop.h (IPA_NODE_REF): Likewise.
7471         (IPA_EDGE_REF): Likewise.
7472         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7473         (propagate_malloc): Likewise.
7474         * ipa-split.c (execute_split_functions): Likewise.
7475         * symbol-summary.h: Rename get to get_create.
7476         (get): Likewise.
7477         (get_create): Likewise.
7478         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7480 2018-06-08  Martin Liska  <mliska@suse.cz>
7482         * symbol-summary.h (release): Move definition out of class
7483         declaration.
7484         (symtab_removal): Likewise.
7485         (symtab_duplication): Likewise.
7487 2018-06-08  Martin Liska  <mliska@suse.cz>
7489         * symbol-summary.h (function_summary): Move constructor
7490         implementation out of class declaration.
7491         (release): Likewise.
7492         (symtab_insertion): Likewise.
7493         (symtab_removal): Likewise.
7494         (symtab_duplication): Likewise.
7495         (get): Likewise.
7497 2018-06-08  Martin Liska  <mliska@suse.cz>
7499         * Makefile.in: Remove support for MPX (macros, related functions,
7500         fields in cgraph_node, ...).
7501         * builtin-types.def (BT_BND): Likewise.
7502         (BT_FN_BND_CONST_PTR): Likewise.
7503         (BT_FN_CONST_PTR_BND): Likewise.
7504         (BT_FN_VOID_PTR_BND): Likewise.
7505         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7506         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7507         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7508         (expand_builtin_mempcpy_with_bounds): Likewise.
7509         (expand_builtin_memset_with_bounds): Likewise.
7510         (expand_builtin_memset_args): Likewise.
7511         (std_expand_builtin_va_start): Likewise.
7512         (expand_builtin): Likewise.
7513         (expand_builtin_with_bounds): Likewise.
7514         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7515         (DEF_LIB_BUILTIN_CHKP): Likewise.
7516         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7517         (DEF_CHKP_BUILTIN): Likewise.
7518         (BUILT_IN_MEMCPY): Likewise.
7519         (BUILT_IN_MEMMOVE): Likewise.
7520         (BUILT_IN_MEMPCPY): Likewise.
7521         (BUILT_IN_MEMSET): Likewise.
7522         (BUILT_IN_STPCPY): Likewise.
7523         (BUILT_IN_STRCAT): Likewise.
7524         (BUILT_IN_STRCHR): Likewise.
7525         (BUILT_IN_STRCPY): Likewise.
7526         (BUILT_IN_STRLEN): Likewise.
7527         (BUILT_IN_MEMCPY_CHK): Likewise.
7528         (BUILT_IN_MEMMOVE_CHK): Likewise.
7529         (BUILT_IN_MEMPCPY_CHK): Likewise.
7530         (BUILT_IN_MEMSET_CHK): Likewise.
7531         (BUILT_IN_STPCPY_CHK): Likewise.
7532         (BUILT_IN_STRCAT_CHK): Likewise.
7533         (BUILT_IN_STRCPY_CHK): Likewise.
7534         * calls.c (store_bounds): Likewise.
7535         (emit_call_1): Likewise.
7536         (special_function_p): Likewise.
7537         (maybe_warn_nonstring_arg): Likewise.
7538         (initialize_argument_information): Likewise.
7539         (finalize_must_preallocate): Likewise.
7540         (compute_argument_addresses): Likewise.
7541         (expand_call): Likewise.
7542         * cfgexpand.c (expand_call_stmt): Likewise.
7543         (expand_return): Likewise.
7544         (expand_gimple_stmt_1): Likewise.
7545         (pass_expand::execute): Likewise.
7546         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7547         (cgraph_node::remove): Likewise.
7548         (cgraph_node::dump): Likewise.
7549         (cgraph_node::verify_node): Likewise.
7550         * cgraph.h (chkp_function_instrumented_p): Likewise.
7551         (symtab_node::get_alias_target): Likewise.
7552         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7553         (cgraph_local_p): Likewise.
7554         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7555         (cgraph_edge::rebuild_references): Likewise.
7556         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7557         (walk_polymorphic_call_targets): Likewise.
7558         (cgraph_node::expand_thunk): Likewise.
7559         (symbol_table::output_weakrefs): Likewise.
7560         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7561         (ix86_handle_option): Likewise.
7562         * config/i386/constraints.md: Likewise.
7563         * config/i386/i386-builtin-types.def (BND): Likewise.
7564         (VOID): Likewise.
7565         (PVOID): Likewise.
7566         (ULONG): Likewise.
7567         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7568         (BDESC_FIRST): Likewise.
7569         (BDESC): Likewise.
7570         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7571         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7572         * config/i386/i386.c (enum reg_class): Likewise.
7573         (ix86_target_string): Likewise.
7574         (ix86_option_override_internal): Likewise.
7575         (ix86_conditional_register_usage): Likewise.
7576         (ix86_valid_target_attribute_inner_p): Likewise.
7577         (ix86_set_indirect_branch_type): Likewise.
7578         (ix86_set_current_function): Likewise.
7579         (ix86_function_arg_regno_p): Likewise.
7580         (init_cumulative_args): Likewise.
7581         (ix86_function_arg_advance): Likewise.
7582         (ix86_function_arg): Likewise.
7583         (ix86_pass_by_reference): Likewise.
7584         (ix86_function_value_regno_p): Likewise.
7585         (ix86_function_value_1): Likewise.
7586         (ix86_function_value_bounds): Likewise.
7587         (ix86_return_in_memory): Likewise.
7588         (ix86_setup_incoming_vararg_bounds): Likewise.
7589         (ix86_va_start): Likewise.
7590         (indirect_thunk_need_prefix): Likewise.
7591         (print_reg): Likewise.
7592         (ix86_print_operand): Likewise.
7593         (ix86_expand_call): Likewise.
7594         (ix86_output_function_return): Likewise.
7595         (reg_encoded_number): Likewise.
7596         (BDESC_VERIFYS): Likewise.
7597         (ix86_init_mpx_builtins): Likewise.
7598         (ix86_init_builtins): Likewise.
7599         (ix86_emit_cmove): Likewise.
7600         (ix86_emit_move_max): Likewise.
7601         (ix86_expand_builtin): Likewise.
7602         (ix86_builtin_mpx_function): Likewise.
7603         (ix86_get_arg_address_for_bt): Likewise.
7604         (ix86_load_bounds): Likewise.
7605         (ix86_store_bounds): Likewise.
7606         (ix86_load_returned_bounds): Likewise.
7607         (ix86_store_returned_bounds): Likewise.
7608         (ix86_class_likely_spilled_p): Likewise.
7609         (ix86_hard_regno_mode_ok): Likewise.
7610         (x86_order_regs_for_local_alloc): Likewise.
7611         (ix86_mitigate_rop): Likewise.
7612         (ix86_bnd_prefixed_insn_p): Likewise.
7613         (ix86_mpx_bound_mode): Likewise.
7614         (ix86_make_bounds_constant): Likewise.
7615         (ix86_initialize_bounds): Likewise.
7616         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7617         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7618         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7619         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7620         (TARGET_CHKP_BOUND_MODE): Likewise.
7621         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7622         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7623         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7624         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7625         * config/i386/i386.h (TARGET_MPX): Likewise.
7626         (TARGET_MPX_P): Likewise.
7627         (VALID_BND_REG_MODE): Likewise.
7628         (FIRST_BND_REG): Likewise.
7629         (LAST_BND_REG): Likewise.
7630         (enum reg_class): Likewise.
7631         (BND_REG_P): Likewise.
7632         (BND_REGNO_P): Likewise.
7633         (BNDmode): Likewise.
7634         (ADJUST_INSN_LENGTH): Likewise.
7635         * config/i386/i386.md: Likewise.
7636         * config/i386/i386.opt: Likewise.
7637         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7638         (defined): Likewise.
7639         (LINK_MPX): Likewise.
7640         (MPX_SPEC): Likewise.
7641         (LIBMPX_SPEC): Likewise.
7642         (LIBMPXWRAPPERS_SPEC): Likewise.
7643         (CHKP_SPEC): Likewise.
7644         * config/i386/predicates.md: Likewise.
7645         * dbxout.c (dbxout_type): Likewise.
7646         * doc/extend.texi: Likewise.
7647         * doc/invoke.texi: Likewise.
7648         * doc/md.texi: Likewise.
7649         * doc/tm.texi: Likewise.
7650         * doc/tm.texi.in: Likewise.
7651         * dwarf2out.c (is_base_type): Likewise.
7652         (gen_formal_types_die): Likewise.
7653         (gen_subprogram_die): Likewise.
7654         (gen_type_die_with_usage): Likewise.
7655         (gen_decl_die): Likewise.
7656         (dwarf2out_late_global_decl): Likewise.
7657         * expr.c (expand_assignment): Likewise.
7658         (emit_storent_insn): Likewise.
7659         (store_expr_with_bounds): Likewise.
7660         (store_expr): Likewise.
7661         (expand_expr_real_1): Likewise.
7662         * expr.h (store_expr_with_bounds): Likewise.
7663         * function.c (use_register_for_decl): Likewise.
7664         (struct bounds_parm_data): Likewise.
7665         (assign_parms_augmented_arg_list): Likewise.
7666         (assign_parm_find_entry_rtl): Likewise.
7667         (assign_parm_is_stack_parm): Likewise.
7668         (assign_parm_load_bounds): Likewise.
7669         (assign_bounds): Likewise.
7670         (assign_parms): Likewise.
7671         (expand_function_start): Likewise.
7672         * gcc.c (CHKP_SPEC): Likewise.
7673         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7674         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7675         (wrestrict_dom_walker::check_call): Likewise.
7676         * gimple.c (gimple_build_call_from_tree): Likewise.
7677         * gimple.h (enum gf_mask): Likewise.
7678         (gimple_call_with_bounds_p): Likewise.
7679         (gimple_call_set_with_bounds): Likewise.
7680         * gimplify.c (gimplify_init_constructor): Likewise.
7681         * ipa-cp.c (initialize_node_lattices): Likewise.
7682         (propagate_constants_across_call): Likewise.
7683         (find_more_scalar_values_for_callers_subset): Likewise.
7684         * ipa-hsa.c (process_hsa_functions): Likewise.
7685         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7686         * ipa-icf.c (sem_function::merge): Likewise.
7687         * ipa-inline.c (early_inliner): Likewise.
7688         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7689         (warn_function_cold): Likewise.
7690         (propagate_pure_const): Likewise.
7691         * ipa-ref.h (enum GTY): Likewise.
7692         * ipa-split.c (find_retbnd): Likewise.
7693         (consider_split): Likewise.
7694         (split_function): Likewise.
7695         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7696         * ipa.c (walk_polymorphic_call_targets): Likewise.
7697         (symbol_table::remove_unreachable_nodes): Likewise.
7698         (process_references): Likewise.
7699         (cgraph_build_static_cdtor_1): Likewise.
7700         * lto-cgraph.c (lto_output_node): Likewise.
7701         (output_refs): Likewise.
7702         (compute_ltrans_boundary): Likewise.
7703         (input_overwrite_node): Likewise.
7704         (input_node): Likewise.
7705         (input_cgraph_1): Likewise.
7706         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7707         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7708         (class pass_chkp_instrumentation_passes): Likewise.
7709         (make_pass_chkp_instrumentation_passes): Likewise.
7710         * passes.def: Likewise.
7711         * rtl.h (struct GTY): Likewise.
7712         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7713         * stor-layout.c (layout_type): Likewise.
7714         * symtab.c: Likewise.
7715         * target.def: Likewise.
7716         * targhooks.c (default_chkp_bound_type): Likewise.
7717         (default_chkp_bound_mode): Likewise.
7718         (default_builtin_chkp_function): Likewise.
7719         (default_chkp_function_value_bounds): Likewise.
7720         (default_chkp_make_bounds_constant): Likewise.
7721         (default_chkp_initialize_bounds): Likewise.
7722         * targhooks.h (default_chkp_bound_type): Likewise.
7723         (default_chkp_bound_mode): Likewise.
7724         (default_builtin_chkp_function): Likewise.
7725         (default_chkp_function_value_bounds): Likewise.
7726         (default_chkp_make_bounds_constant): Likewise.
7727         (default_chkp_initialize_bounds): Likewise.
7728         * toplev.c (compile_file): Likewise.
7729         (process_options): Likewise.
7730         * tree-core.h (DEF_BUILTIN): Likewise.
7731         (DEF_BUILTIN_CHKP): Likewise.
7732         * tree-inline.c (declare_return_variable): Likewise.
7733         (remap_gimple_stmt): Likewise.
7734         (copy_bb): Likewise.
7735         (initialize_inlined_parameters): Likewise.
7736         (expand_call_inline): Likewise.
7737         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7738         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7739         (make_pass_ipa_chkp_produce_thunks): Likewise.
7740         (make_pass_chkp): Likewise.
7741         (make_pass_chkp_opt): Likewise.
7742         (make_pass_chkp_instrumentation_passes): Likewise.
7743         * tree-pretty-print.c (dump_generic_node): Likewise.
7744         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7745         * tree-ssa-dce.c (propagate_necessity): Likewise.
7746         (eliminate_unnecessary_stmts): Likewise.
7747         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7748         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7749         * tree-ssa-sccvn.h: Likewise.
7750         * tree-ssa-strlen.c (get_string_length): Likewise.
7751         (valid_builtin_call): Likewise.
7752         (adjust_last_stmt): Likewise.
7753         (handle_builtin_strchr): Likewise.
7754         (handle_builtin_strcpy): Likewise.
7755         (handle_builtin_stxncpy): Likewise.
7756         (handle_builtin_memcpy): Likewise.
7757         (handle_builtin_strcat): Likewise.
7758         (strlen_check_and_optimize_stmt): Likewise.
7759         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7760         * tree-streamer-in.c: Likewise.
7761         * tree-streamer.c (record_common_node): Likewise.
7762         * tree.c (tree_code_size): Likewise.
7763         (wide_int_to_tree_1): Likewise.
7764         (type_contains_placeholder_1): Likewise.
7765         (build_common_tree_nodes): Likewise.
7766         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7767         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7768         (POINTER_BOUNDS_P): Likewise.
7769         (BOUNDED_TYPE_P): Likewise.
7770         (BOUNDED_P): Likewise.
7771         (CALL_WITH_BOUNDS_P): Likewise.
7772         (pointer_bounds_type_node): Likewise.
7773         * value-prof.c (gimple_ic): Likewise.
7774         * var-tracking.c (vt_add_function_parameters): Likewise.
7775         * varasm.c (make_decl_rtl): Likewise.
7776         (assemble_start_function): Likewise.
7777         (output_constant): Likewise.
7778         (maybe_assemble_visibility): Likewise.
7779         * varpool.c (ctor_for_folding): Likewise.
7780         * chkp-builtins.def: Remove.
7781         * ipa-chkp.c: Remove.
7782         * ipa-chkp.h: Remove.
7783         * rtl-chkp.c: Remove.
7784         * rtl-chkp.h: Remove.
7785         * tree-chkp-opt.c: Remove.
7786         * tree-chkp.c: Remove.
7787         * tree-chkp.h: Remove.
7789 2018-06-07  Carl Love  <cel@us.ibm.com>
7791         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7792         vextract_fp_from_shortl): Add BE support.
7794 2018-06-07  Paul Koning  <ni1d@arrl.net>
7796         * compare-elim.c (try_merge_compare): Don't merge compare if
7797         address contains a side effect.
7798         (try_eliminate_compare): Likewise.
7800 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7802         * config.gcc: Support "tremont".
7803         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7804         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7805         PROCESSOR_TREMONT.
7806         * config/i386/i386.c (m_TREMONT): Define.
7807         (processor_target_table): Add "tremont".
7808         (PTA_TREMONT): Define.
7809         (ix86_lea_outperforms): Add TARGET_TREMONT.
7810         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7811         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7812         and M_INTEL_GOLDMONT_PLUS.
7813         (fold_builtin_cpu): Add "tremont".
7814         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7815         (ix86_option_override_internal): Add "tremont".
7816         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7817         (processor_type): Add PROCESSOR_TREMONT.
7818         * config/i386/x86-tune.def: Add m_TREMONT.
7819         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7821 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7823         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7824         symbol defined for msp430i* devices to be lower case.
7826 2018-06-07  Richard Biener  <rguenther@suse.de>
7828         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7829         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7830         Properly wrap signed arithmetic if overflow wraps.
7832 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7834         PR tree-optimization/69615
7835         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7836         of a cast from a same precision integral SSA_NAME in a bb dominated
7837         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7838         cast to utype if rhs2 has already a compatible type.
7840 2018-06-07  Richard Biener  <rguenther@suse.de>
7842         PR tree-optimization/85935
7843         * graphite-scop-detection.c (find_params_in_bb): Analyze
7844         condition operands with respect to the correct loop.  Assert
7845         the analysis doesn't fail.
7847 2018-06-04  Carl Love  <cel@us.ibm.com>
7849         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7850         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7851         as it is slightly cheaper.
7852         (first_match_or_eos_index_<mode>):
7853         Calculate index using natural element order.
7854         (first_match_index_<mode>):
7855         Calculate index using natural element order.
7856         (first_match_or_eos_index_<mode>):
7857         Calculate index using natural order.
7858         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7859         for BE and LE modes.
7860         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7861         P9V_BUILTIN_VCLZLSBB_V16QI.
7862         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7863         specific.
7865 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7867         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7868         indentation and line wrap for many prototypes.  Add missing
7869         @smallexample directives around block of prototypes for vec_xl and
7870         vec_xst.
7872 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7874         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7875         track if we pass or return IEEE 128-bit floating point.
7876         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7877         C++ mangling that is compatible with GCC 8.1.
7878         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7879         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7880         floating point types.
7881         (rs6000_function_arg_advance_1): Likewise.
7882         (rs6000_mangle_type): Optionally generate mangled names that match
7883         what GCC 8.1 generated for IEEE 128-bit floating point types.
7884         (rs6000_globalize_decl_name): If we have an external function that
7885         passes or returns IEEE 128-bit types, generate a weak reference
7886         from the mangled name used in GCC 8.1 to the current mangled
7887         name.
7888         (rs6000_init_builtins): Make __ibm128 use the long double type if
7889         long double is IBM extended double.  Make __float128 use the long
7890         double type if long double is IEEE 128-bit.
7892         PR target/85657
7893         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7894         macro for __ibm128 built-in functions.
7895         (PACK_IF): Add __ibm128 pack/unpack functions.
7896         (UNPACK_IF): Likewise.
7897         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7898         enable long double built-in functions if long double is IEEE
7899         128-bit floating point.
7900         (rs6000_invalid_builtin): Update long double built-in function
7901         error message.
7902         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7903         functions, adjust the built-in function to use the long double
7904         built-in function if __ibm128 and long double are the same type.
7905         * doc/extend.texi (PowerPC builtins): Update documention for
7906         __builtin_{,un}pack_longdouble.  Add documentation for
7907         __builtin_{,un}pack_ibm128.
7909 2018-06-06  Jim Wilson  <jimw@sifive.com>
7911         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7912         (struct machine_function): New field interrupt_mode.
7913         (riscv_handle_type_attribute): New function.  Add forward declaration.
7914         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7915         (riscv_expand_epilogue): Check interrupt_mode field.
7916         (riscv_set_current_function): Check interrupt attribute args and
7917         set interrupt_mode field.
7918         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7919         (riscv_sret, riscv_uret): New.
7920         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7921         new arguments to interrupt attribute.
7923 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7925         PR target/63177
7926         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7927         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7929 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7931         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7932         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7933         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7934         several redundant entries.
7936 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7938         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7939         type from "rtx" to "rtx_insn *".
7940         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7941         for local "call_insn", removing cast.
7942         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7944 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7946         PR tree-optimization/86066
7947         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7948         for BIT_INSERT_EXPR stores.
7950 2018-06-06  Richard Biener  <rguenther@suse.de>
7952         PR tree-optimization/86062
7953         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7954         component refs ontop
7955         of to be offsetted base.
7957 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7959         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7960         to be static and remove check on interrupt attribute name.
7962 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7964         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7965         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7967 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7969         PR target/79924
7970         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7971         second argument.
7972         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7973         Remove second argument, change how error is called.
7974         (aarch64_layout_arg): Remove second argument from
7975         aarch64_err_no_fpadvsimd call.
7976         (aarch64_init_cumulative_args): Ditto.
7977         (aarch64_gimplify_va_arg_expr): Ditto.
7978         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7980 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7982         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7983         (*simple_return_indirect_internal<mode>): Rename from
7984         simple_return_indirect_internal.  Use W mode iterator.
7985         (rstorssp): New expander.
7986         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7987         (clrssbsy): New expander.
7988         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7990 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7992         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7993         __typeof__.
7994         (cmse_check_pointed_object): Likewise.
7996 2018-06-05  Martin Liska  <mliska@suse.cz>
7998         PR gcov-profile/47618
7999         * doc/invoke.texi: Document how -fprofile-dir format
8000         is extended.
8002 2018-06-05  Richard Biener  <rguenther@suse.de>
8004         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8005         removal pretend DOM info isn't available so we do not update
8006         it and only remove edges, not dominated blocks.  Actually free
8007         DOM info in case we removed something.  Remove unreachable blocks.
8008         (mfb_keep_latches): Work with either DOM info or marked backedges.
8009         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8010         first.  Mark backedges if DOM info isn't available.
8011         (Re-)compute DOM info after cleanup_control_flow_pre.
8013 2018-06-05  Richard Biener  <rguenther@suse.de>
8015         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8016         (locus_discrim_hasher::hash): Adjust.
8017         (locus_discrim_hasher::equal): Likewise.
8018         (next_discriminator_for_locus): Work on line directly.
8019         (same_line_p): Pass in expanded locus1 as well.
8020         (assign_discriminators): Avoid redundant location expansions.
8022 2018-06-05  Richard Biener  <rguenther@suse.de>
8024         PR tree-optimization/86046
8025         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8026         if required after clearing TREE_ADDRESSABLE.
8028 2018-06-05  Richard Biener  <rguenther@suse.de>
8030         PR tree-optimization/86047
8031         * tree-ssa-loop.c (for_each_index): Glob handling of all
8032         decls and constants and really handle all of them.
8034 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8036         PR target/81497
8037         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8038         qualifier_void_pointer and qualifier_const_void_pointer.
8039         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8040         (arm_init_builtins): Handle the above.
8041         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8042         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8043         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8044         void intrinsics.
8046 2018-06-05  Martin Liska  <mliska@suse.cz>
8048         * auto-profile.c (read_autofdo_file): Do not use
8049         gcov_ctr_summary struct.
8050         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8051         * coverage.c (struct counts_entry): Likewise.
8052         (read_counts_file): Read just single summary entry.
8053         (get_coverage_counts): Use gcov_summary struct.
8054         * coverage.h (get_coverage_counts): Likewise.
8055         * gcov-dump.c (dump_working_sets): Likewise.
8056         (tag_summary): Dump just single summary.
8057         * gcov-io.c (gcov_write_summary): Write just histogram
8058         summary.
8059         (gcov_read_summary): Read just single summary.
8060         (compute_working_sets): Use gcov_summary struct.
8061         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8062         of GCOV_COUNTERS_SUMMABLE.
8063         (GCOV_COUNTERS_SUMMABLE): Remove.
8064         (GCOV_FIRST_VALUE_COUNTER): Replace with
8065         GCOV_COUNTER_V_INTERVAL.
8066         (struct gcov_ctr_summary): Remove.
8067         (struct gcov_summary): Directly use fields of former
8068         gcov_ctr_summary.
8069         (compute_working_sets): Use gcov_summary struct.
8070         * gcov.c (read_count_file): Do not use ctrs fields.
8071         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8072         struct.
8073         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8074         struct.
8075         * profile.c: Likewise.
8076         * profile.h: Likewise.
8078 2018-06-05  Martin Liska  <mliska@suse.cz>
8080         PR gcov-profile/84846
8081         * gcov.c (output_lines): Print working directory only
8082         in intermediate format.
8084 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8086         * config/s390/s390-builtin-types.def: Add void function type.
8087         * config/s390/s390-builtins.def: Use the function type for the
8088         tbeginc builtin.
8090 2018-06-04  Jim Wilson  <jimw@sifive.com>
8092         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8093         to int.
8094         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8095         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8096         handle EH_RETURN_DATA_REGNO registers properly.
8097         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8098         (riscv_expand_epilogue): Update comment.  Change argument name and
8099         type.  Update code to use new name and type.  Pass new args to
8100         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8101         EXCEPTION_RETURN.
8102         * config/riscv/riscv.md (NORMAL_RETURN): New.
8103         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8104         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8105         (eh_return): Call gen_eh_return_internal and emit barrier.
8106         (eh_return_internal): Call riscv_expand_epilogue.
8108 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8110         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8111         bit_insertion field and declare can_be_merged_into method.
8112         (merged_store_group::can_be_merged_into): New method.
8113         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8114         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8115         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8117 2018-06-04  Richard Biener  <rguenther@suse.de>
8119         PR tree-optimization/85955
8120         * builtins.c (fold_builtin_sincos): Convert pointers to
8121         destination to appropriate type before dereferencing.
8123 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8125         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8127 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8129         * expr.c (expand_expr_real_1): Force the operand into memory if
8130         its TYPE_MODE is BLKmode and if there is no integer mode for
8131         the number of bits being extracted.
8133 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8135         PR target/85832
8136         PR target/86036
8137         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8138         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8140 2018-06-04  Richard Biener  <rguenther@suse.de>
8142         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8143         (cleanup_tree_cfg_noloop): ... single caller.  Do
8144         start_recording_case_labels later.
8146 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8148         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8149         to _IMMINTRIN_H_INCLUDED.
8150         * config/i386/pconfigintrin.h: Ditto.
8151         * config/i386/waitpkgintrin.h: Ditto.
8152         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8153         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8154         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8155         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8156         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8157         waitpkgintrin.h and cldemoteintrin.h.
8159 2018-06-04  Richard Biener  <rguenther@suse.de>
8161         PR tree-optimization/86038
8162         * tracer.c (find_best_successor): Check probability for
8163         being initialized, bail out if not.
8165 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8167         PR target/86003
8168         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8169         of bits to ignore when comparing architectures.
8171 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8173         PR tree-optimization/69615
8174         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8175         maximum or minimum of the type, try to merge it also as if
8176         range1 is + [-, x - 1] or + [x + 1, -].
8178         PR c++/86025
8179         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8181 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8183         PR tree-optimization/86034
8184         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8185         the unsigned bitfield type in a bit insertion sequence if it does not
8186         have a larger precision than the bitfield size.
8187         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8189 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8191         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8193 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8195         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8196         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8197         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8198         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8200 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8202         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8203         Disable -fdelete-null-pointer-checks for ELF toolchain.
8205 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8206             Kito Cheng  <kito.cheng@gmail.com>
8208         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8209         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8210         (nds32*-*-*): Add glibc and uclibc conditions.
8211         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8212         (TARGET_EXCEPT_UNWIND_INFO): Define.
8213         * config/nds32/elf.h: New file.
8214         * config/nds32/linux.h: New file.
8215         * config/nds32/nds32-elf.opt: New file.
8216         * config/nds32/nds32-linux.opt: New file.
8217         * config/nds32/nds32-fp-as-gp.c
8218         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8219         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8220         TARGET_LINUX_ABI.
8221         (nds32_asm_file_end): Ditto.
8222         (nds32_print_operand): Ditto.
8223         (nds32_insert_attributes): Ditto.
8224         (nds32_init_libfuncs): New function.
8225         (TARGET_HAVE_TLS): Define.
8226         (TARGET_INIT_LIBFUNCS): Define.
8227         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8228         spec content.
8229         (TARGET_ELF): Apply different mcmodel setting.
8230         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8231         been migrated into elf.h and linux.h files.
8232         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8233         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8234         (mcmodel): The content has been migrated into nds32-elf.opt and
8235         nds32-linux.opt files.
8236         * config/nds32/t-elf: New file.
8237         * config/nds32/t-linux: New file.
8239 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8240             Shiva Chen  <shiva0217@gmail.com>
8242         * config/nds32/constants.md (unspec_volatile_element): Add
8243         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8244         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8245         optimization.
8246         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8247         (make_pass_nds32_fp_as_gp): Declare.
8248         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8249         optmization pass.
8250         (nds32_asm_function_end_prologue): Remove unused asm output.
8251         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8252         (nds32_asm_file_start): Output necessary fp_as_gp information.
8253         (nds32_option_override): Adjust register usage.
8254         (nds32_expand_prologue): Consider fp_as_gp situation.
8255         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8256         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8257         (epilogue): Ditto.
8258         (return): Ditto.
8259         (simple_return): Ditto.
8260         (omit_fp_begin): Output special directive for fp_as_gp.
8261         (omit_fp_end): Output special directive for fp_as_gp.
8262         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8263         mforbid-fp-as-gp): New options.
8265 2018-06-01  Mark Wielaard  <mark@klomp.org>
8267         * dwarf2out.c (dwarf2out_finish): Remove generation of
8268         DW_AT_loclists_base.
8270 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8272         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8273         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8274         (struct merged_store_group): Add bit_insertion field.
8275         (dump_char_array): Use standard hexadecimal format.
8276         (merged_store_group::merged_store_group): Set bit_insertion to false.
8277         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8278         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8279         also print the mask in the dump file.
8280         (pass_store_merging::gate): Minor tweak.
8281         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8282         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8283         stores with INTEGER_CST stores.
8284         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8285         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8286         and use it throughout.  Generate bit insertion sequences if need be.
8287         (pass_store_merging::process_store): Remove redundant condition.
8288         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8290 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8292         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8293         the 128-bit floating point types.  Fix function comment.
8295 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8297         * config/aarch64/aarch64-simd.md
8298         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8299         mnemonics.
8300         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8301         mnemonics.
8303 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8305         PR tree-optimization/85989
8306         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8307         variable.
8308         (backprop::intersect_uses): Check it when deciding whether this
8309         is a backedge reference.
8310         (backprop::process_block): Add each phi to m_visited_phis
8311         after visiting it, then clear it at the end.
8313 2018-06-01  Richard Biener  <rguenther@suse.de>
8315         * tree-vectorizer.h (vect_dr_stmt): New function.
8316         (vect_get_load_cost): Adjust.
8317         (vect_get_store_cost): Likewise.
8318         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8319         Use vect_dr_stmt instead of DR_SMTT.
8320         (vect_record_base_alignments): Likewise.
8321         (vect_calculate_target_alignment): Likewise.
8322         (vect_compute_data_ref_alignment): Likewise and make static.
8323         (vect_update_misalignment_for_peel): Likewise.
8324         (vect_verify_datarefs_alignment): Likewise.
8325         (vector_alignment_reachable_p): Likewise.
8326         (vect_get_data_access_cost): Likewise.  Pass down
8327         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8328         (vect_get_peeling_costs_all_drs): Likewise.
8329         (vect_peeling_hash_get_lowest_cost): Likewise.
8330         (vect_enhance_data_refs_alignment): Likewise.
8331         (vect_find_same_alignment_drs): Likewise.
8332         (vect_analyze_data_refs_alignment): Likewise.
8333         (vect_analyze_group_access_1): Likewise.
8334         (vect_analyze_group_access): Likewise.
8335         (vect_analyze_data_ref_access): Likewise.
8336         (vect_analyze_data_ref_accesses): Likewise.
8337         (vect_vfa_segment_size): Likewise.
8338         (vect_small_gap_p): Likewise.
8339         (vectorizable_with_step_bound_p): Likewise.
8340         (vect_prune_runtime_alias_test_list): Likewise.
8341         (vect_analyze_data_refs): Likewise.
8342         (vect_supportable_dr_alignment): Likewise.
8343         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8344         (vect_gen_prolog_loop_niters): Likewise.
8345         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8346         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8347         modify DR_STMT.
8348         (vect_recog_mask_conversion_pattern): Likewise.
8349         (vect_try_gather_scatter_pattern): Likewise.
8350         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8351         to vect_get_store_cost.
8352         (vect_get_store_cost): Get stmt_info instead of DR.
8353         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8354         (vect_get_load_cost): Get stmt_info instead of DR.
8356 2018-06-01  Richard Biener  <rguenther@suse.de>
8358         PR middle-end/86017
8359         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8360         vars wrapped in MEM_REFs.
8362 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8364         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8365         Fix subreg tests so that we only return a choice between
8366         GENERAL_REGS and FP_REGS if the original classes included both.
8368 2018-06-01  Richard Biener  <rguenther@suse.de>
8370         PR ipa/85960
8371         * tree-ssa-structalias.c (get_function_part_constraint):
8372         Handle NULL fi->decl.
8373         (find_func_aliases_for_call): Properly handle indirect
8374         fi from direct call.
8375         (find_func_clobbers): Likewise.
8376         (ipa_pta_execute): Likewise.
8377         (create_variable_info_for): For functions that are ifunc_resolver
8378         resolve to a varinfo that contains the result of the resolver call.
8379         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8380         aliases.
8382 2018-05-31  Michael Collison  <michael.collison@arm.com>
8384         * config/aarch64/aarch64.md:
8385         (*fix_to_zero_extenddfdi2): New pattern.
8386         * gcc.target/aarch64/fix_extend1.c: New testcase.
8388 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8390         PR middle-end/78809
8391         PR middle-end/83026
8392         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8393         and BUILT_IN_STRNCMP_EQ.
8394         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8395         BUILT_IN_STRNCMP_EQ.
8396         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8397         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8398         (gimple_fold_builtin): Likewise.
8399         * tree-ssa-strlen.c (compute_string_length): New function.
8400         (determine_min_obsize): New function.
8401         (handle_builtin_string_cmp): New function to handle calls to
8402         string compare functions.
8403         (strlen_optimize_stmt): Add handling to builtin string compare
8404         calls.
8405         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8406         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8407         * tree.c (build_common_builtin_nodes): Add new defines of
8408         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8410 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8412         PR target/85984
8413         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8414         functions with naked attribute.
8416 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8418         * config/i386/sse.md (avx_vec_concat<mode>):
8419         Substitute concat_tg_mode mode attribute with xtg_mode.
8420         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8421         (concat_tg_mode): Remove mode attribute.
8423 2018-05-31  Martin Sebor  <msebor@redhat.com>
8425         PR c/82063
8426         * calls.c (alloc_max_size): Correct a logic error/typo.
8427         Treat excessive arguments as infinite.  Warn for invalid arguments.
8428         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8430 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8432         PR target/85829
8433         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8434         and movx for Haswell.
8436 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8437             Cesar Philippidis  <cesar@codesourcery.com>
8439         PR middle-end/85879
8440         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8441         when emitting error on private/firstprivate reductions.
8442         * omp-low.c (lower_omp_target): Avoid reference-type processing
8443         on pointers for firstprivate clause.
8445 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8447         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8448         (st1x2): Likewise.
8449         (st1x3): Likewise.
8450         * config/aarch64/aarch64-simd.md
8451         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8452         (aarch64_ld1_x3_<mode>): Likewise
8453         (aarch64_st1x2<VALLDIF:mode>): Likewise
8454         (aarch64_st1_x2_<mode>): Likewise
8455         (aarch64_st1x3<VALLDIF:mode>): Likewise
8456         (aarch64_st1_x3_<mode>): Likewise
8457         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8458         (vld1_s8_x3): Likewise.
8459         (vld1_u16_x3): Likewise.
8460         (vld1_s16_x3): Likewise.
8461         (vld1_u32_x3): Likewise.
8462         (vld1_s32_x3): Likewise.
8463         (vld1_u64_x3): Likewise.
8464         (vld1_s64_x3): Likewise.
8465         (vld1_f16_x3): Likewise.
8466         (vld1_f32_x3): Likewise.
8467         (vld1_f64_x3): Likewise.
8468         (vld1_p8_x3): Likewise.
8469         (vld1_p16_x3): Likewise.
8470         (vld1_p64_x3): Likewise.
8471         (vld1q_u8_x3): Likewise.
8472         (vld1q_s8_x3): Likewise.
8473         (vld1q_u16_x3): Likewise.
8474         (vld1q_s16_x3): Likewise.
8475         (vld1q_u32_x3): Likewise.
8476         (vld1q_s32_x3): Likewise.
8477         (vld1q_u64_x3): Likewise.
8478         (vld1q_s64_x3): Likewise.
8479         (vld1q_f16_x3): Likewise.
8480         (vld1q_f32_x3): Likewise.
8481         (vld1q_f64_x3): Likewise.
8482         (vld1q_p8_x3): Likewise.
8483         (vld1q_p16_x3): Likewise.
8484         (vld1q_p64_x3): Likewise.
8485         (vst1_s64_x2): Likewise.
8486         (vst1_u64_x2): Likewise.
8487         (vst1_f64_x2): Likewise.
8488         (vst1_s8_x2): Likewise.
8489         (vst1_p8_x2): Likewise.
8490         (vst1_s16_x2): Likewise.
8491         (vst1_p16_x2): Likewise.
8492         (vst1_s32_x2): Likewise.
8493         (vst1_u8_x2): Likewise.
8494         (vst1_u16_x2): Likewise.
8495         (vst1_u32_x2): Likewise.
8496         (vst1_f16_x2): Likewise.
8497         (vst1_f32_x2): Likewise.
8498         (vst1_p64_x2): Likewise.
8499         (vst1q_s8_x2): Likewise.
8500         (vst1q_p8_x2): Likewise.
8501         (vst1q_s16_x2): Likewise.
8502         (vst1q_p16_x2): Likewise.
8503         (vst1q_s32_x2): Likewise.
8504         (vst1q_s64_x2): Likewise.
8505         (vst1q_u8_x2): Likewise.
8506         (vst1q_u16_x2): Likewise.
8507         (vst1q_u32_x2): Likewise.
8508         (vst1q_u64_x2): Likewise.
8509         (vst1q_f16_x2): Likewise.
8510         (vst1q_f32_x2): Likewise.
8511         (vst1q_f64_x2): Likewise.
8512         (vst1q_p64_x2): Likewise.
8513         (vst1_s64_x3): Likewise.
8514         (vst1_u64_x3): Likewise.
8515         (vst1_f64_x3): Likewise.
8516         (vst1_s8_x3): Likewise.
8517         (vst1_p8_x3): Likewise.
8518         (vst1_s16_x3): Likewise.
8519         (vst1_p16_x3): Likewise.
8520         (vst1_s32_x3): Likewise.
8521         (vst1_u8_x3): Likewise.
8522         (vst1_u16_x3): Likewise.
8523         (vst1_u32_x3): Likewise.
8524         (vst1_f16_x3): Likewise.
8525         (vst1_f32_x3): Likewise.
8526         (vst1_p64_x3): Likewise.
8527         (vst1q_s8_x3): Likewise.
8528         (vst1q_p8_x3): Likewise.
8529         (vst1q_s16_x3): Likewise.
8530         (vst1q_p16_x3): Likewise.
8531         (vst1q_s32_x3): Likewise.
8532         (vst1q_s64_x3): Likewise.
8533         (vst1q_u8_x3): Likewise.
8534         (vst1q_u16_x3): Likewise.
8535         (vst1q_u32_x3): Likewise.
8536         (vst1q_u64_x3): Likewise.
8537         (vst1q_f16_x3): Likewise.
8538         (vst1q_f32_x3): Likewise.
8539         (vst1q_f64_x3): Likewise.
8540         (vst1q_p64_x3): Likewise.
8542 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8544         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8545         user_label_prefix to name.
8547         * tree-core.h: Update comment about the format of NAME string
8548         passed to handler in attribute_spec.
8550         * config/msp430/msp430.md: Remove erroneous subreg expression from
8551         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8552         zero_extend{q,h}isi2.
8554 2018-05-30  Borislav Petkov  <bp@suse.de>
8556         * doc/extend.texi: Document some architecture specific
8557         constraints and sort entries.
8559 2018-05-30  Martin Sebor  <msebor@redhat.com>
8561         PR middle-end/85369
8562         * builtins.c (expand_builtin_stpcpy_1): New function.
8563         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8564         only if the former succeeds.
8566 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8568         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8569         in saphira.
8571 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8573         * doc/invoke.texi (-flinker-output): Document
8575 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8577         * passes.c (ipa_write_summaries): Only modify statements if body
8578         is in memory.
8579         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8580         incrementally linking.
8581         (ipa_passes): Likewise.
8582         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8583         pass down resolution info.
8584         * common.opt (flag_incremental_link): Update info.
8585         * gcc.c (plugin specs): Turn flinker-output=* to
8586         -plugin-opt=-linker-output-known
8587         * toplev.c (compile_file): Also cut compilation when doing incremental
8588         link.
8589         * flag-types. (enum lto_partition_model): Add
8590         LTO_LINKER_OUTPUT_NOLTOREL.
8591         (invoke.texi): Add -flinker-output docs.
8592         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8593         link same way as WPA; do not stream in dead initializers.
8595         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8596         darf2out_register_external_decl): Support incremental link.
8598 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8600         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8602 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8604         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8605         it down to simple_object_copy_lto_debug_sections.
8606         (run_gcc): Determine incremental LTO link time and configure
8607         lto1 into non-wpa mode, disable renaming of debug sections.
8609 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8611         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8612         descriptions of various incorrectly documented functions.
8614 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8616         Revert:
8617         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8618         address check not strict.
8620 2018-05-30  Richard Biener  <rguenther@suse.de>
8622         PR tree-optimization/85964
8623         * tracer.c (better_p): Drop initialized count check, we only
8624         call the function with initialized counts now.
8625         (find_best_successor): Do find a best edge if one
8626         has uninitialized count.
8627         (find_best_predecessor): Likewise.  Do BB frequency check only
8628         if count is initialized.
8630 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8632         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8633         (aarch64_ldrstr_offset_compare): New.
8634         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8635         load/store orderings.
8636         (aarch64_gen_adjusted_ldpstp): Likewise.
8638 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8640         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8641         Check for subset of GENERAL_REGS and FP_REGS.
8642         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8643         r=w alternative.
8645 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8647         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8648         and wi::to_poly_offset.  Add the current offset and then check
8649         whether the sum fits, rather than using an unchecked addition of
8650         a checked term.  Check for a shwi rather than a uhwi.
8651         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8652         (store_constructor): Use poly_int_tree_p.
8653         (expand_expr_real_1): Likewise.
8654         * function.c (assign_temp): Likewise.
8655         * fold-const.c (const_binop): Use poly_int_tree_p and
8656         wi::to_poly_offset.
8657         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8658         division.
8659         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8660         to_poly_offset for MEM offsets.
8661         * ipa-icf.c (sem_variable::equals): Likewise.
8662         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8663         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8664         wi::to_poly_offset for BIT_FIELD_REF offsets.
8665         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8666         wi::to_poly_offset.
8667         * var-tracking.c (emit_note_insn_var_location): Use
8668         tree_to_poly_uint64.
8670 2018-05-29  Jim Wilson  <jimw@sifive.com>
8672         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8674 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8676         PR target/85950
8677         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8678         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8679         sequence.
8680         (sse4_1_round<mode>2): Use nonimmediate_operand
8681         for operand 1 predicate.
8683 2018-05-29  Martin Sebor  <msebor@redhat.com>
8684             Richard Biener  <rguenther@suse.de>
8686         PR testsuite/85888
8687         * calls.c (get_size_range): Call determine_value_range instead
8688         of get_value_range..
8689         * tree-vrp.h (determine_value_range): Declared new function.
8690         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8692 2018-05-29  Richard Biener  <rguenther@suse.de>
8694         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8695         sure to use non-pattern stmts for get_earlier_stmt arguments.
8696         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8697         called on pattern stmts.
8698         (get_later_stmt): Likewise.
8700 2018-05-29  Martin Liska  <mliska@suse.cz>
8702         PR gcov-profile/85759
8703         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8704         env variables.
8706 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8708         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8709         VEC_UNPACK_*_EXPR.
8710         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8711         VEC_PACK_*_EXPR.
8713         PR target/85918
8714         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8715         VEC_PACK_FLOAT_EXPR): New tree codes.
8716         * tree-pretty-print.c (op_code_prio): Handle
8717         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8718         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8719         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8720         * tree-inline.c (estimate_operator_cost): Likewise.
8721         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8722         * fold-const.c (const_binop): Likewise.
8723         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8724         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8725         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8726         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8727         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8728         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8729         * expr.c (expand_expr_real_2): Likewise.
8730         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8731         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8732         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8733         optabs.
8734         * optabs.c (expand_widen_pattern_expr): For
8735         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8736         sign from result type rather than operand's type.
8737         (expand_binop_directly): For vec_packu_float_optab and
8738         vec_packs_float_optab allow result type to be different from operand's
8739         type.
8740         * optabs-tree.c (optab_for_tree_code): Handle
8741         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8742         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8743         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8744         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8745         VEC_PACK_FLOAT_EXPR.
8746         * tree-vect-stmts.c (supportable_widening_operation): Handle
8747         FIX_TRUNC_EXPR.
8748         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8749         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8750         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8751         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8752         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8753         mode attributes.
8754         (vec_pack<floatprefix>_float_<mode>): New expander.
8755         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8756         attributes.
8757         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8758         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8759         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8760         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8761         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8762         Document.
8763         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8764         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8765         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8766         VEC_PACK_FLOAT_EXPR): Document.
8768 2018-05-29  Richard Biener  <rguenther@suse.de>
8770         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8771         member.
8772         (stmt_vec_info_vec): Make pointer.
8773         (init_stmt_vec_info_vec): Remove.
8774         (free_stmt_vec_info_vec): Likewise.
8775         (set_stmt_vec_info_vec): New function.
8776         (free_stmt_vec_infos): Likewise.
8777         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8778         (set_vinfo_for_stmt): Likewise.
8779         (get_earlier_stmt): Likewise.
8780         (get_later_stmt): Likewise.
8781         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8782         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8783         (vec_info::~vec_info): Free stmt_vec_infos.
8784         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8785         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8786         (pass_slp_vectorize::execute): Likewise.
8787         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8788         (free_stmt_vec_info_vec): Likewise.
8789         (set_stmt_vec_info_vec): New function.
8790         (free_stmt_vec_infos): Likewise.
8791         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8792         the global stmt_vec_info_vec.
8793         * tree-parloops.c (gather_scalar_reductions): Use
8794         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8795         vector.
8797 2018-05-29  Richard Biener  <rguenther@suse.de>
8799         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8801 2018-05-29  Martin Liska  <mliska@suse.cz>
8802             David Malcolm  <dmalcolm@redhat.com>
8804         * vec.c (test_reverse): New.
8805         (vec_c_tests): Add new test.
8806         * vec.h (vl_ptr>::reverse): New function.
8808 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8810         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8812         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8813         and later.
8815 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8817         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8819 2018-05-28  Richard Biener  <rguenther@suse.de>
8821         PR tree-optimization/85933
8822         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8823         look at stmts marked as vectorizable.
8825 2018-05-28  Richard Biener  <rguenther@suse.de>
8827         PR tree-optimization/85934
8828         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8829         vector boolean check before scalar optimization.
8831 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8833         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8834         for armv5te.
8836 2018-05-28  Mark Wielaard  <mark@klomp.org>
8838         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8839         if it is an expression containing a minus sign.
8841 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8843         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8845 2018-05-27  Paul Koning  <ni1d@arrl.net>
8847         * config/pdp11/pdp11.md (truncsihi2): Remove.
8849 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8850             Chung-Ju Wu  <jasonwucj@gmail.com>
8852         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8853         implementation.
8854         (unaligned_store_dw): Ditto.
8855         * config/nds32/nds32-memory-manipulation.c
8856         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8857         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8858         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8859         (emit_setmem_word_loop): Rename to ...
8860         (emit_setmem_doubleword_loop): ... this.
8861         (nds32_gen_dup_4_byte_to_word_value): New function.
8862         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8863         (nds32_expand_setmem_loop): Refine implementation.
8864         (nds32_expand_setmem_loop_v3m): Ditto.
8865         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8866         pattern.
8868 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8870         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8872 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8874         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8875         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8876         machine->attr_no_prologue_p.
8877         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8878         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8879         (nds32_expand_epilogue): Consider attr_naked_p.
8880         (nds32_expand_epilogue_v3pop): Likewise.
8881         (nds32_can_use_return_insn): Likewise.
8882         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8883         attr_no_prologue_p fields.
8884         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8886 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8888         PR target/85918
8889         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8890         attributes.
8891         * config/i386/sse.md
8892         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8893         Rename to ...
8894         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8895         ... this.
8896         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8897         Rename to ...
8898         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8899         ... this.
8900         (*<floatsuffix>floatv2div2sf2): Rename to ...
8901         (*float<floatunssuffix>v2div2sf2): ... this.
8902         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8903         (float<floatunssuffix>v2div2sf2_mask): ... this.
8904         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8905         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8906         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8907         to ...
8908         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8909         ... this.
8910         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8911         Rename to ...
8912         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8913         ... this.
8914         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8915         Rename to ...
8916         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8917         ... this.
8918         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8919         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8920         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8921         gen_ufix_truncv8dfv8si2.
8922         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8923         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8924         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8925         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8926         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8927         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8928         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8929         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8931 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8933         PR target/85900
8934         PR target/85345
8935         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8937 2018-05-25  Jim Wilson  <jimw@sifive.com>
8939         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8940         * config/riscv/riscv.c (struct machine_function): Add
8941         interrupt_handler_p and attribute_checked_p fields.
8942         (riscv_attribute_table): Add interrupt.
8943         (riscv_interrupt_type_p): New.
8944         (riscv_save_reg_p): Save extra regs for interrupt handler.
8945         (riscv_use_save_libcall): Return false  for interrupt handler.
8946         (riscv_first_stack_step): Add forward declaration.
8947         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8948         for interrupt handler with large frame.  Use it for saved reg list.
8949         (riscv_expand_prologue): Move flag_stack_usage_info support to
8950         eliminate duplication.
8951         (riscv_expand_epilogue): Generate mret for interrupt handler.
8952         (riscv_epilogue_uses): New.
8953         (riscv_can_use_return_insn): Return false for interrupt handler.
8954         (riscv_function_ok_for_sibcall): Likewise.
8955         (riscv_set_current_function): Add interrupt handler support.
8956         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8957         * config/riscv/riscv.md (UNSPECV_MRET): New.
8958         (GP_REGNUM): New.
8959         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8960         (riscv_mret): New.
8961         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8963 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8965         PR tree-optimization/85712
8966         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8967         this candidate has already been replaced in-situ by a copy.
8969 2018-05-25  Jason Merrill  <jason@redhat.com>
8971         PR c++/80485 - inline function non-zero address.
8972         * symtab.c (nonzero_address): Check DECL_COMDAT.
8974 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8976         PR target/83628
8977         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8978         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8979         extension of SImode operation.  Use const123_operand predicate.
8980         (*saddsi_1): Remove.
8981         (*saddl_se_1): Ditto.
8982         (*ssubsi_1): Ditto.
8983         (*ssubl_se_1): Ditto.
8984         * config/alpha/predicates.md (const123_operand): New predicate.
8985         * config/alpha/constraints.md (P): Use IN_RANGE.
8987 2018-05-25  Richard Biener  <rguenther@suse.de>
8989         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8990         defaulted to true.
8991         (ref_maybe_used_by_stmt_p): Likewise.
8992         (stmt_may_clobber_ref_p): Likewise.
8993         (stmt_may_clobber_ref_p_1): Likewise.
8994         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8995         and pass it along.
8996         (ref_maybe_used_by_stmt_p): Likewise.
8997         (stmt_may_clobber_ref_p): Likewise.
8998         (stmt_may_clobber_ref_p_1): Likewise.
8999         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9000         the alias oracle to disambiguate DRs with stmts DR analysis
9001         couldn't handle.
9002         (vect_analyze_data_refs): Do not give up on not analyzable
9003         DRs for BB vectorization.  Remove code truncating the dataref
9004         vector.
9006 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9008         PR target/85832
9009         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9010         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9011         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9013 2018-05-25  Richard Biener  <rguenther@suse.de>
9015         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9016         function, combining stmt data ref gathering and fatal analysis
9017         parts.
9018         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9019         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9020         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9021         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9022         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9024 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9026         PR tree-optimization/85720
9027         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9028         SCC if all partitions are builtins.
9029         (version_loop_by_alias_check): New parameter.  Generate cancelable
9030         runtime alias check if all partitions are builtins.
9031         (distribute_loop): Update call to above function.
9033 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9035         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9036         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9037         (parm_default_def_partition_arg): Ditto.
9038         (set_parm_default_def_partition): Ditto.
9039         (get_parm_default_def_partitions): Ditto and make it static.
9040         (get_undefined_value_partitions): Ditto and make it static.
9041         (remove_ssa_form): Refactor call to init_var_map here.
9042         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9043         computation for loop region.
9044         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9045         (register_default_def): Delete.
9046         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9047         (parm_default_def_partition_arg): Ditto.
9048         (set_parm_default_def_partition): Ditto.
9049         (get_parm_default_def_partitions): Ditto and make it static.
9050         (get_undefined_value_partitions): Ditto and make it static.
9051         (coalesce_with_default, coalesce_with_default): Update comment.
9052         (create_coalesce_list_for_region): New func factored out from
9053         create_outofssa_var_map.
9054         (populate_coalesce_list_for_outofssa): New func factored out from
9055         create_outofssa_var_map and coalesce_ssa_name.
9056         (create_outofssa_var_map): Delete.
9057         (coalesce_ssa_name): Refactor to support live range computation.
9058         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9059         (get_parm_default_def_partitions): Delete.
9060         (get_undefined_value_partitions): Ditto.
9061         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9062         computation for loop region.
9063         (new_tree_live_info, loe_visit_block): Ditto.
9064         (live_worklist, set_var_live_on_entry): Ditto.
9065         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9066         * tree-ssa-live.h (struct _var_map): New fields.
9067         (init_var_map): Change decl.
9068         (region_contains_p): New.
9070 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9072         * tree-ssa-live.h (live_merge_and_clear): Delete.
9074 2018-05-25  Richard Biener  <rguenther@suse.de>
9076         PR c++/85912
9077         * tree-dump.c (dequeue_and_dump): Remove access to removed
9078         operand 2 of a SWITCH_EXPR.
9080 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9082         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9083         multiplication and division.
9084         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9085         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9086         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9087         (cond_udiv_optab, cond_umod_optab): New optabs.
9088         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9089         (IFN_COND_RDIV): New internal functions.
9090         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9091         TRUNC_MOD_EXPR and RDIV_EXPR.
9092         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9093         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9094         New unspecs.
9095         (SVE_INT_BINARY): Include mult.
9096         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9097         (optab, sve_int_op): Handle mult.
9098         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9099         UNSPEC_COND_DIV.
9100         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9101         for SVE_INT_BINARY_SD.
9103 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9105         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9106         (optab, sve_int_op): Handle div and udiv.
9107         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9108         for SVE_INT_BINARY_SD.
9109         (*<optab><mode>3): New insn for the same.
9111 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9113         * tree-vect-patterns.c: Include predict.h.
9114         (vect_recog_divmod_pattern): Restrict check for division support
9115         to when optimizing for size.
9117 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9119         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9120         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9121         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9122         (gimple_match_op::set_op): Likewise.
9123         (gimple_resimplify4): Declare.
9124         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9125         (expr::gen_transform): Likewise.
9126         (decision_tree::gen): Generate a simplification routine for 4 operands.
9127         * gimple-match-head.c (gimple_simplify): Add an overload for
9128         4 operands.  In the top-level function, handle up to 4 call
9129         arguments and call gimple_resimplify4.
9130         (gimple_resimplify4): New function.
9131         (build_call_internal): Pass a fourth operand.
9132         (maybe_push_to_seq): Likewise.
9133         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9134         Fold VEC_COND_EXPRs of an operation and a default value into
9135         an IFN_COND_* function if possible.
9136         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9137         New unspecs.
9138         (SVE_COND_FP_BINARY): Include them.
9139         (optab, sve_fp_op): Handle them.
9140         (SVE_INT_BINARY_REV): New code iterator.
9141         (SVE_COND_FP_BINARY_REV): New int iterator.
9142         (commutative): New int attribute.
9143         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9144         Declare.
9145         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9146         function.
9147         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9148         (*cond_<optab><mode>): New patterns for reversed operands.
9150 2018-05-25  Richard Biener  <rguenther@suse.de>
9152         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9153         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9154         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9155         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9156         * tree-vect-data-refs.c (everywhere): Adjust users.
9157         * tree-vect-loop.c (everywhere): Likewise.
9158         * tree-vect-slp.c (everywhere): Likewise.
9159         * tree-vect-stmts.c (everywhere): Likewise.
9160         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9162 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9164         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9165         Rename to...
9166         (gcc_cv_as_section_exclude): ... this.
9167         Try Solaris as #exclude syntax.
9168         * configure: Regenerate.
9169         * config.in: Regenerate.
9170         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9171         SECTION_EXCLUDE.
9172         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9173         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9175         * varasm.c (default_elf_asm_named_section): Don't check if
9176         HAVE_GAS_SECTION_EXCLUDE is defined.
9178 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9180         * doc/md.texi: Update the documentation of the cond_* optabs
9181         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9182         Describe the scalar case too.
9183         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9184         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9185         instead of 2.
9186         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9187         (get_conditional_internal_fn): Update comment.
9188         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9189         accumulator value as a final argument to conditional functions.
9190         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9191         a define_expand and add an "else" operand.  Assert for now that
9192         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9193         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9194         (*cond_<optab><mode>): New patterns.
9195         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9196         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9197         (UNSPEC_COND_EOR): Delete.
9198         (optab): Remove associated mappings.
9199         (SVE_INT_BINARY): New code iterator.
9200         (sve_int_op): Remove int attribute and add "minus" to the code
9201         attribute.
9202         (SVE_COND_INT_OP): Delete.
9203         (SVE_COND_FP_OP): Rename to...
9204         (SVE_COND_FP_BINARY): ...this.
9206 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9208         * optabs.c (can_reuse_operands_p): New function.
9209         (maybe_legitimize_operands): Try to reuse the results for
9210         earlier operands.
9212 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9214         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9215         Add {q} suffix to insn mnemonic.
9217 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9219         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9220         (msp430_warn_func_return): New.
9222 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9224         * fold-const.c (tree_nonzero_bits): New function.
9225         * fold-const.h (tree_nonzero_bits): Likewise.
9226         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9227         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9229 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9231         PR target/85900
9232         PR target/85345
9233         * varasm.c (assemble_alias): Check ifunc_resolver only on
9234         FUNCTION_DECL.
9236 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9238         PR target/85903
9239         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9240         when memory input operand is handled.
9242 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9244         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9245         global.
9246         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9248 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9250         * match.pd: Delay FMA folds until after vectorization.
9252 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9254         PR target/83009
9255         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9256         address check not strict.
9258 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9260         * gimple-match.h (gimple_match_op): New class.
9261         (mprts_hook): Replace parameters with a gimple_match_op *.
9262         (maybe_build_generic_op): Likewise.
9263         (gimple_simplified_result_is_gimple_val): Replace parameters with
9264         a const gimple_match_op *.
9265         (gimple_simplify): Replace code_helper * and tree * parameters with
9266         a gimple_match_op * parameter.
9267         (gimple_resimplify1): Replace code_helper *, tree and tree *
9268         parameters with a gimple_match_op * parameter.
9269         (gimple_resimplify2): Likewise.
9270         (gimple_resimplify3): Likewise.
9271         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9272         parameters with a gimple_match_op * parameter.
9273         * gimple-match-head.c (gimple_simplify): Change prototypes of
9274         auto-generated functions to take a gimple_match_op * instead of
9275         separate code_helper * and tree * parameters.  Make the same
9276         change in the top-level overload and update calls to the
9277         gimple_resimplify routines.  Update calls to the auto-generated
9278         functions and to maybe_push_res_to_seq in the publicly-facing
9279         operation-specific gimple_simplify overloads.
9280         (gimple_match_op::MAX_NUM_OPS): Define.
9281         (gimple_resimplify1): Replace rcode and ops with a single res_op
9282         parameter.  Update call to gimple_simplify.
9283         (gimple_resimplify2): Likewise.
9284         (gimple_resimplify3): Likewise.
9285         (mprts_hook): Replace parameters with a gimple_match_op *.
9286         (maybe_build_generic_op): Likewise.
9287         (build_call_internal): Replace type, nargs and ops with
9288         a gimple_match_op *.
9289         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9290         with a single gimple_match_op *.  Update calls to mprts_hook,
9291         build_call_internal and gimple_simplified_result_is_gimple_val.
9292         Factor out code that is common to the tree_code and combined_fn cases.
9293         * genmatch.c (expr::gen_transform): Replace tem_code and
9294         tem_ops with a gimple_match_op called tem_op.  Update calls
9295         to the gimple_resimplify functions and maybe_push_res_to_seq.
9296         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9297         res_ops.  Update call to the gimple_resimplify functions.
9298         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9299         (decision_tree::gen): Make the functions take a gimple_match_op *
9300         called res_op instead of separate res_code and res_ops parameters.
9301         Update call accordingly.
9302         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9303         and ops with a single res_op parameter.  Update calls to
9304         maybe_build_generic_op and maybe_push_res_to_seq.
9305         (fold_stmt_1): Update calls to gimple_simplify and
9306         replace_stmt_with_simplification.
9307         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9308         and gimple_simplified_result_is_gimple_val.
9309         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9310         gimple_simplify.
9311         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9312         with a gimple_match_op *.
9313         (vn_nary_build_or_lookup): Likewise.  Update call to
9314         vn_nary_build_or_lookup_1.
9315         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9316         gimple_match_op *.  Update calls to the gimple_resimplify routines
9317         and to gimple_simplified_result_is_gimple_val.
9318         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9319         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9320         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9321         (visit_nary_op): Likewise.
9322         (visit_reference_op_load): Likewise.
9324 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9326         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9327         modifier for printing the step amount.
9329 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9331         PR target/78849
9332         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9333         types.
9335 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9337         * doc/sourcebuild.texi (Endianness): New subsubsection.
9339 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9341         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9342         <prefetch_dynamic_strides>: New const bool field.
9343         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9344         prefetch_dynamic_strides.
9345         (exynosm1_prefetch_tune): Likewise.
9346         (thunderxt88_prefetch_tune): Likewise.
9347         (thunderx_prefetch_tune): Likewise.
9348         (thunderx2t99_prefetch_tune): Likewise.
9349         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9350         false.
9351         (aarch64_override_options_internal): Update to set
9352         PARAM_PREFETCH_DYNAMIC_STRIDES.
9353         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9354         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9355         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9356         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9357         prefetch-dynamic-strides setting.
9359 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9361         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9362         <minimum_stride>: New const int field.
9363         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9364         minimum_stride field defaulting to -1.
9365         (exynosm1_prefetch_tune): Likewise.
9366         (thunderxt88_prefetch_tune): Likewise.
9367         (thunderx_prefetch_tune): Likewise.
9368         (thunderx2t99_prefetch_tune): Likewise.
9369         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9370         <default_opt_level>: Set to 3.
9371         (aarch64_override_options_internal): Update to set
9372         PARAM_PREFETCH_MINIMUM_STRIDE.
9373         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9374         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9375         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9376         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9377         stride is constant and is below the minimum stride threshold.
9379 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9381         * config/arm/arm-cpus.in (mode26): Delete.
9382         (armv4): Delete mode26 reference.
9383         * config/arm/arm.c (arm_configure_build_target): Delete use of
9384         isa_bit_mode26.
9386 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9388         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9389         New insn pattern.
9390         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9391         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9392         for non-SSE modes.
9393         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9394         (floatunsdidf2): Ditto.
9396 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9398         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9399         (fixuns_trunc<mode>si2_avx512f): Ditto.
9400         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9401         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9402         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9404 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9406         PR rtl-optimization/79985
9407         * df-scan.c (df_insn_refs_collect): Remove special case for
9408         global registers and asm statements.
9410 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9412         * extend.texi (Global Register Variables): Rewrite the bullet list.
9413         Note that the register is available for allocation. Note that access
9414         via inline asm must use constraints. Add note about async-signal
9415         handlers. Remove paragraph about automagic register selection.
9417 2018-05-23  Richard Biener  <rguenther@suse.de>
9419         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9420         of fixed offset from memset VN.
9422 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9424         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9425         first_interp field.
9426         (alloc_cand_and_find_basis): Initialize first_interp field.
9427         (slsr_process_mul): Modify first_interp field.
9428         (slsr_process_add): Likewise.
9429         (slsr_process_cast): Modify first_interp field for each new
9430         interpretation.
9431         (slsr_process_copy): Likewise.
9432         (dump_candidate): Dump first_interp field.
9433         (replace_mult_candidate): Process all interpretations, not just
9434         subsequent ones.
9435         (replace_rhs_if_not_dup): Likewise.
9436         (replace_one_candidate): Likewise.
9438 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9440         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9441         Add new boolean.
9442         (aarch64_needs_frame_chain): New function.
9443         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9445 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9447         PR target/84882
9448         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9449         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9450         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9451         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9452         as true for strict-align.
9453         (aarch64_can_inline_p): Perform checks even when callee has no
9454         attributes to check for strict alignment.
9455         * doc/extend.texi (AArch64 Function Attributes): Document
9456         no-strict-align.
9457         * doc/invoke.texi: (AArch64 Options): Likewise.
9459 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9461         PR tree-optimization/85853
9462         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9463         the handling of the root of the node to...
9464         (vect_slp_analyze_node_operations_1): ...this new function,
9465         and run the whole thing with the child nodes' def types
9466         set according to their SLP node's def type.
9468 2018-05-23  Richard Biener  <rguenther@suse.de>
9470         PR middle-end/85874
9471         * tree-data-ref.c (create_runtime_alias_checks): Defer
9472         and ignore overflow warnings.
9474 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9476         PR tree-optimization/85822
9477         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9478         constants.
9480 2018-05-23  Richard Biener  <rguenther@suse.de>
9482         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9483         memset constants via native_interpret_expr.
9485 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9487         PR target/85345
9488         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9489         attribute.
9490         (cgraph_node::create_alias): Likewise.
9491         (cgraph_node::get_availability): Check ifunc_resolver instead
9492         of looking up ifunc attribute.
9493         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9494         * varasm.c (do_assemble_alias): Likewise.
9495         (assemble_alias): Likewise.
9496         (default_binds_local_p_3): Likewise.
9497         * cgraph.h (cgraph_node): Add ifunc_resolver.
9498         (cgraph_node::only_called_directly_or_aliased_p): Return false
9499         for IFUNC resolver.
9500         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9501         attribute.
9502         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9503         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9504         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9505         instead of looking up ifunc attribute.
9507 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9509         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9511 2018-05-22  Martin Sebor  <msebor@redhat.com>
9513         PR middle-end/85359
9514         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9515         only when expasion succeeds.
9516         (expand_builtin_strcmp): Same.
9517         (expand_builtin_strncmp): Same.
9519 2018-05-22  Martin Sebor  <msebor@redhat.com>
9521         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9523 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9524             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9526         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9527         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9528         code.
9529         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9530         Add check for legitimate_address.
9531         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9532         (aarch64_swap_ldrstr_operands): New.
9533         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9534         Define prototype.
9536 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9537             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9539         * config/aarch64/aarch64.md: New patterns to generate stp
9540         and ldp.
9541         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9542         single words and double words.
9543         (load_pair_sw, load_pair_dw): Likewise.
9544         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9545         Delete.
9546         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9547         Delete.
9548         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9549         for different mode ldpstp and add peephole for merged zero stores.
9550         Likewise for loads.
9551         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9552         Add size check.
9553         (aarch64_gen_store_pair): Rename calls to match new patterns.
9554         (aarch64_gen_load_pair): Rename calls to match new patterns.
9555         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9556         (load_pair<DREG:mode><DREG2:mode>): ... This.
9557         (store_pair<mode>): Rename to...
9558         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9559         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9560         New mode iterators.
9561         (V_INT_EQUIV): Handle SImode.
9562         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9563         New predicate.
9565 2018-05-22  Martin Sebor  <msebor@redhat.com>
9567         PR c/85623
9568         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9569         or ajust the presumed bound on an operation to avoid unnecessary
9570         warnings.
9572 2018-05-22  Martin Sebor  <msebor@redhat.com>
9574         PR tree-optimization/85826
9575         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9576         assuming that a DECL necesarily has a constant size.
9578 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9580         PR middle-end/85862
9581         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9583 2018-05-22  Richard Biener  <rguenther@suse.de>
9585         PR tree-optimization/85834
9586         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9587         non-constant and non-zero memset arguments.
9589 2018-05-22  Martin Liska  <mliska@suse.cz>
9591         PR ipa/85607
9592         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9594 2018-05-22  Richard Biener  <rguenther@suse.de>
9596         PR tree-optimization/85863
9597         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9598         comparisons when vectype is specified.
9599         (vectorizable_condition): Do not specify vectype for
9600         vect_is_simple_cond when SLP vectorizing.
9602 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9604         PR target/85657
9605         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9606         define __ibm128 as long double.
9607         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9608         as a distinct type when IEEE 128-bit support is enabled.
9609         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9610         128-bit types to use the correct functions.
9611         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9612         convert between 128-bit floating point types that have different
9613         modes but the same representation, instead of using gen_lowpart to
9614         makean alias.
9615         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9616         KFmode.
9617         (IFKF_reg): New attributes to give the register constraints for
9618         IFmode and KFmode.
9619         (extend<mode>tf2_internal): New insns to mark an explicit
9620         conversion between 128-bit floating point types that have a
9621         different mode but share the same representation.
9623 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9625         PR tree-optimization/85814
9626         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9627         a null return from get_strinfo when unsharing the next
9628         strinfo in the chain.
9630 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9632         PR gcc/84923
9633         * varasm.c (weak_finish): Clean up weak_decls.
9635 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9637         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9638         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9639         UNSPEC_UADALP values.
9640         * config/aarch64/iterators.md (ABAL): New int iterator.
9641         (ABDL2): Likewise.
9642         (ADALP): Likewise.
9643         (sur): Add mappings for the above.
9644         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9645         New define_insn.
9646         (aarch64_<sur>abal<mode>_4): Likewise.
9647         (aarch64_<sur>adalp<mode>_3): Likewise.
9648         (<sur>sadv16qi): New define_expand.
9650 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9652         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9653         (*movdf_internal): Ditto.
9654         (*rcpsf2_sse): Ditto.
9655         (*rsqrtsf2_sse): Ditto.
9656         (*sqrt<mode>2_sse): Ditto.
9658 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9660         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9661         eor3q<mode>4.
9662         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9663         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9664         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9665         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9666         vbcaxq_s64): New.
9667         * config/aarch64/arm_neon.h: Likewise.
9668         * config/aarch64/iterators.md (VQ_I): New.
9670 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9672         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9673         arc*-*-linux*.
9674         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9675         MULTILIB_DIRNAMES
9677 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9679         * config/nds32/constraints.md (S): New constraint.
9680         * config/nds32/nds32.md (call_internal): Use constraint S.
9681         (call_value_internal): Likewise.
9682         (sibcall_internal): Likewise.
9683         (sibcall_value_internal): Likewise.
9685 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9686             Chung-Ju Wu  <jasonwucj@gmail.com>
9688         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9689         into consideration.
9691 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9692             Chung-Ju Wu  <jasonwucj@gmail.com>
9694         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9695         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9696         (nds32_rtx_costs_impl): Simplify.
9697         (nds32_address_cost_impl): Simplify.
9698         (nds32_init_rtx_costs): New function.
9699         (nds32_rtx_costs_speed_prefer): Likewise.
9700         (nds32_rtx_costs_size_prefer): Likewise.
9701         (nds32_address_cost_speed_prefer): Likewise.
9702         (nds32_address_cost_speed_fwprop): Likewise.
9703         (nds32_address_cost_size_prefer): Likewise.
9704         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9705         * config/nds32/nds32.c (nds32_option_override): Use
9706         nds32_init_rtx_costs function.
9708 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9710         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9711         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9712         (TARGET_PIPELINE_N8): Likewise.
9713         (TARGET_PIPELINE_N10): Likewise.
9714         (TARGET_PIPELINE_N13): Likewise.
9715         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9717 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9719         * config/nds32/nds32-fpu.md: Update copyright year.
9721 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9723         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9725 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9727         * config/nds32/nds32.c
9728         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9729         * config/nds32/nds32.opt (minline-asm-r15): New option.
9731 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9733         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9734         MASK_HW_ABS.
9735         * config/nds32/nds32.md (abssi2): New pattern.
9737 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9739         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9740         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9741         Merge insn pattern from sse_cvtsi2ss<round_name> and
9742         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9743         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9744         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9745         using SWI48 mode iterator.
9746         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9747         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9748         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9749         pattern from sse_cvttss2si<round_saeonly_name>
9750         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9751         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9752         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9753         using SWI48 mode iterator.
9754         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9755         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9756         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9757         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9758         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9759         using SWI48 mode iterator.
9760         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9761         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9762         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9763         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9764         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9765         SWI48 mode iterator.
9766         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9767         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9768         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9769         pattern from sse_cvttsd2si<round_saeonly_name>
9770         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9772 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9774         * config/nds32/nds32-md-auxiliary.c
9775         (nds32_valid_smw_lwm_base_p): Refine.
9776         (nds32_output_smw_single_word): Refine.
9777         (nds32_output_smw_double_word): New.
9778         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9780 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9782         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9783         (nds32_output_stack_pop): Refine.
9784         (nds32_expand_unaligned_load): Refine.
9785         (nds32_expand_unaligned_store): Refine.
9787 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9788             Chung-Ju Wu  <jasonwucj@gmail.com>
9790         * config/nds32/constants.md: Add TP_REGNUM constant.
9791         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9792         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9793         UNSPEC_ADD32.
9794         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9795         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9796         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9797         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9798         and PIC code generation.
9799         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9800         code generation.
9801         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9802         optimization.
9803         * config/nds32/nds32.md: Support TLS and PIC.
9804         * config/nds32/nds32.c: Support TLS and PIC.
9805         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9806         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9807         predicate.
9809 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9811         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9812         mode with E_ prefix.
9814 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9815             Chung-Ju Wu  <jasonwucj@gmail.com>
9817         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9818         * config/nds32/nds32-md-auxiliary.c
9819         (symbolic_reference_mentioned_p): New.
9820         (nds32_legitimize_ict_address): New.
9821         (nds32_expand_ict_move): New.
9822         (nds32_indirect_call_referenced_p): New.
9823         (nds32_symbol_binds_local_p): Delete.
9824         (nds32_long_call_p): Modify.
9825         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9826         * config/nds32/nds32-protos.h
9827         (symbolic_reference_mentioned_p): Declare.
9828         (nds32_legitimize_ict_address): Declare.
9829         (nds32_expand_ict_move): Declare.
9830         (nds32_indirect_call_referenced_p): Declare.
9831         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9832         (nds32_relax_group): Use nds32_ict_const_p as condition.
9833         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9834         (nds32_asm_file_start): Output ict_model directive in asm code.
9835         (nds32_legitimate_address_p): Consider indirect call.
9836         (nds32_print_operand): Consider indirect call.
9837         (nds32_print_operand_address): Consider indirect call.
9838         (nds32_insert_attributes): Handle "indirect_call" attribute.
9839         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9840         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9841         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9842         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9843         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9844         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9845         (TARGET_ICT_MODEL_SMALL): Define.
9846         (TARGET_ICT_MODEL_LARGE): Define.
9847         * config/nds32/nds32.md (movsi): Consider ict model.
9848         (call, call_value): Consider ict model.
9849         (sibcall, sibcall_value): Consider ict model.
9850         * config/nds32/nds32.opt (mict-model): New option.
9851         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9852         model.
9854 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9855             Monk Chiang  <sh.chiang04@gmail.com>
9856             Jim Wilson <jimw@sifive.com>
9858         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9859         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9860         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9861         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9862         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9863         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9864         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9865         compute save_libcall_adjustment properly.
9866         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9867         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9868         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9869         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9870         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9871         (ABI_SPEC): Handle mabi=ilp32e.
9872         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9873         (RVE): Add RVE mask.
9874         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9875         <-march>: Add rv32e as an example.
9877 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9879         PR c++/82899
9880         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9881         (intra_create_variable_infos): Handle C++ constructors.
9883 2018-05-18  Martin Liska  <mliska@suse.cz>
9885         * passes.def: Remove a redundant pass.
9887 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9889         PR bootstrap/85838
9890         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9892 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9894         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9895         (ARMv4): Update.
9896         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9897         (ARMv6m): Update.
9898         (armv2, armv2a, armv3, armv3m): Delete architectures.
9899         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9900         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9901         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9902         Delete cpus.
9903         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9904         (*mulsidi3adddi): Likewise.
9905         (mulsidi3): Likewise.
9906         (*mulsidi3_nov6): Likewise.
9907         (umulsidi3): Likewise.
9908         (umulsidi3_nov6): Likewise.
9909         (umaddsidi4): Likewise.
9910         (*umulsidi3adddi): Likewise.
9911         (smulsi3_highpart): Likewise.
9912         (*smulsi3_highpart_nov6): Likewise.
9913         (umulsi3_highpart): Likewise.
9914         (*umulsi3_highpart_nov6): Likewise.
9915         * config/arm/arm.h (arm_arch3m): Delete.
9916         * config/arm/arm.c (arm_arch3m): Delete.
9917         (arm_option_override_internal): Update armv3-related comment.
9918         (arm_configure_build_target): Delete use of isa_bit_mode32.
9919         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9920         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9921         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9922         (mulsa3): Likewise.
9923         (mulusa3): Likewise.
9924         * config/arm/arm-protos.h (arm_arch3m): Delete.
9925         * config/arm/arm-tables.opt: Regenerate.
9926         * config/arm/arm-tune.md: Likewise.
9927         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9928         deleted architectures.
9930 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9932         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9933         (armv5t, armv5te): New features.
9934         (ARMv5, ARMv5e): Delete fgroups.
9935         (ARMv5t, ARMv5te): Adjust for above changes.
9936         (ARMv6m): Likewise.
9937         (armv5, armv5e): Delete arches.
9938         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9939         arm_arch5.
9940         (*call_reg_arm): Likewise.
9941         (*call_value_reg_armv5): Likewise.
9942         (*call_value_reg_arm): Likewise.
9943         (*call_symbol): Likewise.
9944         (*call_value_symbol): Likewise.
9945         (*sibcall_insn): Likewise.
9946         (*sibcall_value_insn): Likewise.
9947         (clzsi2): Likewise.
9948         (prefetch): Likewise.
9949         (define_split and define_peephole2 dependent on arm_arch5):
9950         Likewise.
9951         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9952         arm_arch5e.
9953         (TARGET_ARM_QBIT): Likewise.
9954         (TARGET_DSP_MULTIPLY): Likewise.
9955         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9956         (arm_arch5, arm_arch5e): Delete.
9957         (arm_arch5t, arm_arch5te): Declare.
9958         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9959         (arm_arch5t): Declare.
9960         (arm_option_reconfigure_globals): Update for the above.
9961         (arm_options_perform_arch_sanity_checks): Update comment, replace
9962         use of arm_arch5 with arm_arch5t.
9963         (use_return_insn): Likewise.
9964         (arm_emit_call_insn): Likewise.
9965         (output_return_instruction): Likewise.
9966         (arm_final_prescan_insn): Likewise.
9967         (arm_coproc_builtin_available): Likewise.
9968         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9969         arm_arch5e with arm_arch5t and arm_arch5te.
9970         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9971         (arm_arch5t, arm_arch5te): Declare.
9972         * config/arm/arm-tables.opt: Regenerate.
9973         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9974         * config/arm/t-multilib: Likewise.
9975         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9976         instead of arm_arch5.
9977         (*call_reg_thumb1): Likewise.
9978         (*call_value_reg_thumb1_v5): Likewise.
9979         (*call_value_reg_thumb1): Likewise.
9980         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9981         unreachable path.
9982         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9984 2018-05-18  Martin Liska  <mliska@suse.cz>
9986         PR gcov-profile/84846
9987         * doc/gcov.texi: Document -t option of gcov tool.
9989 2018-05-18  Martin Liska  <mliska@suse.cz>
9991         PR gcov-profile/84846
9992         * gcov.c (print_usage): Add new -t option.
9993         (process_args): Handle the option.
9994         (generate_results): Use stdout as output when requested by
9995         the option.
9997 2018-05-18  Martin Liska  <mliska@suse.cz>
9999         PR gcov-profile/84846
10000         * coverage.c (coverage_init): Write PWD to .gcno file.
10001         * doc/gcov.texi: Document how working directory is printed.
10002         * gcov-dump.c (dump_gcov_file): Print PWD.
10003         * gcov.c (output_intermediate_file): Likewise.
10004         (read_graph_file): Read PWD string.
10005         (output_lines): Print PWD.
10007 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10009         PR middle-end/85817
10010         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10011         for retval and return false if all args to phi are zero.
10013 2018-05-18  Richard Biener  <rguenther@suse.de>
10015         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10016         method.
10017         (evrp_dom_walker::before_dom_children): Call it.
10019 2018-05-18  Richard Biener  <rguenther@suse.de>
10021         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10022         results when processing array refs with variable index.
10024 2018-05-18  Toon Moene  <toon@moene.org>
10026         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10027         directly after that of -floop-interchange. Indicate that both
10028         options are enabled by default when specifying -O3.
10030 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10032         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10033         iterator.  Delete separate integer-mode vec_set<mode> expander.
10034         (aarch64_simd_vec_setv2di): Delete.
10035         (vec_setv2di): Delete.
10036         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10037         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10038         the "w, r" alternative.
10040 2018-05-18  Martin Liska  <mliska@suse.cz>
10042         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10043         * tree-pass.h (make_pass_lower_switch_O0): New function.
10044         * tree-switch-conversion.c (node_has_low_bound): Remove.
10045         (node_has_high_bound): Likewise.
10046         (node_is_bounded): Likewise.
10047         (class pass_lower_switch): Make it a template type and create
10048         two instances.
10049         (pass_lower_switch::execute): Add template argument.
10050         (make_pass_lower_switch): New function.
10051         (make_pass_lower_switch_O0): New function.
10052         (do_jump_if_equal): Remove.
10053         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10054         all the hard work to tree optimization passes.
10056 2018-05-18  Martin Liska  <mliska@suse.cz>
10058         * dbgcnt.c (limit_low): Renamed from limit.
10059         (limit_high): New variable.
10060         (dbg_cnt_is_enabled): Check for upper limit.
10061         (dbg_cnt): Adjust dumping.
10062         (dbg_cnt_set_limit_by_index): Add new argument for high
10063         value.
10064         (dbg_cnt_set_limit_by_name): Likewise.
10065         (dbg_cnt_process_single_pair): Parse new format.
10066         (dbg_cnt_process_opt): Use strtok.
10067         (dbg_cnt_list_all_counters): Remove 'value' and add
10068         'limit_high'.
10069         * doc/invoke.texi: Document changes.
10071 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10073         * doc/sourcebuild.texi (scalar_all_fma): Document.
10074         * tree.def (FMA_EXPR): Delete.
10075         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10076         * internal-fn.c (ternary_direct): New macro.
10077         (expand_ternary_optab_fn): Likewise.
10078         (direct_ternary_optab_supported_p): Likewise.
10079         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10080         * builtins.c (fold_builtin_fma): Delete.
10081         (fold_builtin_3): Don't call it.
10082         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10083         * expr.c (expand_expr_real_2): Likewise.
10084         * fold-const.c (operand_equal_p): Likewise.
10085         (fold_ternary_loc): Likewise.
10086         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10087         * gimple.c (DEFTREECODE): Likewise.
10088         * gimplify.c (gimplify_expr): Likewise.
10089         * optabs-tree.c (optab_for_tree_code): Likewise.
10090         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10091         * tree-eh.c (operation_could_trap_p): Likewise.
10092         (stmt_could_throw_1_p): Likewise.
10093         * tree-inline.c (estimate_operator_cost): Likewise.
10094         * tree-pretty-print.c (dump_generic_node): Likewise.
10095         (op_code_prio): Likewise.
10096         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10097         * tree-ssa-operands.c (get_expr_operands): Likewise.
10098         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10099         * fold-const-call.h (fold_fma): Delete.
10100         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10101         CFN_FNMA and CFN_FNMS.
10102         (fold_fma): Delete.
10103         * genmatch.c (combined_fn): New enum.
10104         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10105         (commutative_op): New function.
10106         (commutate): Use it.  Handle more than 2 operands.
10107         (dt_operand::gen_gimple_expr): Use commutative_op.
10108         (parser::parse_expr): Allow :c to be used with non-binary
10109         operators if the commutative operand is known.
10110         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10111         CFN_FMS, CFN_FNMA and CFN_FNMS.
10112         (backprop::process_assign_use): Remove FMA_EXPR handling.
10113         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10114         (gen_hsa_fma): New function.
10115         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10116         IFN_FNMA and IFN_FNMS.
10117         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10118         * gimple-fold.h (follow_all_ssa_edges): Declare.
10119         * gimple-fold.c (follow_all_ssa_edges): New function.
10120         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10121         gimple_build interface and use follow_all_ssa_edges to fold the result.
10122         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10123         instead of checking for optabs directly.
10124         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10125         rather than FMA_EXPRs.
10126         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10127         call to IFN_FMA instead of an FMA_EXPR.
10129 2018-05-17  Jim Wilson  <jimw@sifive.com>
10131         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10132         sign extended promoted subreg, and the range does not have the sign bit
10133         set, then do a sign extend.
10135         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10136         test, check for sign extended subreg and/or constant operands, and
10137         do a sign extend in that case.
10139 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10141         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10142         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10143         Add untyped.
10144         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10145         Change logics_shift_reg to logics_shift_imm.
10146         (thunderx2t99_fp_loadpair_basic): Delete.
10147         (thunderx2t99_fp_storepair_basic): Delete.
10148         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10149         (thunderx2t99_asimd_polynomial): Delete.
10150         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10151         and neon_fp_mul_d_scalar_q.
10152         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10153         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10154         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10155         (thunderx2t99_asimd_lut): Add missing tbl types.
10156         (thunderx2t99_asimd_ext): Delete.
10157         (thunderx2t99_asimd_load1_1_mult): Delete.
10158         (thunderx2t99_asimd_load1_2_mult): Delete.
10159         (thunderx2t99_asimd_load1_ldp): New.
10160         (thunderx2t99_asimd_load1): New.
10161         (thunderx2t99_asimd_load2): Add missing *load2* types.
10162         (thunderx2t99_asimd_load3): New.
10163         (thunderx2t99_asimd_load4): New.
10164         (thunderx2t99_asimd_store1_1_mult): Delete.
10165         (thunderx2t99_asimd_store1_2_mult): Delete.
10166         (thunderx2t99_asimd_store2_mult): Delete.
10167         (thunderx2t99_asimd_store2_onelane): Delete.
10168         (thunderx2t99_asimd_store_stp): New.
10169         (thunderx2t99_asimd_store1): New.
10170         (thunderx2t99_asimd_store2): New.
10171         (thunderx2t99_asimd_store3): New.
10172         (thunderx2t99_asimd_store4): New.
10174 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10176         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10177         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10179 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10180             Segher Boessenkool  <segher@kernel.crashing.org>
10182         PR target/85698
10183         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10184         operand.
10186 2018-05-17  Richard Biener  <rguenther@suse.de>
10188         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10189         for pruning loop and prune defs feeding only already visited PHIs.
10191 2018-05-17  Richard Biener  <rguenther@suse.de>
10193         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10195 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10196             Richard Biener  <rguenther@suse.de>
10198         PR tree-optimization/85793
10199         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10200         for VMAT_ELEMENTWISE.
10202 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10204         * internal-fn.h (lookup_internal_fn): Declare
10205         * internal-fn.c (lookup_internal_fn): New function.
10206         * gimple.c (gimple_build_call_from_tree): Handle calls to
10207         internal functions.
10208         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10209         internal function names.
10210         * tree-pretty-print.c (dump_generic_node): Likewise.
10211         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10213 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10215         * gimple-fold.h (gimple_build): Make the function forms take
10216         combined_fn rather than built_in_function.
10217         (gimple_simplify): Likewise.
10218         * gimple-match-head.c (gimple_simplify): Likewise.
10219         * gimple-fold.c (gimple_build): Likewise.
10220         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10221         rather than gimple_build_call_internal.
10222         (get_initial_defs_for_reduction): Likewise.
10223         (vect_create_epilog_for_reduction): Likewise.
10224         (vectorizable_live_operation): Likewise.
10226 2018-05-17  Martin Liska  <mliska@suse.cz>
10228         * gimple-ssa-sprintf.c (format_directive): Do not use
10229         space in between 'G_' and '('.
10231 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10233         PR target/85323
10234         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10235         even if the mask is not all ones.
10237         PR target/85323
10238         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10239         vector.
10240         (ix86_gimple_fold_builtin): Likewise.
10242         PR target/85323
10243         * config/i386/i386.c: Include tree-vector-builder.h.
10244         (ix86_vector_shift_count): New function.
10245         (ix86_fold_builtin): Fold shift builtins by scalar count.
10246         (ix86_gimple_fold_builtin): Likewise.
10248         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10249         _mm512_setzero): New intrinsics.
10251 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10252             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10254         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10255         code generation for cases where splatting a value is not useful.
10256         * simplify-rtx.c (simplify_ternary_operation): Simplify
10257         vec_merge across a vec_duplicate and a paradoxical subreg forming
10258         a vector mode to a vec_concat.
10260 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10262         * config.gcc: Support "goldmont-plus".
10263         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10264         "goldmont-plus".
10265         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10266         PROCESSOR_GOLDMONT_PLUS.
10267         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10268         (processor_target_table): Add "goldmont-plus".
10269         (PTA_GOLDMONT_PLUS): Define.
10270         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10271         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10272         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10273         (fold_builtin_cpu): Add "goldmont-plus".
10274         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10275         (ix86_option_override_internal): Add "goldmont-plus".
10276         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10277         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10278         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10279         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10281 2018-05-17  Richard Biener  <rguenther@suse.de>
10283         PR tree-optimization/85757
10284         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10285         remove defs that only feed that PHI from further processing.
10287 2018-05-16  Jim Wilson  <jimw@sifive.com>
10289         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10290         asterisk to name.
10291         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10293 2018-05-16  Mark Wielaard  <mark@klomp.org>
10295         * dwarf2out.c (count_index_strings): New function.
10296         (output_indirect_strings): Call count_index_strings and generate
10297         header for dwarf_version >= 5.
10299 2018-05-16  Mark Wielaard  <mark@klomp.org>
10301         * dwarf2out.c (dwarf_FORM): New function.
10302         (set_indirect_string): Use dwarf_FORM.
10303         (reset_indirect_string): Likewise.
10304         (size_of_die): Likewise.
10305         (value_format): Likewise.
10306         (output_die): Likewise.
10307         (add_skeleton_AT_string): Likewise.
10308         (output_macinfo_op): Likewise.
10309         (index_string): Likewise.
10310         (output_index_string_offset): Likewise.
10311         (output_index_string): Likewise.
10312         (count_index_strings): Likewise.
10314 2018-05-16  Carl Love  <cel@us.ibm.com>
10316         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10317         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10319 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10321         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10322         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10324 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10326         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10327         (fnma<mode>4): Likewise.
10328         (fms<mode>4): Likewise.
10329         (fnms<mode>4): Likewise.
10330         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10331         (aarch64_fnma<mode>4): Likewise.
10332         (aarch64_fms<mode>4): Likewise.
10333         (aarch64_fnms<mode>4): Likewise.
10334         (aarch64_fnmadd<mode>4): Likewise.
10336 2018-05-16  Jason Merrill  <jason@redhat.com>
10338         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10340 2018-05-16  Richard Biener  <rguenther@suse.de>
10342         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10343         (dump_stmt_cost): Declare.
10344         (add_stmt_cost): Dump cost we add.
10345         (add_stmt_costs): New function.
10346         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10347         No longer exported.
10348         (vect_analyze_stmt): Adjust prototype.
10349         (vectorizable_condition): Likewise.
10350         (vectorizable_live_operation): Likewise.
10351         (vectorizable_reduction): Likewise.
10352         (vectorizable_induction): Likewise.
10353         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10354         cost vector to pass to vectorizable_ and record afterwards.
10355         (vect_model_reduction_cost): Take cost vector argument and adjust.
10356         (vect_model_induction_cost): Likewise.
10357         (vectorizable_reduction): Likewise.
10358         (vectorizable_induction): Likewise.
10359         (vectorizable_live_operation): Likewise.
10360         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10361         SLP_TREE_NUMBER_OF_VEC_STMTS.
10362         (vect_analyze_slp_cost_1): Remove.
10363         (vect_analyze_slp_cost): Likewise.
10364         (vect_slp_analyze_node_operations): Take visited args and
10365         a target cost vector.  Avoid processing already visited stmt sets.
10366         (vect_slp_analyze_operations): Use a local cost vector to gather
10367         costs and register those of non-discarded instances.
10368         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10369         (vect_schedule_slp_instance): Remove copying of
10370         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10371         zero.
10372         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10373         adding cost.  Record cost entry location.
10374         (vect_prologue_cost_for_slp_op): Function to compute cost of
10375         a constant or invariant generated for SLP vect in the prologue,
10376         split out from vect_analyze_slp_cost_1.
10377         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10378         (vect_model_promotion_demotion_cost): Likewise.
10379         (vect_model_store_cost): Likewise, make static.
10380         (vect_model_load_cost): Likewise.
10381         (vectorizable_bswap): Add cost vector arg and adjust.
10382         (vectorizable_call): Likewise.
10383         (vectorizable_simd_clone_call): Likewise.
10384         (vectorizable_conversion): Likewise.
10385         (vectorizable_assignment): Likewise.
10386         (vectorizable_shift): Likewise.
10387         (vectorizable_operation): Likewise.
10388         (vectorizable_store): Likewise.
10389         (vectorizable_load): Likewise.
10390         (vectorizable_condition): Likewise.
10391         (vectorizable_comparison): Likewise.
10392         (can_vectorize_live_stmts): Likewise.
10393         (vect_analyze_stmt): Likewise.
10394         (vect_transform_stmt): Adjust calls to vectorizable_*.
10395         * tree-vectorizer.c: Include gimple-pretty-print.h.
10396         (dump_stmt_cost): New function.
10398 2018-05-16  Richard Biener  <rguenther@suse.de>
10400         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10401         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10402         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10403         (check_name): New callback.
10404         (dse_classify_store): Track cycles via a visited bitmap of PHI
10405         defs and simplify handling of in-loop and across loop dead stores
10406         and properly fail for loop-variant refs.  Handle byte-tracking with
10407         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10408         limiting the walk.
10410 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10412         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10413         (vect_get_mask_type_for_stmt): Likewise.
10414         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10415         split out from...
10416         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10417         to determine the statement's vector type and the vector type that
10418         should be used for calculating nunits.  Deal with cases in which
10419         the type has to be deferred.
10420         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10421         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10422         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10423         (vect_determine_vf_for_stmt): New functions, split out from...
10424         (vect_determine_vectorization_factor): ...here.
10425         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10426         (vect_get_mask_type_for_stmt): New functions, split out from
10427         vect_determine_vectorization_factor.
10429 2018-05-16  Richard Biener  <rguenther@suse.de>
10431         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10432         verify the [VEC_]COND_EXPR embedded comparison.
10434 2018-05-15  Martin Sebor  <msebor@redhat.com>
10436         PR tree-optimization/85753
10437         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10438         RECORD_TYPE in addition to ARRAY_TYPE.
10440 2018-05-15  Martin Sebor  <msebor@redhat.com>
10442         PR middle-end/85643
10443         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10445 2018-05-15  Richard Biener  <rguenther@suse.de>
10447         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10448         add by_clobber_p one.  Change algorithm to collect all defs
10449         representing uses we need to walk and try reducing them to
10450         a single one before failing.
10451         (dse_dom_walker::dse_optimize_stmt): Adjust.
10453 2018-05-13  Mark Wielaard  <mark@klomp.org>
10455         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10456         (size_of_loc_descr): Likewise.
10457         (output_loc_operands): Likewise.
10458         (output_loc_operands_raw): Likewise.
10459         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10460         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10461         (hash_loc_operands): Likewise.
10462         (compare_loc_operands): Likewise.
10464 2018-05-14  Mark Wielaard  <mark@klomp.org>
10466         * dwarf2out.c (count_index_addrs): New function.
10467         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10469 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10471         PR tree-optimization/83648
10472         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10473         return value as malloc candidate.
10475 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10477         PR ipa/85734
10478         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10479         param as true in call to suggest_attribute.
10481 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10483         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10484         -mreadonly-in-sdata.
10486 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10488         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10489         New pattern.
10490         (aarch64_crypto_aesd_fused): Likewise.
10492 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10494         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10495         (movsi_aarch64): Likewise.
10496         (load_pairsi): Likewise.
10497         (load_pairdi): Likewise.
10498         (store_pairsi): Likewise.
10499         (store_pairdi): Likewise.
10500         (load_pairsf): Likewise.
10501         (load_pairdf): Likewise.
10502         (store_pairsf): Likewise.
10503         (store_pairdf): Likewise.
10504         (zero_extend): Likewise.
10505         (trunc): Swap alternatives.
10506         (fcvt_target): Add '?' to prefer w over r.
10508 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10510         PR target/85756
10511         * config/i386/i386.md: Disallow non-commutative arithmetics in
10512         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10513         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10514         in the peephole2 before it.
10516 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10518         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10519         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10520         (ix86_handle_option): Handle -mcldemote.
10521         * config.gcc: New header.
10522         * config/i386/cldemoteintrin.h: New file.
10523         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10524         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10525         -mcldemote.
10526         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10527         OPTION_MASK_ISA_CLDEMOTE.
10528         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10529         (ix86_valid_target_attribute_inner_p): Ditto.
10530         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10531         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10532         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10533         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10534         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10535         (cldemote): New.
10536         * config/i386/i386.opt: Add -mcldemote.
10537         * config/i386/x86intrin.h: New header.
10538         * doc/invoke.texi: Add -mcldemote.
10540 2018-05-14  Richard Biener  <rguenther@suse.de>
10542         * doc/match-and-simplify.texi: Adjust :s documentation.
10544 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10546         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10547         intended memcpy size.
10548         (REORDER_45): Likewise.
10550 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10552         * sort.cc: New file.
10553         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10554         * vec.c (qsort_chk): Use gcc_qsort.
10555         * Makefile.in (OBJS-libcommon): Add sort.o.
10556         (build/sort.o): New target.  Use it...
10557         (BUILD_RTL): ... here, and...
10558         (build/gencfn-macros): ... here, and...
10559         (build/genmatch): ... here.
10561 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10562             Chung-Ju Wu  <jasonwucj@gmail.com>
10564         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10565         * config/nds32/nds32-graywolf.md: New file.
10566         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10567         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10568         pipeline.
10569         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10570         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10571         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10572         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10573         * config/nds32/pipelines.md: Include n15 settings.
10575 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10576             Chung-Ju Wu  <jasonwucj@gmail.com>
10578         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10579         * config/nds32/nds32-n13.md: New file.
10580         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10581         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10582         pipeline.
10583         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10584         * config/nds32/nds32.md (pipeline_model): Add n13.
10585         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10586         * config/nds32/pipelines.md: Include n13 settings.
10588 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10589             Chung-Ju Wu  <jasonwucj@gmail.com>
10591         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10592         * config/nds32/nds32-n10.md: New file.
10593         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10594         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10595         pipeline.
10596         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10597         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10598         * config/nds32/nds32.md (pipeline_model): Add n10.
10599         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10600         * config/nds32/pipelines.md: Include n10 settings.
10602 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10603             Kito Cheng  <kito.cheng@gmail.com>
10604             Chung-Ju Wu  <jasonwucj@gmail.com>
10606         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10607         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10608         Add enum values for DSP extension instructions.
10609         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10610         New constraints.
10611         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10612         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10613         New code iterators.
10614         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10615         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10616         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10617         * config/nds32/nds32-intrinsic.md: Likewise.
10618         * config/nds32/nds32_intrinsic.h: Likewise.
10619         * config/nds32/nds32-md-auxiliary.c: Likewise.
10620         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10621         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10622         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10623         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10624         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10625         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10626         TYPE_DMAC in switch statement.
10627         * config/nds32/nds32.c: New checking and implementation for DSP
10628         extension instructions.
10629         * config/nds32/nds32.h: Likewise.
10630         * config/nds32/nds32.md: Likewise.
10631         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10632         * config/nds32/predicates.md: Implement new predicates for DSP
10633         extension.
10635 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10637         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10638         Reformat alternatives and attributes so it is easier to identify
10639         which constraints/attributes go with which instruction.
10640         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10641         (mov<mode>_softfloat32, FMOVE64): Likewise.
10642         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10643         (mov<mode>_softfloat64, FMOVE64): Likewise.
10645 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10647         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10648         subsection.
10649         (Basic PowerPC Built-in Functions): The new name of the
10650         subsection previously known as "PowerPC Built-in Functions".
10651         (Basic PowerPC Built-in Functions Available on all Configurations):
10652         New subsubsection.
10653         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10654         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10655         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10656         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10658 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10660         PR ipa/85655
10661         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10662         single const.
10664 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10666         PR target/85733
10667         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10669 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10671         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10672         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10673         (ix86_handle_option): Handle -mwaitpkg.
10674         * config.gcc: New header.
10675         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10676         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10677         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10678         function type.
10679         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10680         OPTION_MASK_ISA_WAITPKG.
10681         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10682         (ix86_option_override_internal): Add PTA_WAITPKG.
10683         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10684         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10685         IX86_BUILTIN_TPAUSE.
10686         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10687         __builtin_ia32_umwait and __builtin_ia32_tpause.
10688         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10689         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10690         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10691         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10692         UNSPECV_TPAUSE): New.
10693         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10694         * config/i386/i386.opt: Add -mwaitpkg.
10695         * config/i386/waitpkgintrin.h: New file.
10696         * config/i386/x86intrin.h: New header.
10697         * doc/invoke.texi: Add -mwaitpkg.
10699 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10701         PR target/85606
10702         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10703         equivalent.
10704         (cortex-m0): Use armv6s-m isa.
10705         (cortex-m0plus): Likewise.
10706         (cortex-m1): Likewise.
10707         (cortex-m0.small-multiply): Likewise.
10708         (cortex-m0plus.small-multiply): Likewise.
10709         (cortex-m1.small-multiply): Likewise.
10711 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10712             Jakub Jelinek  <jakub@redhat.com>
10714         PR tree-optimization/85692
10715         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10716         source permute as well.
10718 2018-05-11  Martin Liska  <mliska@suse.cz>
10720         PR sanitizer/85556
10721         * doc/extend.texi: Document LLVM style format for no_sanitize
10722         attribute.
10724 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10726         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10727         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10728         (mode_supports_vsx_dform_quad): Likewise.
10729         (mode_supports_vmx_dform): Move these functions to be next to the
10730         other mode_supports functions.
10731         (mode_supports_dq_form): Likewise.
10732         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10733         mode_supports_dq_form.
10734         (reg_offset_addressing_ok_p): Likewise.
10735         (offsettable_ok_by_alignment): Likewise.
10736         (rs6000_legitimate_offset_address_p): Likewise.
10737         (legitimate_lo_sum_address_p): Likewise.
10738         (rs6000_legitimize_address): Likewise.
10739         (rs6000_legitimize_reload_address): Likewise.
10740         (rs6000_secondary_reload_inner): Likewise.
10741         (rs6000_preferred_reload_class): Likewise.
10742         (rs6000_output_move_128bit): Likewise.
10744 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10746         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10747         Generate SImode target register for null target.
10748         <case IX86_BUILTIN_XGETBV>: Ditto.
10749         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10750         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10752 2018-05-10  Carl Love  <cel@us.ibm.com>
10754         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10755         dcbtt and dcbtstt if operands[2] is 0.
10757 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10759         PR target/85693
10760         * config/i386/sse.md (usadv64qi): New expander.
10762 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10764         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10765         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10766         -maltivec=be support.
10767         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10768         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10769         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10770         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10771         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10772         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10773         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10774         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10775         altivec_vsumsws): Adjust.
10776         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10777         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10778         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10779         support.
10780         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10781         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10782         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10783         (altivec_lve<VI_char>x): Delete expand.
10784         (*altivec_lve<VI_char>x_internal): Rename to...
10785         (altivec_lve<VI_char>x): ... this.
10786         (altivec_lvxl_<mode>): Delete expand.
10787         (*altivec_lvxl_<mode>_internal): Rename to ...
10788         (altivec_lvxl_<mode>): ... this.
10789         (altivec_stvxl_<mode>): Delete expand.
10790         (*altivec_stvxl_<mode>_internal): Rename to ...
10791         (altivec_stvxl_<mode>): ... this.
10792         (altivec_stve<VI_char>x): Delete expand.
10793         (*altivec_stve<VI_char>x_internal): Rename to ...
10794         (altivec_stve<VI_char>x): ... this.
10795         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10796         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10797         reduc_plus_scal_<mode>): Adjust.
10798         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10799         comment.
10800         (rs6000_cpu_cpp_builtins): Adjust.
10801         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10802         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10803         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10804         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10805         -maltivec=be support.
10806         (rs6000_split_vec_extract_var): Adjust.
10807         (rs6000_split_v4si_init): Adjust.
10808         (swap_selector_for_mode): Delete.
10809         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10810         altivec_expand_stvex_be): Delete.
10811         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10812         -maltivec=be support.
10813         (rs6000_gimple_fold_builtin): Ditto.
10814         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10815         Adjust.
10816         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10817         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10818         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10819         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10820         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10821         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10822         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10823         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10824         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10825         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10826         anonymous split): Adjust.
10827         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10828         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10830 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10832         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10833         when --with-gxx-include-dir is also specified.
10834         * configure: Regenerate.
10836 2018-05-09  Jim Wilson  <jimw@sifive.com>
10838         PR target/84797
10839         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10840         * config/riscv/t-withmultilib: New.
10841         * config/riscv/withmultilib.h: New.
10842         * doc/install.texi: Document RISC-V --with-multilib-list support.
10844 2018-05-09  Richard Biener  <rguenther@suse.de>
10846         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10847         vector.
10848         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10849         actual scalar cost using the cost vector and the add_stmt_cost
10850         machinery.
10852 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10854         PR rtl-optimization/85645
10855         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10856         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10858 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10860         PR rtl-optimization/85645
10861         * shrink-wrap.c (spread_components): Return a boolean saying if
10862         anything was changed.
10863         (try_shrink_wrapping_separate): Iterate spread_components until
10864         nothing changes anymore.
10866 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10868         PR rtl-optimization/85645
10869         * regrename.c (build_def_use): Also kill the chains that include the
10870         destination of a REG_CFA_REGISTER note.
10872 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10874         PR rtl-optimization/85645
10875         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10876         insn that has a REG_CFA_REGISTER note.
10878 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10880         * cfgexpand.c (expand_clobber): New function.
10881         (expand_gimple_stmt_1): Use it.
10882         * tree-vect-stmts.c (vect_clobber_variable): New function,
10883         split out from...
10884         (vectorizable_simd_clone_call): ...here.
10885         (vectorizable_store): Emit a clobber either side of an
10886         IFN_STORE_LANES sequence.
10887         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10889 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10891         PR target/85626
10892         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10893         (define_insn "trap_if_false"): Add exit after trap.
10895 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10897         PR rtl-optimization/85638
10898         * bb-reorder.c: Include common/common-target.h.
10899         (create_forwarder_block): New function extracted from...
10900         (fix_up_crossing_landing_pad): ...here.  Rename into...
10901         (dw2_fix_up_crossing_landing_pad): ...this.
10902         (sjlj_fix_up_crossing_landing_pad): New function.
10903         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10904         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10905         from both partitions and exit the loop after one iteration.
10907 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10909         Revert:
10910         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10911         subsection.
10912         (Basic PowerPC Built-in Functions): The new name of the
10913         subsection previously known as "PowerPC Built-in Functions".
10914         (Basic PowerPC Built-in Functions Available on all Configurations):
10915         New subsubsection.
10916         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10917         subsubsection.
10918         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10919         subsubsection.
10920         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10921         subsubsection.
10922         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10923         subsubsection.
10925 2018-05-08  Jim Wilson  <jimw@sifive.com>
10927         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10928         (LD_EMUL_SUFFIX): New.
10929         (LINK_SPEC): Use it.
10931 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10933         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10934         subsection.
10935         (Basic PowerPC Built-in Functions): The new name of the
10936         subsection previously known as "PowerPC Built-in Functions".
10937         (Basic PowerPC Built-in Functions Available on all Configurations):
10938         New subsubsection.
10939         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10940         subsubsection.
10941         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10942         subsubsection.
10943         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10944         subsubsection.
10945         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10946         subsubsection.
10948 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10950         PR target/85683
10951         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10952         after cmpelim optimization.
10954 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10956         * config.gcc: Support "goldmont".
10957         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10958         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10959         PROCESSOR_GOLDMONT.
10960         * config/i386/i386.c (m_GOLDMONT): Define.
10961         (processor_target_table): Add "goldmont".
10962         (PTA_GOLDMONT): Define.
10963         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10964         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10965         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10966         (fold_builtin_cpu): Add "goldmont".
10967         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10968         (ix86_option_override_internal): Add "goldmont".
10969         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10970         (processor_type): Add PROCESSOR_GOLDMONT.
10971         * config/i386/i386.md: Add CPU "glm".
10972         * config/i386/glm.md: New file.
10973         * config/i386/x86-tune.def: Add m_GOLDMONT.
10974         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10976 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10978         PR target/85572
10979         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10980         E_V4DImode.
10981         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10982         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10983         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10985         PR target/85317
10986         * config/i386/i386.c (ix86_fold_builtin): Handle
10987         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10989         PR target/85480
10990         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10991         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10993 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10995         PR target/85658
10996         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10997         (check_arch): Likewise.
10998         (check_fpu): Return the result rather than printing it.
10999         (end arch): Fix operator precedence.
11000         (end cpu): Likewise.
11001         (END): Print the result from check_fpu.
11003 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11004             Alan Hayward  <alan.hayward@arm.com>
11005             David Sherwood  <david.sherwood@arm.com>
11007         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11008         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11009         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11010         (*fcmuo<mode>_and): New patterns.
11012 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11014         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11015         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11016         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11017         (cmp_op, sve_imm_con): New code attributes.
11018         (SVE_COND_INT_CMP, imm_con): Delete.
11019         (cmp_op): Remove above unspecs from int attribute.
11020         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11021         to...
11022         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11023         comparison-specific unspecs.
11024         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11025         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11026         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11027         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11028         (*vec_fcm<cmp_op><mode>): Rename to...
11029         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11030         (*vec_fcmuo<mode>): Rename to...
11031         (*fcmuo<mode>): ...this and adjust likewise.
11032         (*pred_fcm<cmp_op><mode>): New pattern.
11033         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11034         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11035         functions.
11036         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11037         and UNORDERED.
11038         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11039         (aarch64_emit_sve_predicated_cond): New function.
11040         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11041         (aarch64_emit_unspec_cond_or): Replace with...
11042         (aarch64_emit_sve_or_conds): ...this new function.  Use
11043         aarch64_emit_sve_ptrue_op for the individual comparisons and
11044         aarch64_emit_binop to OR them together.
11045         (aarch64_emit_inverted_unspec_cond): Replace with...
11046         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11047         aarch64_emit_sve_ptrue_op for the comparison and
11048         aarch64_emit_unop to invert the result.
11049         (aarch64_expand_sve_vec_cmp_float): Update after the above
11050         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11052 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11054         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11055         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11056         (Backwards Compatibility): Likewise.
11058 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11060         PR bootstrap/85681
11061         Revert:
11062         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11064         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11065         <prefetch_dynamic_strides>: New const bool field.
11066         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11067         prefetch_dynamic_strides.
11068         (exynosm1_prefetch_tune): Likewise.
11069         (thunderxt88_prefetch_tune): Likewise.
11070         (thunderx_prefetch_tune): Likewise.
11071         (thunderx2t99_prefetch_tune): Likewise.
11072         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11073         to false.
11074         (aarch64_override_options_internal): Update to set
11075         PARAM_PREFETCH_DYNAMIC_STRIDES.
11076         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11077         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11078         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11079         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11080         prefetch-dynamic-strides setting.
11082         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11084         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11085         <minimum_stride>: New const int field.
11086         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11087         minimum_stride field.
11088         (exynosm1_prefetch_tune): Likewise.
11089         (thunderxt88_prefetch_tune): Likewise.
11090         (thunderx_prefetch_tune): Likewise.
11091         (thunderx2t99_prefetch_tune): Likewise.
11092         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11093         (aarch64_override_options_internal): Update to set
11094         PARAM_PREFETCH_MINIMUM_STRIDE.
11095         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11096         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11097         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11098         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11099         stride is constant and is below the minimum stride threshold.
11101 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11103         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11104         to 512.
11106 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11108         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11109         <prefetch_dynamic_strides>: New const bool field.
11110         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11111         prefetch_dynamic_strides.
11112         (exynosm1_prefetch_tune): Likewise.
11113         (thunderxt88_prefetch_tune): Likewise.
11114         (thunderx_prefetch_tune): Likewise.
11115         (thunderx2t99_prefetch_tune): Likewise.
11116         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11117         to false.
11118         (aarch64_override_options_internal): Update to set
11119         PARAM_PREFETCH_DYNAMIC_STRIDES.
11120         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11121         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11122         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11123         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11124         prefetch-dynamic-strides setting.
11126 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11128         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11129         <minimum_stride>: New const int field.
11130         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11131         minimum_stride field.
11132         (exynosm1_prefetch_tune): Likewise.
11133         (thunderxt88_prefetch_tune): Likewise.
11134         (thunderx_prefetch_tune): Likewise.
11135         (thunderx2t99_prefetch_tune): Likewise.
11136         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11137         (aarch64_override_options_internal): Update to set
11138         PARAM_PREFETCH_MINIMUM_STRIDE.
11139         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11140         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11141         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11142         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11143         stride is constant and is below the minimum stride threshold.
11145 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11147         PR c++/85659
11148         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11149         the type is addressable.  Don't force op into register if it has
11150         BLKmode.
11152 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11154         PR other/77609
11155         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11156         any section for which we don't know a specific type it should have,
11157         regardless of name.  Previously this was done only for the exact
11158         names ".init_array", ".fini_array", and ".preinit_array".
11159         (default_elf_asm_named_section): Add comment about
11160         relationship with default_section_type_flags and SECTION_NOTYPE.
11161         (get_section): Don't consider it a type conflict if one side has
11162         SECTION_NOTYPE and the other doesn't, as long as neither has the
11163         SECTION_BSS et al used in the default_section_type_flags logic.
11165 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11167         PR target/85653
11168         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11169         (workaround_barsyncs): New function.
11170         (nvptx_reorg): Use workaround_barsyncs.
11171         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11172         (define_expand "nvptx_membar_cta"): New define_expand.
11173         (define_insn "*nvptx_membar_cta"): New insn.
11175 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11177         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11178         To improve optimization opportunities.
11179         * builtin-types.def: The new needed builtin types for the above.
11181 2018-05-04  Richard Biener  <rguenther@suse.de>
11183         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11184         * gimple-ssa-store-merging.c
11185         (imm_store_chain_info::output_merged_store): Remove redundant create,
11186         release split_store vector contents on failure.
11187         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11188         scalar stmt vector on cache hit.
11190 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11192         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11193         Xilinx FP support.
11194         * config.gcc (powerpc-xilinx-eabi*): Remove.
11195         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11196         support.
11197         (fusion_addis_mem_combo_load): Ditto.
11198         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11199         FP support.
11200         (rs6000_cpu_cpp_builtins): Ditto.
11201         * config/rs6000/rs6000-linux.c
11202         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11203         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11204         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11205         support.
11206         (rs6000_setup_reg_addr_masks): Ditto.
11207         (rs6000_init_hard_regno_mode_ok): Ditto.
11208         (rs6000_option_override_internal): Ditto.
11209         (legitimate_lo_sum_address_p): Ditto.
11210         (rs6000_legitimize_address): Ditto.
11211         (rs6000_legitimize_reload_address): Ditto.
11212         (rs6000_legitimate_address_p): Ditto.
11213         (abi_v4_pass_in_fpr): Ditto.
11214         (setup_incoming_varargs): Ditto.
11215         (rs6000_gimplify_va_arg): Ditto.
11216         (rs6000_split_multireg_move): Ditto.
11217         (rs6000_savres_strategy): Ditto.
11218         (rs6000_emit_prologue_components): Ditto.
11219         (rs6000_emit_epilogue_components): Ditto.
11220         (rs6000_emit_prologue): Ditto.
11221         (rs6000_emit_epilogue): Ditto.
11222         (rs6000_elf_file_end): Ditto.
11223         (rs6000_function_value): Ditto.
11224         (rs6000_libcall_value): Ditto.
11225         * config/rs6000/rs6000.h: Ditto.
11226         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11227         (TARGET_MINMAX): ... this.  New.
11228         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11229         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11230         (*movsi_internal1_single): Delete.
11231         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11232         mfpu=, mxilinx-fpu): Delete.
11233         * config/rs6000/singlefp.h: Delete.
11234         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11235         * config/rs6000/t-rs6000: Ditto.
11236         * config/rs6000/t-xilinx: Delete.
11237         * config/rs6000/titan.md: Adjust for fp_type removal.
11238         * config/rs6000/vsx.md: Remove Xilinx FP support.
11239         (VStype_simple): Delete.
11240         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11241         * config/rs6000/xfpu.h: Delete.
11242         * config/rs6000/xfpu.md: Delete.
11243         * config/rs6000/xilinx.h: Delete.
11244         * config/rs6000/xilinx.opt: Delete.
11245         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11246         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11248 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11250         PR libgomp/85639
11251         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11252         if ignore == 0.
11254 2018-05-04  Richard Biener  <rguenther@suse.de>
11256         PR middle-end/85627
11257         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11258         (expand_complex_div_wide): Likewise.
11259         (expand_complex_operations_1): Likewise.
11260         (expand_complex_libcall): Preserve EH info of the original stmt.
11261         (tree_lower_complex): Handle removed blocks.
11262         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11263         on complex multiplication and division libcall builtins.
11265 2018-05-04  Richard Biener  <rguenther@suse.de>
11267         PR middle-end/85574
11268         * fold-const.c (negate_expr_p): Restrict negation of operand
11269         zero of a division to when we know that can happen without
11270         overflow.
11271         (fold_negate_expr_1): Likewise.
11273 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11275         PR libstdc++/85466
11276         * real.h (real_nextafter): Declare.
11277         * real.c (real_nextafter): New function.
11278         * fold-const-call.c (fold_const_nextafter): New function.
11279         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11280         CASE_CFN_NEXTTOWARD.
11281         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11282         even when arg1_mode is different from arg0_mode.
11284 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11286         * doc/extend.texi (Deprecated Features): Remove
11287         -ffriend-injection.
11288         (Backwards Compatibility): Likewise.
11289         * doc/invoke.texi (C++ Language Options): Likewise.
11290         (C++ Dialect Options): Likewise.
11292 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11294         PR target/85530
11295         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11296         _mm512_mask_mullox_epi64): New intrinsics.
11298 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11300         PR testsuite/85106
11301         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11302         dump files): Add offload-tree.
11304 2018-05-03  Richard Biener  <rguenther@suse.de>
11306         PR tree-optimization/85615
11307         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11308         to loops not nested in BBs loop father to avoid creating multi-entry
11309         loops.
11311 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11313         PR tree-optimization/70291
11314         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11315         arguments.  Change return type to tree.  Emit libcall as a new
11316         statement rather than replacing existing one when inplace_p is true.
11317         (expand_complex_multiplication_components): New function.
11318         (expand_complex_multiplication): Expand floating-point complex
11319         multiplication using the above.
11320         (expand_complex_division): Rename inner_type parameter to type.
11321         Update expand_complex_libcall call-site.
11322         (expand_complex_operations_1): Update expand_complex_multiplication
11323         and expand_complex_division call-sites.
11325 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11327         PR target/85582
11328         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11329         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11330         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11331         the highest significant bit of the shift count mask is clear.  In
11332         check whether and[sq]i3 is needed verify that all significant bits
11333         of the shift count other than the highest are set.
11335 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11337         PR libgomp/82428
11338         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11339         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11340         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11341         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11342         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11343         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11344         __builtin_goacc_parlevel_size.
11346 2018-05-02  Richard Biener  <rguenther@suse.de>
11348         PR tree-optimization/85597
11349         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11350         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11351         directly.
11353 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11355         PR testsuite/85106
11356         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11357         dump files): Add ltrans-tree.
11359 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11361         PR testsuite/85106
11362         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11363         dump files): Add wpa-ipa.
11365 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11367         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11368         powerpc*-*-linux*paired* target.
11369         * config/rs6000/750cl.h: Delete.
11370         * config/rs6000/paired.h: Delete.
11371         * config/rs6000/paired.md: Delete.
11372         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11373         float support.
11374         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11375         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11376         comment.  Remove paired float support.
11377         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11378         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11379         VECTOR_PAIRED.
11380         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11381         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11382         declarations.
11383         * config/rs6000/rs6000.c: Remove paired float support.
11384         (paired_expand_vector_init, paired_expand_vector_move,
11385         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11386         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11387         paired_expand_builtin, paired_expand_predicate_builtin,
11388         paired_init_builtins): Delete.
11389         * config/rs6000/rs6000.h: Remove paired float support.
11390         * config/rs6000/rs6000.md: Remove paired float support.
11391         (move_from_CR_ov_bit): Delete.
11392         * config/rs6000/rs6000.opt (mpaired): Delete.
11393         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11394         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11396 2018-05-02  Richard Biener  <rguenther@suse.de>
11398         PR middle-end/85567
11399         * gimplify.c (gimplify_save_expr): When in SSA form allow
11400         SAVE_EXPRs to compute to SSA vars.
11402 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11404         PR target/85582
11405         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11406         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11407         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11408         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11410 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11412         PR tree-optimization/85586
11413         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11414         exit early for statements in the same group if the accesses are
11415         not strided.
11417 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11419         PR lto/85451
11420         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11421         error message.
11423 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11425         PR tree-optimization/85143
11426         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11428 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11430         PR lto/85451
11431         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11432         not found" error message.
11434 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11436         PR other/83786
11437         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11438         * vec.c (test_ordered_remove_if): New function.
11439         (vec_c_tests): Call test_ordered_remove_if.
11440         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11441         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11442         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11443         VEC_ORDERED_REMOVE_IF.
11445 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11447         PR tree-optimization/82665
11448         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11449         pointer subtraction where arguments come from a memchr call.
11451 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11453         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11454         --push-state --as-needed and --pop-state instead of --as-needed and
11455         --no-as-needed if ld supports it.
11456         * configure: Regenerated.
11458         PR web/85578
11459         * doc/install.texi2html: Replace _002d with - and _002a with * in
11460         generated html files using sed.
11462 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11464         PR c++/85523
11465         * gcc-rich-location.c (blank_line_before_p): New function.
11466         (use_new_line): New function.
11467         (gcc_rich_location::add_fixit_insert_formatted): New function.
11468         * gcc-rich-location.h
11469         (gcc_rich_location::add_fixit_insert_formatted): New function.
11471 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11473         * selftest.c (assert_streq): Rename "expected" and "actual" to
11474         "val1" and "val2".  Extend NULL-handling to cover both inputs
11475         symmetrically, while still requiring both to be non-NULL for a pass.
11476         * selftest.h (assert_streq): Rename "expected" and "actual" to
11477         "val1" and "val2".
11478         (ASSERT_EQ): Likewise.
11479         (ASSERT_EQ_AT): Likewise.
11480         (ASSERT_KNOWN_EQ): Likewise.
11481         (ASSERT_KNOWN_EQ_AT): Likewise.
11482         (ASSERT_NE): Likewise.
11483         (ASSERT_MAYBE_NE): Likewise.
11484         (ASSERT_MAYBE_NE_AT): Likewise.
11485         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11486         the assertion to pass.
11487         (ASSERT_STREQ_AT): Likewise.
11489 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11491         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11492         interaction with -pie.
11494 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11496         * selftest.h: Fix alphabetization of per-source-file selftest
11497         declarations.
11499 2018-04-30  Jason Merrill  <jason@redhat.com>
11501         PR c++/61982 - dead stores to destroyed objects.
11502         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11503         of clobber.
11505 2018-04-30  Jason Merrill  <jason@redhat.com>
11507         * tree.c (build_clobber): New.
11508         * tree.h: Declare it.
11509         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11511 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11513         * diagnostic-show-locus.c (layout::layout): Update for
11514         location_get_source_line returning a char_span.
11515         (struct char_span): Move to input.h.
11516         (struct correction): Update for fields in char_span becoming
11517         private.
11518         (struct source_line): Update for location_get_source_line
11519         returning a char_span.
11520         (layout::print_line): Likewise.
11521         * edit-context.c (edited_file::print_content): Likewise.
11522         (edited_file::print_diff_hunk): Likewise.
11523         (edited_file::print_run_of_changed_lines): Likewise.
11524         (edited_file::get_num_lines): Likewise.
11525         (edited_line::edited_line): Likewise.
11526         * final.c (asm_show_source): Likewise.
11527         * input.c (location_get_source_line): Convert return type
11528         from const char * to char_span, losing the final "line_len"
11529         param.
11530         (dump_location_info): Update for the above.
11531         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11532         when handling the literal within the line.
11533         (test_reading_source_line): Update for location_get_source_line
11534         returning a char_span.
11535         * input.h (class char_span): Move here from
11536         diagnostic-show-locus.c, converting from a struct to a class.
11537         Make data members private.
11538         (char_span::operator bool): New.
11539         (char_span::length): New.
11540         (char_span::get_buffer): New.
11541         (char_span::operator[]): New.
11542         (char_span::subspan): Make const.
11543         (char_span::xstrdup): New.
11544         (location_get_source_line): Convert return type from const char *
11545         to char_span, losing the final "line_size" param.
11547 2018-04-30  Jan Hubicka  <jh@suse.cz>
11549         * lto-wrapper.c (ltrans_priorities): New static var.
11550         (cmp_priority): New.
11551         (run_gcc): Read priorities and if doing parallel build order
11552         the Makefile by them.
11554 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11556         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11558 2018-04-30  Richard Biener  <rguenther@suse.de>
11560         * tree-cfg.c (verify_address): Remove base argument, add
11561         flag whether to check TREE_ADDRESSABLE and do that.
11562         (verify_expr): Remove.
11563         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11564         (verify_gimple_assign_single): Likewise.
11565         (verify_gimple_switch): Likewise.
11566         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11567         piece from verify_expr.
11568         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11570 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11572         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11574 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11576         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11577         (small_data_pattern): Likewise.
11578         (arc_rewrite_small_data): Likewise.
11579         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11580         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11581         (get_symbol_alignment): New function.
11582         (legitimate_small_data_address_p): Likewise.
11583         (legitimate_scaled_address): Update, call
11584         legitimate_small_data_address_p.
11585         (output_sdata): New static variable.
11586         (arc_print_operand): Update how we handle small data operands.
11587         (arc_print_operand_address): Likewise.
11588         (arc_legitimate_address_p): Update, use
11589         legitimate_small_data_address_p.
11590         (arc_rewrite_small_data_p): Remove.
11591         (arc_rewrite_small_data_1): Likewise.
11592         (arc_rewrite_small_data): Likewise.
11593         (small_data_pattern): Likewise.
11594         (compact_sda_memory_operand): Update to use
11595         legitimate_small_data_address_p and get_symbol_alignment.
11596         (prepare_move_operands): Don't rewite sdata pattern.
11597         (prepare_extend_operands): Remove.
11598         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11599         pattern.
11600         (zero_extendqisi2): Likewise.
11601         (zero_extendhisi2): Likewise.
11602         (extendqihi2): Likewise.
11603         (extendqisi2): Likewise.
11604         (extendhisi2): Likewise.
11605         (addsi3): Likewise.
11606         (subsi3): Likewise.
11607         (andsi3): Likewise.
11608         * config/arc/constraints.md (Usd): Change it to memory constraint.
11610 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11612         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11613         as source of std instructions.
11614         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11615         allow 6-bit constants as source for store instructions.
11616         (movdi_insn): Update instruction pattern to allow 6-bit constants
11617         as source for store instructions.
11619 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11621         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11623 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11624             Sandra Loosemore <sandra@codesourcery.com>
11626         * dumpfile.c (dump_open): Allow '-' for stdout.
11627         * doc/invoke.texi (Developer Options): Document dump filename
11628         determination early.  Document stdin/stdout selection.
11630 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11632         Microblaze Target: PIC data text relative
11634         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11635         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11636         Add declaration.
11637         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11638         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11639         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11640         New addressing mode for data-text relative position indepenedent code.
11641         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11642         'ADDRESS_SYMBOLIC_TXT_REL'.
11643         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11644         (microblaze_legitimate_pic_operand): Exclude function calls from
11645         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11646         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11647         addresses cases.
11648         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11649         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11650         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11651         for 'address + offset'.
11652         (microblaze_expand_prologue): Add new function prologue call for
11653         'r20' assignation.
11654         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11655         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11656         table in case of TARGET_PIC_DATA_TEXT_REL.
11657         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11658         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11659         Add new macros 'UNSPEC_TEXT',
11660         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11661         + exclude function calls from 'UNSPEC_PLT' in case of data text
11662         relative mode.
11663         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11664         new target hook for generating address diff vector tables in case of
11665         flag_pic.
11666         * doc/tm.texi : Regenerate.
11667         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11668         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11669         of addr diff vector generation.
11670         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11671         target hook definition.
11672         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11673         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11674         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11675         option for data text relative.
11677 2018-04-30  Richard Biener  <rguenther@suse.de>
11679         * tree-chrec.h (evolution_function_is_constant_p): Remove
11680         redundant check.
11681         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11683 2018-04-30  Richard Biener  <rguenther@suse.de>
11685         PR bootstrap/85571
11686         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11688 2018-04-30  Richard Biener  <rguenther@suse.de>
11690         PR tree-optimization/28364
11691         PR tree-optimization/85275
11692         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11693         copying first exit test.
11695 2018-04-28  Mark Wielaard  <mark@klomp.org>
11697         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11698         dwarf_version >= 5.
11699         (dwarf_AT): Handle DW_AT_addr_base.
11700         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11702 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11704         PR target/84431
11705         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11706         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11707         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11708         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11710 2018-04-28  Richard Biener  <rguenther@suse.de>
11712         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11713         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11714         to reflect use.  Only add interesting stmts.
11716 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11718         PR ipa/85549
11719         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11720         the jump function allows for passing through aggregate values.
11722 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11724         * input.h (in_system_header_at): Convert from macro to inline
11725         function.
11726         (from_macro_expansion_at): Likewise.
11727         (from_macro_definition_at): Likewise.
11729 2018-04-27  Jeff Law  <law@redhat.com>
11731         * config.gcc: Mark tile* targets as deprecated/obsolete.
11733 2018-04-27  Richard Biener  <rguenther@suse.de>
11735         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11736         fix for ILP32.
11738 2018-04-27  Richard Biener  <rguenther@suse.de>
11740         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11742 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11744         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11745         with Yd constraint. Set "preferred_for_speed" attribute from
11746         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11747         with Yd constraint.
11748         (*movdi_internal): Ditto.
11749         (movti_interunit splitters): Remove
11750         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11751         (movdi_interunit splitters): Ditto.
11752         * config/i386/constraints.md (Ye): Remove.
11753         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11755 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11757         PR target/85512
11758         * config/aarch64/constraints.md (Usg): Limit to 31.
11759         (Usj): Limit to 63.
11761 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11763         PR tree-optimization/85529
11764         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11765         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11766         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11767         zero extension or masking of the MSB bit.
11768         (optimize_range_tests): Add FIRST_BB argument, pass it through
11769         to optimize_range_tests_var_bound.
11770         (maybe_optimize_range_tests, reassociate_bb): Adjust
11771         optimize_range_tests callers.
11773 2018-04-26  Richard Biener  <rguenther@suse.de>
11774             Jakub Jelinek  <jakub@redhat.com>
11776         * cgraph.h (symbol_table): Just declare debug method here.
11777         * symtab.c (symbol_table::debug): Define.
11779 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11781         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11783 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11785         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11786         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11787         (*movdi_internal): Substitute Yi and Yj constraint with x
11788         and Ym and Yn constraint with y constraint.  Update "isa"
11789         attribute and set "preferred_for_speed" attribute from
11790         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11791         (*movsi_internal): Ditto.
11792         (*movdf_internal): Ditto.
11793         (*movsf_internal): Ditto.
11794         (*zero_extendsidi2): Ditto.
11795         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11796         (sse2_loadld): Ditto.
11797         (*vec_extract<ssevecmodelower>_0): Ditto.
11798         (*vec_extractv4si_0_zext_sse4): Ditto.
11799         (vec_concatv2di): Ditto.
11800         (*vec_dup<mode>): Ditto.
11801         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11802         * config/i386/constraints.md (Yi): Remove.
11803         (Yj): Remove.
11804         (Ym): Remove.
11805         (Yn): Remove.
11807 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11809         * dumpfile.c (dump_open): New.
11810         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11811         (dump_finish): Detect stdio/stderr by value not name.
11813 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11815         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11817 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11819         PR target/84952
11820         * config/nvptx/nvptx.c (verify_neutering_jumps)
11821         (verify_neutering_labels): New function
11822         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11824 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11826         PR target/84025
11827         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11828         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11829         need neutering.
11831 2018-04-26  Richard Biener <rguenther@suse.de>
11832             Tom de Vries  <tom@codesourcery.com>
11834         PR lto/85422
11835         * lto-streamer-out.c (output_function): Fixup loops if required to match
11836         discovery done in the reader.
11838 2018-04-26  Richard Biener  <rguenther@suse.de>
11840         PR tree-optimization/85116
11841         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11842         have a loop exit from the single latch predecessor.  Remove
11843         case of header with just condition.
11844         (ch_base::copy_headers): Exclude infinite loops from any
11845         processing.
11846         (pass_ch::execute): Record exits.
11848 2018-04-26  Richard Biener  <rguenther@suse.de>
11850         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11851         prologue cost vector and pass it to vect_get_load_cost.
11852         (vect_get_peeling_costs_all_drs): Likewise.
11853         (vect_peeling_hash_get_lowest_cost): Likewise.
11854         (vect_enhance_data_refs_alignment): Likewise.
11856 2018-04-26  Richard Biener  <rguenther@suse.de>
11858         PR middle-end/85450
11859         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11860         checking of integer<->pointer conversions.
11861         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11862         sign-/zero-extending pointer types.
11863         (expand_omp_for_static_chunk): Likewise.
11865 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11866             Jean Lee  <xiaoyur347@gmail.com>
11868         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11869         (TARGET_ASAN_SHADOW_OFFSET): Define.
11870         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11871         true for -fsanitize=address.
11873 2018-04-25  Mark Wielaard  <mark@klomp.org>
11875         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11876         shorter ones.
11878 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11880         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11881         than "alu", remove explicit "memory" and "imm_disp" attributes.
11882         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11884         PR middle-end/85414
11885         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11886         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11887         gen_lowpart_no_emit.
11889 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11891         PR target/85473
11892         * config/i386/i386.c (ix86_expand_builtin): Change memory
11893         operand to XI, extend p0 to Pmode.
11894         * config/i386/i386.md: Change unspec volatile and operand
11895         1 mode to XI, change operand 0 mode to P.
11897 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11899         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11900         GET_MODE_MASK before any checking.
11901         (nds32_can_use_bset_p): Likewise.
11902         (nds32_can_use_btgl_p): Likewise.
11904 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11906         * config/nds32/nds32-doubleword.md: New define_split pattern for
11907         illegal register number.
11909 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11911         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11913 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11915         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11917 2018-04-25  Richard Biener  <rguenther@suse.de>
11919         * lto-streamer.h (LTO_major_version): Bump to 8.
11921 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11923         * BASE-VER: Set to 9.0.0.
11925 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11927         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11928         in __abskf2 and __powikf2.
11930 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11932         PR target/85512
11933         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11934         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11935         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11936         Use the above on operand 2.  Reindent.
11937         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11939 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11941         PR target/85485
11942         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11943         handle OPT_mcet.
11944         * config/i386/i386.opt (mcet): Removed.
11945         * doc/install.texi: Remove -mcet documentation.
11946         * doc/invoke.texi: Likewise.
11948 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11950         PR target/85485
11951         * doc/install.texi: Remove -mcet from bootstrap-cet.
11953 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11955         PR target/85511
11956         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11957         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11958         if TARGET_64BIT.
11960         PR target/85503
11961         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11962         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11963         containing a CONST_VECTOR.
11965 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11967         * doc/install.texi: Update newlib dependency for nvptx.
11969 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11971         PR target/85508
11972         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11973         instead of INTVAL when shifting x left.
11975 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11977         PR tree-optimization/85478
11978         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11979         vect_grouped_store_supported for single element vectors.
11981 2018-04-24  Richard Biener  <rguenther@suse.de>
11983         PR target/85491
11984         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11985         load cost increase to the case of non-constant step.
11987 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11989         PR target/84828
11990         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11991         destination if any_malformed_asm.
11993 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11995         PR middle-end/85496
11996         * expr.c (store_field): In the bitfield case, if the value comes from
11997         a function call and is returned in registers by means of a PARALLEL,
11998         do not change the mode of the temporary unless BLKmode and VOIDmode.
12000 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12002         PR rtl-optimization/85423
12003         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12004         dependencies to debug insns when the previous insn is non-debug.
12006 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12008         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12009         enums into a single definition.
12010         (fls): Fix predicates and printing.
12011         (seti): Likewise.
12013 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12015         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12016         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12017         and short u6 immediate.
12018         (check_if_valid_sleep_operand): Remove.
12019         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12021 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12023         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12024         flag_always_save_lp condition.
12025         * config/nds32/nds32.opt (malways-save-lp): New option.
12027 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12029         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12030         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12031         * config/nds32/nds32.h
12032         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12033         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12035 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12037         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12038         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12040 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12041             Chung-Ju Wu  <jasonwucj@gmail.com>
12043         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12044         Declare.
12045         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12046         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12048 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12050         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12052 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12054         * config/nds32/nds32-protos.h (nds32_data_alignment,
12055         nds32_local_alignment): Declare.
12056         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12057         nds32_local_alignment): New functions.
12058         (TARGET_CONSTANT_ALIGNMENT): Define.
12059         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12061 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12063         * config/nds32/nds32.c
12064         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12065         (TARGET_MODES_TIEABLE_P): Likewise.
12067 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12069         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12070         level Ofast and Og.
12072 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12073             Chung-Ju Wu  <jasonwucj@gmail.com>
12075         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12076         for unaligned access.
12077         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12078         unaligned access.
12079         * config/nds32/nds32-intrinsic.md: Likewise.
12080         * config/nds32/nds32_intrinsic.h: Likewise.
12081         * config/nds32/nds32.h (nds32_builtins): Likewise.
12082         * config/nds32/nds32.opt (munaligned-access): New option.
12083         * config/nds32/nds32.c (nds32_asm_file_start): Display
12084         flag_unaligned_access status.
12086 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12088         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12089         -mno-relax is present.
12090         * config/riscv/linux.h (LINK_SPEC): Ditto.
12092 2018-04-20  Martin Sebor  <msebor@redhat.com>
12094         PR c/85365
12095         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12096         for null pointers.
12097         (gimple_fold_builtin_stxcpy_chk): Same.
12098         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12100 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12102         PR target/85456
12103         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12104         __powikf2 when long double is IEEE 128-bit.
12106 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12108         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12109         step to make sure stack always aligned.
12111 2018-04-20  Carl Love  <cel@us.ibm.com>
12113         PR target/83402
12114         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12115         size check for arg0.
12117 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12118             Tom de Vries  <tom@codesourcery.com>
12120         PR target/85445
12121         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12122         Emit insns for calls too.
12123         (nvptx_find_par): Always look for worker-level predecessor insn.
12124         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12125         calls.
12126         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12127         (nvptx_process_pars): Propagate frames for calls.
12129 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12131         PR target/85469
12132         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12133         Removed.
12134         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12135         (ix86_handle_option): Don't handle OPT_mibt.
12136         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12137         __SHSTK__.
12138         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12139         has_ibt and ibt.
12140         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12141         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12142         (ix86_target_macros): Define __CET__ with flag_cf_protection
12143         for -fcf-protection.
12144         * config/i386/i386.c (isa2_opts): Remove -mibt.
12145         * config/i386/i386.h (TARGET_IBT): Removed.
12146         (TARGET_IBT_P): Likewise.
12147         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12148         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12149         * config/i386/i386.opt (mcet): Update help message.
12150         (mshstk): Likewise.
12151         (mibt): Removed.
12152         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12153         -mcet as an alias for -mshstk.
12155 2018-04-20  Richard Biener <rguenther@suse.de>
12157         PR middle-end/85475
12158         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12159         complexity by forcing a single use of the multiply operand.
12161 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12163         ipa/85449
12164         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12165         recursion dependency to only apply to non-clones.
12167 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12169         ipa/85447
12170         * ipa-cp.c (create_specialized_node): Check that clones of
12171         self-recursive edges exist during IPA-CP.
12173 2018-04-19  Toon Moene  <toon@moene.org>
12175         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12176         by -O3.
12178 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12180         PR tree-optimization/85467
12181         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12182         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12183         VECTOR_CST element to type.
12185 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12187         PR target/85397
12188         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12189         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12190         (builtin_longjmp): Likewise.
12191         (save_stack_nonlocal): New pattern.
12192         (restore_stack_nonlocal): Likewise.
12194 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12196         PR target/85404
12197         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12198         Replace ASM_OUTPUT_LABEL with fprintf.
12200 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12202         PR target/85417
12203         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12204         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12205         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12206         define __IBT__ and __SHSTK__ for -fcf-protection.
12207         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12208         TARGET_IBT.
12209         (ix86_trampoline_init): Likewise.
12210         (x86_output_mi_thunk): Likewise.
12211         (ix86_notrack_prefixed_insn_p): Likewise.
12212         (ix86_option_override_internal): Don't disallow -fcf-protection.
12213         * config/i386/i386.md (rdssp<mode>): Also enable for
12214         -fcf-protection.
12215         (incssp<mode>): Likewise.
12216         (nop_endbr): Likewise.
12217         * config/i386/i386.opt (mcet): Change help message to built-in
12218         functions only.
12219         (mibt): Likewise.
12220         (mshstk): Likewise.
12221         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12222         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12223         enable CET built-in functions.
12225 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12227         * common/config/i386/i386-common.c
12228         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12229         OPTION_MASK_ISA_MOVDIRI_UNSET,
12230         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12231         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12232         * config.gcc (movdirintrin.h): New header.
12233         * config/i386/cpuid.h (bit_MOVDIRI,
12234         bit_MOVDIR64B): New bits.
12235         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12236         and -mmvodir64b.
12237         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12238         (VOID, PVOID, PCVOID)): New function types.
12239         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12240         __builtin_ia32_directstoreu_u64,
12241         __builtin_ia32_movdir64b): New builtins.
12242         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12243         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12244         and -mmovdiri.
12245         (ix86_valid_target_attribute_inner_p): Ditto.
12246         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12247         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12248         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12249         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12250         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12251         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12252         (movdiri<mode>, movdir64b_<mode>): New.
12253         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12254         * config/i386/immintrin.h: Include movdirintrin.h.
12255         * config/i386/movdirintrin.h: New file.
12256         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12258 2018-04-19  Richard Biener  <rguenther@suse.de>
12260         PR middle-end/85455
12261         * cfg.c (clear_bb_flags): When loop state says we have
12262         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12264 2018-04-19  Richard Biener  <rguenther@suse.de>
12266         PR tree-optimization/84737
12267         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12268         copying restrict info.
12269         (vect_setup_realignment): Use it.
12270         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12271         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12272         the first DR to all generated stores.
12273         (vectorizable_load): Likewise for loads.
12275 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12277         PR tree-optimization/85446
12278         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12279         the integral and pointer types to have the same precision.
12281         * doc/install.texi: Document --disable-cet being the default and
12282         --enable-cet=auto.
12284 2018-04-18  Martin Liska  <mliska@suse.cz>
12286         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12287         style.
12289 2018-04-18  Martin Liska  <mliska@suse.cz>
12291         Revert
12292         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12294         PR ipa/83983
12295         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12296         arguments if they are comparable.
12298 2018-04-18  Martin Liska  <mliska@suse.cz>
12300         Revert
12301         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12303         PR lto/84805
12304         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12305         incomplete types.
12307 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12309         PR target/85388
12310         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12311         ENDBR after calling __morestack.
12313 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12315         PR jit/85384
12316         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12317         by using gcc_base_ver to generate a gcc_driver_version, and use
12318         it when generating GCC_DRIVER_NAME.
12319         * configure: Regenerate.
12321 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12323         PR target/81084
12324         * config.gcc: Obsolete powerpc*-*-*spe*.
12326 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12328         PR debug/84637
12329         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12330         (stabstr_D): Change type of unum from unsigned int to
12331         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12332         type.
12334 2018-04-17  Jim Wilson  <jimw@sifive.com>
12336         PR 84856
12337         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12338         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12339         Set arg_pointer_offset after using pretend_args_size.
12341 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12343         PR rtl-optimization/85431
12344         * dse.c (record_store): Ignore zero width stores.
12346         PR sanitizer/85230
12347         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12348         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12349         __builtin_stack_restore rather than after it.
12350         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12351         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12352         argument instead of virtual_dynamic_stack_rtx.
12354 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12356         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12357         New prototype.
12358         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12359         Add note to error message to explain internal mapping of overloaded
12360         built-in function name to non-overloaded built-in function name.
12361         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12362         function.
12364 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12366         PR target/85424
12367         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12368         where the inputs overlap with the output.
12370 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12372         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12373         (=v, v) alternative and explicit "memory" attribute.
12374         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12375         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12376         attributes.
12377         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12378         "sselog1" type instead of "sselog".
12379         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12380         "sselog".  Remove explicit "memory" attribute.
12381         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12382         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12383         attributes.
12384         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12385         "sselog1" type instead of "sselog".  Remove explicit "memory"
12386         attribute.
12387         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12388         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12389         attribute.
12390         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12391         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12392         attributes.
12393         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12394         "sselog1" type instead of "sselog".  Remove explicit "memory"
12395         attribute.
12396         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12397         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12398         attribute.
12400         PR target/85430
12401         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12403         PR middle-end/85414
12404         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12405         on a SUBREG.
12407 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12409         PR ipa/85421
12410         * ipa-cp.c (create_specialized_node): Call
12411         expand_all_artificial_thunks if necessary.
12413 2018-04-17  Martin Liska  <mliska@suse.cz>
12415         PR lto/85405
12416         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12417         in message, remote space in between '_G' and '('.
12419 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12421         PR target/85281
12422         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12423         avx512f_vmcmp<mode>3<round_saeonly_name>,
12424         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12425         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12426         avx512f_rndscale<mode><round_saeonly_name>,
12427         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12428         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12429         Use %<iptr>2 instead of %2 for -masm=intel.
12430         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12431         avx512f_vcvttss2usi<round_saeonly_name>,
12432         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12433         -masm=intel.
12434         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12435         avx512f_vcvttsd2usi<round_saeonly_name>,
12436         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12437         Use %q1 instead of %1 for -masm=intel.
12438         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12439         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12440         of %3 for -masm=intel.
12441         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12442         -masm=intel.
12443         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12444         -masm=intel.
12445         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12446         -masm=intel.
12447         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12448         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12449         %g1.
12450         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12451         -masm=intel.
12452         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12453         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12454         %g1 and one with %0 and %1.
12455         (avx512er_vmrcp28<mode><round_saeonly_name>,
12456         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12457         %1 for -masm=intel.
12458         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12459         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12460         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12461         of %0 and %{%4%} for -masm=intel.
12462         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12463         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12464         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12465         order of %0 and %{%5%}%{z%} for -masm=intel.
12467 2018-04-17  Jan Hubicka  <jh@suse.cz>
12469         PR lto/85405
12470         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12472 2018-04-17  Martin Liska  <mliska@suse.cz>
12474         PR ipa/85329
12475         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12476         for target_clone error message.  Make default implementation
12477         clone to be a local declaration.
12478         (separate_attrs): Add new argument and check for an empty
12479         string.
12480         (expand_target_clones): Handle it.
12481         (ipa_target_clone): Make redirection just for target_clones
12482         functions.
12484 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12485             Tom de Vries  <tom@codesourcery.com>
12487         PR middle-end/84955
12488         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12489         tiled basic blocks without omp continue statements.
12491 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12493         PR target/83660
12494         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12495         vec_extract expression as having side effects to make sure it gets
12496         a cleanup point.
12498 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12500         PR target/85403
12501         * config/i386/i386.c (get_builtin_code_for_version): Check
12502         error_mark_node.
12504 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12506         PR target/84331
12507         * config.gcc: Support "skylake".
12508         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12509         PROCESSOR_SKYLAKE.
12510         * config/i386/i386.c (m_SKYLAKE): Define.
12511         (processor_target_table): Add "skylake".
12512         (ix86_option_override_internal): Add "skylake".
12513         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12514         PROCESSOR_CANNONLAKE.
12515         (get_builtin_code_for_version): Fix priority for
12516         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12517         PROCESSOR_SKYLAKE-AVX512.
12518         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12519         (processor_type): Add PROCESSOR_SKYLAKE.
12521 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12522             Jason Merrill  <jason@redhat.com>
12524         PR c++/85112
12525         * convert.c (convert_to_integer_1): Use direct recursion for
12526         enumeral types and types with a precision less than the number
12527         of bits in their mode.
12529 2018-04-16  Julia Koval  <julia.koval@intel.com>
12531         PR target/84413
12532         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12533         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12535 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12537         PR target/85293
12538         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12539         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12540         and -mno-direct-move.
12542 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12544         PR target/83402
12545         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12546         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12547         Ensure negative shifts result in {0}.
12549 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12551         PR rtl-optimization/79916
12552         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12553         regs (if any) to define how to gnerate SD moves when LRA is in
12554         progress.
12556 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12558         PR rtl-optimization/85393
12559         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12560         * except.c (expand_dw2_landing_pad_for_region): Make static.
12561         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12562         a label and unconditional jump to old_bb, rather than
12563         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12564         basic block.
12566         PR rtl-optimization/85376
12567         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12568         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12569         instead of a specific value.
12571 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12572             Bin Cheng  <bin.cheng@arm.com>
12574         PR tree-optimization/82965
12575         PR tree-optimization/83991
12576         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12577         by_profile_only parameter.
12578         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12579         information if the loop was predicted to iterate too many times.
12580         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12582 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12584         PR lto/71991
12585         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12586         always inline.
12588 2018-04-13  Martin Liska  <mliska@suse.cz>
12589             Jakub Jelinek  <jakub@redhat.com>
12591         PR middle-end/81657
12592         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12593         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12594         * builtins.c (expand_builtin_memory_copy_args): Use
12595         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12596         handle dest_addr == pc_rtx.
12598 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12600         PR target/85291
12601         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12602         asked to not generate direct moves.
12603         (fix_trunc<mode>si2_stfiwx): Similar.
12604         (fix_trunc<mode>si2_internal): Similar.
12606 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12608         PR debug/83157
12609         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12610         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12611         lookup if dest in some wider mode is known to be const0_rtx and
12612         if so, record permanent equivalence for it to be ZERO_EXTEND of
12613         the narrower mode destination.
12615 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12617         * lto-streamer-out.c (output_function): Revert 259346.
12618         * omp-expand.c (expand_oacc_for): Likewise.
12620 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12622         PR rtl-optimization/85354
12623         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12624         * sel-sched.c (sel_global_init): ... here.
12626 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12628         PR target/85238
12629         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12630         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12631         mode for PE-COFF targets.
12632         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12633         (i386_pe_asm_lto_end): Likewise.
12634         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12635         (TARGET_ASM_LTO_END): Likewise.
12636         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12637         (i386_pe_asm_lto_start): New function.
12638         (i386_pe_asm_lto_end): Likewise.
12640 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12641             Richard Biener  <rguenther@suse.de>
12643         PR middle-end/84955
12644         * lto-streamer-out.c (output_function): Fix CFG loop state before
12645         streaming out.
12646         * omp-expand.c (expand_oacc_for): Handle calls to internal
12647         functions like regular functions.
12649 2018-04-12  Richard Biener  <rguenther@suse.de>
12651         PR lto/85371
12652         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12653         for the early LTO debug to properly generate references to it
12654         during DIE emission.  Do not re-use that for the skeleton for
12655         split-dwarf.
12656         (dwarf2out_early_finish): Likewise.
12658 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12660         PR target/85328
12661         * config/i386/sse.md
12662         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12663         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12664         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12665         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12666         and output is a reg, avoid creating invalid lowpart subreg, but
12667         instead split into a 512-bit move.  Don't split if not AVX512VL,
12668         input is xmm16+ reg and output is a mem.
12669         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12670         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12671         xmm16+ reg and output is a mem.
12673 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12675         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12676         also for flag_dwarf2_cfi_asm.
12678 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12680         PR rtl-optimization/85342
12681         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12682         a bool scalar var inside of the loop instead.  Don't try to update
12683         recog_data.operand after failed apply_change_group.
12685 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12687         PR target/85296
12688         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12689         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12690         array with flexible array member as array without given dimension.
12691         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12692         argument for undefined param to true.
12694 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12696         PR target/85321
12697         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12698         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12699         from PowerPC section.
12700         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12701         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12702         help text that is too long.
12703         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12704         help text that is too long.
12705         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12706         help text that is too long.
12708 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12710         * config/alpha/alpha.md (stack_probe_internal): Rename
12711         from "probe_stack".  Update all callers.
12713 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12715         PR rtl-optimization/84566
12716         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12717         sched_macro_fuse_insns.
12719 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12721         PR target/84301
12722         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12723         (compute_block_dependences): ... from here.
12725 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12727         PR tree-optimization/85331
12728         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12729         from int to HOST_WIDE_INT.
12731 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12733         PR ipa/84149
12734         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12735         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12736         not the same as the source val.
12737         (cgraph_edge_brings_value_p): New parameter.
12738         (gather_edges_for_value): Pass destination value to
12739         cgraph_edge_brings_value_p.
12740         (perhaps_add_new_callers): Likewise.
12741         (get_info_about_necessary_edges): Likewise and exclude values brought
12742         only by self-recursive edges.
12743         (create_specialized_node): Redirect only clones of self-calling edges.
12744         (+self_recursive_pass_through_p): New function.
12745         (find_more_scalar_values_for_callers_subset): Use it.
12746         (find_aggregate_values_for_callers_subset): Likewise.
12747         (known_aggs_to_agg_replacement_list): Removed.
12748         (decide_whether_version_node): Re-calculate known constants for all
12749         remaining context clones.
12751 2018-04-11  Richard Biener  <rguenther@suse.de>
12753         PR lto/85339
12754         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12755         from early DWARF output.
12756         (dwarf2out_early_finish): Output line info unconditionally into
12757         early DWARF and add reference to it.
12759 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12761         PR target/85281
12762         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12763         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12764         other than V2DFmode using iptr mode attribute.
12765         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12767 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12769         PR rtl-optimization/84659
12770         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12772 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12774         PR debug/85302
12775         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12776         SIZEP is NULL.
12777         (output_loc_list): Pass address of a dummy size variable even in the
12778         locview handling loop.
12779         (index_location_lists): Add comment on why skip_loc_list_entry can't
12780         call size_of_locs.
12782 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12784         PR target/85261
12785         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12786         into register.
12788 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12790         PR target/85321
12791         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12792         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12793         and -mstring-compare-inline-limit.
12795 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12797         PR target/85287
12798         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12799         for stack clash protection in a register whenever we need it to be in
12800         a register.
12802 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12804         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12805         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12807 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12809         PR target/85321
12810         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12811         the help text.
12812         (mlong-double-): Ditto.
12813         * config/rs6000/sysv4.opt (msdata=): Ditto.
12814         (mtls-size=): Ditto.
12816 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12818         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12819         erroneous entries for
12820         "vector int vec_ldl (int, long int *)", and
12821         "vector unsigned int vec_ldl (int, unsigned long int *)".
12822         Add comments and entries for
12823         "vector bool char vec_ldl (int, bool char *)",
12824         "vector bool short vec_ldl (int, bool short *)",
12825         "vector bool int vec_ldl (int, bool int *)",
12826         "vector bool long long vec_ldl (int, bool long long *)",
12827         "vector pixel vec_ldl (int, pixel *)",
12828         "vector long long vec_ldl (int, long long *)",
12829         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12830         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12831         type tree bool_long_long_type_node and correct definition of
12832         bool_V2DI_type_node to make reference to this new type tree.
12833         (rs6000_mangle_type): Replace erroneous reference to
12834         bool_long_type_node with bool_long_long_type_node.
12835         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12836         comments to emphasize sign distinctions for char and int types and
12837         replace RS6000_BTI_bool_long constant with
12838         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12839         use of RS6000_BTI_pixel.
12840         (bool_long_type_node): Remove this macro definition.
12841         (bool_long_long_type_node): New macro definition
12843 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12845         PR rtl-optimization/85300
12846         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12847         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12848         simplify_unary_operation fails.
12850 2018-04-10  Martin Liska  <mliska@suse.cz>
12852         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12853         cgraph_edge and ipa_ref.
12855 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12857         PR target/85177
12858         PR target/85255
12859         * config/i386/sse.md
12860         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12861         computation of the VEC_MERGE selector from mask.
12862         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12863         Fix decoding of the VEC_MERGE selector into mask.
12865 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12867         PR tree-optimization/85286
12868         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12870 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12872         * final.c (final_1): Set insn_last_address as well as
12873         insn_current_address.
12875 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12877         PR target/85173
12878         * explow.c (emit_stack_probe): Call validize_mem on memory location
12879         before passing it to gen_probe_stack.  Create address operand and
12880         legitimize it for the probe_stack_address case.
12882 2018-04-09  Jan Hubicka  <jh@suse.cz>
12884         PR lto/85078
12885         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12886         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12887         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12888         walk basetypes.
12889         (free_lang_data): Rebuild type inheritance graph.
12891 2018-04-09  Martin Sebor  <msebor@redhat.com>
12893         * invoke.texi (-finline-small-functions): Mention other optimization
12894         options.
12895         (-findirect-inlining, -fpartial-inlining): Same.
12896         (-finline-functions-called-once): Same.
12897         (-freorder-blocks-and-partition): Same.
12899 2018-04-09  Jan Hubicka  <jh@suse.cz>
12901         PR rtl/84058
12902         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12903         jumps; choose last target that matches the criteria (i.e.
12904         no partition changes for non-crossing jumps).
12905         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12906         support for redirecting crossing jumps to non-crossing.
12908 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12910         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12911         also for naked functions.
12913 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12915         * config/arc/arc.md (add_shift): New pattern.
12916         (add_shift2): Likewise.
12917         (sub_shift): Likewise.
12918         (sub_shift_cmp0_noout): Likewise.
12919         (compare_si_ashiftsi): Likewise.
12920         (xbfu_cmp0_noout): New combine pattern.
12921         (xbfu_cmp0"): Likewise.
12922         (movsi_set_cc_insn): Place the predicable variant first.
12923         (commutative_binary_cmp0_noout): Remove clobber.
12924         (commutative_binary_cmp0): New pattern.
12925         (noncommutative_binary_cmp0): Likewise.
12926         (noncommutative_binary_cmp0_noout): Likewise.
12927         (noncommutative_binary_comparison_result_used): Removed.
12928         (rsub_cmp0): New pattern.
12929         (rsub_cmp0_noout): Likewise.
12930         (extzvsi): Changed, keep only meaningful variants.
12931         (SQH, SEZ): New iterators.
12932         (SQH_postfix): New mode attribute.
12933         (SEZ_prefix): New code attribute.
12934         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12935         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12936         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12937         of numerical value.
12938         (noncommutative_operator): Check the availability of barrel
12939         shifter option.
12941 2018-04-09  Richard Biener  <rguenther@suse.de>
12943         PR tree-optimization/85284
12944         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12945         Only use the niter constraining form of simple_iv when the exit
12946         is always executed.
12948 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12950         PR target/84041
12951         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12952         (define_expand "*memory_barrier"): New define_expand.
12953         (define_insn "memory_barrier"): New insn.
12955 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12957         PR rtl-optimization/80463
12958         PR rtl-optimization/83972
12959         PR rtl-optimization/83480
12961         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12962         correct producer for the insn.
12963         (tidy_control_flow): Fixup seqnos in case of debug insns.
12965 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12967         PR rtl-optimization/83913
12969         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12970         different sched-times when merging exprs.
12972 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12974         PR rtl-optimization/83962
12976         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12977         tidy_fallthru_edge and tidy_control_flow.
12979 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12981         PR rtl-optimization/83530
12983         * sel-sched.c (force_next_insn): New global variable.
12984         (remove_insn_for_debug): When force_next_insn is true, also leave only
12985         next insn in the ready list.
12986         (sel_sched_region): When the region wasn't scheduled, make another pass
12987         over it with force_next_insn set to 1.
12989 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12991         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12992         into tm_file.
12993         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12994         for interrupt control.
12995         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12996         functions for interrupt control.
12997         * config/nds32/nds32-intrinsic.md: Likewise.
12998         * config/nds32/nds32_intrinsic.h: Likewise.
12999         * config/nds32/nds32.h (nds32_builtins): Likewise.
13001 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13003         * config/nds32/nds32.c (nds32_init_machine_status,
13004         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13005         strict_aligned_p field.
13006         (nds32_expand_to_rtl_hook): New function.
13007         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13008         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13010 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13011             Chung-Ju Wu  <jasonwucj@gmail.com>
13013         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13014         * config/nds32/nds32-n7.md: New file.
13015         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13016         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13017         pipeline.
13018         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13019         * config/nds32/nds32.md (pipeline_model): Add n7.
13020         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13021         * config/nds32/pipelines.md: Include n7 settings.
13023 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13024             Chung-Ju Wu  <jasonwucj@gmail.com>
13026         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13027         * config/nds32/nds32-e8.md: New file.
13028         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13029         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13030         pipeline.
13031         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13032         * config/nds32/nds32.md (pipeline_model): Add e8.
13033         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13034         * config/nds32/pipelines.md: Include e8 settings.
13036 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13037             Chung-Ju Wu  <jasonwucj@gmail.com>
13039         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13040         * config/nds32/nds32-n8.md: New file.
13041         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13042         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13043         pipeline.
13044         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13045         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13046         * config/nds32/nds32.md (pipeline_model): Add n8.
13047         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13048         * config/nds32/pipelines.md: Include n8 settings.
13050 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13051             Chung-Ju Wu  <jasonwucj@gmail.com>
13053         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13054         * config/nds32/nds32-n9-2r1w.md: New file.
13055         * config/nds32/nds32-n9-3r2w.md: New file.
13056         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13057         nds32_register_ports): New or modify for cpu n9.
13058         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13059         pipeline.
13060         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13061         * config/nds32/nds32-utils.c: New file.
13062         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13063         TARGET_MUL_SLOW): Define.
13064         * config/nds32/nds32.md (pipeline_model): New attribute.
13065         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13066         New options that support cpu n9.
13067         * config/nds32/pipelines.md: Include n9 settings.
13068         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13070 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13072         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13073         information if necessary.
13074         (output_cond_branch_compare_zero): Likewise.
13075         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13076         (nds32_target_alignment): Refine for alignment.
13077         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13078         (FUNCTION_BOUNDARY): Modify.
13079         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13080         align case.
13081         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13083 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13085         * config/nds32/constants.md (unspec_volatile_element): Add values for
13086         TLB operation and data prefetch.
13087         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13088         functions for TLB operation and data prefetch.
13089         * config/nds32/nds32-intrinsic.md: Likewise.
13090         * config/nds32/nds32_intrinsic.h: Likewise.
13091         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13092         (nds32_print_operand): Likewise.
13093         * config/nds32/nds32.h (nds32_builtins): Likewise.
13095 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13096         Andrew Pinski <pinsika@gcc.gnu.org>
13098         PR middle-end/82976
13099         * match.pd: Use constant_boolean_node of correct type instead of
13100         boolean_true_node or boolean_false_node for simplifying
13101         pointer comparisons to zero.
13103 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13105         PR tree-optimization/80021
13106         * tree.c (verify_type_variant): Make error call in verify_variant_match
13107         translatable and remove final full stop.
13109 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13111         * config/nds32/constants.md (unspec_volatile_element): Add
13112         UNSPEC_VOLATILE_EH_RETURN.
13113         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13114         nds32_output_stack_pop): Support dwarf exception handling process.
13115         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13116         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13117         exception handling process.
13118         (nds32_compute_stack_frame): Likewise.
13119         (nds32_return_addr_rtx): Likewise.
13120         (nds32_initial_elimination_offset): Likewise.
13121         (nds32_expand_prologue): Likewise.
13122         (nds32_expand_epilogue): Likewise.
13123         (nds32_dynamic_chain_address): New function.
13124         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13125         exception handling.
13126         (DYNAMIC_CHAIN_ADDRESS): Define.
13127         (EH_RETURN_DATA_REGNO): Define.
13128         (EH_RETURN_STACKADJ_RTX): Define.
13129         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13130         patterns for dwarf exception handling.
13132 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13134         * config/nds32/nds32.h: Clean up obsolete macros.
13136 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13138         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13139         Add enum values for particular instructions.
13140         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13141         particular intrinsic functions.
13142         * config/nds32/nds32-intrinsic.md: Likewise.
13143         * config/nds32/nds32_intrinsic.h: Likewise.
13144         * config/nds32/nds32.h (nds32_builtins): Likewise.
13145         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13146         (btst, ave): New patterns for particular instructions.
13148 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13150         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13151         Add enum values for atomic load/store and memory sync.
13152         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13153         and memory sync.
13154         * config/nds32/nds32-intrinsic.md: Likewise.
13155         * config/nds32/nds32_intrinsic.h: Likewise.
13156         * config/nds32/nds32.h (nds32_builtins): Likewise.
13158 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13160         PR tree-optimization/85257
13161         * fold-const.c (native_encode_vector): If not all elts could fit
13162         and off is -1, return 0 rather than offset.
13163         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13164         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13165         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13166         adjust buffer in native_interpret_expr call.
13168 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13170         * config/nds32/constants.md (unspec_volatile_element): Add cache
13171         control enum values.
13172         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13173         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13174         * config/nds32/nds32.c (nds32_cctl_names): New.
13175         (nds32_print_operand): Handle cache control register names.
13176         * config/nds32/nds32.h (nds32_builtins): New enum values.
13177         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13178         macros.
13179         * config/nds32/nds32.md (type): Add mmu.
13180         * config/nds32/pipelines.md (simple_insn): Add mmu.
13182 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13184         * config/nds32/nds32.md (type): Remove call.
13185         * config/nds32/pipelines.md (simple_insn): Likewise.
13187 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13189         * config/nds32/constants.md (unspec_volatile_element): Add
13190         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13191         UNSPEC_VOLATILE_FMFCFG.
13192         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13193         description for fmfcfg and fmfcsr.
13194         (bdesc_1arg): Add fmtcsr.
13195         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13196         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13197         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13198         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13199         unspec_fmfcfg): New patterns.
13200         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13201         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13202         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13203         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13204         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13205         __nds32__fmfcfg): Define.
13207 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13209         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13210         intrinsic register names.
13211         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13212         intrinsic register enum values and macros.
13214 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13216         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13217         for load/store addressing form.
13218         (nds32_print_operand_address): Likewise.
13220 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13222         PR target/85196
13223         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13224         based on LABEL_REF.  Remove useless assertion.
13225         (pic_address_needs_scratch): Fix formatting.
13226         (sparc_legitimize_pic_address): Minor tweaks.
13227         (sparc_delegitimize_address): Adjust assertion accordingly.
13228         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13229         into symbolic_operand.
13230         (movsi_high_pic_label_ref): Likewise.
13231         (movsi_lo_sum_pic_label_ref): Likewise.
13232         (movdi_pic_label_ref): Likewise.
13233         (movdi_high_pic_label_ref): Likewise.
13234         (movdi_lo_sum_pic_label_ref): Likewise.
13236 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13238         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13239         custom LIB_SPEC setup.
13241 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13242             Kito Cheng  <kito.cheng@gmail.com>
13244         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13245         * config/riscv/freebsd.h: New.
13247 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13249         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13250         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13251         file.
13253 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13254             Kito Cheng  <kito.cheng@gmail.com>
13256         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13257         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13258         * config/nds32/nds32-protos.h (nds32_output_call,
13259         nds32_output_return): Declare.
13260         * config/nds32/nds32.md: Refine all the call and return patterns.
13262 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13264         PR debug/85252
13265         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13266         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13268         PR rtl-optimization/84872
13269         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13270         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13271         EDGE_CROSSING edge.
13273 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13275         * expr.c (copy_blkmode_to_reg): Revert 254862.
13276         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13278 2018-04-06  Richard Biener  <rguenther@suse.de>
13280         PR middle-end/85244
13281         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13282         after seeing a component reference with an adjacent field.  Treat
13283         refs to arrays at struct end of external decls similar to
13284         refs to unconstrained commons.
13286 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13288         PR sanitizer/85213
13289         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13290         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13291         recursive calls.
13292         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13293         save_p here.
13295 2018-04-06  Richard Biener  <rguenther@suse.de>
13297         PR middle-end/85180
13298         * alias.c (find_base_term): New wrapper around find_base_term
13299         unwinding CSELIB_VAL_PTR changes.
13300         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13301         recursion.
13303 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13305         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13306         instructions.
13307         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13308         constant definitions.
13309         ("nop"): lr 0,0 -> nopr r0
13310         ("nop_lr0", "nop_lr1"): New insn definitions.
13312 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13314         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13315         NDS32_V3PUSH_AVAILABLE_P macro.
13317 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13318             Chung-Ju Wu  <jasonwucj@gmail.com>
13320         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13321         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13322         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13323         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13324         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13325         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13326         * config/nds32/constraints.md: New constraints and checking for hard
13327         float configuration.
13328         * config/nds32/iterators.md: New mode iterator and attribute for hard
13329         float configuration.
13330         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13331         patterns.
13332         * config/nds32/nds32-fpu.md: New file.
13333         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13334         deal with hard float code generation.
13335         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13336         ARCH_V3S.
13337         (abi_type, float_reg_number): New enum type.
13338         * config/nds32/nds32-predicates.c: New predicates for hard float.
13339         * config/nds32/nds32-protos.h: Declare functions for hard float.
13340         * config/nds32/nds32.c: Implementation for hard float configuration.
13341         * config/nds32/nds32.h: Definitions for hard float configuration.
13342         * config/nds32/nds32.md: Include hard float machine description and
13343         modify patterns for hard float configuration.
13344         * config/nds32/nds32.opt: New options for hard float configuration.
13345         * config/nds32/predicates.md: New predicates for hard float
13346         configuration.
13348 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13350         * common/config/nds32/nds32-common.c
13351         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13353 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13355         PR middle-end/85195
13356         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13357         CONSTRUCTOR_ELT (ctor, ...)->value.
13359 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13361         PR target/85193
13362         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13364 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13366         PR target/85204
13367         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13368         cond jump.
13370 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13371             Kito Cheng  <kito.cheng@gmail.com>
13373         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13374         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13375         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13376         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13378 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13379             Kito Cheng  <kito.cheng@gmail.com>
13381         * config/nds32/constraints.md (Ufe): New memory constraint.
13382         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13383         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13384         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13385         operands.
13386         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13387         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13389 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13391         * config/nds32/nds32.md: Use optimize_size in the condition for
13392         alu-shift instructions.
13394 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13396         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13398 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13400         * config/nds32/nds32.md (negsi2): Refine pattern.
13402 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13403             Chung-Ju Wu  <jasonwucj@gmail.com>
13405         * config/nds32/iterators.md (shift_rotate): New code iterator.
13406         (shift): New code attribute.
13407         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13408         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13409         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13410         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13411         bit-wise operations.
13412         (andsi3, *andsi3): Ditto.
13413         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13414         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13415         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13416         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13417         nds32_ior_operand, nds32_xor_operand): New predicates.
13419 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13421         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13422         (addsi3, subsi3): ... this.
13424 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13426         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13428 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13430         * config/nds32/nds32.md: Adjust indention.
13432 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13434         * config/nds32/nds32.md (feature): New attribute.
13436 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13438         * config/nds32/nds32.md (subtype): New attribute.
13440 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13442         PR target/85203
13443         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13444         expansion to perform a bitwise AND of the argument followed by a
13445         boolean negation of the result.
13447 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13449         PR rtl-optimization/84878
13450         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13451         the basic block.  Assert the use reference is not artificial and that
13452         it has an associated insn.
13454 2018-04-04  Michael Matz  <matz@suse.de>
13456         * builtins.c (compute_objsize): Pass correct operand
13457         to array_at_struct_end_p.
13459 2018-04-04  Richard Biener  <rguenther@suse.de>
13461         PR lto/85176
13462         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13463         from contexts for DINFO_LEVEL_TERSE and below.
13465 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13467         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13468         resiter_operand condition.
13469         * config/nds32/nds32.md (*move<mode>): Ditto.
13471 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13472             Monk Chiang  <sh.chiang04@gmail.com>
13474         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13476 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13478         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
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_inverse_cond_code,
13484         nds32_cond_code_str, output_cond_branch,
13485         output_cond_branch_compare_zero, nds32_expand_cbranch,
13486         nds32_expand_cstore, nds32_expand_movcc,
13487         nds32_output_cbranchsi4_equality_zero,
13488         nds32_output_cbranchsi4_equality_reg,
13489         nds32_output_cbranchsi4_equality_reg_or_const_int,
13490         nds32_output_cbranchsi4_greater_less_zero: New functions.
13491         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13492         nds32_expand_cstore, nds32_expand_movcc,
13493         nds32_output_cbranchsi4_equality_zero,
13494         nds32_output_cbranchsi4_equality_reg,
13495         nds32_output_cbranchsi4_equality_reg_or_const_int,
13496         nds32_output_cbranchsi4_greater_less_zero): Declare.
13497         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13498         nds32_rimm11s_operand): New predicates.
13499         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13500         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13501         patterns.
13503 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13505         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13506         * config/nds32/nds32.md: Ditto.
13507         * config/nds32/pipelines.md: Ditto.
13509 2018-04-04  Richard Biener  <rguenther@suse.de>
13511         PR tree-optimization/85168
13512         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13513         propagating abnormals.
13515 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13517         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13519 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13520             Kito Cheng  <kito.cheng@gmail.com>
13522         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13523         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13524         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13525         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13526         * config/nds32/nds32.md (sibcall_internal): New.
13527         (sibcall_register): Remove.
13528         (sibcall_immediate): Remove.
13529         (sibcall_value_internal): New.
13530         (sibcall_value_register): Remove.
13531         (sibcall_value_immediate): Remove.
13532         * config/nds32/predicates.md (nds32_general_register_operand): New.
13533         (nds32_call_address_operand): New.
13535 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13537         PR rtl-optimization/85167
13538         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13539         bb_defs if *split_p, instead preinitialize it to NULL.
13541         PR tree-optimization/85156
13542         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13543         evaluating the argument multiple times.
13545 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13547         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13548         than vector.
13549         (_mm_cvtpd_ps): Likewise.
13550         (_mm_cvttpd_epi32): Likewise.
13551         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13552         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13553         vector, pixel, and bool following altivec.h include.
13555 2018-04-03  Martin Sebor  <msebor@redhat.com>
13557         * doc/extend.texi (Common Function Attributes): Clarify.
13558         (const attribute): Likewise.
13559         (pure attribute): Likewise.
13561 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13563         PR target/85169
13564         * config/i386/i386.c (ix86_expand_vector_set): Use
13565         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13567 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13569         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13570         instructions when changing rounding bits to preserve precision bits
13571         in the x87 control word.
13573 2018-04-03  Martin Liska  <mliska@suse.cz>
13575         PR tree-optimization/82491
13576         * rtl.h (strip_offset_and_add): Replace += suboffset with
13577         poly_uint64 () + suboffset.
13579 2018-03-29  Martin Liska  <mliska@suse.cz>
13580             Martin Jambor  <mjambor@suse.cz>
13582         PR ipa/84947
13583         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13584         param_type is not an integral or pointer type.
13586 2018-04-03  Richard Biener  <rguenther@suse.de>
13588         * sese.h (recompute_all_dominators): Remove.
13590 2018-04-02  Martin Sebor  <msebor@redhat.com>
13592         * doc/invoke.texi (-Wrestrict): Fix typos.
13594 2018-04-02  Jim Wilson  <jimw@sifive.com>
13596         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13597         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13598         (<optab>di3, <optab>si3_extend): Likewise.
13599         (<optab>si3_mask, <optab>si3_mask_1): New.
13600         (<optab>di3_mask, <optab>di3_mask_1): New.
13601         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13602         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13603         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13605 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13607         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13608         example.
13610 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13612         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13613         (nds32_canonicalize_comparison): New function.
13615 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13616             Kito Cheng  <kito.cheng@gmail.com>
13617             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13619         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13620         * config/nds32/constants.md (unspec_volatile_element): Add
13621         UNSPEC_VOLATILE_RELAX_GROUP.
13622         * config/nds32/nds32-relax-opt.c: New file.
13623         * config/nds32/nds32-predicates.c
13624         (nds32_symbol_load_store_p): New function.
13625         * config/nds32/nds32-protos.h
13626         (nds32_symbol_load_store_p): Declare function.
13627         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13628         * config/nds32/nds32.c
13629         (nds32_register_pass): New function to register pass.
13630         (nds32_register_passes): New function to register passes.
13631         * config/nds32/nds32.md (relax_group): New pattern.
13632         * config/nds32/nds32.opt (mrelax-hint): New option.
13633         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13635 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13637         * config/nds32/t-nds32: Modify files dependency.
13639 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13641         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13642         (PROFILE_HOOK): Define its implementation.
13644 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13646         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13647         type and 32-bit size.
13649 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13651         PR middle-end/85090
13652         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13653         (V_128_256): New mode iterator.
13654         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13655         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13656         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13657         of V.
13658         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13659         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13661 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13663         PR target/83315
13664         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13665         NaN inputs correctly.
13667 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13669         PR target/80546
13670         * config/rs6000/vsx.md (??r): New mode attribute.
13671         (*vsx_mov<mode>_64bit): Use it.
13672         (*vsx_mov<mode>_32bit): Likewise.
13674 2018-03-30  Martin Sebor  <msebor@redhat.com>
13676         PR tree-optimization/84818
13677         * builtins.c (check_access): Use warning_n.
13679 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13681         PR target/83822
13682         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13683         condition.
13684         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13685         condition.
13687 2018-03-30  Julia Koval  <julia.koval@intel.com>
13689         PR target/84413
13690         * x86-tune.def (movx, partial_reg_dependency): Enable for
13691         m_SKYLAKE_AVX512.
13693 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13695         PR inline-asm/84985
13696         * lra-constraints.c (process_alt_operands): Move setting
13697         this_alternative_matches below.
13699 2018-03-29  Martin Liska  <mliska@suse.cz>
13701         PR lto/84995.
13702         * doc/invoke.texi: Document how LTO works with debug info.
13703         Describe auto-load support of binutils.  Mention 'x86-64'
13704         as valid option value of -march option.
13706 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13708         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13710         PR c/85094
13711         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13712         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13713         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13714         checking.
13716 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13718         PR target/84912
13719         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13720         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13721         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13722         for RS6000_BTM_POWERPC64.
13723         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13724         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13725         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13726         definition.
13727         (DIVDE): Use it.
13728         (DIVDEU): Likewise.
13730 2018-03-28  Carl Love  <cel@us.ibm.com>
13732         Revert
13733         2017-09-27  Carl Love  <cel@us.ibm.com>
13735         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13736         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13737         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13738         fctiw instruction.
13740 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13742         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13743         instead of __vector bool.
13744         (_mm_max_pu8): Likewise.
13745         (_mm_min_pi16): Likewise.
13747 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13749         PR target/84912
13750         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13751         (DIVWEUO): Likewise.
13752         (DIVDEO): Likewise.
13753         (DIVDEUO): Likewise.
13754         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13755         DIVWEUO and DIVDEUO.
13756         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13757         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13758         (div_extend): Likewise.
13759         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13760         builtin function.
13761         (__builtin_divweuo): Likewise.
13762         (__builtin_divdeo): Likewise.
13763         (__builtin_divdeuo): Likewise.
13765 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13767         PR target/85095
13768         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13769         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13771         PR tree-optimization/82004
13772         * gimple-match-head.c (optimize_pow_to_exp): New function.
13773         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13774         Don't fold to exp if optimize_pow_to_exp is false.
13776 2018-03-28  Martin Liska  <mliska@suse.cz>
13778         PR other/84819
13779         * calls.c (initialize_argument_information): Fix trailing space.
13780         * common.opt: Fix typo and provide better explanation for
13781         -fsanitize-coverage option.
13782         * config/i386/i386.opt: Fix typo.
13784 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13785             Martin Liska  <mliska@suse.cz>
13787         PR sanitizer/85081
13788         * gimplify.c (asan_poison_variable): Don't do the check for
13789         gimplify_omp_ctxp here.
13790         (gimplify_decl_expr): Do it here.
13791         (gimplify_target_expr): Likewise.
13793 2018-03-28  Martin Liska  <mliska@suse.cz>
13795         PR target/84988
13796         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13797         chkp_type_bounds_count if MPX is not enabled.
13799 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13801         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13803 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13805         PR target/84914
13806         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13807         function to create the function decl for complex long double
13808         multiply and divide for -mabi=ieeelongdouble.
13809         (init_float128_ieee): Call it.
13811 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13813         PR target/85044
13814         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13815         -fcf-protection=branch -mibt.
13816         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13818 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13820         PR target/81863
13821         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13822         arm_word_relocations.
13824 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13826         PR target/85056
13827         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13828         extern array declarations.
13830 2018-03-27  Richard Biener  <rguenther@suse.de>
13832         PR middle-end/84067
13833         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13834         explicit single_use checks.
13836 2018-03-27  Richard Biener  <rguenther@suse.de>
13838         PR tree-optimization/85082
13839         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13840         Valueize the VUSE.
13842 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13844         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13845         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13846         Turn on fasynchronous-unwind-tables and funwind-tables.
13848 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13850         PR target/85073
13851         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13852         (*bmi_blsr_<mode>_ccz): Ditto.
13854 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13856         PR tree-optimization/85063
13857         * omp-general.c (offloading_function_p): New function.  Factor out
13858         of ...
13859         * omp-offload.c (pass_omp_target_link::gate): ... here.
13860         * omp-general.h (offloading_function_p): Declare.
13861         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13862         with attribute omp declare target for offloading functions.
13864 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13866         PR tree-optimization/84005
13867         * tree-data-ref.h (get_base_for_alignment): Declare.
13868         * tree-data-ref.c (get_base_for_alignment_1): New function.
13869         (get_base_for_alignment): Likewise.
13870         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13871         get_base_for_alignment to find a suitable base object, instead
13872         of always using drb->base_address.
13874 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13876         PR inline-asm/85022
13877         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13878         known size by default.
13880 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13882         PR inline-asm/85030
13883         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13884         and non BLKmode operands.
13886 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13888         PR target/85026
13889         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13890         Clean up attributes.
13892 2018-03-23  Richard Biener  <rguenther@suse.de>
13894         PR debug/85020
13895         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13896         we are going to emit early debug for LTO.
13898 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13900         PR inline-asm/85034
13901         * function.c (match_asm_constraints_1): Don't optimize if input
13902         doesn't satisfy general_operand predicate for output's mode.
13904         PR inline-asm/85022
13905         * alias.c (write_dependence_p): Don't require for x_canonicalized
13906         non-VOIDmode if x has VOIDmode.
13908         PR sanitizer/85029
13909         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13910         just don't try to optimize it rather than assert it never happens.
13912 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13914         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13915         macro expansions for definition of ST_INTERNAL_<mode> and
13916         LD_INTERNAL_<mode> builtins.
13917         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13918         Remove prototype.
13919         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13920         function.
13921         (altivec_expand_st_builtin): Likewise.
13922         (altivec_expand_builtin): Remove calls to deleted functions.
13923         (rs6000_address_for_altivec): Delete this function.
13924         * config/rs6000/vector.md: Remove expands for
13925         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13927 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13929         PR target/84826
13930         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13931         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13932         re-computing once computed.
13933         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13934         (arm_init_machine_status): Initialize
13935         machine->static_chain_stack_bytes.
13937 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13939         PR target/84760
13940         * doc/extend.texi: Add four new prototypes for vec_ld.
13941         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13942         definitions for more logical presentation.
13943         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13944         entries for V1TI variants of __builtin_altivec_ld builtin.
13945         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13946         handling of V1TI variant of LVX icode pattern.
13947         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13948         (rs6000_gimple_fold_builtin): Likewise.
13949         (altivec_init_builtins): Add code to define
13950         __builtin_altivec_lvx_v1ti function.
13952 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13954         PR inline-asm/84941
13955         * function.c (match_asm_constraints_1): Don't do the optimization
13956         if input isn't a REG, SUBREG, MEM or constant.
13958 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13960         PR tree-optimization/84956
13961         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13962         bb_has_abnormal_pred.
13964 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13966         PR sanitizer/85018
13967         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13968         DECL_INITIAL (decl) to decl at the end.
13969         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13970         adjust the comment.
13972 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13974         * doc/extend.texi (__builtin_tgmath): Document when complex
13975         integer types are treated as _Complex _Float64.
13977 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13979         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13981 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13983         PR tree-optimization/84960
13984         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13985         if it is ENTRY block, move them into single succ of ENTRY in that case.
13987 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13989         PR tree-optimization/84811
13990         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13991         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13992         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13993         (known_subrange_p): Update accordingly.  Cast each value involved
13994         in the size comparison, rather than casting the result of the
13995         subtraction.
13997 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13999         PR tree-optimization/84982
14000         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14001         by flipping the least significant bit rather than all bits from
14002         bitpos to bitpos + bitsize - 1.
14004 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14006         * doc/extend.texi (Deprecated Features): Remove mention of
14007         long-deleted deprecations.
14009 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14011         PR jit/84288
14012         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14013         * configure: Regenerate.
14015 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14017         PR tree-optimization/83126
14018         * tree-parloops.c (num_phis): New function.
14019         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14021 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14023         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14024         mention anon-struct/union members and trailing attributes.
14026 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14028         PR tree-optimization/84969
14029         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14030         builtin memset partitions if they set different rhs values.
14032 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14034         PR rtl-optimization/84989
14035         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14036         VEC_DUPLICATE with scalar result mode.
14038 2018-03-21  Martin Liska  <mliska@suse.cz>
14040         PR ipa/84963
14041         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14042         not intended return statement.
14044 2018-03-21  Martin Liska  <mliska@suse.cz>
14046         PR target/84988
14047         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14048         (chkp_find_bound_slots_1): Limit number of iterations.
14050 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14052         PR target/84838
14053         * Minor grammar fixes for x86 options.
14055 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14057         PR debug/84875
14058         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14059         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14061 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14063         PR target/83789
14064         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14065         (altivec_lvx_<mode>_1op): Likewise.
14066         (altivec_stvx_<mode>_2op): Likewise.
14067         (altivec_stvx_<mode>_1op): Likewise.
14068         (altivec_lvx_<VM2:mode>): New define_expand.
14069         (altivec_stvx_<VM2:mode>): Likewise.
14070         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14071         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14072         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14073         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14074         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14075         (rs6000_gen_lvx): Likewise.
14076         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14077         (altivec_expand_stv_builtin): Likewise.
14078         (altivec_expand_builtin): Likewise.
14079         * config/rs6000/vector.md: Likewise.
14081 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14083         PR target/82518
14084         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14085         BYTES_BIG_ENDIAN.
14087 2018-03-20  Richard Biener  <rguenther@suse.de>
14089         PR target/84986
14090         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14091         sign-conversions as zero, fall back to standard scalar_stmt
14092         cost for the rest.
14094 2018-03-20  Martin Liska  <mliska@suse.cz>
14096         PR ipa/84825
14097         * predict.c (rebuild_frequencies): Handle case when we have
14098         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14100 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14102         PR target/84990
14103         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14104         flag_section_anchors.
14105         * varasm.c (use_blocks_for_decl_p): Remove hack for
14106         dw2_force_const_mem.
14108         PR target/84845
14109         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14110         to ...
14111         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14112         be created, use lowpart_subreg of operands[0] rather than operands[0]
14113         itself.
14114         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14115         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14116         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14117         and n constraint instead of aarch64_shift_imm_di and Usd.
14118         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14119         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14121 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14123         PR target/82989
14124         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14125         to favor GPR over NEON registers.
14126         (<shift>di3_neon): Likewise.
14128 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14130         PR target/84952
14131         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14132         (nvptx_process_pars): Emit bar.sync asap and alap.
14134 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14136         PR target/84954
14137         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14138         seen_label if seen_label is already set.
14140 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14142         PR target/84945
14143         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14144         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14145         Use 1U instead of 1.  Formatting fixes.
14147         PR c/84953
14148         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14149         instead of TREE_TYPE (s1) for the return value.
14151 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14153         PR tree-optimization/84946
14154         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14155         bitsize + bitsize in poly_uint64 rather than poly_int64.
14157         PR sanitizer/78651
14158         * dwarf2asm.c: Include fold-const.c.
14159         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14160         of decl rather than decl itself.
14162         PR rtl-optimization/84643
14163         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14165 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14167         PR sanitizer/78651
14168         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14169         calling assemble_variable.
14171 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14173         PR target/81647
14174         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14175         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14177 2018-03-19  Jim Wilson  <jimw@sifive.com>
14179         PR bootstrap/84856
14180         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14181         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14182         (riscv_first_stack_step): Likewise.
14183         (riscv_option_override): Use STACK_BOUNDARY instead of
14184         MIN_STACK_BOUNDARY.
14185         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14186         MIN_STACK_BOUNDARY.
14187         (BIGGEST_ALIGNMENT): Set to 128.
14188         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14189         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14190         STACK_BOUNDARY.
14192 2018-03-19  Richard Biener  <rguenther@suse.de>
14194         PR tree-optimization/84933
14195         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14196         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14198 2018-03-19  Richard Biener  <rguenther@suse.de>
14200         PR tree-optimization/84859
14201         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14202         (cond_if_else_store_replacement): Perform sinking operation on
14203         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14204         Generalize what a BB with a single eligible store is.
14206 2018-03-19  Richard Biener  <rguenther@suse.de>
14208         PR tree-optimization/84929
14209         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14210         chrec_is_positive against non-chrec arg.
14212 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14214         PR target/84711
14215         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14217 2018-03-18  Martin Liska  <mliska@suse.cz>
14219         PR rtl-optimization/84635
14220         * regrename.c (build_def_use): Use matches_mode only when
14221         matches >= 0.
14223 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14225         PR tree-optimization/84913
14226         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14227         vectorize chains of COND_EXPRs.
14229 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14231         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14233 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14235         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14237 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14239         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14241 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14242             Kito Cheng  <kito.cheng@gmail.com>
14244         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14245         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14246         (nds32_adjust_reg_alloc_order): New function.
14247         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14249 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14251         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14252         nds32_print_operand, nds32_print_operand_address): Use
14253         HOST_WIDE_INT_PRINT_DEC instead.
14255 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14257         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14259 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14261         PR target/84902
14262         * config/i386/i386.c (initial_ix86_tune_features,
14263         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14264         unsigned long long.
14265         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14266         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14267         rather than 1u << ix86_tune.  Formatting fix.
14268         (ix86_option_override_internal): Change ix86_arch_mask from
14269         unsigned int to unsigned HOST_WIDE_INT, initialize to
14270         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14271         (ix86_function_specific_restore): Likewise.
14273 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14275         PR target/84899
14276         * postreload.c (reload_combine_recognize_pattern): Perform
14277         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14278         truncate_int_for_mode the result for the destination's mode.
14280         PR c/84909
14281         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14282         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14283         Likewise.
14284         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14285         Likewise.
14287 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14289         PR target/84876
14290         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14291         regno_allocno_class_array and sorted_pseudos.
14292         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14293         insns where regno is used.
14295 2018-03-16  Martin Liska  <mliska@suse.cz>
14297         PR ipa/84833
14298         * multiple_target.c (create_dispatcher_calls): Redirect
14299         reference in the symbol table.
14301 2018-03-16  Martin Liska  <mliska@suse.cz>
14303         PR ipa/84722
14304         * multiple_target.c (create_dispatcher_calls): Redirect also
14305         an alias.
14307 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14309         PR c++/79937
14310         PR c++/82410
14311         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14312         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14313         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14315 2018-03-16  Julia Koval  <julia.koval@intel.com>
14317         * doc/invoke.texi (Skylake Server): Add CLWB.
14318         Cannonlake): Remove CLWB.
14320 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14322         PR tree-optimization/84841
14323         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14324         1 << 3.
14325         (FLOAT_ONE_CONST_TYPE): Define.
14326         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14327         (sort_by_operand_rank): Put entries with higher constant_type last
14328         rather than first to match comments.
14330 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14332         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14333         split predicate.
14335 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14337         PR c++/79085
14338         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14339         check and use address of target always.
14341 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14343         PR target/84574
14344         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14345         (indirect_thunk_bnd_needed): Likewise.
14346         (indirect_thunks_used): Likewise.
14347         (indirect_thunks_bnd_used): Likewise.
14348         (indirect_return_needed): New.
14349         (indirect_return_bnd_needed): Likewise.
14350         (output_indirect_thunk_function): Add a bool argument for
14351         function return.
14352         (output_indirect_thunk_function): Don't generate alias for
14353         function return thunk.
14354         (ix86_code_end): Call output_indirect_thunk_function to generate
14355         function return thunks.
14356         (ix86_output_function_return): Set indirect_return_bnd_needed
14357         and indirect_return_needed instead of indirect_thunk_bnd_needed
14358         and indirect_thunk_needed.
14360 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14362         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14363         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14364         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14366 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14367             Paul Hua <paul.hua.gm@gmail.com>
14369         PR c/84852
14370         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14372 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14374         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14375         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14376         resp. SFmode cases.
14378 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14380         PR target/84711
14381         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14382         instead of GET_MODE_SIZE when comparing Units.
14384 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14386         PR target/68256
14387         * varasm.c (hash_section): Return an unchangeble hash value
14388         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14389         Return !aarch64_can_use_per_function_literal_pools_p ().
14391 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14393         PR target/84860
14394         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14395         rather than address of cmode as last argument to prepare_cmp_insn.
14397 2018-03-15  Julia Koval  <julia.koval@intel.com>
14399         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14400         F_AVX512VNNI, F_AVX512BITALG): New.
14402 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14404         PR target/83451
14405         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14406         insn for floating-point loads and stores.
14408 2018-03-14  Carl Love  <cel@us.ibm.com>
14410         * config/rs6000/rs6000-c.c: Add macro definitions for
14411         ALTIVEC_BUILTIN_VEC_PERMXOR.
14412         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14413         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14414         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14415         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14416         UNSPEC_VPERMXOR.
14417         * config/doc/extend.texi: Add prototypes for vec_permxor.
14419 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14421         PR c/84852
14422         * diagnostic-show-locus.c (class layout_point): Convert m_line
14423         from int to linenum_type.
14424         (line_span::comparator): Use linenum "compare" function when
14425         comparing line numbers.
14426         (test_line_span): New function.
14427         (layout_range::contains_point): Convert param "row" from int to
14428         linenum_type.
14429         (layout_range::intersects_line_p): Likewise.
14430         (layout::will_show_line_p): Likewise.
14431         (layout::print_source_line): Likewise.
14432         (layout::should_print_annotation_line_p): Likewise.
14433         (layout::print_annotation_line): Likewise.
14434         (layout::print_leading_fixits): Likewise.
14435         (layout::annotation_line_showed_range_p): Likewise.
14436         (struct line_corrections): Likewise for field m_row.
14437         (line_corrections::line_corrections): Likewise for param "row".
14438         (layout::print_trailing_fixits): Likewise.
14439         (layout::get_state_at_point): Likewise.
14440         (layout::get_x_bound_for_row): Likewise.
14441         (layout::print_line): Likewise.
14442         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14443         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14444         * input.c (selftest::test_linenum_comparisons): New function.
14445         (selftest::input_c_tests): Call it.
14446         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14447         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14448         * selftest.h (ASSERT_GT): New macro.
14449         (ASSERT_GT_AT): New macro.
14450         (ASSERT_LT): New macro.
14451         (ASSERT_LT_AT): New macro.
14453 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14455         PR rtl-optimization/84780
14456         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14458 2018-03-14  Martin Liska  <mliska@suse.cz>
14460         * tree.c (record_node_allocation_statistics): Use
14461         get_stats_node_kind.
14462         (get_stats_node_kind): New function extracted from
14463         record_node_allocation_statistics.
14464         (free_node): Use get_stats_node_kind.
14466 2018-03-14  Richard Biener  <rguenther@suse.de>
14468         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14469         that the value-set of ANTIC_IN doesn't grow.
14471         Revert
14472         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14473         member.
14474         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14475         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14477 2018-03-14  Julia Koval  <julia.koval@intel.com>
14479         * config.gcc (icelake-client, icelake-server): New.
14480         (icelake): Remove.
14481         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14482         (initial_ix86_arch_features): Ditto.
14483         (PTA_SKYLAKE): Add SGX.
14484         (PTA_ICELAKE): Remove.
14485         (PTA_ICELAKE_CLIENT): New.
14486         (PTA_ICELAKE_SERVER): New.
14487         (ix86_option_override_internal): Split up icelake on icelake client and
14488         icelake server.
14489         (get_builtin_code_for_version): Ditto.
14490         (fold_builtin_cpu): Ditto.
14491         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14492         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14493         * config/i386/i386.h (processor_type): Ditto.
14494         * doc/invoke.texi: Ditto.
14496 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14498         PR sanitizer/83392
14499         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14500         INTEGER_CST offset, add it together with bitpos / 8 and
14501         sign extend based on POINTER_SIZE.
14503         PR target/84844
14504         Revert
14505         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14507         PR target/78090
14508         * config/i386/constraints.md (Yc): New register constraint.
14509         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14510         Use Yc constraint for alternative 2 of operand 0.  Remove
14511         preferred_for_speed attribute.
14513 2018-03-14  Richard Biener  <rguenther@suse.de>
14515         PR tree-optimization/84830
14516         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14517         with the old one to avoid oscillations.
14519 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14521         PR target/83712
14522         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14523         pseudos.
14524         (assign_by_spills): Return a flag of reload assignment failure.
14525         Do not process the reload assignment failures.  Do not spill other
14526         reload pseudos if they has the same reg class.  Update n if
14527         necessary.
14528         (lra_assign): Add a return arg.  Set up from the result of
14529         assign_by_spills call.
14530         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14531         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14532         usage_insns if it is not NULL.
14533         (spill_hard_reg_in_range): New function.
14534         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14535         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14536         function prototypes.
14537         (lra_assign): Change prototype.
14538         * lra.c (lra): Add code to deal with fails by splitting hard reg
14539         live ranges.
14541 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14543         * config/riscv/riscv.opt (mrelax): New option.
14544         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14545         "norelax" when riscv_mrelax is disabled.
14546         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14548 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14550         PR target/84743
14551         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14552         reassociation for int modes.
14554 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14556         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14557         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14558         for big-endian.
14559         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14560         * config/aarch64/aarch64-sve.md
14561         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14562         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14563         (*extend<mode><Vwide>2): Rename to...
14564         (aarch64_sve_extend<mode><Vwide>2): ...this.
14565         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14566         renaming the old pattern to...
14567         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14568         unsigned packs.
14569         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14570         define_expand, renaming the old pattern to...
14571         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14572         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14573         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14574         account when deciding which SVE instruction the optab should use.
14575         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14577 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14579         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14580         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14581         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14582         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14583         (tlsdesc_small_<mode>): Turn a define_expand and use
14584         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14585         (tlsdesc_small_advsimd_<mode>): ...this.
14586         (tlsdesc_small_sve_<mode>): New pattern.
14588 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14590         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14591         (UNSPEC_UMUL_HIGHPART): New constants.
14592         (MUL_HIGHPART): New int iteraor.
14593         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14594         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14595         define_expand.
14596         (*<su>mul<mode>3_highpart): New define_insn.
14598 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14600         PR lto/84805
14601         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14602         incomplete types.
14604 2018-03-13  Martin Liska  <mliska@suse.cz>
14606         PR ipa/84658.
14607         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14608         vector.
14609         (sem_item_optimizer::~sem_item_optimizer): Release it.
14610         (sem_item_optimizer::merge_classes): Register variable aliases.
14611         (sem_item_optimizer::fixup_pt_set): New function.
14612         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14613         * ipa-icf.h: Declare new variables and functions.
14615 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14617         PR middle-end/84834
14618         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14619         integer_pow2p@2 and test integer_pow2p in condition.
14620         (A < 0 ? C : 0): Similarly for @1.
14622         PR middle-end/84831
14623         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14624         characters starting at p contain '\0' character, don't look beyond
14625         that.
14627         PR target/84827
14628         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14629         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14631         PR target/84828
14632         * reg-stack.c (change_stack): Change update_end var from int to
14633         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14634         also call set_block_for_insn on the newly added insns and rescan.
14636         PR target/84786
14637         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14638         on the last operand.
14640         PR c++/84704
14641         * tree.c (stabilize_reference_1): Return save_expr (e) for
14642         STATEMENT_LIST even if it doesn't have side-effects.
14644 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14646         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14648 2018-03-12  Renlin Li  <renlin.li@arm.com>
14650         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14651         aarch64_output_scalar_simd_mov_immediate.
14653 2018-03-12  Martin Sebor  <msebor@redhat.com>
14655         PR tree-optimization/83456
14656         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14657         for perfectly overlapping calls to memcpy.
14658         (gimple_fold_builtin_memory_chk): Same.
14659         (gimple_fold_builtin_strcpy): Handle no-warning.
14660         (gimple_fold_builtin_stxcpy_chk): Same.
14661         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14663 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14665         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14666         parameter.  Use it for SFmode.
14667         (rs6000_function_arg_advance_1): Adjust.
14668         (rs6000_function_arg): Adjust.
14669         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14671 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14673         PR rtl-optimization/84169
14674         PR rtl-optimization/84780
14675         * combine.c (can_combine_p): Check for a 2-insn combination whether
14676         the destination register is used between the two insns, too.
14678 2018-03-12  Richard Biener  <rguenther@suse.de>
14680         PR tree-optimization/84803
14681         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14682         for refs DR analysis didn't process.
14684 2018-03-12  Richard Biener  <rguenther@suse.de>
14686         PR tree-optimization/84777
14687         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14688         force-vectorize loops ignore whether we are optimizing for size.
14690 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14692         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14693         (TARGET_MD_ASM_ADJUST): Define.
14695 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14696             Kito Cheng  <kito.cheng@gmail.com>
14697             Chung-Ju Wu  <jasonwucj@gmail.com>
14699         * config/nds32/nds32.c (nds32_compute_stack_frame,
14700         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14701         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14702         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14703         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14704         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14705         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14706         * config/nds32/nds32.md (prologue, epilogue): Use macro
14707         NDS32_V3PUSH_AVAILABLE_P to do checking.
14709 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14711         PR debug/58150
14712         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14713         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14714         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14715         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14716         addition of most attributes on !orig_type_die or the attribute not
14717         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14719 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14720             Chung-Ju Wu  <jasonwucj@gmail.com>
14722         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14723         __NDS32_VH__ macro.
14724         * config/nds32/nds32.opt (mvh): New option.
14726 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14727             Chung-Ju Wu  <jasonwucj@gmail.com>
14729         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14730         function.
14731         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14732         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14733         definition.
14735 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14736             Chung-Ju Wu  <jasonwucj@gmail.com>
14738         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14739         function.
14740         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14741         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14743 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14744             Kito Cheng  <kito.cheng@gmail.com>
14745             Chung-Ju Wu  <jasonwucj@gmail.com>
14747         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14748         UNSPEC_FFMISM and UNSPEC_FLMISM.
14749         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14750         for ffb, ffmism and flmism.
14751         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14752         (unspec_ffmism): Ditto.
14753         (unspec_flmism): Ditto.
14754         (nds32_expand_builtin_impl): Check if string extension is available.
14755         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14756         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14758 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14760         Reverting patch:
14761         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14763         PR target/83712
14764         * lra-assigns.c (assign_by_spills): Return a flag of reload
14765         assignment failure.  Do not process the reload assignment
14766         failures.  Do not spill other reload pseudos if they has the same
14767         reg class.
14768         (lra_assign): Add a return arg.  Set up from the result of
14769         assign_by_spills call.
14770         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14771         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14772         usage_insns if it is not NULL.
14773         (spill_hard_reg_in_range): New function.
14774         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14775         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14776         function prototypes.
14777         (lra_assign): Change prototype.
14778         * lra.c (lra): Add code to deal with fails by splitting hard reg
14779         live ranges.
14781 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14783         PR target/84807
14784         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14786 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14788         PR debug/84620
14789         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14790         (dw_val_node): Add val_symbolic_view.
14791         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14792         (symview_upper_bound): New.
14793         (new_line_info_table): Initialize symviews_since_reset.
14794         (dwarf2out_source_line): Count symviews_since_reset and set
14795         symview_upper_bound.
14796         (dw_val_equal_p): Handle symview.
14797         (add_AT_symview): New.
14798         (print_dw_val): Handle symview.
14799         (attr_checksum, attr_checksum_ordered): Likewise.
14800         (same_dw_val_p, size_of_die): Likewise.
14801         (value_format, output_die): Likewise.
14802         (add_high_low_attributes): Use add_AT_symview for entry_view.
14803         (dwarf2out_finish): Reset symview_upper_bound, clear
14804         zero_view_p.
14806 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14808         PR target/83969
14809         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14810         Add strict argument and use it.
14811         (rs6000_split_multireg_move): Update for new strict argument.
14812         (mem_operand_gpr): Disallow all non-offsettable addresses.
14813         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14815 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14817         PR target/84772
14818         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14819         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14820         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14822         PR c++/84767
14823         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14824         decl, use remap_type if we want to use the type.
14826 2018-03-09  Martin Sebor  <msebor@redhat.com>
14828         PR tree-optimization/84526
14829         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14830         Remove dead code.
14831         (builtin_access::generic_overlap): Be prepared to handle non-array
14832         base objects.
14834 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14836         PR rtl-optimization/84682
14837         * lra-constraints.c (process_address_1): Check is_address flag
14838         for address constraints.
14839         (process_alt_operands): Likewise.
14840         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14841         preprocess_constraints.
14842         * recog.h (preprocess_constraints): Add oploc parameter.
14843         Adjust callers.
14844         * recog.c (preprocess_constraints): Test address_operand for
14845         CT_ADDRESS constraints.
14847 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14849         PR target/83712
14850         * lra-assigns.c (assign_by_spills): Return a flag of reload
14851         assignment failure.  Do not process the reload assignment
14852         failures.  Do not spill other reload pseudos if they has the same
14853         reg class.
14854         (lra_assign): Add a return arg.  Set up from the result of
14855         assign_by_spills call.
14856         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14857         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14858         usage_insns if it is not NULL.
14859         (spill_hard_reg_in_range): New function.
14860         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14861         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14862         function prototypes.
14863         (lra_assign): Change prototype.
14864         * lra.c (lra): Add code to deal with fails by splitting hard reg
14865         live ranges.
14867 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14869         PR target/83193
14870         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14871         Accept complain bool parameter.  Only emit errors if it is true.
14872         (arm_parse_cpu_option_name): Likewise.
14873         (arm_target_thumb_only): Adjust callers of the above.
14874         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14875         prototype to take a default true bool parameter.
14876         (arm_parse_arch_option_name): Likewise.
14878 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14879             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14881         PR jit/64089
14882         PR jit/84288
14883         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14884         * configure: Regenerate.
14885         * configure.ac ("linker --version-script option"): New.
14886         ("linker soname option"): New.
14888 2018-03-09  Richard Biener  <rguenther@suse.de>
14890         PR tree-optimization/84775
14891         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14892         immediate uses of predicate stmts and mark them modified.
14894         Revert
14895         PR tree-optimization/84178
14896         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14897         to caller.
14898         (version_loop_for_if_conversion): Delay update_ssa call.
14899         (tree_if_conversion): Delay update_ssa until after predicate
14900         insertion.
14902 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14904         PR target/84763
14905         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14906         when the function accesses prior frames.
14908 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14910         PR debug/84456
14911         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14912         gen_llsym, otherwise call maybe_gen_llsym.
14914         PR inline-asm/84742
14915         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14916         has ',' character inside of it.
14918 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14920         PR target/84748
14921         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14922         as clobbering CC_REGNUM.
14924 2018-03-08  Richard Biener  <rguenther@suse.de>
14926         PR middle-end/84552
14927         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14928         (follow_copies_to_constant): Do not follow SSA names registered
14929         for update.
14931 2018-03-08  Richard Biener  <rguenther@suse.de>
14933         PR tree-optimization/84178
14934         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14935         to caller.
14936         (version_loop_for_if_conversion): Delay update_ssa call.
14937         (tree_if_conversion): Delay update_ssa until after predicate
14938         insertion.
14940 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14942         PR tree-optimization/84178
14943         * tree-if-conv.c (release_bb_predicate): Remove the
14944         the assertion that the stmts have NULL use_ops.
14945         Discard the statements, asserting that they haven't
14946         yet been added to a BB.
14948 2018-03-08  Richard Biener  <rguenther@suse.de>
14950         PR tree-optimization/84746
14951         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14952         (phi_translate): Pass in destination ANTIC_OUT set.
14953         (phi_translate_1): Likewise.  For a simplified result lookup
14954         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14955         (phi_translate_set): Adjust.
14956         (do_pre_regular_insertion): Likewise.
14957         (do_pre_partial_partial_insertion): Likewise.
14959 2018-03-08  Martin Liska  <mliska@suse.cz>
14961         PR gcov-profile/84735
14962         * doc/gcov.texi: Document usage of profile files.
14963         * gcov-io.h: Document changes in the format.
14965 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14967         PR debug/84404
14968         PR debug/84408
14969         * dwarf2out.c (struct dw_line_info_table): Update comments for
14970         view == -1.
14971         (FORCE_RESET_NEXT_VIEW): New.
14972         (FORCE_RESETTING_VIEW_P): New.
14973         (RESETTING_VIEW_P): Check for -1 too.
14974         (ZERO_VIEW_P): Likewise.
14975         (new_line_info_table): Force-reset next view.
14976         (dwarf2out_begin_function): Likewise.
14977         (dwarf2out_source_line): Simplify zero_view_p initialization.
14978         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14979         view directly.  Omit view when omitting .loc at line 0.
14981 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14983         PR tree-optimization/84740
14984         * tree-switch-conversion.c (process_switch): Call build_constructors
14985         only if info.phi_count is non-zero.
14987         PR tree-optimization/84739
14988         * tree-tailcall.c (find_tail_calls): Check call arguments against
14989         DECL_ARGUMENTS (current_function_decl) rather than
14990         DECL_ARGUMENTS (func) when checking for tail recursion.
14992 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14994         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14995         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14996         Volker Reichelt's entry and add entries for people that perform
14997         GCC fuzzy testing and report numerous bugs.
14999 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15001         PR target/82411
15002         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15003         readonly data in sdata, if that is disabled.
15004         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15005         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15006         -mreadonly-in-sdata option.
15008 2018-03-07  Martin Sebor  <msebor@redhat.com>
15010         PR tree-optimization/84468
15011         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15012         basic block when looking for nul assignment.
15014 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15016         PR target/84277
15017         * except.h (output_function_exception_table): Adjust prototype.
15018         * except.c (output_function_exception_table): Remove FNNAME parameter
15019         and add SECTION parameter.  Ouput one part of the table at a time.
15020         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15021         the first part of the exception table and emit unwind directives.
15022         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15023         (i386_pe_seh_cold_init): Likewise.
15024         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15025         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15026         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15027         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15028         * config/i386/winnt.c: Include except.h.
15029         (struct seh_frame_state): Add reg_offset, after_prologue and
15030         in_cold_section fields.
15031         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15032         (i386_pe_seh_cold_init): New function.
15033         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15034         to seh->in_cold_section.
15035         (seh_emit_push): Record the offset of the push.
15036         (seh_emit_save): Record the offet of the save.
15037         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15038         Test seh->after_prologue to disregard the epilogue.
15039         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15040         (i386_pe_end_cold_function): New function.
15042 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15044         PR fortran/84565
15045         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15046         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15048         PR c++/84704
15049         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15050         on tmp_var.
15051         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15052         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15054         PR middle-end/84723
15055         * multiple_target.c: Include tree-inline.h and intl.h.
15056         (expand_target_clones): Diagnose and fail if node->definition and
15057         !tree_versionable_function_p (node->decl).
15059 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15061         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15062         sprint_ul.
15063         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15064         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15065         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15067 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15069         PR target/84710
15070         * combine.c (try_combine): Use reg_or_subregno instead of handling
15071         just paradoxical SUBREGs and REGs.
15073 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15075         * config/arc/arc.c (arc_finalize_pic): Remove function.
15076         (arc_must_save_register): We use single base PIC register, remove
15077         checks to save/restore the PIC register.
15078         (arc_expand_prologue): Likewise.
15079         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15080         Remove.
15081         (arc_verify_short): Likewise.
15082         (arc_attr_type): Likewise.
15083         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15084         (walk_stores): Likewise.
15085         (arc_address_cost): Make it static.
15086         (arc_verify_short): Likewise.
15087         (branch_dest): Likewise.
15088         (arc_attr_type): Likewise.
15089         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15090         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15091         (arc_final_prescan_insn): Remove inserting the nops due to
15092         hardware hazards.  It is done in reorg step.
15093         (insn_length_variant_t): Remove.
15094         (insn_length_parameters_t): Likewise.
15095         (arc_insn_length_parameters): Likewise.
15096         (arc_get_insn_variants): Likewise.
15097         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15099 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15101         PR inline-asm/84683
15102         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15103         assertion failure.
15105         PR tree-optimization/84687
15106         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15107         on new_node->decl.
15108         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15110 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15112         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15113         Rename to ppc_speculation_barrier.
15114         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15115         __builtin_ppc_speculation_barrier.
15117 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15119         PR target/84700
15120         * combine.c (combine_simplify_rtx): Don't try to simplify if
15121         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15122         are equal to x.
15124 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15126         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15127         to 32 bytes when compiling for POWER9.
15129 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15131         PR target/84564
15132         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15133         regparm >= 3 with no arg reg available also for calls with
15134         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15136         PR target/84524
15137         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15138         orig,vex.
15139         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15141 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15143         PR target/84264
15144         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15146 2018-03-05  Richard Biener  <rguenther@suse.de>
15148         PR tree-optimization/84486
15149         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15150         When inserting a __builtin_assume_aligned call set the LHS
15151         SSA name alignment info accordingly.
15153 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15155         PR tree-optimization/84114
15156         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15157         Avoid reassociation of FLOAT_MODE addition.
15159 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15161         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15162         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15163         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15164         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15165         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15166         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15167         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15168         and -mwbnoinvd.
15169         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15170         __builtin_ia32_wbinvd): New builtins.
15171         (SPECIAL_ARGS2): New.
15172         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15173         (SPECIAL_ARGS2): New.
15174         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15175         (ix86_valid_target_attribute_inner_p): Ditto.
15176         (ix86_init_mmx_sse_builtins): Add special_args2.
15177         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15178         TARGET_WBNOINVD_P): New.
15179         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15180         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15181         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15182         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15183         * config/i386/pconfigintrin.h: New file.
15184         * config/i386/wbnoinvdintrin.h: Ditto.
15185         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15186         wbnoinvdintrin.h.
15187         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15189 2018-03-05  Richard Biener  <rguenther@suse.de>
15191         PR tree-optimization/84670
15192         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15193         member.
15194         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15195         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15196         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15197         doesn't grow if all successors (recursively) were visited at least
15198         once.
15200 2018-03-05  Richard Biener  <rguenther@suse.de>
15202         PR tree-optimization/84650
15203         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15204         if executed in the loop pipeline.
15206 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15208         * doc/configfiles.texi (Configuration Files): Move info about
15209         conditionalizing $target-protos.h to...
15210         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15211         differs from $target-protos.h.
15213 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15214             Chung-Ju Wu  <jasonwucj@gmail.com>
15216         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15217         * config/nds32/nds32-multiple.md (setmemsi): Define.
15218         * config/nds32/nds32-memory-manipulation.c
15219         (nds32_gen_dup_4_byte_to_word_value): New.
15220         (emit_setmem_word_loop): New.
15221         (emit_setmem_byte_loop): New.
15222         (nds32_expand_setmem_loop): New.
15223         (nds32_expand_setmem_loop_v3m): New.
15224         (nds32_expand_setmem_unroll): New.
15225         (nds32_expand_setmem): New.
15227 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15228             Chung-Ju Wu  <jasonwucj@gmail.com>
15230         * config/nds32/nds32-memory-manipulation.c
15231         (nds32_emit_load_store): New.
15232         (nds32_emit_post_inc_load_store): New.
15233         (nds32_emit_mem_move): New.
15234         (nds32_emit_mem_move_block): New.
15235         (nds32_expand_movmemsi_loop_unknown_size): New.
15236         (nds32_expand_movmemsi_loop_known_size): New.
15237         (nds32_expand_movmemsi_loop): New.
15238         (nds32_expand_movmemsi_unroll): New.
15239         (nds32_expand_movmemqi): Rename ...
15240         (nds32_expand_movmemsi): ... to this.
15241         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15242         (movmemsi): ... to this.
15243         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15244         (nds32_expand_movmemsi): ... to this.
15246 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15247             Monk Chiang  <sh.chiang04@gmail.com>
15248             Chung-Ju Wu  <jasonwucj@gmail.com>
15250         * config/nds32/nds32-protos.h
15251         (nds32_expand_load_multiple): New arguments.
15252         (nds32_expand_store_multiple): Ditto.
15253         (nds32_valid_multiple_load_store): Rename ...
15254         (nds32_valid_multiple_load_store_p): ... to this.
15255         * config/nds32/nds32-memory-manipulation.c
15256         (nds32_expand_load_multiple): Refine implementation.
15257         (nds32_expand_store_multiple): Ditto.
15258         * config/nds32/nds32-multiple.md
15259         (load_multiple): Update nds32_expand_load_multiple interface.
15260         (store_multiple): Update nds32_expand_store_multiple interface.
15261         * config/nds32/nds32-predicates.c
15262         (nds32_valid_multiple_load_store): Rename ...
15263         (nds32_valid_multiple_load_store_p): ... to this and refine
15264         implementation.
15265         * config/nds32/predicates.md
15266         (nds32_load_multiple_and_update_address_operation): New predicate.
15267         (nds32_store_multiple_and_update_address_operation): New predicate.
15269 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15270             Chung-Ju Wu  <jasonwucj@gmail.com>
15272         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15273         (combo): New attribute.
15274         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15276 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15278         * config/nds32/nds32.opt: Change -mcmodel= default value.
15280 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15281             Monk Chiang  <sh.chiang04@gmail.com>
15282             Chung-Ju Wu  <jasonwucj@gmail.com>
15284         * config/nds32/constants.md (unspec_element): New enum.
15285         * config/nds32/constraints.md (Umw): New constraint.
15286         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15287         * config/nds32/nds32-intrinsic.md: Likewise.
15288         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15289         (nds32_valid_smw_lwm_base_p): New.
15290         (nds32_output_smw_single_word): New.
15291         (nds32_output_lmw_single_word): New.
15292         (nds32_expand_unaligned_load): New.
15293         (nds32_expand_unaligned_store): New.
15294         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15295         (nds32_output_smw_single_word): Declare.
15296         (nds32_output_lmw_single_word): Declare.
15297         (nds32_expand_unaligned_load): Declare.
15298         (nds32_expand_unaligned_store): Declare.
15299         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15300         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15301         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15302         NDS32_BUILTIN_UASTORE_DW.
15303         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15304         predicate.
15306 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15307             Kito Cheng  <kito.cheng@gmail.com>
15308             Chung-Ju Wu  <jasonwucj@gmail.com>
15310         * config/nds32/nds32-intrinsic.c
15311         (nds32_expand_builtin_null_ftype_reg): Delete.
15312         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15313         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15314         (nds32_read_argument): New.
15315         (nds32_legitimize_target): Ditto.
15316         (nds32_legitimize_argument): Ditto.
15317         (nds32_check_constant_argument): Ditto.
15318         (nds32_expand_unop_builtin): Ditto.
15319         (nds32_expand_unopimm_builtin): Ditto.
15320         (nds32_expand_binop_builtin): Ditto.
15321         (nds32_builtin_decl_impl): Ditto.
15322         (builtin_description): Ditto.
15323         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15324         (nds32_init_builtins_impl): Ditto.
15325         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15326         (nds32_builtin_decl): New.
15327         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15328         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15330 2018-03-02  Jeff Law  <law@redhat.com>
15332         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15333         (redundant_insn, fill_simple_delay_slots): Likewise.
15334         (fill_slots_from_thread): Likewise.
15335         * resource.c (mark_referenced_resources): Likewise.
15336         (mark_set_resources, find_dead_or_set_registers): Likewise.
15338 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15340         * substring-locations.h (format_warning_va): Formatting fix for
15341         ATTRIBUTE_GCC_DIAG.
15342         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15343         argument.
15344         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15345         * substring-locations.c: Include intl.h.
15346         (format_warning_va): Turned into small wrapper around
15347         format_warning_n_va, renamed to ...
15348         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15349         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15350         use ngettext.
15351         (format_warning_at_substring_n): New function.
15352         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15353         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15354         format_warning_at_substring with just a shorter name instead of
15355         const function pointer.
15356         (fmtwarn_n): New function.
15357         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15358         appropriate, get rid of all the fmtstr temporaries, move conditionals
15359         with G_() wrapped string literals directly into fmtwarn arguments,
15360         cast dir.len to (int), formatting fixes.
15362 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15364         * doc/invoke.texi: Remove "Cilk Plus" references.
15366 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15367             Richard Biener  <rguenther@suse.de>
15369         PR ipa/84628
15370         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15371         for error or warning attributes if CALL_FROM_THUNK_P is set.
15372         Formatting fixes.
15374 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15376         PR target/56540
15377         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15378         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15380         PR target/56540
15381         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15382         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15384         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15385         instead of -1U in last predictors element's probability member.
15387 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15389         PR ipa/83983
15390         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15391         arguments if they are comparable.
15393 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15395         PR tree-optimization/84634
15396         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15397         masks and masked_loop_p with a single loop_masks, making sure it's
15398         null for bb vectorization.
15400 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15402         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15403         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15404         loop->force_vectorize to check whether there is no alias.
15406 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15408         PR target/84614
15409         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15410         prototypes.
15411         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15412         comments.
15413         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15414         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15415         instead of a loop around prev_real_insn.
15416         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15417         prev_real_insn.
15419         PR inline-asm/84625
15420         * config/i386/i386.c (ix86_print_operand): Use conditional
15421         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15422         zero vector.
15424 2018-03-02  Richard Biener  <rguenther@suse.de>
15426         PR tree-optimization/84427
15427         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15428         (bitmap_set_subtract_values): Rewrite to handle multiple
15429         exprs per value.
15430         (clean): Likewise.
15431         (prune_clobbered_mems): Likewise.
15432         (phi_translate): Take edge instead of pred/phiblock.
15433         (phi_translate_1): Likewise.
15434         (phi_translate_set): Likewise.  Insert all translated
15435         exprs for a value into the set, keeping possibly multiple
15436         expressions per value.
15437         (compute_antic_aux): Adjust for phi_translate changes.
15438         When intersecting union the expressions and prune those
15439         not in the final value set, keeping possibly multiple
15440         expressions per value.  Do not use value-insertion
15441         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15442         all expressions.  Add verification that the value-sets
15443         only shrink during iteration.
15444         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15445         (do_pre_regular_insertion): Likewise.
15446         (do_pre_partial_partial_insertion): Likewise.
15448 2018-03-02  Richard Biener  <rguenther@suse.de>
15450         PR target/82005
15451         * config/darwin.c (saved_debug_info_level): New static global.
15452         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15453         (darwin_asm_lto_end): Restore debug info generation settings.
15455 2018-03-01  Martin Liska  <mliska@suse.cz>
15457         PR sanitizer/82484
15458         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15459         volatile arguments.
15461 2018-03-01  Richard Biener  <rguenther@suse.de>
15463         PR debug/84645
15464         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15465         type annotation with LTO when debug was disabled at compile-time.
15467 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15469         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15470         XINT with INTVAL.
15471         (mips_final_postscan_insn): Likewise.
15473 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15475         PR rtl-optimization/84528
15476         * alias.c (init_alias_target): Add commentary.
15477         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15478         a unique base value if the frame pointer is not eliminated
15479         to the stack pointer.
15481 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15483         PR rtl-optimization/83327
15484         * lra-int.h (hard_regs_spilled_into): Declare.
15485         * lra.c (hard_regs_spilled_into): Define.
15486         (init_reg_info): Init hard_regs_spilled_into.
15487         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15488         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15489         (process_bb_lives): Handle hard_regs_spilled_into.
15490         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15491         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15493 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15495         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15496         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15497         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15498         * config/rs6000/aix72.h: New file.
15500 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15502         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15503         instead of warning_at with conditional singular and plural messages
15504         where possible.
15506         PR target/52991
15507         * stor-layout.c (update_alignment_for_field): For
15508         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15509         && !DECL_PACKED (field), do the alignment update, just use
15510         only desired_align instead of MAX (type_align, desired_align)
15511         as the alignment.
15512         (place_field): Don't do known_align < desired_align handling
15513         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15514         is non-NULL, instead do it after rli->prev_field handling and
15515         only if not within a bitfield word.  For DECL_PACKED (field)
15516         use type_align of BITS_PER_UNIT.
15518 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15520         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15521         superfluous parentheses and trailing spaces.
15523 2018-02-28  Richard Biener  <rguenther@suse.de>
15525         PR tree-optimization/84584
15526         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15527         SCoPs with fake exit edge.
15529 2018-02-28  Martin Liska  <mliska@suse.cz>
15531         PR testsuite/84597
15532         * timevar.c (timer::print): Fix format to properly print 100%
15533         values.
15535 2018-02-28  Richard Biener  <rguenther@suse.de>
15537         PR middle-end/84607
15538         * genmatch.c (capture_info::walk_match): Do not mark
15539         captured expressions without operands as expr_p given
15540         they act more like predicates and should be subject to
15541         "lost tail" side-effect preserving.
15543 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15545         PR rtl-optimization/81611
15546         * auto-inc-dec.c (attempt_change): Move dead note from
15547         mem_insn if it's the next use of regno
15548         (find_address): Take address use of reg holding
15549         non-incremented value.  Add parm to limit search to the named
15550         reg only.
15551         (merge_in_block): Attempt to use a mem insn that is the next
15552         use of the original regno.
15554 2018-02-27  Martin Sebor  <msebor@redhat.com>
15556         PR c++/83871
15557         * doc/invoke.texi (-Wmissing-attributes): New option.
15558         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15560 2018-02-27  Martin Sebor  <msebor@redhat.com>
15562         PR translation/84207
15563         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15564         n argument to unsigned HOST_WIDE_INT.
15565         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15566         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15567         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15568         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15570 2018-02-27  Richard Biener  <rguenther@suse.de>
15572         PR tree-optimization/84512
15573         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15574         Do not use the estimate returned from record_stmt_cost for
15575         the scalar iteration cost but sum properly using add_stmt_cost.
15577 2018-02-27  Richard Biener  <rguenther@suse.de>
15579         PR tree-optimization/84466
15580         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15581         Adjust last change to less strictly validate use operands.
15583 2018-02-27  Martin Liska  <mliska@suse.cz>
15585         PR gcov-profile/84548
15586         * gcov.c (process_file): Allow partial overlap and consider it
15587         also as group functions.
15588         (output_lines): Properly calculate range of lines for a group.
15590 2018-02-27  Martin Liska  <mliska@suse.cz>
15592         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15593         'ggc' suffixes.  Change first column width.
15594         (timer::print): Fix formatting of the column.
15596 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15598         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15599         preserve inline entry blocks for the sake of debug inline
15600         entry point markers alone.
15601         (remove_unused_locals): Suggest in comments a better place to
15602         force the preservation of inline entry blocks that are
15603         otherwise unused, but do not preserve them.
15605 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15607         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15609 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15611         PR target/84039
15612         * config/i386/constraints.md (Bs): Replace
15613         ix86_indirect_branch_register with
15614         TARGET_INDIRECT_BRANCH_REGISTER.
15615         (Bw): Likewise.
15616         * config/i386/i386.md (indirect_jump): Likewise.
15617         (tablejump): Likewise.
15618         (*sibcall_memory): Likewise.
15619         (*sibcall_value_memory): Likewise.
15620         Peepholes of indirect call and jump via memory: Likewise.
15621         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15622         (*sibcall_value_GOT_32): Likewise.
15623         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15624         (GOT_memory_operand): Likewise.
15625         (call_insn_operand): Likewise.
15626         (sibcall_insn_operand): Likewise.
15627         (GOT32_symbol_operand): Likewise.
15628         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15630 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15632         PR rtl-optimization/83496
15633         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15634         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15635         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15636         redundant insn, if any.
15637         (relax_delay_slots): Likewise.
15638         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15640 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15642         PR tree-optimization/83965
15643         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15644         that grouped statements are part of a reduction chain.  Return
15645         true if the statement is not marked as a reduction itself but
15646         is part of a group.
15647         (vect_recog_dot_prod_pattern): Don't check whether the statement
15648         is part of a group here.
15649         (vect_recog_sad_pattern): Likewise.
15650         (vect_recog_widen_sum_pattern): Likewise.
15652 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15654         PR debug/84545
15655         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15657 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15659         PR target/84530
15660         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15661         the bool argument.
15662         (ix86_output_indirect_function_return): New prototype.
15663         (ix86_split_simple_return_pop_internal): Likewise.
15664         * config/i386/i386.c (indirect_return_via_cx): New.
15665         (indirect_return_via_cx_bnd): Likewise.
15666         (indirect_thunk_name): Handle return va CX_REG.
15667         (output_indirect_thunk_function): Create alias for
15668         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15669         (ix86_output_indirect_jmp): Remove the bool argument.
15670         (ix86_output_indirect_function_return): New function.
15671         (ix86_split_simple_return_pop_internal): Likewise.
15672         * config/i386/i386.md (*indirect_jump): Don't pass false
15673         to ix86_output_indirect_jmp.
15674         (*tablejump_1): Likewise.
15675         (simple_return_pop_internal): Change it to define_insn_and_split.
15676         Call ix86_split_simple_return_pop_internal to split it for
15677         -mfunction-return=.
15678         (simple_return_indirect_internal): Call
15679         ix86_output_indirect_function_return instead of
15680         ix86_output_indirect_jmp.
15682 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15684         PR bootstrap/84405
15685         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15686         memset and value initialization afterwards.
15688 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15690         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15692 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15694         PR target/84521
15695         * common/config/aarch64/aarch64-common.c
15696         (aarch_option_optimization_table[]): Switch
15697         off fomit-frame-pointer
15699 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15700             Chung-Ju Wu  <jasonwucj@gmail.com>
15702         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15703         volatile memory.
15704         (store_multiple): Ditto.
15706 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15708         * config.gcc: Add --with-cpu support for nds32 target.
15709         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15710         * config/nds32/nds32.opt: Add -mcpu= option.
15712 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15714         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15715         isel=yes): Warn for these deprecated options.
15717 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15719         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15720         ISA_2_5_MASKS_EMBEDDED.
15722 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15724         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15725         p->max as pointers rather than using iterative_hash_expr.
15727 2018-02-23  Carl Love  <cel@us.ibm.com>
15729         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15730         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15731         BU_P8V_OVERLOAD_2.
15732         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15733         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15734         P8V_BUILTIN_VEC_VUNSIGNED2.
15736 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15738         PR target/81572
15739         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15740         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15741         LRA_UNKNOWN_ALT.
15742         * lra-constraints.c (curr_insn_transform): Set up
15743         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15744         LRA_UNKNOWN_ALT.
15745         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15746         * lra-eliminations.c (spill_pseudos): Ditto.
15747         (process_insn_for_elimination): Ditto.
15748         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15749         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15750         LRA_NON_CLOBBERED_ALT.
15752 2018-02-22  Martin Sebor  <msebor@redhat.com>
15754         PR tree-optimization/84480
15755         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15756         to maybe_diag_stxncpy_trunc.  Call it.
15757         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15758         from gimple_fold_builtin_strcpy.  Print inlining stack.
15759         (handle_builtin_stxncpy): Print inlining stack.
15760         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15762 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15764         PR target/84176
15765         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15766         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15767         and -fcheck-pointer-bounds are used together.
15768         (indirect_thunk_prefix): New enum.
15769         (indirect_thunk_need_prefix): New function.
15770         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15771         "_nt" instead of "_bnd" for NOTRACK prefix.
15772         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15773         (output_indirect_thunk_function): Likewise.
15774         (): Likewise.
15775         (ix86_code_end): Update output_indirect_thunk_function calls.
15776         (ix86_output_indirect_branch_via_reg): Replace
15777         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15778         (ix86_output_indirect_branch_via_push): Likewise.
15779         (ix86_output_function_return): Likewise.
15780         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15781         incompatible with -fcf-protection=branch and
15782         -fcheck-pointer-bounds.
15784 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15786         PR target/83335
15787         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15788         Change gcc_assert call to output_operand_lossage.
15790 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15792         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15794 2018-02-22  DJ Delorie  <dj@redhat.com>
15795             Sebastian Perta  <sebastian.perta@renesas.com>
15796             Oleg Endo  <olegendo@gcc.gnu.org>
15798         * config/rx/rx.c (rx_rtx_costs): New function.
15799         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15801 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15803         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15805 2018-02-22  Martin Liska  <mliska@suse.cz>
15807         PR driver/83193
15808         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15809         Add "native" as a possible value.
15811 2018-02-22  Martin Liska  <mliska@suse.cz>
15813         PR driver/83193
15814         * config/i386/i386.c (ix86_option_override_internal):
15815         Add "native" as a possible value for -march and -mtune.
15817 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15819         PR target/84502
15820         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15821         to all type variants.
15823         PR tree-optimization/84503
15824         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15825         width as info->bitpos + info->bitsize - start.
15826         (merged_store_group::merge_overlapping): Simplify width computation.
15827         (check_no_overlap): New function.
15828         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15829         start + width and last_order of the group, fail if check_no_overlap
15830         fails.
15831         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15832         to group if check_no_overlap fails.
15834 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15836         * config/rs6000/altivec.md: Delete contraint arguments to
15837         define_expand, define_split, and define_peephole2, and in
15838         define_insn_and_split if always unused.
15839         * config/rs6000/darwin.md: Ditto.
15840         * config/rs6000/dfp.md: Ditto.
15841         * config/rs6000/rs6000.md: Ditto.
15842         * config/rs6000/sync.md: Ditto.
15843         * config/rs6000/vector.md: Ditto.
15844         * config/rs6000/vsx.md: Ditto.
15846 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15848         * config/rs6000/altivec.md: Write output control strings as braced
15849         blocks instead of double-quoted strings.
15850         * config/rs6000/darwin.md: Ditto.
15851         * config/rs6000/rs6000.md: Ditto.
15852         * config/rs6000/vector.md: Ditto.
15853         * config/rs6000/vsx.md: Ditto.
15855 2018-02-21  Jason Merrill  <jason@redhat.com>
15857         PR c++/84314 - ICE with templates and fastcall attribute.
15858         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15860 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15862         * ipa-cp.c (determine_versionability): Fix comment typos.
15864 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15866         PR c/84229
15867         * ipa-cp.c (determine_versionability): Do not version functions caling
15868         va_arg_pack.
15870 2018-02-21  Martin Liska  <mliska@suse.cz>
15872         PR driver/83193
15873         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15874         Add "native" as a possible value.
15875         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15876         the macro when native cpu detection is available.
15878 2018-02-21  Martin Liska  <mliska@suse.cz>
15880         PR driver/83193
15881         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15882         Add "native" as a possible value.
15883         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15884         when native cpu detection is available.
15886 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15887             Martin Sebor  <msebor@redhat.com>
15889         PR tree-optimization/84478
15890         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15891         false.
15892         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15893         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15894         support which is conservatively correct, for 2 only stay conservative
15895         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15896         argument to the 2 argument get_range_strlen, adjust 6 arg
15897         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15898         false.
15899         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15900         (gimple_fold_builtin_strlen): Pass true as last argument to
15901         get_range_strlen.
15903 2018-02-20  Martin Sebor  <msebor@redhat.com>
15905         PR middle-end/84095
15906         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15907         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15908         (builtin_memref::builtin_memref): Factor out parts into
15909         set_base_and_offset and call it.
15911 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15913         PR middle-end/84406
15914         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15915         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15916         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15917         search at the associated MODE_INT.
15919 2018-02-20  Jeff Law  <law@redhat.com>
15921         PR middle-end/82123
15922         PR tree-optimization/81592
15923         PR middle-end/79257
15924         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15925         for range data rather than using global data.
15926         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15927         range data rather than using global data.
15928         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15929         pass it to children as needed.
15930         (struct directive::fmtresult): Similarly.
15931         (struct directive::set_width): Similarly.
15932         (struct directive::set_precision): Similarly.
15933         (format_integer, format_directive, parse_directive): Similarly.
15934         (format_none): Accept unnamed vr_values parameter.
15935         (format_percent, format_floating, format_character): Similarly.
15936         (format_string, format_plain): Similarly.
15937         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15938         the EVRP range analyzer for range data rather than using global data.
15939         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15940         gimple-ssa-evrp-analyze.h
15941         (class sprintf_dom_walker): Add after_dom_children member function.
15942         Add evrp_range_analyzer member.
15943         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15944         range analyzer as needed.
15945         (sprintf_dom_walker::after_dom_children): New member function.
15946         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15947         if not optimizing.
15948         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15949         (evrp_range_analyzer::pop_to_marker): Likewise.
15951 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15953         PR tree-optimization/84419
15954         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15955         with the required type if its current type is compatible but
15956         different.
15958 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15960         PR middle-end/82004
15961         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15962         after vectorization.
15964 2018-02-20  Martin Liska  <mliska@suse.cz>
15966         PR driver/83193
15967         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15968         possible values if we don't have a hint.
15970 2018-02-20  Martin Liska  <mliska@suse.cz>
15972         PR c/84310
15973         PR target/79747
15974         * final.c (shorten_branches): Build align_tab array with one
15975         more element.
15976         * opts.c (finish_options): Add alignment option limit check.
15977         (MAX_CODE_ALIGN): Likewise.
15978         (MAX_CODE_ALIGN_VALUE): Likewise.
15979         * doc/invoke.texi: Document maximum allowed option value for
15980         all -falign-* options.
15982 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15984         PR target/84146
15985         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15986         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15987         * var-tracking.c (emit_note_insn_var_location): Remove all references
15988         to NOTE_INSN_CALL_ARG_LOCATION.
15989         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15990         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15991         Use copy_rtx_if_shared.
15992         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15993         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15994         (dwarf2out_var_location): Remove handling of
15995         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15996         on call_insn.
15997         * final.c (final_scan_insn): Remove all references to
15998         NOTE_INSN_CALL_ARG_LOCATION.
15999         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16000         before dumping final insns.
16001         * except.c (emit_note_eh_region_end): Remove all references to
16002         NOTE_INSN_CALL_ARG_LOCATION.
16003         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16004         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16005         * config/arc/arc.c (hwloop_optimize): Likewise.
16006         * config/arm/arm.c (create_fix_barrier): Likewise.
16007         * config/s390/s390.c (s390_chunkify_start): Likewise.
16008         * config/sh/sh.c (find_barrier): Likewise.
16009         * config/i386/i386.c (rest_of_insert_endbranch,
16010         ix86_seh_fixup_eh_fallthru): Likewise.
16011         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16012         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16013         * config/frv/frv.c (frv_function_prologue): Likewise.
16014         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16015         reg note.
16016         (note_outside_basic_block_p): Remove all references to
16017         NOTE_INSN_CALL_ARG_LOCATION.
16018         * gengtype.c (adjust_field_rtx_def): Likewise.
16019         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16020         Likewise.
16021         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16022         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16024         PR c++/84444
16025         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16026         is ADDR_EXPR.
16028         PR tree-optimization/84452
16029         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16030         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16031         is NULL.
16033 2018-02-19  Martin Liska  <mliska@suse.cz>
16035         PR sanitizer/82183
16036         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16038 2018-02-19  Martin Liska  <mliska@suse.cz>
16039             Richard Sandiford  <richard.sandiford@linaro.org>
16041         PR tree-optimization/82491
16042         * gimple-fold.c (get_base_constructor): Make earlier bail out
16043         to prevent ubsan.
16045 2018-02-19  Carl Love  <cel@us.ibm.com>
16047         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16048         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16049         BU_P8V_OVERLOAD_1.
16050         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16051         P8V_BUILTIN_VEC_NEG.
16053 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16055         * config/rl78/rl78.md (movdf): New define expand.
16057 2018-02-19  Martin Liska  <mliska@suse.cz>
16059         PR other/80589
16060         * doc/invoke.texi: Fix typo.
16061         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16063 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16065         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16066         handle rs6000_single_float and rs6000_double_float specially for
16067         e500 family CPUs.
16069 2018-02-16  Jeff Law  <law@redhat.com>
16071         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16072         (pop_regs): Use it.
16074 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16076         PR ipa/84425
16077         * ipa-inline.c (inline_small_functions): Fix a typo.
16079 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16081         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16083 2018-02-16  Carl Love  <cel@us.ibm.com>
16085         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16086         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16087         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16088         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16089         expansion to P8V_BUILTIN_VEC_FLOAT2.
16091 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16093         PR rtl-optimization/70023
16094         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16095         src_regno into account.
16097 2018-02-16  Carl Love  <cel@us.ibm.com>
16099         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16100         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16101         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16102         * config/rs6000/rs6000.c: Remove case statements for
16103         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16104         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16105         and P9V_BUILTIN_VEC_VINSERT4B.
16106         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16107         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16108         * config/rs6000/vsx.md:
16109         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16110         vec_insert4b.
16112 2018-02-16  Carl Love  <cel@us.ibm.com>
16114         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16115         vec_insert4b.
16116         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16117         definitions.
16118         * config/rs6000/rs6000-c.c: Add the definitions for
16119         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16120         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16121         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16122         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16123         definition for insert4b and define insn *insert3b_internal.
16124         * doc/extend.texi: Add documentation for vec_extract4b.
16126 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16128         * doc/extend.texi (Backwards Compatibility): Mention friend
16129         injection.  Note for-scope is deprecated.
16130         * doc/invoke.texi (-ffriend-injection): Deprecate.
16132 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16134         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16135         that moved to I2, also allow destinations that are a paradoxical
16136         subreg (instead of a normal reg).
16138 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16140         PR target/83831
16141         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16142         to QImode.
16144 2018-02-16  Richard Biener  <rguenther@suse.de>
16146         PR tree-optimization/84037
16147         PR tree-optimization/84016
16148         PR target/82862
16149         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16150         Adjust vec_construct for the fact we need additional higher latency
16151         128bit inserts for AVX256 and AVX512 vector builds.
16152         (ix86_add_stmt_cost): Scale vector construction cost for
16153         elementwise loads.
16155 2018-02-16  Richard Biener  <rguenther@suse.de>
16157         PR tree-optimization/84417
16158         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16159         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16160         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16162 2018-02-16  Martin Liska  <mliska@suse.cz>
16164         PR sanitizer/84307
16165         * internal-fn.def (ASAN_CHECK): Set proper flags.
16166         (ASAN_MARK): Likewise.
16168 2018-02-16  Julia Koval  <julia.koval@intel.com>
16170         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16171         from PTA_CANNONLAKE.
16173 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16175         PR target/84272
16176         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16177         Use ++iter rather than iter++ for std::list iterators.
16178         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16179         defer deleting them until all nodes in the forest are processed.  Do
16180         free even leaf nodes.  Change to_process into auto_vec.
16182         PR bootstrap/84405
16183         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16184         * vec.h (vec_default_construct): Use memset instead of placement new
16185         if BROKEN_VALUE_INITIALIZATION is defined.
16186         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16187         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16188         is defined.
16190         PR rtl-optimization/83723
16191         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16192         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16193         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16194         recursive calls.
16195         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16196         callers.
16197         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16199 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16201         PR rtl-optimization/81443
16202         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16203         from inner REGs to paradoxical SUBREGs.
16205 2018-02-16  Richard Biener  <rguenther@suse.de>
16207         PR tree-optimization/84399
16208         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16209         For operands we can analyze at their definition make sure we can
16210         analyze them at each use as well.
16212 2018-02-16  Richard Biener  <rguenther@suse.de>
16214         PR tree-optimization/84190
16215         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16216         volatile accesses if the decl isn't volatile.
16218 2018-02-15  Jason Merrill  <jason@redhat.com>
16220         PR c++/84314 - ICE with templates and fastcall attribute.
16221         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16222         TYPE_CANONICAL on an existing type.
16224 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16226         PR tree-optimization/84383
16227         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16228         dstoff nor call operand_equal_p if dstbase is NULL.
16230         PR tree-optimization/84334
16231         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16232         also a CONSTANT_CLASS_P, punt.
16234 2018-02-14  Jim Wilson  <jimw@sifive.com>
16236         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16237         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16238         to where locals are set.  Add TARGET_RVC support.
16239         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16241 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16243         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16245 2018-02-14  Martin Sebor  <msebor@redhat.com>
16247         PR tree-optimization/83698
16248         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16249         arrays constrain the offset range to their bounds.
16250         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16251         (builtin_access::overlap): Avoid setting the size of overlap if it's
16252         already been set.
16253         (maybe_diag_overlap): Also consider arrays when deciding what values
16254         of offsets to include in diagnostics.
16256 2018-02-14  Martin Sebor  <msebor@redhat.com>
16258         PR c/84108
16259         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16260         that correspond to the kind of a declaration.
16262 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16264         PR target/83984
16265         * config/pa/pa.md: Load address of PIC label using the linkage table
16266         if the label is nonlocal.
16268 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16270         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16271         warning message if user requests -maltivec=be.
16272         * doc/invoke.texi: Document deprecation of -maltivec=be.
16274 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16276         PR target/84220
16277         * config/rs6000/rs6000-c.c: Update definitions for
16278         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16279         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16281 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16283         PR target/84239
16284         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16285         add _get_ssp intrinsics. Remove argument from
16286         __builtin_ia32_rdssp[d|q].
16287         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16288         * config/i386/i386-builtin.def: Remove argument from
16289         __builtin_ia32_rdssp[d|q].
16290         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16291         ix86_expand_special_args_builtin for _rdssp[d|q].
16292         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16293         Clear register before usage.
16294         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16295         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16297 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16299         PR tree-optimization/84357
16300         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16301         operand 1 of an ARRAY_REF too.
16303 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16305         PR target/83831
16306         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16307         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16308         declarations.
16309         (set_of_reg): New struct.
16310         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16311         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16312         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16313         functions.
16314         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16315         Split into bitclr, bitset, bitinvert patterns if appropriate.
16316         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16317         use rx_fuse_in_memory_bitop.
16318         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16319         to named insn, correct maximum insn length.
16321 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16323         PR target/79242
16324         * machmode.def: Define a complex mode for PARTIAL_INT.
16325         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16326         MODE_PARTIAL_INT.
16327         * doc/rtl.texi: Document CSPImode.
16328         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16329         handling.
16330         (msp430_hard_regno_nregs_with_padding): Likewise.
16332 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16334         PR target/84279
16335         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16337 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16339         PR rtl-optimization/84169
16340         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16341         we generated a parallel as new i3 and we split that to new i2 and i3
16342         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16343         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16344         those to i2, not i1.  Partially rewrite this scan code.
16346 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16348         PR c/82210
16349         * stor-layout.c (place_field): For variable length fields, adjust
16350         offset_align afterwards not just based on the field's alignment,
16351         but also on the size.
16353         PR middle-end/84309
16354         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16355         of exps and logs in the use_exp2 case.
16357 2018-02-13  Jeff Law  <law@redhat.com>
16359         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16360         entry for "vector".
16362         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16363         ARGS as unused.
16365 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16367         PR debug/84342
16368         PR debug/84319
16369         * common.opt (gas-loc-support, gas-locview-support): New.
16370         (ginline-points, ginternal-reset-location-views): New.
16371         * doc/invoke.texi: Document them.  Use @itemx where intended.
16372         (gvariable-location-views): Adjust.
16373         * target.def (reset_location_view): New.
16374         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16375         (TARGET_RESET_LOCATION_VIEW): New.
16376         * doc/tm.texi: Rebuilt.
16377         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16378         (dwarf2out_default_as_locview_support): New.
16379         (output_asm_line_debug_info): Use option variables.
16380         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16381         (output_loc_list): Likewise.
16382         (add_high_low_attributes): Check option variables.
16383         Don't output entry view attribute in strict mode.
16384         (gen_inlined_subroutine_die): Check option variables.
16385         (dwarf2out_inline_entry): Likewise.
16386         (init_sections_and_labels): Likewise.
16387         (dwarf2out_early_finish): Likewise.
16388         (maybe_reset_location_view): New, from...
16389         (dwarf2out_var_location): ... here.  Call it.
16390         * debug.h (dwarf2out_default_as_loc_support): Declare.
16391         (dwarf2out_default_as_locview_support): Declare.
16392         * hooks.c (hook_int_rtx_insn_0): New.
16393         * hooks.h (hook_int_rtx_insn_0): Declare.
16394         * toplev.c (process_options): Take -gas-loc-support and
16395         -gas-locview-support from dwarf2out.  Enable
16396         -gvariable-location-views by default only with locview
16397         assembler support.  Enable -ginternal-reset-location-views by
16398         default only if the target defines the corresponding hook.
16399         Enable -ginline-points by default if location views are
16400         enabled; force it disabled if statement frontiers are
16401         disabled.
16402         * tree-inline.c (expand_call_inline): Check option variables.
16403         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16405 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16407         PR tree-optimization/84321
16408         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16409         handling.  Also check whether the anti-range contains any values
16410         that satisfy the mask; switch to a VR_RANGE if not.
16412 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16414         PR sanitizer/84340
16415         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16417 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16419         PR c++/83990
16420         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16421         of call statements, also set location of a load to a temporary.
16423 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16425         * config/rl78/rl78.c (add_vector_labels): New function.
16426         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16427         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16428         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16429         which checks that no arguments are passed.
16430         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16431         * doc/extend.texi: Documentation for the new attribute.
16433 2018-02-13  Andreas Schwab  <schwab@suse.de>
16435         * config/riscv/linux.h (CPP_SPEC): Define.
16437 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16439         PR target/84335
16440         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16441         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16442         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16443         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16444         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16445         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16446         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16447         temporarily for AES and PCLMUL builtins.
16449         PR tree-optimization/84339
16450         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16451         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16452         Formatting fixes.
16454         PR middle-end/84309
16455         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16456         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16457         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16458         inline function.
16459         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16460         inline function.
16461         * omp-simd-clone.h: New file.
16462         * omp-simd-clone.c: Include omp-simd-clone.h.
16463         (expand_simd_clones): No longer static.
16464         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16465         cgraph.h and omp-simd-clone.h.
16466         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16467         (vect_recog_widen_shift_pattern): Formatting fix.
16468         (vect_pattern_recog_1): Don't check optab for calls.
16470         PR target/84336
16471         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16472         operands[2] into a REG before using gen_lowpart on it.
16474 2018-02-12  Jeff Law  <law@redhat.com>
16476         PR target/83760
16477         * config/sh/sh.c (find_barrier): Consider a sibling call
16478         a barrier as well.
16480         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16481         successfully back substituting a reg.
16483 2018-02-12  Richard Biener  <rguenther@suse.de>
16485         PR tree-optimization/84037
16486         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16487         parameter, move visited init to caller.
16488         (vect_slp_analyze_operations): Separate cost from validity
16489         check, initialize visited once for all instances.
16490         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16491         for all instances.
16492         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16493         out an assert.
16494         (vect_model_promotion_demotion_cost): Likewise.
16495         (vectorizable_bswap): Guard cost modeling with !slp_node
16496         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16497         SLP stmts.
16498         (vectorizable_call): Likewise.
16499         (vectorizable_conversion): Likewise.
16500         (vectorizable_assignment): Likewise.
16501         (vectorizable_shift): Likewise.
16502         (vectorizable_operation): Likewise.
16503         (vectorizable_store): Likewise.
16504         (vectorizable_load): Likewise.
16505         (vectorizable_condition): Likewise.
16506         (vectorizable_comparison): Likewise.
16508 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16510         PR sanitizer/84307
16511         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16512         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16513         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16515 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16517         PR middle-end/83665
16518         * params.def (inline-min-speedup): Increase from 8 to 15.
16519         (max-inline-insns-auto): Decrease from 40 to 30.
16520         * ipa-split.c (consider_split): Add some buffer for function to
16521         be considered inlining candidate.
16522         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16523         default values.
16525 2018-02-12  Richard Biener  <rguenther@suse.de>
16527         PR tree-optimization/84037
16528         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16529         matched stmts if we cannot swap the non-matched ones.
16531 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16533         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16534         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16535         _mm_maskz_scalef_round_ss): New intrinsics.
16536         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16537         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16538         __builtin_ia32_scalefss_round): Remove.
16539         (__builtin_ia32_scalefsd_mask_round,
16540         __builtin_ia32_scalefss_mask_round): New intrinsics.
16541         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16542         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16543         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16544         "<round_constraint>")): Changed to ...
16545         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16546         "<round_scalar_constraint>")): ... this.
16547         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16548         %0, %1, %2<round_op3>}"): Changed to ...
16549         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16550         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16551         %2<round_scalar_mask_op3>}"): ... this.
16552         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16554 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16556         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16557         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16558         (_mm_maskz_sqrt_round_ss): New intrinsics.
16559         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16560         (__builtin_ia32_sqrtsd_mask_round)
16561         (__builtin_ia32_sqrtss_mask_round): New builtins.
16562         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16563         (__builtin_ia32_sqrtss_round): Remove.
16564         (__builtin_ia32_sqrtsd_mask_round)
16565         (__builtin_ia32_sqrtss_mask_round): New builtins.
16566         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16567         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16568         ((match_operand:VF_128 1 "vector_operand"
16569         "xBm,<round_constraint>")): Changed to ...
16570         ((match_operand:VF_128 1 "vector_operand"
16571         "xBm,<round_scalar_constraint>")): ... this.
16572         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16573         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16574         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16575         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16576         %<iptr>1<round_scalar_mask_op3>}): ... this.
16577         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16578         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16580 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16582         PR target/84266
16583         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16584         Cast vec_cmpeq result to correct type.
16585         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16586         Cast vec_cmpgt result to correct type.
16588 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16590         * final.c (final_scan_insn_1): Renamed from...
16591         (final_scan_insn): ... this.  New wrapper, to recover
16592         seen from the outermost call in recursive ones.
16593         * config/sparc/sparc.c (output_return): Drop seen from call.
16594         (output_sibcall): Likewise.
16595         * config/visium/visium.c (output_branch): Likewise.
16597 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16599         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16600         function label.
16602 2018-02-10  Alan Modra  <amodra@gmail.com>
16604         PR target/84300
16605         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16606         Specify LR as an input.
16608 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16610         PR sanitizer/83987
16611         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16612         remove_member_access_dummy_vars): New functions.
16613         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16614         lower_omp_1, execute_lower_omp): Use them.
16616         PR rtl-optimization/84308
16617         * shrink-wrap.c (spread_components): Release todo vector.
16619 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16621         PR rtl-optimization/57193
16622         * ira-color.c (struct allocno_color_data): Add member
16623         conflict_allocno_hard_prefs.
16624         (update_conflict_allocno_hard_prefs): New.
16625         (bucket_allocno_compare_func): Add a preference based on
16626         conflict_allocno_hard_prefs.
16627         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16628         (color_allocnos): Remove a dead code.  Initiate
16629         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16631 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16633         PR target/84226
16634         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16635         constraint from =wa to wa.  Avoid a subreg on the output operand,
16636         instead use a pseudo and subreg it in a move.
16637         (p9_xxbrd_<mode>): Changed to ...
16638         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16639         (p9_xxbrd_v2df): New expander.
16640         (p9_xxbrw_<mode>): Changed to ...
16641         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16642         (p9_xxbrw_v4sf): New expander.
16644 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16646         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16648 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16650         PR target/83926
16651         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16652         multiply in 32-bit mode.
16653         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16654         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16655         mode.
16657 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16659         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16660         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16661         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16662         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16664 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16666         PR lto/84213
16667         * dwarf2out.c (is_trivial_indirect_ref): New function.
16668         (dwarf2out_late_global_decl): Do not generate a location
16669         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16670         and that are not defined in the current unit.
16672 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16674         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16675         instead of a libcall for UNORDERED.
16677 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16679         PR target/82641
16680         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16681         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16683 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16685         PR target/PR84295
16686         * config/s390/s390.c (s390_set_current_function): Invoke
16687         s390_indirect_branch_settings also if fndecl didn't change.
16689 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16691         * config/rs6000/rs6000.md (blockage): Set length to zero.
16693 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16695         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16697 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16699         PR sanitizer/84285
16700         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16701         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16702         -static-lib*san.
16704         PR debug/84252
16705         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16706         PARALLEL incoming that failed vt_get_decl_and_offset check.
16708         PR middle-end/84237
16709         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16710         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16711         TREE_READONLY bit.
16712         (get_variable_section): For decls in named .bss* sections pass true as
16713         second argument to bss_initializer_p.
16715 2018-02-09  Marek Polacek  <polacek@redhat.com>
16716             Jakub Jelinek  <jakub@redhat.com>
16718         PR c++/83659
16719         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16720         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16721         Sync some changes from cxx_fold_indirect_ref.
16723 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16725         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16726         markers.
16727         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16728         (BLOCK_INLINE_ENTRY_LABEL): New.
16729         (dwarf2out_var_location): Disregard inline entry markers.
16730         (inline_entry_data): New struct.
16731         (inline_entry_data_hasher): New hashtable type.
16732         (inline_entry_data_hasher::hash): New.
16733         (inline_entry_data_hasher::equal): New.
16734         (inline_entry_data_table): New variable.
16735         (add_high_low_attributes): Add DW_AT_entry_pc and
16736         DW_AT_GNU_entry_view attributes if a pending entry is found
16737         in inline_entry_data_table.  Add old entry_pc attribute only
16738         if debug nonbinding markers are disabled.
16739         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16740         markers are enabled.
16741         (block_within_block_p, dwarf2out_inline_entry): New.
16742         (dwarf2out_finish): Check that no entries remained in
16743         inline_entry_data_table.
16744         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16745         (final_scan_insn, notice_source_line): Likewise.
16746         (rest_of_clean_state): Skip inline entry markers.
16747         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16748         markers.
16749         * gimple.c (gimple_build_debug_inline_entry): New.
16750         * gimple.h (enum gimple_debug_subcode): Add
16751         GIMPLE_DEBUG_INLINE_ENTRY.
16752         (gimple_build_debug_inline_entry): Declare.
16753         (gimple_debug_inline_entry_p): New.
16754         (gimple_debug_nonbind_marker_p): Adjust.
16755         * insn-notes.def (INLINE_ENTRY): New.
16756         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16757         inline entry marker notes.
16758         (print_insn): Likewise.
16759         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16760         (INSN_DEBUG_MARKER_KIND): Likewise.
16761         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16762         * tree-inline.c (expand_call_inline): Build and insert
16763         debug_inline_entry stmt.
16764         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16765         inline entry blocks early, if nonbind markers are enabled.
16766         (dump_scope_block): Dump fragment info.
16767         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16768         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16769         (gimple_build_debug_inline_entry): New.
16770         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16771         Enable/disable inline entry points too.
16772         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16773         (DEBUG_INSN): Describe inline entry markers.
16775         * common.opt (gvariable-location-views): New.
16776         (gvariable-location-views=incompat5): New.
16777         * config.in: Rebuilt.
16778         * configure: Rebuilt.
16779         * configure.ac: Test assembler for view support.
16780         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16781         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16782         * dwarf2out.c (var_loc_view): New typedef.
16783         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16784         (dwarf2out_locviews_in_attribute): New.
16785         (dwarf2out_locviews_in_loclist): New.
16786         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16787         (enum dw_line_info_opcode): Add LI_adv_address.
16788         (struct dw_line_info_table): Add view.
16789         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16790         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16791         (zero_view_p): New variable.
16792         (ZERO_VIEW_P): New macro.
16793         (output_asm_line_debug_info): New.
16794         (struct var_loc_node): Add view.
16795         (add_AT_view_list, AT_loc_list): New.
16796         (add_var_loc_to_decl): Add view param.  Test it against last.
16797         (new_loc_list): Add view params.  Record them.
16798         (AT_loc_list_ptr): Handle loc and view lists.
16799         (view_list_to_loc_list_val_node): New.
16800         (print_dw_val): Handle dw_val_class_view_list.
16801         (size_of_die): Likewise.
16802         (value_format): Likewise.
16803         (loc_list_has_views): New.
16804         (gen_llsym): Set vl_symbol too.
16805         (maybe_gen_llsym, skip_loc_list_entry): New.
16806         (dwarf2out_maybe_output_loclist_view_pair): New.
16807         (output_loc_list): Output view list or entries too.
16808         (output_view_list_offset): New.
16809         (output_die): Handle dw_val_class_view_list.
16810         (output_dwarf_version): New.
16811         (output_compilation_unit_header): Use it.
16812         (output_skeleton_debug_sections): Likewise.
16813         (output_rnglists, output_line_info): Likewise.
16814         (output_pubnames, output_aranges): Update version comments.
16815         (output_one_line_info_table): Output view numbers in asm comments.
16816         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16817         Call maybe_gen_llsym.
16818         (loc_list_from_tree_1): Adjust.
16819         (add_AT_location_description): Create view list attribute if
16820         needed, check it's absent otherwise.
16821         (convert_cfa_to_fb_loc_list): Adjust.
16822         (maybe_emit_file): Call output_asm_line_debug_info for test.
16823         (dwarf2out_var_location): Reset views as needed.  Precompute
16824         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16825         attribute.  Set view.
16826         (new_line_info_table): Reset next view.
16827         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16828         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16829         the assembler, or select appropriate line info opcodes.
16830         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16831         (optimize_string_length): Catch it.  Adjust.
16832         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16833         dw_val_class_view_list, and remove it if no longer needed.
16834         (hash_loc_list): Hash view numbers.
16835         (loc_list_hasher::equal): Compare them.
16836         (optimize_location_lists): Check whether a view list symbol is
16837         needed, and whether the locview attribute is present, and
16838         whether they match.  Remove the locview attribute if no longer
16839         needed.
16840         (index_location_lists): Call skip_loc_list_entry for test.
16841         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16842         Use output_dwarf_version.
16843         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16844         (struct dw_val_node): Add val_view_list.
16845         * final.c (SEEN_NEXT_VIEW): New.
16846         (set_next_view_needed): New.
16847         (clear_next_view_needed): New.
16848         (maybe_output_next_view): New.
16849         (final_start_function): Rename to...
16850         (final_start_function_1): ... this.  Take pointer to FIRST,
16851         add SEEN parameter.  Emit param bindings in the initial view.
16852         (final_start_function): Reintroduce SEEN-less interface.
16853         (final): Rename to...
16854         (final_1): ... this.  Take SEEN parameter.  Output final pending
16855         next view at the end.
16856         (final): Reintroduce seen-less interface.
16857         (final_scan_insn): Output pending next view before switching
16858         sections or ending a block.  Mark the next view as needed when
16859         outputting variable locations.  Notify debug backend of section
16860         changes, and of location view changes.
16861         (rest_of_handle_final): Adjust.
16862         * toplev.c (process_options): Autodetect value for debug variable
16863         location views option.  Warn on incompat5 without -gdwarf-5.
16864         * doc/invoke.texi (gvariable-location-views): New.
16865         (gvariable-location-views=incompat5): New.
16866         (gno-variable-location-views): New.
16868 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16870         PR tree-optimization/84136
16871         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16872         that the result of find_edge is non-NULL.
16874 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16876         PR target/83008
16877         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16878         storing integer register in SImode.  Fix cost of 256 and 512
16879         byte aligned SSE register store.
16881 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16883         * config/i386/i386.c (ix86_multiplication_cost): Fix
16884         multiplication cost for TARGET_AVX512DQ.
16886 2018-02-08  Marek Polacek  <polacek@redhat.com>
16888         PR tree-optimization/84238
16889         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16890         get_range_strlen.
16892 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16894         PR tree-optimization/84265
16895         * tree-vect-stmts.c (vectorizable_store): Don't treat
16896         VMAT_CONTIGUOUS accesses as grouped.
16897         (vectorizable_load): Likewise.
16899 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16901         PR tree-optimization/81635
16902         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16903         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16904         (test_round_for_mask): New functions.
16905         (wide_int_cc_tests): Call test_round_for_mask.
16906         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16907         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16908         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16909         range returned by get_range_info.
16911 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16913         PR ipa/81360
16914         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16915         * symtab.c: Include builtins.h
16916         (symtab_node::output_to_lto_symbol_table_p): Move here
16917         from lto-streamer-out.c:output_symbol_p.
16918         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16919         (output_symbol_p): Move all logic to symtab.c
16920         (produce_symtab): Update.
16922 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16924         * config/s390/s390-opts.h (enum indirect_branch): Define.
16925         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16926         (s390_indirect_branch_via_thunk)
16927         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16928         (enum s390_indirect_branch_type): Define.
16929         * config/s390/s390.c (struct s390_frame_layout, struct
16930         machine_function): Remove.
16931         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16932         (indirect_branch_table_label_no, indirect_branch_table_name):
16933         Define variables.
16934         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16935         (enum s390_indirect_branch_option): Define.
16936         (s390_return_addr_from_memory): New function.
16937         (s390_handle_string_attribute): New function.
16938         (s390_attribute_table): Add new attribute handler.
16939         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16940         (s390_indirect_branch_via_thunk): New function.
16941         (s390_indirect_branch_via_inline_thunk): New function.
16942         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16943         sibling call optimization for non z10 compiles.
16944         (s390_emit_call): Force indirect branch target to be a single
16945         register.  Add r1 clobber for non-z10 compiles.
16946         (s390_emit_epilogue): Emit return jump via return_use expander.
16947         (s390_reorg): Handle JUMP_INSNs as execute targets.
16948         (s390_option_override_internal): Perform validity checks for the
16949         new command line options.
16950         (s390_indirect_branch_attrvalue): New function.
16951         (s390_indirect_branch_settings): New function.
16952         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16953         (s390_output_indirect_thunk_function):  New function.
16954         (s390_code_end): Implement target hook.
16955         (s390_case_values_threshold): Implement target hook.
16956         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16957         macros.
16958         * config/s390/s390.h (struct s390_frame_layout)
16959         (struct machine_function): Move here from s390.c.
16960         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16961         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16962         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16963         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16964         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16965         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16966         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16967         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16968         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16969         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16970         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16971         (mnemonic attribute): Add values which aren't recognized
16972         automatically.
16973         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16974         pattern for branch conversion.  Fix mnemonic attribute.
16975         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16976         indirect branch via thunk if requested.
16977         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16978         ("*indirect_jump"): Disable for branch conversion using out of
16979         line thunks.
16980         ("indirect_jump_via_thunk<mode>_z10")
16981         ("indirect_jump_via_thunk<mode>")
16982         ("indirect_jump_via_inlinethunk<mode>_z10")
16983         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16984         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16985         ("casesi_jump_via_inlinethunk<mode>_z10")
16986         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16987         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16988         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16989         ("*indirect2_jump"): Disable for branch conversion.
16990         ("casesi_jump"): Turn into expander and expand patterns for branch
16991         conversion.
16992         ("return_use"): New expander.
16993         ("*return"): Emit return via thunk and rename it to ...
16994         ("*return<mode>"): ... this one.
16995         * config/s390/s390.opt: Add new options and and enum for the
16996         option values.
16998 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17000         * lra-constraints.c (match_reload): Unconditionally use
17001         gen_lowpart_SUBREG, rather than selecting between that
17002         and equivalent gen_rtx_SUBREG code.
17004 2018-02-08  Richard Biener  <rguenther@suse.de>
17006         PR tree-optimization/84233
17007         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17008         changed flag instead of boguously re-using phi_inserted.
17010 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17012         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17013         static local variables.
17015 2018-02-08  Richard Biener  <rguenther@suse.de>
17017         PR tree-optimization/84278
17018         * tree-vect-stmts.c (vectorizable_store): When looking for
17019         smaller vector types to perform grouped strided loads/stores
17020         make sure the mode is supported by the target.
17021         (vectorizable_load): Likewise.
17023 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17025         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17026         Increase LDP/STP opportunities by adding adjacent callee-saves.
17028 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17030         PR rtl-optimization/84068
17031         PR rtl-optimization/83459
17032         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17034 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17036         PR tree-optimization/84224
17037         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17038         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17039         non-zero arguments.
17041 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17043         PR target/84113
17044         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17045         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17046         count, remove one USE.
17048 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17050         * doc/install.texi (Configuration): Document the
17051         --with-long-double-format={ibm,ieee} PowerPC configuration
17052         options.
17054         PR target/84154
17055         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17056         Convert from define_expand to be define_insn_and_split.  Rework
17057         float/double/_Float128 conversions to QI/HI/SImode to work with
17058         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17059         conversions to QI/HImode types did a store and then a load to
17060         truncate the value.  For conversions to VSX registers, don't split
17061         the insn, instead emit the code directly.  Use the code iterator
17062         any_fix to combine signed and unsigned conversions.
17063         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17064         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17065         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17066         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17067         (fix_<mode>di2_hw): Likewise.
17068         (fixuns_<mode>di2_hw): Likewise.
17069         (fix_<mode>si2_hw): Likewise.
17070         (fixuns_<mode>si2_hw): Likewise.
17071         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17072         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17073         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17074         fix<uns>_trunc<SFDF:mode>si2_p8.
17075         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17076         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17077         (fix<uns>_<mode>_mem): Likewise.
17078         (fctiw<u>z_<mode>_mem): Likewise.
17079         (fix<uns>_<mode>_mem): Likewise.
17080         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17081         the register allocator from doing a direct move to the GPRs to do
17082         a store, and instead use the ISA 3.0 store byte/half-word from
17083         vector register instruction.  For IEEE 128-bit floating point,
17084         also optimize stores of 32-bit ints.
17085         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17087 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17089         * genextract.c (push_pathstr_operand): New function to support
17090         [a-zA-Z].
17091         (walk_rtx): Call push_pathstr_operand.
17092         (print_path): Support [a-zA-Z].
17094 2018-02-07  Richard Biener  <rguenther@suse.de>
17096         PR tree-optimization/84037
17097         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17098         (cse_and_gimplify_to_preheader): Declare.
17099         (vect_get_place_in_interleaving_chain): Likewise.
17100         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17101         ivexpr_map.
17102         (_loop_vec_info::~_loop_vec_info): Delete it.
17103         (cse_and_gimplify_to_preheader): New function.
17104         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17105         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17106         (vectorizable_load): Likewise.  For grouped stores always base
17107         the IV on the first element.
17108         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17109         condition before gimplifying.
17111 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17113         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17114         *DIV_EXPR and *MOD_EXPR.
17116 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17118         PR target/84248
17119         * config/i386/i386.c (ix86_option_override_internal): Mask out
17120         the CF_SET bit when checking -fcf-protection.
17122 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17124         PR libgomp/84217
17125         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17126         enough.
17128 2018-02-07  Richard Biener  <rguenther@suse.de>
17130         PR tree-optimization/84204
17131         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17132         this place.
17134         PR tree-optimization/84205
17135         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17136         special-case isl_ast_op_zdiv_r.
17138         PR tree-optimization/84223
17139         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17140         Only add conditions from within the region.
17141         (gather_bbs::after_dom_children): Adjust.
17143 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17145         PR target/84209
17146         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17147         * config/avr/avr.md: Only post-reload split REG-REG moves if
17148         either register is GENERAL_REG_P.
17150 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17152         PR tree-optimization/84235
17153         * tree-ssa-scopedtables.c
17154         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17155         if the subtraction is performed in floating point type where NaNs are
17156         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17157         build 1.  Formatting fix.
17159 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17161         PR target/84146
17162         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17163         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17164         and skip it regardless of bb boundaries.  Use CALL_P macro,
17165         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17166         unnecessarily, formatting fix.
17168 2018-02-06  Michael Collison  <michael.collison@arm.com>
17170         * config/arm/thumb2.md:
17171         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17172         (*thumb_mov_notscc): Ditto.
17174 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17176         PR target/84154
17177         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17178         unsigned_fix, not "s".
17180 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17182         * configure.ac (gcc_fn_eh_frame_ro): New function.
17183         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17184         correct .eh_frame permissions.
17185         * configure: Regenerate.
17187 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17189         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17190         irrelevant options.
17192 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17194         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17195         Display warning message for -mno-speculate-indirect-jumps.
17197 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17199         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17200         Undocumented.
17201         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17203 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17205         PR tree-optimization/84225
17206         * tree-eh.c (find_trapping_overflow): Only call
17207         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17209 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17211         PR target/84145
17212         * config/i386/i386.c: Reimplement the check of possible options
17213         -mibt/-mshstk conbination. Change error messages.
17214         * doc/invoke.texi: Fix a typo: remove extra '='.
17216 2018-02-06  Marek Polacek  <polacek@redhat.com>
17218         PR tree-optimization/84228
17219         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17221 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17223         PR target/82641
17224         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17225         emitted arch directives.
17226         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17227         __ARM_FEATURE_COPROC before changing architectures.
17229 2018-02-06  Richard Biener  <rguenther@suse.de>
17231         * config/i386/i386.c (print_reg): Fix typo.
17232         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17234 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17236         * configure: Regenerate.
17238 2018-02-05  Martin Sebor  <msebor@redhat.com>
17240         PR tree-optimization/83369
17241         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17242         inlining context.
17244 2018-02-05  Martin Liska  <mliska@suse.cz>
17246         * doc/invoke.texi: Cherry-pick upstream r323995.
17248 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17250         * ira.c (ira_init_register_move_cost): Adjust comment.
17252 2018-02-05  Martin Liska  <mliska@suse.cz>
17254         PR gcov-profile/84137
17255         * doc/gcov.texi: Fix typo in documentation.
17257 2018-02-05  Martin Liska  <mliska@suse.cz>
17259         PR gcov-profile/83879
17260         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17261         using dlopen functionality.
17263 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17265         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17266         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17267         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17268         _mm_maskz_range_round_ss): New intrinsics.
17269         (__builtin_ia32_rangesd128_round)
17270         (__builtin_ia32_rangess128_round): Remove.
17271         (__builtin_ia32_rangesd128_mask_round,
17272         __builtin_ia32_rangess128_mask_round): New builtins.
17273         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17274         __builtin_ia32_rangess128_round): Remove.
17275         (__builtin_ia32_rangesd128_mask_round,
17276         __builtin_ia32_rangess128_mask_round): New builtins.
17277         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17278         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17279         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17280         "<round_saeonly_constraint>")): Changed to ...
17281         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17282         "<round_saeonly_scalar_constraint>")): ... this.
17283         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17284         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17285         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17286         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17287         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17289 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17291         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17292         options.
17293         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17294         Remove all values except native, 8540 and 8548.
17296 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17298         * config/i386/i386.c (ix86_output_function_return): Pass
17299         INVALID_REGNUM, instead of -1, as invalid register number to
17300         indirect_thunk_name and output_indirect_thunk.
17302 2018-02-02  Julia Koval  <julia.koval@intel.com>
17304         * config.gcc: Add -march=icelake.
17305         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17306         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17307         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17308         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17309         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17310         (processor_target_table): Add icelake.
17311         (ix86_option_override_internal): Handle new PTAs.
17312         (get_builtin_code_for_version): Handle icelake.
17313         (M_INTEL_COREI7_ICELAKE): New.
17314         (fold_builtin_cpu): Handle icelake.
17315         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17316         * doc/invoke.texi: Add -march=icelake.
17318 2018-02-02  Julia Koval  <julia.koval@intel.com>
17320         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17321         to wide_int_bitmask.
17322         * wide-int-bitmask.h: New.
17324 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17326         PR target/84066
17327         * config/i386/i386.md: Replace Pmode with word_mode in
17328         builtin_setjmp_setup and builtin_longjmp to support x32.
17330 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17332         PR target/56010
17333         PR target/83743
17334         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17335         #include "opts.h".
17336         (rs6000_supported_cpu_names): New static variable.
17337         (linux_cpu_translation_table): Likewise.
17338         (elf_platform) <cpu>: Define new static variable and use it.
17339         Translate kernel AT_PLATFORM name to canonical name if needed.
17340         Error if platform name is unknown.
17342 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17344         PR target/84089
17345         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17347 2018-02-01  Jeff Law  <law@redhat.com>
17349         PR target/84128
17350         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17351         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17352         the scratch if RELEASE_VIA_POP is false.
17353         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17354         If we have to save a temporary register, decrement SIZE appropriately.
17355         Pass new arguments to release_scratch_register_on_entry.
17356         (ix86_adjust_stack_and_probe): Likewise.
17357         (ix86_emit_probe_stack_range): Pass new arguments to
17358         release_scratch_register_on_entry.
17360 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17362         PR rtl-optimization/84157
17363         * combine.c (change_zero_ext): Use REG_P predicate in
17364         front of HARD_REGISTER_P predicate.
17366 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17368         * config/avr/avr.c (avr_option_override): Move disabling of
17369         -fdelete-null-pointer-checks to...
17370         * common/config/avr/avr-common.c (avr_option_optimization_table):
17371         ...here.
17373 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17375         PR tree-optimization/81635
17376         * tree-data-ref.c (split_constant_offset_1): For types that
17377         wrap on overflow, try to use range info to prove that wrapping
17378         cannot occur.
17380 2018-02-01  Renlin Li  <renlin.li@arm.com>
17382         PR target/83370
17383         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17384         TAILCALL_ADDR_REGS.
17385         (aarch64_register_move_cost): Likewise.
17386         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17387         TAILCALL_ADDR_REGS.
17388         (REG_CLASS_NAMES): Likewise.
17389         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17390         TAILCALL_ADDR_REGS. Remove IP registers.
17391         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17393 2018-02-01  Richard Biener  <rguenther@suse.de>
17395         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17396         for specifying RPO order and allow NULL for that.
17397         * domwalk.c (dom_walker::dom_walker): Likewise.
17398         (dom_walker::walk): Handle NULL RPO order.
17399         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17400         in RPO order.
17401         (rewrite_update_dom_walker): Likewise.
17402         (mark_def_dom_walker): Likewise.
17404 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17406         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17407         (aarch64_maybe_expand_sve_subreg_move): Declare.
17408         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17409         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17410         predicate.
17411         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17412         that are semantically a reverse operation.
17413         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17414         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17415         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17416         functions.
17417         (aarch64_can_change_mode_class): For big-endian, forbid changes
17418         between two SVE modes if they have different element sizes.
17420 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17422         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17423         the TImode handling for big-endian targets.
17425 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17427         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17428         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17429         not just bytes.
17430         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17431         Remove BSWAP handing for big-endian targets and use the form of
17432         LD1RQ appropariate for the mode.
17434 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17436         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17437         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17438         duplicated element.
17440 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17442         PR tearget/83845
17443         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17444         check for operands that need to go through aarch64_sve_reload_be.
17446 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17448         PR tree-optimization/81661
17449         PR tree-optimization/84117
17450         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17451         * tree-eh.c: Include gimplify.h.
17452         (find_trapping_overflow, replace_trapping_overflow,
17453         rewrite_to_non_trapping_overflow): New functions.
17454         * tree-vect-loop.c: Include tree-eh.h.
17455         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17456         * tree-data-ref.c: Include tree-eh.h.
17457         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17459 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17461         PR rtl-optimization/84123
17462         * combine.c (change_zero_ext): Check if hard register satisfies
17463         can_change_dest_mode before calling gen_lowpart_SUBREG.
17465 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17467         PR target/82444
17468         * ira.c (ira_init_register_move_cost): Remove assert.
17470 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17472         PR rtl-optimization/84071
17473         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17474         * doc/tm.texi: Regenerate.
17476 2018-01-31  Richard Biener  <rguenther@suse.de>
17478         PR tree-optimization/84132
17479         * tree-data-ref.c (analyze_miv_subscript): Properly
17480         check whether evolution_function_is_affine_multivariate_p
17481         before calling gcd_of_steps_may_divide_p.
17483 2018-01-31  Julia Koval  <julia.koval@intel.com>
17485         PR target/83618
17486         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17487         * config/i386/i386.md (rdpid_rex64) New.
17488         (rdpid): Make 32bit only.
17490 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17492         PR lto/84105
17493         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17494         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17496 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17498         Revert
17499         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17501         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17503 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17505         PR rtl-optimization/84071
17506         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17507         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17509 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17511         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17512         (arc_attribute_table): Add 'aux' attribute.
17513         (arc_in_small_data_p): Consider aux like variables.
17514         (arc_is_aux_reg_p): New function.
17515         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17516         (arc_get_aux_arg): New function.
17517         (prepare_move_operands): Handle aux-register access.
17518         (arc_handle_aux_attribute): New function.
17519         * doc/extend.texi (ARC Variable attributes): Add subsection.
17521 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17523         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17524         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17525         (arc_attribute_table): Add 'uncached' attribute.
17526         (arc_print_operand): Print '.di' flag for uncached memory
17527         accesses.
17528         (arc_in_small_data_p): Do not consider for small data the uncached
17529         types.
17530         (arc_is_uncached_mem_p): New function.
17531         * config/arc/predicates.md (compact_store_memory_operand): Check
17532         for uncached memory accesses.
17533         (nonvol_nonimm_operand): Likewise.
17534         * doc/extend.texi (ARC Type Attribute): New subsection.
17536 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17538         PR c/84100
17539         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17540         falign-loops=): Add Optimization flag.
17542 2018-01-30  Jeff Law  <law@redhat.com>
17544         PR target/84064
17545         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17546         INT_REGISTERS_SAVED.  Check it prior to calling
17547         get_scratch_register_on_entry.
17548         (ix86_adjust_stack_and_probe): Similarly.
17549         (ix86_emit_probe_stack_range): Similarly.
17550         (ix86_expand_prologue): Corresponding changes.
17552 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17554         PR target/40411
17555         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17556         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17558 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17560         PR target/84112
17561         * lra-constraints.c (curr_insn_transform): Process AND in the
17562         address.
17564 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17566         PR rtl-optimization/83986
17567         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17568         dependence against last_pending_memory_flush in addition to
17569         pending_jump_insns.
17571 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17573         PR tree-optimization/81611
17574         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17575         copies.
17577 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17579         PR target/83758
17580         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17581         a reg rtx.
17583 2018-01-30  Richard Biener  <rguenther@suse.de>
17584             Jakub Jelinek  <jakub@redhat.com>
17586         PR tree-optimization/84111
17587         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17588         inner loops added during recursion, as they don't have up-to-date
17589         SSA form.
17591 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17593         PR ipa/81360
17594         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17595         (can_inline_edge_by_limits_p): ... here.
17596         (can_early_inline_edge_p, check_callers,
17597         update_caller_keys, update_callee_keys, recursive_inlining,
17598         add_new_edges_to_heap, speculation_useful_p,
17599         inline_small_functions,
17600         inline_small_functions, flatten_function,
17601         inline_to_all_callers_1): Update.
17603 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17605         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17606         zeros correctly.
17608 2018-01-30  Richard Biener  <rguenther@suse.de>
17610         PR tree-optimization/83008
17611         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17612         invariant and constant vector uses in stmts when they need
17613         more than one stmt.
17615 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17617         PR bootstrap/84017
17618         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17619         * configure: Regenerate.
17621 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17623         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17624         pattern.
17625         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17626         Use gen_rtx_REG rather than gen_lowpart.
17628 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17630         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17631         rather than 0 when creating partial subregs.
17633 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17635         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17636         of usage.
17638 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17640         PR target/81550
17641         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17642         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17643         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17644         flags.  This restores the settings used before the 2017-07-24.
17645         Turning off pre increment/decrement/modify allows IVOPTS to
17646         optimize DF/SF loops where the index is an int.
17648 2018-01-29  Richard Biener  <rguenther@suse.de>
17649             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17651         PR bootstrap/80867
17652         * tree-vect-stmts.c (vectorizable_call): Don't call
17653         targetm.vectorize_builtin_md_vectorized_function if callee is
17654         NULL.
17656 2018-01-22  Carl Love  <cel@us.ibm.com>
17658         * doc/extend.tex: Fix typo in second arg in
17659         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17661 2018-01-29  Richard Biener  <rguenther@suse.de>
17663         PR tree-optimization/84086
17664         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17665         (flush_ssaname_freelist): When SSA names were released reset
17666         the SCEV hash table.
17668 2018-01-29  Richard Biener  <rguenther@suse.de>
17670         PR tree-optimization/84057
17671         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17672         removed paths when removing edges.
17674 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17676         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17677         -mfunction-return=@var{choice}.
17679 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17681         PR diagnostic/84034
17682         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17683         Handle CR like TAB.
17684         (layout::print_source_line): Likewise.
17685         (test_get_line_width_without_trailing_whitespace): Add test cases.
17687 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17689         PR middle-end/84040
17690         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17691         debug insns.
17693 2018-01-26  Jim Wilson  <jimw@sifive.com>
17695         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17697         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17698         specified.
17700 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17702         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17703         and CMP + SUB-immediate -> SUBS.
17705 2018-01-26  Martin Sebor  <msebor@redhat.com>
17707         PR tree-optimization/83896
17708         * tree-ssa-strlen.c (get_string_len): Rename...
17709         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17710         Avoid assuming length is constant.
17711         (handle_char_store): Use HOST_WIDE_INT for string length.
17713 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17715         PR target/81763
17716         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17717         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17719 2018-01-26  Richard Biener  <rguenther@suse.de>
17721         PR rtl-optimization/84003
17722         * dse.c (record_store): Only record redundant stores when
17723         the earlier store aliases at least all accesses the later one does.
17725 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17727         PR rtl-optimization/83985
17728         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17729         REG_CFA_RESTORE insns.
17730         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17731         REG_CFA_RESTORE insns here.
17733         PR c/83989
17734         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17735         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17737 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17739         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17740         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17741         (arc_init): Likewise.
17742         (arc_override_options): Likewise.
17743         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17744         value.
17745         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17746         support.
17747         * config/arc/arc.h (TARGET_DBNZ): Define.
17748         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17749         properly set the tune attribute.
17750         (dbnz): Use TARGET_DBNZ guard.
17751         * config/arc/arc.opt (mtune): Add core3 option.
17753 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17755         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17756         recognize new pic like addresses.
17757         (arc_delegitimize_address): Clean up.
17759 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17761         * config/arc/arc-arches.def: Option mrf16 valid for all
17762         architectures.
17763         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17764         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17765         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17766         * config/arc/arc-tables.opt: Regenerate.
17767         * config/arc/arc.c (arc_conditional_register_usage): Handle
17768         reduced register file case.
17769         (arc_file_start): Set must have build attributes.
17770         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17771         mrf16 option value.
17772         * config/arc/arc.opt (mrf16): Add new option.
17773         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17774         * config/arc/genmultilib.awk: Handle new mrf16 option.
17775         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17776         * config/arc/t-multilib: Regenerate.
17777         * doc/invoke.texi (ARC Options): Document mrf16 option.
17779 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17781         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17782         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17783         (arc_attribute_table): Add 'secure_call' attribute.
17784         (arc_print_operand): Print secure call operand.
17785         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17786         secure.
17787         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17788         (call_i): Add support for sjli instruction.
17789         (call_value_i): Likewise.
17790         * config/arc/constraints.md (Csc): New constraint.
17792 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17793             John Eric Martin  <John.Martin@emmicro-us.com>
17795         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17796         * config/arc/arc.c (_arc_jli_section): New struct.
17797         (arc_jli_section): New type.
17798         (rc_jli_sections): New static variable.
17799         (arc_handle_jli_attribute): New function.
17800         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17801         (arc_file_end): New function.
17802         (TARGET_ASM_FILE_END): Define.
17803         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17804         (arc_add_jli_section): New function.
17805         (jli_call_scan): Likewise.
17806         (arc_reorg): Call jli_call_scan.
17807         (arc_output_addsi): Remove 'S' from printing asm operand.
17808         (arc_is_jli_call_p): New function.
17809         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17810         operand.
17811         (movhi_insn): Likewise.
17812         (movsi_insn): Likewise.
17813         (movsi_set_cc_insn): Likewise.
17814         (loadqi_update): Likewise.
17815         (load_zeroextendqisi_update): Likewise.
17816         (load_signextendqisi_update): Likewise.
17817         (loadhi_update): Likewise.
17818         (load_zeroextendhisi_update): Likewise.
17819         (load_signextendhisi_update): Likewise.
17820         (loadsi_update): Likewise.
17821         (loadsf_update): Likewise.
17822         (movsicc_insn): Likewise.
17823         (bset_insn): Likewise.
17824         (bxor_insn): Likewise.
17825         (bclr_insn): Likewise.
17826         (bmsk_insn): Likewise.
17827         (bicsi3_insn): Likewise.
17828         (cmpsi_cc_c_insn): Likewise.
17829         (movsi_ne): Likewise.
17830         (movsi_cond_exec): Likewise.
17831         (clrsbsi2): Likewise.
17832         (norm_f): Likewise.
17833         (normw): Likewise.
17834         (swap): Likewise.
17835         (divaw): Likewise.
17836         (flag): Likewise.
17837         (sr): Likewise.
17838         (kflag): Likewise.
17839         (ffs): Likewise.
17840         (ffs_f): Likewise.
17841         (fls): Likewise.
17842         (call_i): Remove 'S' asm letter, add jli instruction.
17843         (call_value_i): Likewise.
17844         * config/arc/arc.op (mjli-always): New option.
17845         * config/arc/constraints.md (Cji): New constraint.
17846         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17847         operand.
17848         (subsf3_fpx): Likewise.
17849         (mulsf3_fpx): Likewise.
17850         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17851         asm operand.
17852         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17853         function attrbutes.
17854         * doc/invoke.texi (ARC): Document mjli-always option.
17856 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17858         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17859         avoid addition with 0 and use incw and decw where possible.
17861 2018-01-26  Richard Biener  <rguenther@suse.de>
17863         PR tree-optimization/81082
17864         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17865         association if it requires casting to unsigned.
17866         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17867         from fold_plusminus_mult_expr to catch important cases late when
17868         range info is available.
17870 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17872         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17873         * configure.ac (hidden_linkonce): New test.
17874         * configure: Regenerate.
17875         * config.in: Regenerate.
17877 2018-01-26  Julia Koval  <julia.koval@intel.com>
17879         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17880         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17881         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17882         _mm_mask_bitshuffle_epi64_mask): Fix type.
17883         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17884         USI_FTYPE_V4DI_V4DI_USI): Remove.
17885         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17886         __builtin_ia32_vpshufbitqmb256_mask,
17887         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17888         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17889         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17891 2018-01-26  Alan Modra  <amodra@gmail.com>
17893         PR target/84033
17894         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17895         UNSPEC_VBPERMQ.  Sort other unspecs.
17897 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17899         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17901 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17903         PR middle-end/83055
17904         * predict.c (drop_profile): Do not push/pop cfun; update also
17905         node->count.
17906         (handle_missing_profiles): Fix logic looking for zero profiles.
17908 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17910         PR middle-end/83977
17911         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17912         on functions with #pragma omp declare simd or functions with simd
17913         attribute.
17914         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17915         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17916         Remove trailing \n from warning_at calls.
17918 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17920         PR target/84028
17921         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17922         for neutered workers.
17924 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17926         PR target/68467
17927         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17928         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17930 2018-01-24  Jeff Law  <law@redhat.com>
17932         PR target/83994
17933         * i386.c (get_probe_interval): Move to earlier point.
17934         (ix86_compute_frame_layout): If -fstack-clash-protection and
17935         the frame is larger than the probe interval, then use pushes
17936         to save registers rather than reg->mem moves.
17937         (ix86_expand_prologue): Remove conditional for int_registers_saved
17938         assertion.
17940 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17942         PR target/84014
17943         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17944         min/max for never referenced object.
17946 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17948         PR middle-end/83977
17949         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17950         here.
17951         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17952         attributes from DECL_ATTRIBUTES (decl) without affecting
17953         DECL_ATTRIBUTES (current_function_decl).
17954         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17955         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17957 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17959         PR tree-optimization/83979
17960         * fold-const.c (fold_comparison): Use constant_boolean_node
17961         instead of boolean_{true,false}_node.
17963 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17965         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17966         with zero counts.
17968 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17970         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17971         Simplify the clause that sets the length attribute.
17972         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17973         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17974         clause that sets the length attribute.
17975         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17977 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17979         PR target/83589
17980         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17981         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17982         Add strict parameter.
17983         (prevent_branch_around_nothing): Insert dummy insn between branch to
17984         label and label with no ptx insn inbetween.
17985         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17987 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17989         PR target/81352
17990         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17991         for neutered threads in warp.
17992         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17994 2018-01-24  Richard Biener  <rguenther@suse.de>
17996         PR tree-optimization/83176
17997         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17998         operands.
18000 2018-01-24  Richard Biener  <rguenther@suse.de>
18002         PR tree-optimization/82819
18003         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18004         code generating pluses that are no-ops in the target precision.
18006 2018-01-24  Richard Biener  <rguenther@suse.de>
18008         PR middle-end/84000
18009         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18011 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18013         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18014         to merge probabilities.
18015         * predict.c (probably_never_executed): Also mark as cold functions
18016         with global 0 profile and guessed local profile.
18017         * profile-count.c (profile_probability::combine_with_count): New
18018         member function.
18019         * profile-count.h (profile_probability::operator*,
18020         profile_probability::operator*=, profile_probability::operator/,
18021         profile_probability::operator/=): Reduce precision to adjusted
18022         and set value to guessed on contradictory divisions.
18023         (profile_probability::combine_with_freq): Remove.
18024         (profile_probability::combine_wiht_count): Declare.
18025         (profile_count::force_nonzero):: Set to adjusted.
18026         (profile_count::probability_in):: Set quality to adjusted.
18027         * tree-ssa-tail-merge.c (replace_block_by): Use
18028         combine_with_count.
18030 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18031             Jim Wilson  <jimw@sifive.com>
18033         * config/riscv/riscv.c (riscv_stack_boundary): New.
18034         (riscv_option_override): Set riscv_stack_boundary.  Handle
18035         riscv_preferred_stack_boundary_arg.
18036         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18037         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18038         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18039         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18040         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18041         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18043 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18045         PR target/83905
18046         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18047         of struct ix86_frame.
18048         (ix86_expand_epilogue): Likewise.  Add a local variable for
18049         the reg_save_offset field in struct ix86_frame.
18051 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18053         PR tree-optimization/82604
18054         * tree-loop-distribution.c (enum partition_kind): New enum item
18055         PKIND_PARTIAL_MEMSET.
18056         (partition_builtin_p): Support above new enum item.
18057         (generate_code_for_partition): Ditto.
18058         (compute_access_range): Differentiate cases that equality can be
18059         proven at all loops, the innermost loops or no loops.
18060         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18061         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18062         (finalize_partitions, distribute_loop): Don't fuse partition of
18063         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18064         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18065         parloop is enabled.
18067 2018-01-23  Martin Liska  <mliska@suse.cz>
18069         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18070         order to ignore the predictor.
18071         (PRED_POLYMORPHIC_CALL): Likewise.
18072         (PRED_RECURSIVE_CALL): Likewise.
18074 2018-01-23  Martin Liska  <mliska@suse.cz>
18076         * tree-profile.c (tree_profiling): Print function header to
18077         aware reader which function we are working on.
18078         * value-prof.c (gimple_find_values_to_profile): Do not print
18079         not interesting value histograms.
18081 2018-01-23  Martin Liska  <mliska@suse.cz>
18083         * profile-count.h (enum profile_quality): Add
18084         profile_uninitialized as the first value. Do not number values
18085         as they are zero based.
18086         (profile_count::verify): Update sanity check.
18087         (profile_probability::verify): Likewise.
18089 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18091         * doc/invoke.texi (ffor-scope): Deprecate.
18093 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18095         PR tree-optimization/83510
18096         * domwalk.c (set_all_edges_as_executable): New function.
18097         (dom_walker::dom_walker): Convert bool param
18098         "skip_unreachable_blocks" to enum reachability.  Move setup of
18099         edge flags to set_all_edges_as_executable and only do it when
18100         reachability is REACHABLE_BLOCKS.
18101         * domwalk.h (enum dom_walker::reachability): New enum.
18102         (dom_walker::dom_walker): Convert bool param
18103         "skip_unreachable_blocks" to enum reachability.
18104         (set_all_edges_as_executable): New decl.
18105         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18106         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18107         "reachability".
18108         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18109         but converting true to REACHABLE_BLOCKS.
18110         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18111         * tree-vrp.c
18112         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18113         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18114         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18115         REACHABLE_BLOCKS.
18116         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18117         if check_all_array_refs will be called.
18119 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18121         * tree.c (selftest::test_location_wrappers): Add more test
18122         coverage.
18124 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18126         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18127         (selftest::test_bit_in_range): Likewise.
18129 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18131         PR testsuite/83888
18132         * doc/sourcebuild.texi (vect_float): Say that the selector
18133         only describes the situation when -funsafe-math-optimizations is on.
18134         (vect_float_strict): Document.
18136 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18138         PR tree-optimization/83965
18139         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18140         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18141         instead of checking only for a reduction.
18142         (vect_recog_widen_sum_pattern): Likewise.
18144 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18146         * predict.c (probably_never_executed): Only use precise profile info.
18147         (compute_function_frequency): Skip after inlining hack since we now
18148         have quality checking.
18150 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18152         * profile-count.h (profile_probability::very_unlikely,
18153         profile_probability::unlikely, profile_probability::even): Set
18154         precision to guessed.
18156 2018-01-23  Richard Biener  <rguenther@suse.de>
18158         PR tree-optimization/83963
18159         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18160         Properly terminate dominator walk when crossing the exit edge not
18161         when visiting its source block.
18163 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18165         PR c++/83918
18166         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18167         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18169 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18171         PR tree-optimization/83957
18172         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18173         semicolon after for body surrounded by braces.
18175         PR tree-optimization/83081
18176         * profile-count.h (profile_probability::split): New method.
18177         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18178         Use profile_probability::split.
18179         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18180         when splitting a single conditional jump into 2.
18182 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18184         PR tree-optimization/69452
18185         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18186         decl.
18188 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18190         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18191         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18192         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18194 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18196         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18197         declaration.
18198         * config/rl78/rl78.md (movdi): New define_expand.
18199         * config/rl78/rl78.c (rl78_split_movdi): New function.
18201 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18203         PR target/83862
18204         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18205         no longer used.
18206         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18207         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18208         128-bit to produce an UNSPEC move to get the double word with the
18209         signbit and then a shift directly to do signbit.
18210         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18211         implementation with a new version that just does either a direct
18212         move or a regular move.  Move memory interface to separate insns.
18213         Move insns so they are next to the expander.
18214         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18215         with signbit move.  Split big and little endian case.
18216         (signbit<mode>2_dm_mem_le): Likewise.
18217         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18218         (signbit<mode>2_dm2): Likewise.
18220 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18222         * config/rl78/rl78.md (anddi3): New define_expand.
18224 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18226         * config/rl78/rl78.md (umindi3): New define_expand.
18228 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18230         * config/rl78/rl78.md (smindi3): New define_expand.
18232 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18234         * config/rl78/rl78.md (smaxdi3): New define_expand.
18236 2018-01-22  Carl Love  <cel@us.ibm.com>
18238         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18239         LVX_V1TI): Add macro expansion.
18240         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18241         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18242         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18243         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18244         Change check to determine if the instruction is a byte reversing
18245         entry.  Fix typo in comment.
18246         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18247         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18248         Add def_builtin calls for new builtins.
18249         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18250         Add define_insn expansion.
18252 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18254         * config/rl78/rl78.md (umaxdi3): New define_expand.
18256 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18258         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18259         for non-QImode registers.
18261 2018-01-22  Richard Biener  <rguenther@suse.de>
18263         PR tree-optimization/83963
18264         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18265         including the loop exit block.
18266         (scop_detection::merge_sese): Likewise.
18267         (scop_detection::add_scop): Do it here instead.
18269 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18271         * doc/sourcebuild.texi (arm_softfloat): Document.
18273 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18275         PR gcc/77734
18276         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18277         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18278         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18280 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18281             David Edelsohn  <dje.gcc@gmail.com>
18283         PR target/83946
18284         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18285         Change "crset eq" to "crset 2".
18286         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18287         (*call_indirect_aix<mode>_nospec): Likewise.
18288         (*call_value_indirect_aix<mode>_nospec): Likewise.
18289         (*call_indirect_elfv2<mode>_nospec): Likewise.
18290         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18291         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18292         change assembly output from . to $.
18293         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18294         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18295         (*tablejump<mode>_internal1_nospec): Likewise.
18297 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18299         PR target/80870
18300         * config/sh/sh_optimize_sett_clrt.cc:
18301         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18303 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18305         PR tree-optimization/83940
18306         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18307         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18308         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18309         use it to pass back the definition type.
18310         (vect_check_store_rhs): Likewise rhs_dt_out.
18311         (vect_build_gather_load_calls): Add a mask_dt argument and use
18312         it instead of a call to vect_is_simple_use.
18313         (vectorizable_store): Update calls to vect_check_load_store_mask
18314         and vect_check_store_rhs.  Use the dt returned by the latter instead
18315         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18316         instead of calls to vect_is_simple_use.  Pass the scalar rather
18317         than the vector operand to vect_is_simple_use when handling
18318         second and subsequent copies of an rhs value.
18319         (vectorizable_load): Update calls to vect_check_load_store_mask
18320         and vect_build_gather_load_calls.  Use the cached mask_dt and
18321         gs_info.offset_dt instead of calls to vect_is_simple_use.
18323 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18325         PR middle-end/83945
18326         * tree-emutls.c: Include gimplify.h.
18327         (lower_emutls_2): New function.
18328         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18329         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18330         it before further processing.
18332         PR target/83930
18333         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18334         UINTVAL (trueop1) instead of INTVAL (op1).
18336 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18338         PR debug/81570
18339         PR debug/83728
18340         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18341         INCOMING_FRAME_SP_OFFSET if not defined.
18342         (scan_trace): Add ENTRY argument.  If true and
18343         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18344         emit a note to adjust the CFA offset.
18345         (create_cfi_notes): Adjust scan_trace callers.
18346         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18347         INCOMING_FRAME_SP_OFFSET in the CIE.
18348         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18349         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18350         Likewise.
18351         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18352         * doc/tm.texi: Regenerated.
18354 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18356         PR rtl-optimization/83147
18357         * lra-constraints.c (remove_inheritance_pseudos): Use
18358         lra_substitute_pseudo_within_insn.
18360 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18361             Cesar Philippidis  <cesar@codesourcery.com>
18363         PR target/83920
18364         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18366 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18368         PR target/83790
18369         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18370         spaces for function labels.
18372 2018-01-19  Martin Liska  <mliska@suse.cz>
18374         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18375         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18376         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18377         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18378         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18379         (PRED_CONST_RETURN): Change from 69 to 65.
18380         (PRED_NULL_RETURN): Change from 91 to 71.
18381         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18382         (PRED_LOOP_GUARD): Change from 66 to 73.
18384 2018-01-19  Martin Liska  <mliska@suse.cz>
18386         * predict.c (predict_insn_def): Add new assert.
18387         (struct branch_predictor): Change type to signed integer.
18388         (test_prediction_value_range): Amend test to cover
18389         PROB_UNINITIALIZED.
18390         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18391         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18392         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18393         (PRED_LOOP_IV_COMPARE): Likewise.
18394         * predict.h (PROB_UNINITIALIZED): Define new constant.
18396 2018-01-19  Martin Liska  <mliska@suse.cz>
18398         * predict.c (dump_prediction): Add new format for
18399         analyze_brprob.py script which is enabled with -details
18400         suboption.
18401         * profile-count.h (precise_p): New function.
18403 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18405         PR tree-optimization/83922
18406         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18407         there are no statements that need masking.
18408         (vect_active_double_reduction_p): New function.
18409         (vect_analyze_loop_operations): Use it when handling phis that
18410         are not in the loop header.
18412 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18414         PR tree-optimization/83914
18415         * tree-vect-loop.c (vectorizable_induction): Don't convert
18416         init_expr or apply the peeling adjustment for inductions
18417         that are nested within the vectorized loop.
18419 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18421         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18422         instead of NEG.
18424 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18426         PR sanitizer/81715
18427         PR testsuite/83882
18428         * function.h (gimplify_parameters): Add gimple_seq * argument.
18429         * function.c: Include gimple.h and options.h.
18430         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18431         for the added local temporaries if needed.
18432         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18433         if there are any parameter cleanups, wrap whole body into a
18434         try/finally with the cleanups.
18436 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18438         PR target/82964
18439         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18440         Use GET_MODE_CLASS for scalar floating point.
18442 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18444         PR ipa/82256
18445         patch by PaX Team
18446         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18447         Fix call of call_cgraph_insertion_hooks.
18449 2018-01-18  Martin Sebor  <msebor@redhat.com>
18451         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18453 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18455         PR ipa/83619
18456         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18457         frequencies.
18459 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18461         PR other/70268
18462         * common.opt: (-ffile-prefix-map): New option.
18463         * opts.c (common_handle_option): Defer it.
18464         * opts-global.c (handle_common_deferred_options): Handle it.
18465         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18466         * file-prefix-map.h: New file.
18467         (remap_debug_filename, add_debug_prefix_map): ...here.
18468         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18469         * final.c (debug_prefix_map, add_debug_prefix_map
18470         remap_debug_filename): Move to...
18471         * file-prefix-map.c: New file.
18472         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18473         generalize, get rid of alloca(), use strrchr() instead of strchr().
18474         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18475         Implement in terms of add_prefix_map().
18476         (remap_macro_filename, remap_debug_filename): Implement in term of
18477         remap_filename().
18478         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18479         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18480         * dbxout.c: Include file-prefix-map.h.
18481         * varasm.c: Likewise.
18482         * vmsdbgout.c: Likewise.
18483         * xcoffout.c: Likewise.
18484         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18485         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18486         * doc/invoke.texi (-ffile-prefix-map): Document.
18487         (-fdebug-prefix-map): Update description.
18489 2018-01-18  Martin Liska  <mliska@suse.cz>
18491         * config/i386/i386.c (indirect_thunk_name): Document that also
18492         lfence is emitted.
18493         (output_indirect_thunk): Document why both instructions
18494         (pause and lfence) are generated.
18496 2018-01-18  Richard Biener  <rguenther@suse.de>
18498         PR tree-optimization/83887
18499         * graphite-scop-detection.c
18500         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18501         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18502         (scop_detection::merge_sese): Re-implement with a flood-fill
18503         algorithm that properly finds a SESE region if it exists.
18505 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18507         PR c/61240
18508         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18509         pointer_diff optimizations use view_convert instead of convert.
18511 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18513         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18514         Generate different code for -mno-speculate-indirect-jumps.
18515         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18516         (*call_indirect_aix<mode>): Disable for
18517         -mno-speculate-indirect-jumps.
18518         (*call_indirect_aix<mode>_nospec): New define_insn.
18519         (*call_value_indirect_aix<mode>): Disable for
18520         -mno-speculate-indirect-jumps.
18521         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18522         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18523         -mno-speculate-indirect-jumps.
18524         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18526 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18528         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18529         long double type, set the flags for noting the default long double
18530         type, even if we don't pass or return a long double type.
18532 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18534         PR ipa/83051
18535         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18536         failure.
18538 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18540         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18541         support for merge[hl].
18542         (fold_mergehl_helper): New helper function.
18543         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18544         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18545         (altivec_vmrglw_direct): Add xxmrglw insn.
18547 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18549         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18550         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18552 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18554         PR lto/83121
18555         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18556         call the lto_location_cache before reading the
18557         DECL_SOURCE_LOCATION of the types.
18559 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18560             Richard Sandiford  <richard.sandiford@linaro.org>
18562         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18563         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18564         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18565         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18566         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18567         Add declaration.
18568         * config/aarch64/constraints.md (aarch64_movti_operand):
18569         Limit immediates.
18570         * config/aarch64/predicates.md (Uti): Add new constraint.
18572 2018-01-17  Carl Love  <cel@us.ibm.com>
18574         * config/rs6000/vsx.md (define_expand xl_len_r,
18575         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18576         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18577         lxvll.
18578         (define_expand, define_insn): Move the shift left from  the
18579         define_insn to the define_expand for lxvl and stxvl instructions.
18580         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18581         and XL_LEN_R definitions to PURE.
18583 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18585         * config/i386/i386.c (indirect_thunk_name): Declare regno
18586         as unsigned int.  Compare regno with INVALID_REGNUM.
18587         (output_indirect_thunk): Ditto.
18588         (output_indirect_thunk_function): Ditto.
18589         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18590         in the call to output_indirect_thunk_function.
18592 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18594         PR middle-end/83884
18595         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18596         rather than the size of inner_type to determine the stack slot size
18597         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18599 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18601         PR target/83546
18602         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18603         to PTA_SILVERMONT.
18605 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18607         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18608         endian Linux systems to optionally enable multilibs for selecting
18609         the long double type if the user configured an explicit type.
18610         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18611         have no long double multilibs if not defined.
18612         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18613         warn if the user used -mabi={ieee,ibm}longdouble and we built
18614         multilibs for long double.
18615         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18616         appropriate multilib option.
18617         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18618         multilib options.
18619         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18620         for building long double multilibs.
18621         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18623 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18625         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18626         copies.
18628         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18629         64 bits.
18630         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18631         128 bits.
18633         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18634         variables.
18636         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18637         return value.
18639 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18641         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18642         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18644 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18646         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18647         different rtl trees depending on TARGET_64BIT.
18648         (rs6000_gen_lvx): Likewise.
18650 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18652         * config/visium/visium.md (nop): Tweak comment.
18653         (hazard_nop): Likewise.
18655 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18657         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18658         -mspeculate-indirect-jumps.
18659         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18660         for -mno-speculate-indirect-jumps.
18661         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18662         (*call_value_indirect_elfv2<mode>): Disable for
18663         -mno-speculate-indirect-jumps.
18664         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18665         (indirect_jump): Emit different RTL for
18666         -mno-speculate-indirect-jumps.
18667         (*indirect_jump<mode>): Disable for
18668         -mno-speculate-indirect-jumps.
18669         (*indirect_jump<mode>_nospec): New define_insn.
18670         (tablejump): Emit different RTL for
18671         -mno-speculate-indirect-jumps.
18672         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18673         (tablejumpsi_nospec): New define_expand.
18674         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18675         (tablejumpdi_nospec): New define_expand.
18676         (*tablejump<mode>_internal1): Disable for
18677         -mno-speculate-indirect-jumps.
18678         (*tablejump<mode>_internal1_nospec): New define_insn.
18679         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18680         option.
18682 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18684         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18685         callers updated.
18687 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18688             Richard Biener  <rguenth@suse.de>
18690         PR libgomp/83590
18691         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18692         return early, inline manually is_gimple_sizepos.  Make sure if we
18693         call gimplify_expr we don't end up with a gimple constant.
18694         * tree.c (variably_modified_type_p): Don't return true for
18695         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18696         * gimplify.h (is_gimple_sizepos): Remove.
18698 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18700         PR tree-optimization/83857
18701         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18702         vectorizable_live_operation for pure SLP statements.
18703         (vectorizable_live_operation): Handle PHIs.
18705 2018-01-16  Richard Biener  <rguenther@suse.de>
18707         PR tree-optimization/83867
18708         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18709         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18711 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18713         PR c/83844
18714         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18715         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18716         If off is not INTEGER_CST, issue a may not be aligned warning
18717         rather than isn't aligned.  Use isn%'t rather than isn't.
18718         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18719         into MULT_EXPR.
18720         <case MULT_EXPR>: Improve the case when bottom and one of the
18721         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18722         operand, in that case check if the other operand is multiple of
18723         bottom divided by the INTEGER_CST operand.
18725 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18727         PR target/83858
18728         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18729         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18730         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18731         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18732         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18733         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18734         (pa_function_arg_size): New function.
18736 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18738         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18739         in a separate statement.
18741 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18743         PR tree-optimization/83847
18744         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18745         group gathers and scatters.
18747 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18749         PR rtl-optimization/86620
18750         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18752         PR rtl-optimization/83213
18753         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18754         to last if both are JUMP_INSNs.
18756         PR tree-optimization/83843
18757         * gimple-ssa-store-merging.c
18758         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18759         store_immediate_info for bswap/nop orig_stores.
18761 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18763         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18764         !TARGET_MUL.
18765         <UDIV>: Increase cost if !TARGET_DIV.
18767 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18769         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18770         (define_attr "cr_logical_3op"): New.
18771         (cceq_ior_compare): Adjust.
18772         (cceq_ior_compare_complement): Adjust.
18773         (*cceq_rev_compare): Adjust.
18774         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18775         (is_cracked_insn): Adjust.
18776         (insn_must_be_first_in_group): Adjust.
18777         * config/rs6000/40x.md: Adjust.
18778         * config/rs6000/440.md: Adjust.
18779         * config/rs6000/476.md: Adjust.
18780         * config/rs6000/601.md: Adjust.
18781         * config/rs6000/603.md: Adjust.
18782         * config/rs6000/6xx.md: Adjust.
18783         * config/rs6000/7450.md: Adjust.
18784         * config/rs6000/7xx.md: Adjust.
18785         * config/rs6000/8540.md: Adjust.
18786         * config/rs6000/cell.md: Adjust.
18787         * config/rs6000/e300c2c3.md: Adjust.
18788         * config/rs6000/e500mc.md: Adjust.
18789         * config/rs6000/e500mc64.md: Adjust.
18790         * config/rs6000/e5500.md: Adjust.
18791         * config/rs6000/e6500.md: Adjust.
18792         * config/rs6000/mpc.md: Adjust.
18793         * config/rs6000/power4.md: Adjust.
18794         * config/rs6000/power5.md: Adjust.
18795         * config/rs6000/power6.md: Adjust.
18796         * config/rs6000/power7.md: Adjust.
18797         * config/rs6000/power8.md: Adjust.
18798         * config/rs6000/power9.md: Adjust.
18799         * config/rs6000/rs64.md: Adjust.
18800         * config/rs6000/titan.md: Adjust.
18802 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18804         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18805         ix86_indirect_branch_register logic.
18807 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18809         * config/i386/constraints.md (Bs): Update
18810         ix86_indirect_branch_register check.  Don't check
18811         ix86_indirect_branch_register with GOT_memory_operand.
18812         (Bw): Likewise.
18813         * config/i386/predicates.md (GOT_memory_operand): Don't check
18814         ix86_indirect_branch_register here.
18815         (GOT32_symbol_operand): Likewise.
18817 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18819         * config/i386/predicates.md (constant_call_address_operand):
18820         Rewrite ix86_indirect_branch_register logic.
18821         (sibcall_insn_operand): Likewise.
18823 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18825         * config/i386/constraints.md (Bs): Replace
18826         ix86_indirect_branch_thunk_register with
18827         ix86_indirect_branch_register.
18828         (Bw): Likewise.
18829         * config/i386/i386.md (indirect_jump): Likewise.
18830         (tablejump): Likewise.
18831         (*sibcall_memory): Likewise.
18832         (*sibcall_value_memory): Likewise.
18833         Peepholes of indirect call and jump via memory: Likewise.
18834         * config/i386/i386.opt: Likewise.
18835         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18836         (GOT_memory_operand): Likewise.
18837         (call_insn_operand): Likewise.
18838         (sibcall_insn_operand): Likewise.
18839         (GOT32_symbol_operand): Likewise.
18841 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18843         PR middle-end/83837
18844         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18845         type rather than type addr's type points to.
18846         (expand_omp_atomic_mutex): Likewise.
18847         (expand_omp_atomic): Likewise.
18849 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18851         PR target/83839
18852         * config/i386/i386.c (output_indirect_thunk_function): Use
18853         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18854         for  __x86_return_thunk.
18856 2018-01-15  Richard Biener  <rguenther@suse.de>
18858         PR middle-end/83850
18859         * expmed.c (extract_bit_field_1): Fix typo.
18861 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18863         PR target/83687
18864         * config/arm/iterators.md (VF): New mode iterator.
18865         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18866         Remove integer-related logic from pattern.
18867         (neon_vabd<mode>_3): Likewise.
18869 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18871         PR middle-end/82694
18872         * common.opt (fstrict-overflow): No longer an alias.
18873         (fwrapv-pointer): New option.
18874         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18875         also for pointer types based on flag_wrapv_pointer.
18876         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18877         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18878         opts->x_flag_wrapv got set.
18879         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18880         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18881         POINTER_TYPE_OVERFLOW_UNDEFINED.
18882         * match.pd: Likewise in address comparison pattern.
18883         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18885 2018-01-15  Richard Biener  <rguenther@suse.de>
18887         PR lto/83804
18888         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18889         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18890         Reset type names to their identifier if their TYPE_DECL doesn't
18891         have linkage (and thus is used for ODR and devirt).
18892         (save_debug_info_for_decl): Remove.
18893         (save_debug_info_for_type): Likewise.
18894         (add_tree_to_fld_list): Adjust.
18895         * tree-pretty-print.c (dump_generic_node): Make dumping of
18896         type names more robust.
18898 2018-01-15  Richard Biener  <rguenther@suse.de>
18900         * BASE-VER: Bump to 8.0.1.
18902 2018-01-14  Martin Sebor  <msebor@redhat.com>
18904         PR other/83508
18905         * builtins.c (check_access): Avoid warning when the no-warning bit
18906         is set.
18908 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18910         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18911         * ira-color (allocno_hard_regs_compare): Likewise.
18913 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18915         PR target/83013
18916         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18917         Use .pushsection/.popsection.
18919 2018-01-14  Martin Sebor  <msebor@redhat.com>
18921         PR c++/81327
18922         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18924 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18926         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18927         entry from extra_headers.
18928         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18929         extra_headers, make the list bitwise identical to the i?86-*-* one.
18931 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18933         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18934         -mcmodel=large with -mindirect-branch=thunk,
18935         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18936         -mfunction-return=thunk-extern.
18937         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18938         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18939         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18941 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18943         * config/i386/i386.c (print_reg): Print the name of the full
18944         integer register without '%'.
18945         (ix86_print_operand): Handle 'V'.
18946         * doc/extend.texi: Document 'V' modifier.
18948 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18950         * config/i386/constraints.md (Bs): Disallow memory operand for
18951         -mindirect-branch-register.
18952         (Bw): Likewise.
18953         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18954         (GOT_memory_operand): Likewise.
18955         (call_insn_operand): Likewise.
18956         (sibcall_insn_operand): Likewise.
18957         (GOT32_symbol_operand): Likewise.
18958         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18959         for -mindirect-branch-register.
18960         (tablejump): Likewise.
18961         (*sibcall_memory): Likewise.
18962         (*sibcall_value_memory): Likewise.
18963         Disallow peepholes of indirect call and jump via memory for
18964         -mindirect-branch-register.
18965         (*call_pop): Replace m with Bw.
18966         (*call_value_pop): Likewise.
18967         (*sibcall_pop_memory): Replace m with Bs.
18968         * config/i386/i386.opt (mindirect-branch-register): New option.
18969         * doc/invoke.texi: Document -mindirect-branch-register option.
18971 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18973         * config/i386/i386-protos.h (ix86_output_function_return): New.
18974         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18975         set function_return_type.
18976         (indirect_thunk_name): Add ret_p to indicate thunk for function
18977         return.
18978         (output_indirect_thunk_function): Pass false to
18979         indirect_thunk_name.
18980         (ix86_output_indirect_branch_via_reg): Likewise.
18981         (ix86_output_indirect_branch_via_push): Likewise.
18982         (output_indirect_thunk_function): Create alias for function
18983         return thunk if regno < 0.
18984         (ix86_output_function_return): New function.
18985         (ix86_handle_fndecl_attribute): Handle function_return.
18986         (ix86_attribute_table): Add function_return.
18987         * config/i386/i386.h (machine_function): Add
18988         function_return_type.
18989         * config/i386/i386.md (simple_return_internal): Use
18990         ix86_output_function_return.
18991         (simple_return_internal_long): Likewise.
18992         * config/i386/i386.opt (mfunction-return=): New option.
18993         (indirect_branch): Mention -mfunction-return=.
18994         * doc/extend.texi: Document function_return function attribute.
18995         * doc/invoke.texi: Document -mfunction-return= option.
18997 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18999         * config/i386/i386-opts.h (indirect_branch): New.
19000         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19001         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19002         with local indirect jump when converting indirect call and jump.
19003         (ix86_set_indirect_branch_type): New.
19004         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19005         (indirectlabelno): New.
19006         (indirect_thunk_needed): Likewise.
19007         (indirect_thunk_bnd_needed): Likewise.
19008         (indirect_thunks_used): Likewise.
19009         (indirect_thunks_bnd_used): Likewise.
19010         (INDIRECT_LABEL): Likewise.
19011         (indirect_thunk_name): Likewise.
19012         (output_indirect_thunk): Likewise.
19013         (output_indirect_thunk_function): Likewise.
19014         (ix86_output_indirect_branch_via_reg): Likewise.
19015         (ix86_output_indirect_branch_via_push): Likewise.
19016         (ix86_output_indirect_branch): Likewise.
19017         (ix86_output_indirect_jmp): Likewise.
19018         (ix86_code_end): Call output_indirect_thunk_function if needed.
19019         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19020         needed.
19021         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19022         (ix86_attribute_table): Add indirect_branch.
19023         * config/i386/i386.h (machine_function): Add indirect_branch_type
19024         and has_local_indirect_jump.
19025         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19026         to true.
19027         (tablejump): Likewise.
19028         (*indirect_jump): Use ix86_output_indirect_jmp.
19029         (*tablejump_1): Likewise.
19030         (simple_return_indirect_internal): Likewise.
19031         * config/i386/i386.opt (mindirect-branch=): New option.
19032         (indirect_branch): New.
19033         (keep): Likewise.
19034         (thunk): Likewise.
19035         (thunk-inline): Likewise.
19036         (thunk-extern): Likewise.
19037         * doc/extend.texi: Document indirect_branch function attribute.
19038         * doc/invoke.texi: Document -mindirect-branch= option.
19040 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19042         PR ipa/83051
19043         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19045 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19047         * ipa-inline.c (want_inline_small_function_p): Return false if
19048         inlining has already failed with CIF_FINAL_ERROR.
19049         (update_caller_keys): Call want_inline_small_function_p before
19050         can_inline_edge_p.
19051         (update_callee_keys): Likewise.
19053 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19055         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19056         New function.
19057         (rs6000_quadword_masked_address_p): Likewise.
19058         (quad_aligned_load_p): Likewise.
19059         (quad_aligned_store_p): Likewise.
19060         (const_load_sequence_p): Add comment to describe the outer-most loop.
19061         (mimic_memory_attributes_and_flags): New function.
19062         (rs6000_gen_stvx): Likewise.
19063         (replace_swapped_aligned_store): Likewise.
19064         (rs6000_gen_lvx): Likewise.
19065         (replace_swapped_aligned_load): Likewise.
19066         (replace_swapped_load_constant): Capitalize argument name in
19067         comment describing this function.
19068         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19069         and stores that access quad-word aligned addresses and replace
19070         with stvx or lvx instructions when appropriate.
19071         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19072         New function prototype.
19073         (rs6000_quadword_masked_address_p): Likewise.
19074         (rs6000_gen_lvx): Likewise.
19075         (rs6000_gen_stvx): Likewise.
19076         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19077         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19078         when memory address is aligned.
19079         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19080         this split to select lvx instruction when memory address is aligned.
19081         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19082         instruction when memory address is aligned.
19083         (*vsx_le_perm_load_v16qi): Likewise.
19084         (four unnamed splitters): Modify to select the stvx instruction
19085         when memory is aligned.
19087 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19089         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19090         which appears in the queue multiple times.
19092 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19093             Alan Hayward  <alan.hayward@arm.com>
19094             David Sherwood  <david.sherwood@arm.com>
19096         * tree-vectorizer.h (vec_lower_bound): New structure.
19097         (_loop_vec_info): Add check_nonzero and lower_bounds.
19098         (LOOP_VINFO_CHECK_NONZERO): New macro.
19099         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19100         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19101         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19102         fields.  Make seg_len the distance travelled, not including the
19103         access size.
19104         (dr_direction_indicator): Declare.
19105         (dr_zero_step_indicator): Likewise.
19106         (dr_known_forward_stride_p): Likewise.
19107         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19108         tree-ssanames.h.
19109         (runtime_alias_check_p): Allow runtime alias checks with
19110         variable strides.
19111         (operator ==): Compare access_size and align.
19112         (prune_runtime_alias_test_list): Rework for new distinction between
19113         the access_size and seg_len.
19114         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19115         segment lengths.
19116         (get_segment_min_max): New function.
19117         (create_intersect_range_checks): Use it.
19118         (dr_step_indicator): New function.
19119         (dr_direction_indicator): Likewise.
19120         (dr_zero_step_indicator): Likewise.
19121         (dr_known_forward_stride_p): Likewise.
19122         * tree-loop-distribution.c (data_ref_segment_size): Return
19123         DR_STEP * (niters - 1).
19124         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19125         constructor.
19126         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19127         (vect_preserves_scalar_order_p): New function, split out from...
19128         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19129         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19130         (vect_vfa_access_size): New function.
19131         (vect_vfa_align): Likewise.
19132         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19133         (dump_lower_bound): New function.
19134         (vect_check_lower_bound): Likewise.
19135         (vect_small_gap_p): Likewise.
19136         (vectorizable_with_step_bound_p): Likewise.
19137         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19138         depencies if the vectorization factor is 1.  Convert the checks
19139         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19140         a bunds check for variable steps if the minimum required step is
19141         relatively small. Update calls to the dr_with_seg_len
19142         constructor and to vect_compile_time_alias.
19143         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19144         function.
19145         (vect_loop_versioning): Call it.
19146         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19147         when retrying.
19148         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19150 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19151             Alan Hayward  <alan.hayward@arm.com>
19152             David Sherwood  <david.sherwood@arm.com>
19154         * doc/sourcebuild.texi (vect_scatter_store): Document.
19155         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19156         optabs.
19157         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19158         Document.
19159         * genopinit.c (main): Add supports_vec_scatter_store and
19160         supports_vec_scatter_store_cached to target_optabs.
19161         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19162         IFN_MASK_SCATTER_STORE.
19163         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19164         functions.
19165         * internal-fn.h (internal_store_fn_p): Declare.
19166         (internal_fn_stored_value_index): Likewise.
19167         * internal-fn.c (scatter_store_direct): New macro.
19168         (expand_scatter_store_optab_fn): New function.
19169         (direct_scatter_store_optab_supported_p): New macro.
19170         (internal_store_fn_p): New function.
19171         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19172         IFN_MASK_SCATTER_STORE.
19173         (internal_fn_mask_index): Likewise.
19174         (internal_fn_stored_value_index): New function.
19175         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19176         for scatter stores.
19177         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19178         * optabs-query.c (supports_vec_scatter_store_p): New function.
19179         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19180         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19181         true for scatter stores.
19182         (vect_gather_scatter_fn_p): Handle scatter stores too.
19183         (vect_check_gather_scatter): Consider using scatter stores if
19184         supports_vec_scatter_store_p.
19185         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19186         scatter stores too.
19187         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19188         internal_fn_stored_value_index.
19189         (check_load_store_masking): Handle scatter stores too.
19190         (vect_get_store_rhs): Make public.
19191         (vectorizable_call): Use internal_store_fn_p.
19192         (vectorizable_store): Handle scatter store internal functions.
19193         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19194         when deciding whether the end of the group has been reached.
19195         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19196         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19197         (mask_scatter_store<mode>): New insns.
19199 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19200             Alan Hayward  <alan.hayward@arm.com>
19201             David Sherwood  <david.sherwood@arm.com>
19203         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19204         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19205         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19206         function.
19207         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19208         Use vect_truncate_gather_scatter_offset if we can't treat the
19209         operation as a normal gather load or scatter store.
19210         (get_group_load_store_type): Take the gather_scatter_info
19211         as argument.  Try using a gather load or scatter store for
19212         single-element groups.
19213         (get_load_store_type): Update calls to get_group_load_store_type
19214         and vect_use_strided_gather_scatters_p.
19216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19217             Alan Hayward  <alan.hayward@arm.com>
19218             David Sherwood  <david.sherwood@arm.com>
19220         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19221         optional tree argument.
19222         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19223         null target hooks.
19224         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19225         but continue to use the current value as a fallback.
19226         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19227         to compare the updates.
19228         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19229         (get_load_store_type): Use it when handling a strided access.
19230         (vect_get_strided_load_store_ops): New function.
19231         (vect_get_data_ptr_increment): Likewise.
19232         (vectorizable_load): Handle strided gather loads.  Always pass
19233         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19235 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19236             Alan Hayward  <alan.hayward@arm.com>
19237             David Sherwood  <david.sherwood@arm.com>
19239         * doc/md.texi (gather_load@var{m}): Document.
19240         (mask_gather_load@var{m}): Likewise.
19241         * genopinit.c (main): Add supports_vec_gather_load and
19242         supports_vec_gather_load_cached to target_optabs.
19243         * optabs-tree.c (init_tree_optimization_optabs): Use
19244         ggc_cleared_alloc to allocate target_optabs.
19245         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19246         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19247         functions.
19248         * internal-fn.h (internal_load_fn_p): Declare.
19249         (internal_gather_scatter_fn_p): Likewise.
19250         (internal_fn_mask_index): Likewise.
19251         (internal_gather_scatter_fn_supported_p): Likewise.
19252         * internal-fn.c (gather_load_direct): New macro.
19253         (expand_gather_load_optab_fn): New function.
19254         (direct_gather_load_optab_supported_p): New macro.
19255         (direct_internal_fn_optab): New function.
19256         (internal_load_fn_p): Likewise.
19257         (internal_gather_scatter_fn_p): Likewise.
19258         (internal_fn_mask_index): Likewise.
19259         (internal_gather_scatter_fn_supported_p): Likewise.
19260         * optabs-query.c (supports_at_least_one_mode_p): New function.
19261         (supports_vec_gather_load_p): Likewise.
19262         * optabs-query.h (supports_vec_gather_load_p): Declare.
19263         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19264         and memory_type field.
19265         (NUM_PATTERNS): Bump to 15.
19266         * tree-vect-data-refs.c: Include internal-fn.h.
19267         (vect_gather_scatter_fn_p): New function.
19268         (vect_describe_gather_scatter_call): Likewise.
19269         (vect_check_gather_scatter): Try using internal functions for
19270         gather loads.  Recognize existing calls to a gather load function.
19271         (vect_analyze_data_refs): Consider using gather loads if
19272         supports_vec_gather_load_p.
19273         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19274         (vect_get_gather_scatter_offset_type): Likewise.
19275         (vect_convert_mask_for_vectype): Likewise.
19276         (vect_add_conversion_to_patterm): Likewise.
19277         (vect_try_gather_scatter_pattern): Likewise.
19278         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19279         (vect_vect_recog_func_ptrs): Add it.
19280         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19281         internal_fn_mask_index and internal_gather_scatter_fn_p.
19282         (check_load_store_masking): Take the gather_scatter_info as an
19283         argument and handle gather loads.
19284         (vect_get_gather_scatter_ops): New function.
19285         (vectorizable_call): Check internal_load_fn_p.
19286         (vectorizable_load): Likewise.  Handle gather load internal
19287         functions.
19288         (vectorizable_store): Update call to check_load_store_masking.
19289         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19290         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19291         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19292         (aarch64_gather_scale_operand_d): New predicates.
19293         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19294         (mask_gather_load<mode>): New insns.
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         * optabs.def (fold_left_plus_optab): New optab.
19301         * doc/md.texi (fold_left_plus_@var{m}): Document.
19302         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19303         * internal-fn.c (fold_left_direct): Define.
19304         (expand_fold_left_optab_fn): Likewise.
19305         (direct_fold_left_optab_supported_p): Likewise.
19306         * fold-const-call.c (fold_const_fold_left): New function.
19307         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19308         * tree-parloops.c (valid_reduction_p): New function.
19309         (gather_scalar_reductions): Use it.
19310         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19311         (vect_finish_replace_stmt): Declare.
19312         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19313         (needs_fold_left_reduction_p): New function, split out from...
19314         (vect_is_simple_reduction): ...here.  Accept reductions that
19315         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19316         (vect_force_simple_reduction): Also store the reduction type in
19317         the assignment's STMT_VINFO_REDUC_TYPE.
19318         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19319         (merge_with_identity): New function.
19320         (vect_expand_fold_left): Likewise.
19321         (vectorize_fold_left_reduction): Likewise.
19322         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19323         scalar phi in place for it.  Check for target support and reject
19324         cases that would reassociate the operation.  Defer the transform
19325         phase to vectorize_fold_left_reduction.
19326         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19327         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19328         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19330 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19332         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19333         call to ifc_temp_var.
19335 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19336             Alan Hayward  <alan.hayward@arm.com>
19337             David Sherwood  <david.sherwood@arm.com>
19339         * target.def (legitimize_address_displacement): Take the original
19340         offset as a poly_int.
19341         * targhooks.h (default_legitimize_address_displacement): Update
19342         accordingly.
19343         * targhooks.c (default_legitimize_address_displacement): Likewise.
19344         * doc/tm.texi: Regenerate.
19345         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19346         as an argument, moving assert of ad->disp == ad->disp_term to...
19347         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19348         Try calling targetm.legitimize_address_displacement before expanding
19349         the address rather than afterwards, and adjust for the new interface.
19350         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19351         Match the new hook interface.  Handle SVE addresses.
19352         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19353         new hook interface.
19355 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19357         * Makefile.in (OBJS): Add early-remat.o.
19358         * target.def (select_early_remat_modes): New hook.
19359         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19360         * doc/tm.texi: Regenerate.
19361         * targhooks.h (default_select_early_remat_modes): Declare.
19362         * targhooks.c (default_select_early_remat_modes): New function.
19363         * timevar.def (TV_EARLY_REMAT): New timevar.
19364         * passes.def (pass_early_remat): New pass.
19365         * tree-pass.h (make_pass_early_remat): Declare.
19366         * early-remat.c: New file.
19367         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19368         function.
19369         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19371 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19372             Alan Hayward  <alan.hayward@arm.com>
19373             David Sherwood  <david.sherwood@arm.com>
19375         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19376         vfm1 with a bound_epilog parameter.
19377         (vect_do_peeling): Update calls accordingly, and move the prologue
19378         call earlier in the function.  Treat the base bound_epilog as 0 for
19379         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19380         this base when peeling for gaps.
19381         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19382         with fully-masked loops.
19383         (vect_estimate_min_profitable_iters): Handle the single peeled
19384         iteration in that case.
19386 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19387             Alan Hayward  <alan.hayward@arm.com>
19388             David Sherwood  <david.sherwood@arm.com>
19390         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19391         single-element interleaving even if the size is not a power of 2.
19392         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19393         accesses for single-element interleaving if the group size is
19394         not a power of 2.
19396 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19397             Alan Hayward  <alan.hayward@arm.com>
19398             David Sherwood  <david.sherwood@arm.com>
19400         * doc/md.texi (fold_extract_last_@var{m}): Document.
19401         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19402         * optabs.def (fold_extract_last_optab): New optab.
19403         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19404         * internal-fn.c (fold_extract_direct): New macro.
19405         (expand_fold_extract_optab_fn): Likewise.
19406         (direct_fold_extract_optab_supported_p): Likewise.
19407         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19408         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19409         EXTRACT_LAST_REDUCTION.
19410         (get_initial_def_for_reduction): Do not create an initial vector
19411         for EXTRACT_LAST_REDUCTION reductions.
19412         (vectorizable_reduction): Leave the scalar phi in place for
19413         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19414         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19415         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19416         transform phase to vectorizable_condition.
19417         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19418         split out from...
19419         (vect_finish_stmt_generation): ...here.
19420         (vect_finish_replace_stmt): New function.
19421         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19422         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19423         pattern.
19424         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19427             Alan Hayward  <alan.hayward@arm.com>
19428             David Sherwood  <david.sherwood@arm.com>
19430         * doc/md.texi (extract_last_@var{m}): Document.
19431         * optabs.def (extract_last_optab): New optab.
19432         * internal-fn.def (EXTRACT_LAST): New internal function.
19433         * internal-fn.c (cond_unary_direct): New macro.
19434         (expand_cond_unary_optab_fn): Likewise.
19435         (direct_cond_unary_optab_supported_p): Likewise.
19436         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19437         loops using EXTRACT_LAST.
19438         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19439         (extract_last_<mode>): ...this optab.
19440         (vec_extract<mode><Vel>): Update accordingly.
19442 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19443             Alan Hayward  <alan.hayward@arm.com>
19444             David Sherwood  <david.sherwood@arm.com>
19446         * target.def (empty_mask_is_expensive): New hook.
19447         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19448         * doc/tm.texi: Regenerate.
19449         * targhooks.h (default_empty_mask_is_expensive): Declare.
19450         * targhooks.c (default_empty_mask_is_expensive): New function.
19451         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19452         if the target says that empty masks are expensive.
19453         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19454         New function.
19455         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19457 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19458             Alan Hayward  <alan.hayward@arm.com>
19459             David Sherwood  <david.sherwood@arm.com>
19461         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19462         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19463         (vect_use_loop_mask_for_alignment_p): New function.
19464         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19465         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19466         niters_skip argument.  Make sure that the first niters_skip elements
19467         of the first iteration are inactive.
19468         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19469         Update call to vect_set_loop_masks_directly.
19470         (get_misalign_in_elems): New function, split out from...
19471         (vect_gen_prolog_loop_niters): ...here.
19472         (vect_update_init_of_dr): Take a code argument that specifies whether
19473         the adjustment should be added or subtracted.
19474         (vect_update_init_of_drs): Likewise.
19475         (vect_prepare_for_masked_peels): New function.
19476         (vect_do_peeling): Skip prologue peeling if we're using a mask
19477         instead.  Update call to vect_update_inits_of_drs.
19478         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19479         mask_skip_niters.
19480         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19481         alignment.  Do not include the number of peeled iterations in
19482         the minimum threshold in that case.
19483         (vectorizable_induction): Adjust the start value down by
19484         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19485         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19486         Take the number of skipped iterations into account when calculating
19487         the loop bounds.
19488         * tree-vect-stmts.c (vect_gen_while_not): New function.
19490 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19491             Alan Hayward  <alan.hayward@arm.com>
19492             David Sherwood  <david.sherwood@arm.com>
19494         * doc/sourcebuild.texi (vect_fully_masked): Document.
19495         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19496         default value to 0.
19497         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19498         split out from...
19499         (vect_analyze_loop_2): ...here. Don't check the vectorization
19500         factor against the number of loop iterations if the loop is
19501         fully-masked.
19503 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19504             Alan Hayward  <alan.hayward@arm.com>
19505             David Sherwood  <david.sherwood@arm.com>
19507         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19508         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19509         (dump_groups): Update accordingly.
19510         (iv_use::mem_type): New member variable.
19511         (address_p): New function.
19512         (record_use): Add a mem_type argument and initialize the new
19513         mem_type field.
19514         (record_group_use): Add a mem_type argument.  Use address_p.
19515         Remove obsolete null checks of base_object.  Update call to record_use.
19516         (find_interesting_uses_op): Update call to record_group_use.
19517         (find_interesting_uses_cond): Likewise.
19518         (find_interesting_uses_address): Likewise.
19519         (get_mem_type_for_internal_fn): New function.
19520         (find_address_like_use): Likewise.
19521         (find_interesting_uses_stmt): Try find_address_like_use before
19522         calling find_interesting_uses_op.
19523         (addr_offset_valid_p): Use the iv mem_type field as the type
19524         of the addressed memory.
19525         (add_autoinc_candidates): Likewise.
19526         (get_address_cost): Likewise.
19527         (split_small_address_groups_p): Use address_p.
19528         (split_address_groups): Likewise.
19529         (add_iv_candidate_for_use): Likewise.
19530         (autoinc_possible_for_pair): Likewise.
19531         (rewrite_groups): Likewise.
19532         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19533         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19534         (get_alias_ptr_type_for_ptr_address): New function.
19535         (rewrite_use_address): Rewrite address uses in calls that were
19536         identified by find_address_like_use.
19538 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19539             Alan Hayward  <alan.hayward@arm.com>
19540             David Sherwood  <david.sherwood@arm.com>
19542         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19543         TARGET_MEM_REFs.
19544         * gimple-expr.h (is_gimple_addressable: Likewise.
19545         * gimple-expr.c (is_gimple_address): Likewise.
19546         * internal-fn.c (expand_call_mem_ref): New function.
19547         (expand_mask_load_optab_fn): Use it.
19548         (expand_mask_store_optab_fn): Likewise.
19550 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19551             Alan Hayward  <alan.hayward@arm.com>
19552             David Sherwood  <david.sherwood@arm.com>
19554         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19555         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19556         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19557         (cond_umax@var{mode}): Document.
19558         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19559         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19560         (cond_umin_optab, cond_umax_optab): New optabs.
19561         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19562         (COND_IOR, COND_XOR): New internal functions.
19563         * internal-fn.h (get_conditional_internal_fn): Declare.
19564         * internal-fn.c (cond_binary_direct): New macro.
19565         (expand_cond_binary_optab_fn): Likewise.
19566         (direct_cond_binary_optab_supported_p): Likewise.
19567         (get_conditional_internal_fn): New function.
19568         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19569         Cope with reduction statements that are vectorized as calls rather
19570         than assignments.
19571         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19572         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19573         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19574         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19575         (UNSPEC_COND_EOR): New unspecs.
19576         (optab): Add mappings for them.
19577         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19578         (sve_int_op, sve_fp_op): New int attributes.
19580 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19581             Alan Hayward  <alan.hayward@arm.com>
19582             David Sherwood  <david.sherwood@arm.com>
19584         * optabs.def (while_ult_optab): New optab.
19585         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19586         * internal-fn.def (WHILE_ULT): New internal function.
19587         * internal-fn.h (direct_internal_fn_supported_p): New override
19588         that takes two types as argument.
19589         * internal-fn.c (while_direct): New macro.
19590         (expand_while_optab_fn): New function.
19591         (convert_optab_supported_p): Likewise.
19592         (direct_while_optab_supported_p): New macro.
19593         * wide-int.h (wi::udiv_ceil): New function.
19594         * tree-vectorizer.h (rgroup_masks): New structure.
19595         (vec_loop_masks): New typedef.
19596         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19597         and fully_masked_p.
19598         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19599         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19600         (vect_max_vf): New function.
19601         (slpeel_make_loop_iterate_ntimes): Delete.
19602         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19603         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19604         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19605         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19606         internal-fn.h, stor-layout.h and optabs-query.h.
19607         (vect_set_loop_mask): New function.
19608         (add_preheader_seq): Likewise.
19609         (add_header_seq): Likewise.
19610         (interleave_supported_p): Likewise.
19611         (vect_maybe_permute_loop_masks): Likewise.
19612         (vect_set_loop_masks_directly): Likewise.
19613         (vect_set_loop_condition_masked): Likewise.
19614         (vect_set_loop_condition_unmasked): New function, split out from
19615         slpeel_make_loop_iterate_ntimes.
19616         (slpeel_make_loop_iterate_ntimes): Rename to..
19617         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19618         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19619         (vect_do_peeling): Update call accordingly.
19620         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19621         loops.
19622         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19623         mask_compare_type, can_fully_mask_p and fully_masked_p.
19624         (release_vec_loop_masks): New function.
19625         (_loop_vec_info): Use it to free the loop masks.
19626         (can_produce_all_loop_masks_p): New function.
19627         (vect_get_max_nscalars_per_iter): Likewise.
19628         (vect_verify_full_masking): Likewise.
19629         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19630         retries, and free the mask rgroups before retrying.  Check loop-wide
19631         reasons for disallowing fully-masked loops.  Make the final decision
19632         about whether use a fully-masked loop or not.
19633         (vect_estimate_min_profitable_iters): Do not assume that peeling
19634         for the number of iterations will be needed for fully-masked loops.
19635         (vectorizable_reduction): Disable fully-masked loops.
19636         (vectorizable_live_operation): Likewise.
19637         (vect_halve_mask_nunits): New function.
19638         (vect_double_mask_nunits): Likewise.
19639         (vect_record_loop_mask): Likewise.
19640         (vect_get_loop_mask): Likewise.
19641         (vect_transform_loop): Handle the case in which the final loop
19642         iteration might handle a partial vector.  Call vect_set_loop_condition
19643         instead of slpeel_make_loop_iterate_ntimes.
19644         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19645         (check_load_store_masking): New function.
19646         (prepare_load_store_mask): Likewise.
19647         (vectorizable_store): Handle fully-masked loops.
19648         (vectorizable_load): Likewise.
19649         (supportable_widening_operation): Use vect_halve_mask_nunits for
19650         booleans.
19651         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19652         (vect_gen_while): New function.
19653         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19654         (aarch64_uqdec<mode>): New insn.
19656 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19657             Alan Hayward  <alan.hayward@arm.com>
19658             David Sherwood  <david.sherwood@arm.com>
19660         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19661         (reduc_xor_scal_optab): New optabs.
19662         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19663         (reduc_xor_scal_@var{m}): Document.
19664         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19665         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19666         internal functions.
19667         * fold-const-call.c (fold_const_call): Handle them.
19668         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19669         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19670         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19671         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19672         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19673         (UNSPEC_XORV): New unspecs.
19674         (optab): Add entries for them.
19675         (BITWISEV): New int iterator.
19676         (bit_reduc_op): New int attributes.
19678 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19679             Alan Hayward  <alan.hayward@arm.com>
19680             David Sherwood  <david.sherwood@arm.com>
19682         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19683         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19684         * optabs.def (vec_shl_insert_optab): New optab.
19685         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19686         (duplicate_and_interleave): Likewise.
19687         * tree-vect-loop.c: Include internal-fn.h.
19688         (neutral_op_for_slp_reduction): New function, split out from
19689         get_initial_defs_for_reduction.
19690         (get_initial_def_for_reduction): Handle option 2 for variable-length
19691         vectors by loading the neutral value into a vector and then shifting
19692         the initial value into element 0.
19693         (get_initial_defs_for_reduction): Replace the code argument with
19694         the neutral value calculated by neutral_op_for_slp_reduction.
19695         Use gimple_build_vector for constant-length vectors.
19696         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19697         but the first group_size elements have a neutral value.
19698         Use duplicate_and_interleave otherwise.
19699         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19700         Update call to get_initial_defs_for_reduction.  Handle SLP
19701         reductions for variable-length vectors by creating one vector
19702         result for each scalar result, with the elements associated
19703         with other scalar results stubbed out with the neutral value.
19704         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19705         Require IFN_VEC_SHL_INSERT for double reductions on
19706         variable-length vectors, or SLP reductions that have
19707         a neutral value.  Require can_duplicate_and_interleave_p
19708         support for variable-length unchained SLP reductions if there
19709         is no neutral value, such as for MIN/MAX reductions.  Also require
19710         the number of vector elements to be a multiple of the number of
19711         SLP statements when doing variable-length unchained SLP reductions.
19712         Update call to vect_create_epilog_for_reduction.
19713         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19714         and remove initial values.
19715         (duplicate_and_interleave): Make public.
19716         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19717         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19719 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19720             Alan Hayward  <alan.hayward@arm.com>
19721             David Sherwood  <david.sherwood@arm.com>
19723         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19724         (can_duplicate_and_interleave_p): New function.
19725         (vect_get_and_check_slp_defs): Take the vector of statements
19726         rather than just the current one.  Remove excess parentheses.
19727         Restriction rejectinon of vect_constant_def and vect_external_def
19728         for variable-length vectors to boolean types, or types for which
19729         can_duplicate_and_interleave_p is false.
19730         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19731         (duplicate_and_interleave): New function.
19732         (vect_get_constant_vectors): Use gimple_build_vector for
19733         constant-length vectors and suitable variable-length constant
19734         vectors.  Use duplicate_and_interleave for other variable-length
19735         vectors.  Don't defer the update when inserting new statements.
19737 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19738             Alan Hayward  <alan.hayward@arm.com>
19739             David Sherwood  <david.sherwood@arm.com>
19741         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19742         min_profitable_iters doesn't go negative.
19744 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19745             Alan Hayward  <alan.hayward@arm.com>
19746             David Sherwood  <david.sherwood@arm.com>
19748         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19749         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19750         * optabs.def (vec_mask_load_lanes_optab): New optab.
19751         (vec_mask_store_lanes_optab): Likewise.
19752         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19753         (MASK_STORE_LANES): Likewise.
19754         * internal-fn.c (mask_load_lanes_direct): New macro.
19755         (mask_store_lanes_direct): Likewise.
19756         (expand_mask_load_optab_fn): Handle masked operations.
19757         (expand_mask_load_lanes_optab_fn): New macro.
19758         (expand_mask_store_optab_fn): Handle masked operations.
19759         (expand_mask_store_lanes_optab_fn): New macro.
19760         (direct_mask_load_lanes_optab_supported_p): Likewise.
19761         (direct_mask_store_lanes_optab_supported_p): Likewise.
19762         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19763         parameter.
19764         (vect_load_lanes_supported): Likewise.
19765         * tree-vect-data-refs.c (strip_conversion): New function.
19766         (can_group_stmts_p): Likewise.
19767         (vect_analyze_data_ref_accesses): Use it instead of checking
19768         for a pair of assignments.
19769         (vect_store_lanes_supported): Take a masked_p parameter.
19770         (vect_load_lanes_supported): Likewise.
19771         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19772         vect_store_lanes_supported and vect_load_lanes_supported.
19773         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19774         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19775         parameter.  Don't allow gaps for masked accesses.
19776         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19777         and vect_load_lanes_supported.
19778         (get_load_store_type): Take a masked_p parameter and update
19779         call to get_group_load_store_type.
19780         (vectorizable_store): Update call to get_load_store_type.
19781         Handle IFN_MASK_STORE_LANES.
19782         (vectorizable_load): Update call to get_load_store_type.
19783         Handle IFN_MASK_LOAD_LANES.
19785 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19786             Alan Hayward  <alan.hayward@arm.com>
19787             David Sherwood  <david.sherwood@arm.com>
19789         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19790         modes for SVE.
19791         * config/aarch64/aarch64-protos.h
19792         (aarch64_sve_struct_memory_operand_p): Declare.
19793         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19794         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19795         (VPRED, vpred): Handle SVE structure modes.
19796         * config/aarch64/constraints.md (Utx): New constraint.
19797         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19798         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19799         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19800         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19801         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19802         structure modes.  Split into pieces after RA.
19803         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19804         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19805         New patterns.
19806         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19807         SVE structure modes.
19808         (aarch64_classify_address): Likewise.
19809         (sizetochar): Move earlier in file.
19810         (aarch64_print_operand): Handle SVE register lists.
19811         (aarch64_array_mode): New function.
19812         (aarch64_sve_struct_memory_operand_p): Likewise.
19813         (TARGET_ARRAY_MODE): Redefine.
19815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19816             Alan Hayward  <alan.hayward@arm.com>
19817             David Sherwood  <david.sherwood@arm.com>
19819         * target.def (array_mode): New target hook.
19820         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19821         * doc/tm.texi: Regenerate.
19822         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19823         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19824         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19825         targetm.array_mode.
19826         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19827         type sizes.
19829 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19830             Alan Hayward  <alan.hayward@arm.com>
19831             David Sherwood  <david.sherwood@arm.com>
19833         * fold-const.c (fold_binary_loc): Check the argument types
19834         rather than the result type when testing for a vector operation.
19836 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19838         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19839         * doc/tm.texi: Regenerate.
19841 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19842             Alan Hayward  <alan.hayward@arm.com>
19843             David Sherwood  <david.sherwood@arm.com>
19845         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19846         (sve): Document new AArch64 extension.
19847         * doc/md.texi (w): Extend the description of the AArch64
19848         constraint to include SVE vectors.
19849         (Upl, Upa): Document new AArch64 predicate constraints.
19850         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19851         enum.
19852         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19853         (msve-vector-bits=): New option.
19854         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19855         SVE when these are disabled.
19856         (sve): New extension.
19857         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19858         modes.  Adjust their number of units based on aarch64_sve_vg.
19859         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19860         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19861         aarch64_addr_query_type.
19862         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19863         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19864         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19865         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19866         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19867         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19868         (aarch64_simd_imm_zero_p): Delete.
19869         (aarch64_check_zero_based_sve_index_immediate): Declare.
19870         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19871         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19872         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19873         (aarch64_sve_float_mul_immediate_p): Likewise.
19874         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19875         rather than an rtx.
19876         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19877         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19878         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19879         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19880         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19881         (aarch64_regmode_natural_size): Likewise.
19882         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19883         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19884         left one place.
19885         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19886         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19887         for VG and the SVE predicate registers.
19888         (V_ALIASES): Add a "z"-prefixed alias.
19889         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19890         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19891         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19892         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19893         (REG_CLASS_NAMES): Add entries for them.
19894         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19895         and the predicate registers.
19896         (aarch64_sve_vg): Declare.
19897         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19898         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19899         (REGMODE_NATURAL_SIZE): Define.
19900         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19901         SVE macros.
19902         * config/aarch64/aarch64.c: Include cfgrtl.h.
19903         (simd_immediate_info): Add a constructor for series vectors,
19904         and an associated step field.
19905         (aarch64_sve_vg): New variable.
19906         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19907         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19908         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19909         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19910         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19911         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19912         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19913         (aarch64_get_mask_mode): New functions.
19914         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19915         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19916         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19917         predicate modes and predicate registers.  Explicitly restrict
19918         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19919         to store a vector mode if it is recognized by
19920         aarch64_classify_vector_mode.
19921         (aarch64_regmode_natural_size): New function.
19922         (aarch64_hard_regno_caller_save_mode): Return the original mode
19923         for predicates.
19924         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19925         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19926         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19927         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19928         functions.
19929         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19930         does not overlap dest if the function is frame-related.  Handle
19931         SVE constants.
19932         (aarch64_split_add_offset): New function.
19933         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19934         them aarch64_add_offset.
19935         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19936         and update call to aarch64_sub_sp.
19937         (aarch64_add_cfa_expression): New function.
19938         (aarch64_expand_prologue): Pass extra temporary registers to the
19939         functions above.  Handle the case in which we need to emit new
19940         DW_CFA_expressions for registers that were originally saved
19941         relative to the stack pointer, but now have to be expressed
19942         relative to the frame pointer.
19943         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19944         functions above.
19945         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19946         IP0 and IP1 values for SVE frames.
19947         (aarch64_expand_vec_series): New function.
19948         (aarch64_expand_sve_widened_duplicate): Likewise.
19949         (aarch64_expand_sve_const_vector): Likewise.
19950         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19951         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19952         into the register, rather than emitting a SET directly.
19953         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19954         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19955         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19956         (offset_9bit_signed_scaled_p): New functions.
19957         (aarch64_replicate_bitmask_imm): New function.
19958         (aarch64_bitmask_imm): Use it.
19959         (aarch64_cannot_force_const_mem): Reject expressions involving
19960         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19961         (aarch64_classify_index): Handle SVE indices, by requiring
19962         a plain register index with a scale that matches the element size.
19963         (aarch64_classify_address): Handle SVE addresses.  Assert that
19964         the mode of the address is VOIDmode or an integer mode.
19965         Update call to aarch64_classify_symbol.
19966         (aarch64_classify_symbolic_expression): Update call to
19967         aarch64_classify_symbol.
19968         (aarch64_const_vec_all_in_range_p): New function.
19969         (aarch64_print_vector_float_operand): Likewise.
19970         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19971         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19972         and the FP immediates 1.0 and 0.5.
19973         (aarch64_print_address_internal): Handle SVE addresses.
19974         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19975         (aarch64_regno_regclass): Handle predicate registers.
19976         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19977         data modes.
19978         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19979         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19980         (aarch64_convert_sve_vector_bits): New function.
19981         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19982         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19983         rather than an rtx.
19984         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19985         Handle SVE vector and predicate modes.  Accept VL-based constants
19986         that need only one temporary register, and VL offsets that require
19987         no temporary registers.
19988         (aarch64_conditional_register_usage): Mark the predicate registers
19989         as fixed if SVE isn't available.
19990         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19991         Return true for SVE vector and predicate modes.
19992         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19993         rather than an unsigned int.  Handle SVE modes.
19994         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19995         SVE modes.
19996         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19997         if SVE is enabled.
19998         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19999         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20000         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20001         (aarch64_sve_float_mul_immediate_p): New functions.
20002         (aarch64_sve_valid_immediate): New function.
20003         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20004         Explicitly reject structure modes.  Check for INDEX constants.
20005         Handle PTRUE and PFALSE constants.
20006         (aarch64_check_zero_based_sve_index_immediate): New function.
20007         (aarch64_simd_imm_zero_p): Delete.
20008         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20009         vector modes.  Accept constants in the range of CNT[BHWD].
20010         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20011         ask for an Advanced SIMD mode.
20012         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20013         (aarch64_simd_vector_alignment): Handle SVE predicates.
20014         (aarch64_vectorize_preferred_vector_alignment): New function.
20015         (aarch64_simd_vector_alignment_reachable): Use it instead of
20016         the vector size.
20017         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20018         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20019         functions.
20020         (MAX_VECT_LEN): Delete.
20021         (expand_vec_perm_d): Add a vec_flags field.
20022         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20023         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20024         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20025         for SVE modes.
20026         (aarch64_evpc_rev): Rename to...
20027         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20028         (aarch64_evpc_rev_global): New function.
20029         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20030         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20031         MAX_VECT_LEN.
20032         (aarch64_evpc_sve_tbl): New function.
20033         (aarch64_expand_vec_perm_const_1): Update after rename of
20034         aarch64_evpc_rev.  Handle SVE permutes too, trying
20035         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20036         than aarch64_evpc_tbl.
20037         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20038         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20039         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20040         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20041         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20042         (aarch64_expand_sve_vcond): New functions.
20043         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20044         of aarch64_vector_mode_p.
20045         (aarch64_dwarf_poly_indeterminate_value): New function.
20046         (aarch64_compute_pressure_classes): Likewise.
20047         (aarch64_can_change_mode_class): Likewise.
20048         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20049         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20050         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20051         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20052         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20053         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20054         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20055         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20056         constraints.
20057         (Dn, Dl, Dr): Accept const as well as const_vector.
20058         (Dz): Likewise.  Compare against CONST0_RTX.
20059         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20060         of "vector" where appropriate.
20061         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20062         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20063         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20064         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20065         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20066         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20067         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20068         (v_int_equiv): Extend to SVE modes.
20069         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20070         mode attributes.
20071         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20072         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20073         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20074         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20075         (SVE_COND_FP_CMP): New int iterators.
20076         (perm_hilo): Handle the new unpack unspecs.
20077         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20078         attributes.
20079         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20080         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20081         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20082         (aarch64_equality_operator, aarch64_constant_vector_operand)
20083         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20084         (aarch64_sve_nonimmediate_operand): Likewise.
20085         (aarch64_sve_general_operand): Likewise.
20086         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20087         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20088         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20089         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20090         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20091         (aarch64_sve_float_arith_immediate): Likewise.
20092         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20093         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20094         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20095         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20096         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20097         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20098         (aarch64_sve_float_arith_operand): Likewise.
20099         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20100         (aarch64_sve_float_mul_operand): Likewise.
20101         (aarch64_sve_vec_perm_operand): Likewise.
20102         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20103         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20104         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20105         as well as const_vector.
20106         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20107         in file.  Use CONST0_RTX and CONSTM1_RTX.
20108         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20109         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20110         Use aarch64_simd_imm_zero.
20111         * config/aarch64/aarch64-sve.md: New file.
20112         * config/aarch64/aarch64.md: Include it.
20113         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20114         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20115         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20116         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20117         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20118         (sve): New attribute.
20119         (enabled): Disable instructions with the sve attribute unless
20120         TARGET_SVE.
20121         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20122         aarch64_expand_mov_immediate.
20123         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20124         CNT[BHSD] immediates.
20125         (movti): Split CONST_POLY_INT moves into two halves.
20126         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20127         Split additions that need a temporary here if the destination
20128         is the stack pointer.
20129         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20130         (*add<mode>3_poly_1): New instruction.
20131         (set_clobber_cc): New expander.
20133 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20135         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20136         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20137         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20138         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20139         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20140         Change innermode from fixed_mode_size to machine_mode.
20141         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20142         subreg of a variable-length CONST_VECTOR.
20144 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20145             Alan Hayward  <alan.hayward@arm.com>
20146             David Sherwood  <david.sherwood@arm.com>
20148         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20149         (add_offset_to_base): New function, split out from...
20150         (create_mem_ref): ...here.  When handling a scale other than 1,
20151         check first whether the address is valid without the offset.
20152         Add it into the base if so, leaving the index and scale as-is.
20154 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20156         PR c++/83778
20157         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20158         fold_for_warn before checking if arg2 is INTEGER_CST.
20160 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20162         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20163         (store_multiple_operation): Delete.
20164         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20165         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20166         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20167         guarded by TARGET_STRING.
20168         (rs6000_output_load_multiple): Delete.
20169         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20170         OPTION_MASK_STRING / TARGET_STRING handling.
20171         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20172         (const rs6000_opt_masks) <"string">: Change mask to 0.
20173         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20174         (MASK_STRING): Delete.
20175         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20176         parts.  Simplify.
20177         (load_multiple): Delete.
20178         (*ldmsi8): Delete.
20179         (*ldmsi7): Delete.
20180         (*ldmsi6): Delete.
20181         (*ldmsi5): Delete.
20182         (*ldmsi4): Delete.
20183         (*ldmsi3): Delete.
20184         (store_multiple): Delete.
20185         (*stmsi8): Delete.
20186         (*stmsi7): Delete.
20187         (*stmsi6): Delete.
20188         (*stmsi5): Delete.
20189         (*stmsi4): Delete.
20190         (*stmsi3): Delete.
20191         (movmemsi_8reg): Delete.
20192         (corresponding unnamed define_insn): Delete.
20193         (movmemsi_6reg): Delete.
20194         (corresponding unnamed define_insn): Delete.
20195         (movmemsi_4reg): Delete.
20196         (corresponding unnamed define_insn): Delete.
20197         (movmemsi_2reg): Delete.
20198         (corresponding unnamed define_insn): Delete.
20199         (movmemsi_1reg): Delete.
20200         (corresponding unnamed define_insn): Delete.
20201         * config/rs6000/rs6000.opt (mno-string): New.
20202         (mstring): Replace by deprecation warning stub.
20203         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20205 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20207         * regrename.c (regrename_do_replace): If replacing the same
20208         reg multiple times, try to reuse last created gen_raw_REG.
20210         PR debug/81155
20211         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20212         main to workaround a bug in GDB.
20214 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20216         PR target/83737
20217         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20219 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20221         PR rtl-optimization/80481
20222         * ira-color.c (get_cap_member): New function.
20223         (allocnos_conflict_by_live_ranges_p): Use it.
20224         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20225         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20227 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20229         PR target/83628
20230         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20231         (*saddl_se_1): Ditto.
20232         (*ssubsi_1): Ditto.
20233         (*ssubl_se_1): Ditto.
20235 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20237         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20238         rather than wi::to_widest for DR_INITs.
20239         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20240         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20241         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20242         INTEGER_CSTs.
20243         (vect_analyze_group_access_1): Note that here.
20245 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20247         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20248         polynomial type sizes.
20250 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20252         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20253         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20254         (gimple_add_tmp_var): Likewise.
20256 2018-01-12  Martin Liska  <mliska@suse.cz>
20258         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20259         (gimple_alloc_sizes): Likewise.
20260         (dump_gimple_statistics): Use PRIu64 in printf format.
20261         * gimple.h: Change uint64_t to int.
20263 2018-01-12  Martin Liska  <mliska@suse.cz>
20265         * tree-core.h: Use uint64_t instead of int.
20266         * tree.c (tree_node_counts): Likewise.
20267         (tree_node_sizes): Likewise.
20268         (dump_tree_statistics): Use PRIu64 in printf format.
20270 2018-01-12  Martin Liska  <mliska@suse.cz>
20272         * Makefile.in: As qsort_chk is implemented in vec.c, add
20273         vec.o to linkage of gencfn-macros.
20274         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20275         passing the info to record_node_allocation_statistics.
20276         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20277         and pass the info.
20278         * ggc-common.c (struct ggc_usage): Add operator== and use
20279         it in operator< and compare function.
20280         * mem-stats.h (struct mem_usage): Likewise.
20281         * vec.c (struct vec_usage): Remove operator< and compare
20282         function. Can be simply inherited.
20284 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20286         PR target/81616
20287         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20288         * tree-ssa-math-opts.c: Include domwalk.h.
20289         (convert_mult_to_fma_1): New function.
20290         (fma_transformation_info): New type.
20291         (fma_deferring_state): Likewise.
20292         (cancel_fma_deferring): New function.
20293         (result_of_phi): Likewise.
20294         (last_fma_candidate_feeds_initial_phi): Likewise.
20295         (convert_mult_to_fma): Added deferring logic, split actual
20296         transformation to convert_mult_to_fma_1.
20297         (math_opts_dom_walker): New type.
20298         (math_opts_dom_walker::after_dom_children): New method, body moved
20299         here from pass_optimize_widening_mul::execute, added deferring logic
20300         bits.
20301         (pass_optimize_widening_mul::execute): Moved most of code to
20302         math_opts_dom_walker::after_dom_children.
20303         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20304         * config/i386/i386.c (ix86_option_override_internal): Added
20305         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20307 2018-01-12  Richard Biener  <rguenther@suse.de>
20309         PR debug/83157
20310         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20311         inline instance vars.
20313 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20315         PR target/81819
20316         * config/rx/rx.c (rx_is_restricted_memory_address):
20317         Handle SUBREG case.
20319 2018-01-12  Richard Biener  <rguenther@suse.de>
20321         PR tree-optimization/80846
20322         * target.def (split_reduction): New target hook.
20323         * targhooks.c (default_split_reduction): New function.
20324         * targhooks.h (default_split_reduction): Declare.
20325         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20326         target requests first reduce vectors by combining low and high
20327         parts.
20328         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20329         (get_vectype_for_scalar_type_and_size): Export.
20330         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20331         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20332         * doc/tm.texi: Regenerate.
20333         * config/i386/i386.c (ix86_split_reduction): Implement
20334         TARGET_VECTORIZE_SPLIT_REDUCTION.
20336 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20338         PR target/83368
20339         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20340         in PIC mode except for TARGET_VXWORKS_RTP.
20341         * config/sparc/sparc.c: Include cfgrtl.h.
20342         (TARGET_INIT_PIC_REG): Define.
20343         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20344         (sparc_pic_register_p): New predicate.
20345         (sparc_legitimate_address_p): Use it.
20346         (sparc_legitimize_pic_address): Likewise.
20347         (sparc_delegitimize_address): Likewise.
20348         (sparc_mode_dependent_address_p): Likewise.
20349         (gen_load_pcrel_sym): Remove 4th parameter.
20350         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20351         (sparc_expand_prologue): Do not call load_got_register here.
20352         (sparc_flat_expand_prologue): Likewise.
20353         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20354         (sparc_use_pseudo_pic_reg): New function.
20355         (sparc_init_pic_reg): Likewise.
20356         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20357         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20359 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20361         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20362         Add item for branch_cost.
20364 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20366         PR rtl-optimization/83565
20367         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20368         not extend the result to a larger mode for rotate operations.
20369         (num_sign_bit_copies1): Likewise.
20371 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20373         PR target/40411
20374         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20375         -symbolic.
20376         Use values-Xc.o for -pedantic.
20377         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20379 2018-01-12  Martin Liska  <mliska@suse.cz>
20381         PR ipa/83054
20382         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20383         New function.
20384         (possible_polymorphic_call_targets): Use it.
20385         (ipa_devirt): Likewise.
20387 2018-01-12  Martin Liska  <mliska@suse.cz>
20389         * profile-count.h (enum profile_quality): Use 0 as invalid
20390         enum value of profile_quality.
20392 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20394         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20395         -mext-string options.
20397 2018-01-12  Richard Biener  <rguenther@suse.de>
20399         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20400         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20401         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20402         Likewise.
20403         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20405 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20407         * configure.ac (--with-long-double-format): Add support for the
20408         configuration option to change the default long double format on
20409         PowerPC systems.
20410         * config.gcc (powerpc*-linux*-*): Likewise.
20411         * configure: Regenerate.
20412         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20413         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20414         used without modification.
20416 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20418         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20419         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20420         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20421         MISC_BUILTIN_SPEC_BARRIER.
20422         (rs6000_init_builtins): Likewise.
20423         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20424         enum value.
20425         (speculation_barrier): New define_insn.
20426         * doc/extend.texi: Document __builtin_speculation_barrier.
20428 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20430         PR target/83203
20431         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20432         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20433         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20434         iterators.
20435         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20436         integral modes instead of "ss" and "sd".
20437         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20438         vectors with 32-bit and 64-bit elements.
20439         (vecdupssescalarmodesuffix): New mode attribute.
20440         (vec_dup<mode>): Use it.
20442 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20444         PR target/83330
20445         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20446         frame if argument is passed on stack.
20448 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20450         PR target/82682
20451         * ree.c (combine_reaching_defs): Optimize also
20452         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20453         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20455 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20457         PR middle-end/83189
20458         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20460 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20462         PR middle-end/83718
20463         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20464         after they are computed.
20466 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20468         PR tree-optimization/83695
20469         * gimple-loop-linterchange.cc
20470         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20471         reset cached scev information after interchange.
20472         (pass_linterchange::execute): Remove call to scev_reset_htab.
20474 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20476         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20477         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20478         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20479         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20480         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20481         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20482         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20483         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20484         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20485         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20486         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20487         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20488         (V_lane_reg): Likewise.
20489         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20490         New define_expand.
20491         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20492         (vfmal_lane_low<mode>_intrinsic,
20493         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20494         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20495         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20496         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20497         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20498         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20500 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20502         * config/arm/arm-cpus.in (fp16fml): New feature.
20503         (ALL_SIMD): Add fp16fml.
20504         (armv8.2-a): Add fp16fml as an option.
20505         (armv8.3-a): Likewise.
20506         (armv8.4-a): Add fp16fml as part of fp16.
20507         * config/arm/arm.h (TARGET_FP16FML): Define.
20508         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20509         when appropriate.
20510         * config/arm/arm-modes.def (V2HF): Define.
20511         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20512         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20513         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20514         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20515         vfmsl_low, vfmsl_high): New set of builtins.
20516         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20517         (vfml_op): New code attribute.
20518         (VFMLHALVES): New int iterator.
20519         (VFML, VFMLSEL): New mode attributes.
20520         (V_reg): Define mapping for V2HF.
20521         (V_hi, V_lo): New mode attributes.
20522         (VF_constraint): Likewise.
20523         (vfml_half, vfml_half_selector): New int attributes.
20524         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20525         define_expand.
20526         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20527         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20528         New define_insn.
20529         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20530         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20531         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20532         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20533         documentation.
20534         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20535         Document new effective target and option set.
20537 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20539         * config/arm/arm-cpus.in (armv8_4): New feature.
20540         (ARMv8_4a): New fgroup.
20541         (armv8.4-a): New arch.
20542         * config/arm/arm-tables.opt: Regenerate.
20543         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20544         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20545         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20546         Add matching rules for -march=armv8.4-a and extensions.
20547         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20549 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20551         PR target/81821
20552         * config/rx/rx.md (BW): New mode attribute.
20553         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20555 2018-01-11  Richard Biener  <rguenther@suse.de>
20557         PR tree-optimization/83435
20558         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20559         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20560         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20562 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20563             Alan Hayward  <alan.hayward@arm.com>
20564             David Sherwood  <david.sherwood@arm.com>
20566         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20567         field.
20568         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20569         (aarch64_print_address_internal): Use it to check for a zero offset.
20571 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20572             Alan Hayward  <alan.hayward@arm.com>
20573             David Sherwood  <david.sherwood@arm.com>
20575         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20576         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20577         Return a poly_int64 rather than a HOST_WIDE_INT.
20578         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20579         rather than a HOST_WIDE_INT.
20580         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20581         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20582         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20583         final_offset from HOST_WIDE_INT to poly_int64.
20584         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20585         to_constant when getting the number of units in an Advanced SIMD
20586         mode.
20587         (aarch64_builtin_vectorized_function): Check for a constant number
20588         of units.
20589         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20590         GET_MODE_SIZE.
20591         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20592         attribute instead of GET_MODE_NUNITS.
20593         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20594         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20595         GET_MODE_SIZE for fixed-size registers.
20596         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20597         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20598         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20599         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20600         (aarch64_print_operand, aarch64_print_address_internal)
20601         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20602         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20603         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20604         Handle polynomial GET_MODE_SIZE.
20605         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20606         wider than SImode without modification.
20607         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20608         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20609         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20610         passing and returning SVE modes.
20611         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20612         rather than GEN_INT.
20613         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20614         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20615         (aarch64_allocate_and_probe_stack_space): Likewise.
20616         (aarch64_layout_frame): Cope with polynomial offsets.
20617         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20618         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20619         polynomial offsets.
20620         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20621         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20622         poly_int64 rather than a HOST_WIDE_INT.
20623         (aarch64_get_separate_components, aarch64_process_components)
20624         (aarch64_expand_prologue, aarch64_expand_epilogue)
20625         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20626         (aarch64_anchor_offset): New function, split out from...
20627         (aarch64_legitimize_address): ...here.
20628         (aarch64_builtin_vectorization_cost): Handle polynomial
20629         TYPE_VECTOR_SUBPARTS.
20630         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20631         GET_MODE_NUNITS.
20632         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20633         number of elements from the PARALLEL rather than the mode.
20634         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20635         rather than GET_MODE_BITSIZE.
20636         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20637         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20638         (aarch64_expand_vec_perm_const_1): Handle polynomial
20639         d->perm.length () and d->perm elements.
20640         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20641         Apply to_constant to d->perm elements.
20642         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20643         polynomial CONST_VECTOR_NUNITS.
20644         (aarch64_move_pointer): Take amount as a poly_int64 rather
20645         than an int.
20646         (aarch64_progress_pointer): Avoid temporary variable.
20647         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20648         the mode attribute instead of GET_MODE.
20650 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20651             Alan Hayward  <alan.hayward@arm.com>
20652             David Sherwood  <david.sherwood@arm.com>
20654         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20655         x exists before using it.
20656         (aarch64_add_constant_internal): Rename to...
20657         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20658         src and dest rtxes.  Handle the case in which they're different,
20659         including when the offset is zero.  Replace scratchreg with an rtx.
20660         Use 2 additions if there is no spare register into which we can
20661         move a 16-bit constant.
20662         (aarch64_add_constant): Delete.
20663         (aarch64_add_offset): Replace reg with separate src and dest
20664         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20665         Use aarch64_add_offset_1.
20666         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20667         an rtx rather than an int.  Take the delta as a poly_int64
20668         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20669         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20670         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20671         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20672         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20673         and aarch64_add_sp.
20674         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20675         aarch64_add_constant.
20677 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20679         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20680         Use scalar_float_mode.
20682 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20684         * config/aarch64/aarch64-simd.md
20685         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20686         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20687         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20688         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20689         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20690         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20691         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20692         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20693         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20694         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20696 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20698         PR target/83514
20699         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20700         targ_options->x_arm_arch_string is non NULL.
20702 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20704         * config/aarch64/aarch64.h
20705         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20707 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20709         PR target/82096
20710         * expmed.c (emit_store_flag_force): Swap if const op0
20711         and change VOIDmode to mode of op0.
20713 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20715         PR rtl-optimization/83761
20716         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20717         than bytes to mode_for_size.
20719 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20721         PR middle-end/83189
20722         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20723         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20724         profile.
20726 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20728         PR middle-end/83575
20729         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20730         when in layout mode.
20731         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20732         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20733         partition fixup.
20735 2018-01-10  Michael Collison  <michael.collison@arm.com>
20737         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20738         * config/aarch64/aarch64-option-extension.def: Add
20739         AARCH64_OPT_EXTENSION of 'fp16fml'.
20740         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20741         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20742         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20743         * config/aarch64/constraints.md (Ui7): New constraint.
20744         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20745         (VFMLA_SEL_W): Ditto.
20746         (f16quad): Ditto.
20747         (f16mac1): Ditto.
20748         (VFMLA16_LOW): New int iterator.
20749         (VFMLA16_HIGH): Ditto.
20750         (UNSPEC_FMLAL): New unspec.
20751         (UNSPEC_FMLSL): Ditto.
20752         (UNSPEC_FMLAL2): Ditto.
20753         (UNSPEC_FMLSL2): Ditto.
20754         (f16mac): New code attribute.
20755         * config/aarch64/aarch64-simd-builtins.def
20756         (aarch64_fmlal_lowv2sf): Ditto.
20757         (aarch64_fmlsl_lowv2sf): Ditto.
20758         (aarch64_fmlalq_lowv4sf): Ditto.
20759         (aarch64_fmlslq_lowv4sf): Ditto.
20760         (aarch64_fmlal_highv2sf): Ditto.
20761         (aarch64_fmlsl_highv2sf): Ditto.
20762         (aarch64_fmlalq_highv4sf): Ditto.
20763         (aarch64_fmlslq_highv4sf): Ditto.
20764         (aarch64_fmlal_lane_lowv2sf): Ditto.
20765         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20766         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20767         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20768         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20769         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20770         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20771         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20772         (aarch64_fmlal_lane_highv2sf): Ditto.
20773         (aarch64_fmlsl_lane_highv2sf): Ditto.
20774         (aarch64_fmlal_laneq_highv2sf): Ditto.
20775         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20776         (aarch64_fmlalq_lane_highv4sf): Ditto.
20777         (aarch64_fmlsl_lane_highv4sf): Ditto.
20778         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20779         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20780         * config/aarch64/aarch64-simd.md:
20781         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20782         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20783         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20784         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20785         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20786         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20787         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20788         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20789         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20790         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20791         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20792         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20793         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20794         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20795         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20796         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20797         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20798         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20799         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20800         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20801         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20802         (vfmlsl_low_u32): Ditto.
20803         (vfmlalq_low_u32): Ditto.
20804         (vfmlslq_low_u32): Ditto.
20805         (vfmlal_high_u32): Ditto.
20806         (vfmlsl_high_u32): Ditto.
20807         (vfmlalq_high_u32): Ditto.
20808         (vfmlslq_high_u32): Ditto.
20809         (vfmlal_lane_low_u32): Ditto.
20810         (vfmlsl_lane_low_u32): Ditto.
20811         (vfmlal_laneq_low_u32): Ditto.
20812         (vfmlsl_laneq_low_u32): Ditto.
20813         (vfmlalq_lane_low_u32): Ditto.
20814         (vfmlslq_lane_low_u32): Ditto.
20815         (vfmlalq_laneq_low_u32): Ditto.
20816         (vfmlslq_laneq_low_u32): Ditto.
20817         (vfmlal_lane_high_u32): Ditto.
20818         (vfmlsl_lane_high_u32): Ditto.
20819         (vfmlal_laneq_high_u32): Ditto.
20820         (vfmlsl_laneq_high_u32): Ditto.
20821         (vfmlalq_lane_high_u32): Ditto.
20822         (vfmlslq_lane_high_u32): Ditto.
20823         (vfmlalq_laneq_high_u32): Ditto.
20824         (vfmlslq_laneq_high_u32): Ditto.
20825         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20826         (AARCH64_FL_FOR_ARCH8_4): New.
20827         (AARCH64_ISA_F16FML): New ISA flag.
20828         (TARGET_F16FML): New feature flag for fp16fml.
20829         (doc/invoke.texi): Document new fp16fml option.
20831 2018-01-10  Michael Collison  <michael.collison@arm.com>
20833         * config/aarch64/aarch64-builtins.c:
20834         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20835         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20836         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20837         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20838         (AARCH64_ISA_SHA3): New ISA flag.
20839         (TARGET_SHA3): New feature flag for sha3.
20840         * config/aarch64/iterators.md (sha512_op): New int attribute.
20841         (CRYPTO_SHA512): New int iterator.
20842         (UNSPEC_SHA512H): New unspec.
20843         (UNSPEC_SHA512H2): Ditto.
20844         (UNSPEC_SHA512SU0): Ditto.
20845         (UNSPEC_SHA512SU1): Ditto.
20846         * config/aarch64/aarch64-simd-builtins.def
20847         (aarch64_crypto_sha512hqv2di): New builtin.
20848         (aarch64_crypto_sha512h2qv2di): Ditto.
20849         (aarch64_crypto_sha512su0qv2di): Ditto.
20850         (aarch64_crypto_sha512su1qv2di): Ditto.
20851         (aarch64_eor3qv8hi): Ditto.
20852         (aarch64_rax1qv2di): Ditto.
20853         (aarch64_xarqv2di): Ditto.
20854         (aarch64_bcaxqv8hi): Ditto.
20855         * config/aarch64/aarch64-simd.md:
20856         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20857         (aarch64_crypto_sha512su0qv2di): Ditto.
20858         (aarch64_crypto_sha512su1qv2di): Ditto.
20859         (aarch64_eor3qv8hi): Ditto.
20860         (aarch64_rax1qv2di): Ditto.
20861         (aarch64_xarqv2di): Ditto.
20862         (aarch64_bcaxqv8hi): Ditto.
20863         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20864         (vsha512h2q_u64): Ditto.
20865         (vsha512su0q_u64): Ditto.
20866         (vsha512su1q_u64): Ditto.
20867         (veor3q_u16): Ditto.
20868         (vrax1q_u64): Ditto.
20869         (vxarq_u64): Ditto.
20870         (vbcaxq_u16): Ditto.
20871         * config/arm/types.md (crypto_sha512): New type attribute.
20872         (crypto_sha3): Ditto.
20873         (doc/invoke.texi): Document new sha3 option.
20875 2018-01-10  Michael Collison  <michael.collison@arm.com>
20877         * config/aarch64/aarch64-builtins.c:
20878         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20879         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20880         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20881         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20882         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20883         (AARCH64_ISA_SM4): New ISA flag.
20884         (TARGET_SM4): New feature flag for sm4.
20885         * config/aarch64/aarch64-simd-builtins.def
20886         (aarch64_sm3ss1qv4si): Ditto.
20887         (aarch64_sm3tt1aq4si): Ditto.
20888         (aarch64_sm3tt1bq4si): Ditto.
20889         (aarch64_sm3tt2aq4si): Ditto.
20890         (aarch64_sm3tt2bq4si): Ditto.
20891         (aarch64_sm3partw1qv4si): Ditto.
20892         (aarch64_sm3partw2qv4si): Ditto.
20893         (aarch64_sm4eqv4si): Ditto.
20894         (aarch64_sm4ekeyqv4si): Ditto.
20895         * config/aarch64/aarch64-simd.md:
20896         (aarch64_sm3ss1qv4si): Ditto.
20897         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20898         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20899         (aarch64_sm4eqv4si): Ditto.
20900         (aarch64_sm4ekeyqv4si): Ditto.
20901         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20902         (sm3part_op): Ditto.
20903         (CRYPTO_SM3TT): Ditto.
20904         (CRYPTO_SM3PART): Ditto.
20905         (UNSPEC_SM3SS1): New unspec.
20906         (UNSPEC_SM3TT1A): Ditto.
20907         (UNSPEC_SM3TT1B): Ditto.
20908         (UNSPEC_SM3TT2A): Ditto.
20909         (UNSPEC_SM3TT2B): Ditto.
20910         (UNSPEC_SM3PARTW1): Ditto.
20911         (UNSPEC_SM3PARTW2): Ditto.
20912         (UNSPEC_SM4E): Ditto.
20913         (UNSPEC_SM4EKEY): Ditto.
20914         * config/aarch64/constraints.md (Ui2): New constraint.
20915         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20916         * config/arm/types.md (crypto_sm3): New type attribute.
20917         (crypto_sm4): Ditto.
20918         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20919         (vsm3tt1aq_u32): Ditto.
20920         (vsm3tt1bq_u32): Ditto.
20921         (vsm3tt2aq_u32): Ditto.
20922         (vsm3tt2bq_u32): Ditto.
20923         (vsm3partw1q_u32): Ditto.
20924         (vsm3partw2q_u32): Ditto.
20925         (vsm4eq_u32): Ditto.
20926         (vsm4ekeyq_u32): Ditto.
20927         (doc/invoke.texi): Document new sm4 option.
20929 2018-01-10  Michael Collison  <michael.collison@arm.com>
20931         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20932         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20933         (AARCH64_FL_FOR_ARCH8_4): New.
20934         (AARCH64_FL_V8_4): New flag.
20935         (doc/invoke.texi): Document new armv8.4-a option.
20937 2018-01-10  Michael Collison  <michael.collison@arm.com>
20939         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20940         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20941         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20942         * config/aarch64/aarch64-option-extension.def: Add
20943         AARCH64_OPT_EXTENSION of 'sha2'.
20944         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20945         (crypto): Disable sha2 and aes if crypto disabled.
20946         (crypto): Enable aes and sha2 if enabled.
20947         (simd): Disable sha2 and aes if simd disabled.
20948         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20949         New flags.
20950         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20951         (TARGET_SHA2): New feature flag for sha2.
20952         (TARGET_AES): New feature flag for aes.
20953         * config/aarch64/aarch64-simd.md:
20954         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20955         conditional on TARGET_AES.
20956         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20957         (aarch64_crypto_sha1hsi): Make pattern conditional
20958         on TARGET_SHA2.
20959         (aarch64_crypto_sha1hv4si): Ditto.
20960         (aarch64_be_crypto_sha1hv4si): Ditto.
20961         (aarch64_crypto_sha1su1v4si): Ditto.
20962         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20963         (aarch64_crypto_sha1su0v4si): Ditto.
20964         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20965         (aarch64_crypto_sha256su0v4si): Ditto.
20966         (aarch64_crypto_sha256su1v4si): Ditto.
20967         (doc/invoke.texi): Document new aes and sha2 options.
20969 2018-01-10  Martin Sebor  <msebor@redhat.com>
20971         PR tree-optimization/83781
20972         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20973         as string arrays.
20975 2018-01-11  Martin Sebor  <msebor@gmail.com>
20976             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20978         PR tree-optimization/83501
20979         PR tree-optimization/81703
20981         * tree-ssa-strlen.c (get_string_cst): Rename...
20982         (get_string_len): ...to this.  Handle global constants.
20983         (handle_char_store): Adjust.
20985 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20986             Jim Wilson  <jimw@sifive.com>
20988         * config/riscv/riscv-protos.h (riscv_output_return): New.
20989         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20990         (riscv_attribute_table, riscv_output_return),
20991         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20992         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20993         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20994         function.
20995         (riscv_expand_prologue): Add early return for naked function.
20996         (riscv_expand_epilogue): Likewise.
20997         (riscv_function_ok_for_sibcall): Return false for naked function.
20998         (riscv_set_current_function): New.
20999         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21000         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21001         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21002         * doc/extend.texi (RISC-V Function Attributes): New.
21004 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21006         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21007         check for 128-bit long double before checking TCmode.
21008         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21009         128-bit long doubles before checking TFmode or TCmode.
21010         (FLOAT128_IBM_P): Likewise.
21012 2018-01-10  Martin Sebor  <msebor@redhat.com>
21014         PR tree-optimization/83671
21015         * builtins.c (c_strlen): Unconditionally return zero for the empty
21016         string.
21017         Use -Warray-bounds for warnings.
21018         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21019         for non-constant array indices with COMPONENT_REF, arrays of
21020         arrays, and pointers to arrays.
21021         (gimple_fold_builtin_strlen): Determine and set length range for
21022         non-constant character arrays.
21024 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21026         PR middle-end/81897
21027         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21028         empty blocks.
21030 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21032         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21034 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21036         PR target/83399
21037         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21038         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21039         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21040         indexed_or_indirect_operand predicate.
21041         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21042         (*vsx_le_perm_load_v8hi): Likewise.
21043         (*vsx_le_perm_load_v16qi): Likewise.
21044         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21045         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21046         (*vsx_le_perm_store_v8hi): Likewise.
21047         (*vsx_le_perm_store_v16qi): Likewise.
21048         (eight unnamed splitters): Likewise.
21050 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21052         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21053         * config/rs6000/emmintrin.h: Likewise.
21054         * config/rs6000/mmintrin.h: Likewise.
21055         * config/rs6000/xmmintrin.h: Likewise.
21057 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21059         PR c++/43486
21060         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21061         "public_flag".
21062         * tree.c (tree_nop_conversion): Return true for location wrapper
21063         nodes.
21064         (maybe_wrap_with_location): New function.
21065         (selftest::check_strip_nops): New function.
21066         (selftest::test_location_wrappers): New function.
21067         (selftest::tree_c_tests): Call it.
21068         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21069         (maybe_wrap_with_location): New decl.
21070         (EXPR_LOCATION_WRAPPER_P): New macro.
21071         (location_wrapper_p): New inline function.
21072         (tree_strip_any_location_wrapper): New inline function.
21074 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21076         PR target/83735
21077         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21078         stack_realign_offset for the largest alignment of stack slot
21079         actually used.
21080         (ix86_find_max_used_stack_alignment): New function.
21081         (ix86_finalize_stack_frame_flags): Use it.  Set
21082         max_used_stack_alignment if we don't realign stack.
21083         * config/i386/i386.h (machine_function): Add
21084         max_used_stack_alignment.
21086 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21088         * config/arm/arm.opt (-mbranch-cost): New option.
21089         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21090         account.
21092 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21094         PR target/83629
21095         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21096         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21098 2018-01-10  Richard Biener  <rguenther@suse.de>
21100         PR debug/83765
21101         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21102         early out so it also covers the case where we have a non-NULL
21103         origin.
21105 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21107         PR tree-optimization/83753
21108         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21109         for non-strided grouped accesses if the number of elements is 1.
21111 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21113         PR target/81616
21114         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21115         * i386.h (TARGET_USE_GATHER): Define.
21116         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21118 2018-01-10  Martin Liska  <mliska@suse.cz>
21120         PR bootstrap/82831
21121         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21122         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21123         partitioning.
21124         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21125         CLEANUP_NO_PARTITIONING is not set.
21127 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21129         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21130         for vectors, as a partial revert of r254296.
21131         * rtl.h (const_vec_p): Delete.
21132         (const_vec_duplicate_p): Don't test for vector CONSTs.
21133         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21134         * expmed.c (make_tree): Likewise.
21136         Revert:
21137         * common.md (E, F): Use CONSTANT_P instead of checking for
21138         CONST_VECTOR.
21139         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21140         checking for CONST_VECTOR.
21142 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21144         PR middle-end/83575
21145         * predict.c (force_edge_cold): Handle in more sane way edges
21146         with no prediction.
21148 2018-01-09  Carl Love  <cel@us.ibm.com>
21150         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21151         V4SI, V4SF types.
21152         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21153         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21154         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21155         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21156         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21157         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21158         * config/rs6000/rs6000-protos.h: Add extern defition for
21159         rs6000_generate_float2_double_code.
21160         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21161         function.
21162         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21163         (float2_v2df): Add define_expand.
21165 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21167         PR target/83628
21168         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21169         op_mode in the force_to_mode call.
21171 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21173         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21174         instead of checking each element individually.
21175         (aarch64_evpc_uzp): Likewise.
21176         (aarch64_evpc_zip): Likewise.
21177         (aarch64_evpc_ext): Likewise.
21178         (aarch64_evpc_rev): Likewise.
21179         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21180         instead of checking each element individually.  Return true without
21181         generating rtl if
21182         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21183         whether all selected elements come from the same input, instead of
21184         checking each element individually.  Remove calls to gen_rtx_REG,
21185         start_sequence and end_sequence and instead assert that no rtl is
21186         generated.
21188 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21190         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21191         order of HIGH and CONST checks.
21193 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21195         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21196         if the destination isn't an SSA_NAME.
21198 2018-01-09  Richard Biener  <rguenther@suse.de>
21200         PR tree-optimization/83668
21201         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21202         move prologue...
21203         (canonicalize_loop_form): ... here, renamed from ...
21204         (canonicalize_loop_closed_ssa_form): ... this and amended to
21205         swap successor edges for loop exit blocks to make us use
21206         the RPO order we need for initial schedule generation.
21208 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21210         PR tree-optimization/64811
21211         * match.pd: When optimizing comparisons with Inf, avoid
21212         introducing or losing exceptions from comparisons with NaN.
21214 2018-01-09  Martin Liska  <mliska@suse.cz>
21216         PR sanitizer/82517
21217         * asan.c (shadow_mem_size): Add gcc_assert.
21219 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21221         Don't save registers in main().
21223         PR target/83738
21224         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21225         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21226         * config/avr/avr.c (avr_set_current_function): Don't error if
21227         naked, OS_task or OS_main are specified at the same time.
21228         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21229         OS_main.
21230         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21231         attribute.
21232         * common/config/avr/avr-common.c (avr_option_optimization_table):
21233         Switch on -mmain-is-OS_task for optimizing compilations.
21235 2018-01-09  Richard Biener  <rguenther@suse.de>
21237         PR tree-optimization/83572
21238         * graphite.c: Include cfganal.h.
21239         (graphite_transform_loops): Connect infinite loops to exit
21240         and remove fake edges at the end.
21242 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21244         * ipa-inline.c (edge_badness): Revert accidental checkin.
21246 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21248         PR ipa/80763
21249         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21250         symbols; not inline clones.
21252 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21254         PR target/83507
21255         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21256         hard registers.  Formatting fixes.
21258         PR preprocessor/83722
21259         * gcc.c (try_generate_repro): Pass
21260         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21261         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21262         do_report_bug.
21264 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21265             Kito Cheng  <kito.cheng@gmail.com>
21267         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21268         (riscv_leaf_function_p): Delete.
21269         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21271 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21273         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21274         function.
21275         (do_ifelse): New function.
21276         (do_isel): New function.
21277         (do_sub3): New function.
21278         (do_add3): New function.
21279         (do_load_mask_compare): New function.
21280         (do_overlap_load_compare): New function.
21281         (expand_compare_loop): New function.
21282         (expand_block_compare): Call expand_compare_loop() when appropriate.
21283         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21284         option description.
21285         (-mblock-compare-inline-loop-limit): New option.
21287 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21289         PR target/83677
21290         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21291         Reverse order of second and third operands in first alternative.
21292         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21293         of first and second elements in UNSPEC_VPERMR vector.
21294         (altivec_expand_vec_perm_le): Likewise.
21296 2018-01-08  Jeff Law  <law@redhat.com>
21298         PR rtl-optimizatin/81308
21299         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21300         (process_switch): If group_case_labels makes a change, then set
21301         cfg_altered.
21302         (pass_convert_switch::execute): If a switch is converted, then
21303         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21305         PR rtl-optimization/81308
21306         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21307         splitting insns.
21309 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21311         PR target/83663 - Revert r255946
21312         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21313         generation for cases where splatting a value is not useful.
21314         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21315         across a vec_duplicate and a paradoxical subreg forming a vector
21316         mode to a vec_concat.
21318 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21320         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21321         -march=armv8.3-a variants.
21322         * config/arm/t-multilib: Likewise.
21323         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21325 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21327         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21328         to generate rtl.
21329         (cceq_ior_compare_complement): Give it a name so I can use it, and
21330         change boolean_or_operator predicate to boolean_operator so it can
21331         be used to generate a crand.
21332         (eqne): New code iterator.
21333         (bd/bd_neg): New code_attrs.
21334         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21335         a single define_insn.
21336         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21337         decrement (bdnzt/bdnzf/bdzt/bdzf).
21338         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21339         with the new names of the branch decrement patterns, and added the
21340         names of the branch decrement conditional patterns.
21342 2018-01-08  Richard Biener  <rguenther@suse.de>
21344         PR tree-optimization/83563
21345         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21346         cache.
21348 2018-01-08  Richard Biener  <rguenther@suse.de>
21350         PR middle-end/83713
21351         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21353 2018-01-08  Richard Biener  <rguenther@suse.de>
21355         PR tree-optimization/83685
21356         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21357         references to abnormals.
21359 2018-01-08  Richard Biener  <rguenther@suse.de>
21361         PR lto/83719
21362         * dwarf2out.c (output_indirect_strings): Handle empty
21363         skeleton_debug_str_hash.
21364         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21366 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21368         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21369         (emit_store_direct): Likewise.
21370         (arc_trampoline_adjust_address): Likewise.
21371         (arc_asm_trampoline_template): New function.
21372         (arc_initialize_trampoline): Use asm_trampoline_template.
21373         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21374         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21375         * config/arc/arc.md (flush_icache): Delete pattern.
21377 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21379         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21380         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21381         munaligned-access.
21383 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21385         PR target/83681
21386         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21387         by not USED_FOR_TARGET.
21388         (make_pass_resolve_sw_modes): Likewise.
21390 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21392         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21393         USED_FOR_TARGET.
21395 2018-01-08  Richard Biener  <rguenther@suse.de>
21397         PR middle-end/83580
21398         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21400 2018-01-08  Richard Biener  <rguenther@suse.de>
21402         PR middle-end/83517
21403         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21405 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21407         PR middle-end/81897
21408         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21409         basic blocks with a small number of successors.
21410         (convert_control_dep_chain_into_preds): Improve handling of
21411         forwarder blocks.
21412         (dump_predicates): Split apart into...
21413         (dump_pred_chain): ...here...
21414         (dump_pred_info): ...and here.
21415         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21416         (can_chain_union_be_invalidated_p): Improve check for invalidation
21417         of paths.
21418         (uninit_uses_cannot_happen): Avoid unnecessary if
21419         convert_control_dep_chain_into_preds yielded nothing.
21421 2018-01-06  Martin Sebor  <msebor@redhat.com>
21423         PR tree-optimization/83640
21424         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21425         subtracting negative offset from size.
21426         (builtin_access::overlap): Adjust offset bounds of the access to fall
21427         within the size of the object if possible.
21429 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21431         PR rtl-optimization/83699
21432         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21433         extract_bit_field_as_subreg to cases in which the extracted
21434         value is also a vector.
21436         * lra-constraints.c (process_alt_operands): Test for the equivalence
21437         substitutions when detecting a possible reload cycle.
21439 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21441         PR debug/83480
21442         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21443         by default if flag_selective_schedling{,2}.  Formatting fixes.
21445         PR rtl-optimization/83682
21446         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21447         if it has non-VECTOR_MODE element mode.
21448         (vec_duplicate_p): Likewise.
21450         PR middle-end/83694
21451         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21452         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21454 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21456         PR target/83604
21457         * config/i386/i386-builtin.def
21458         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21459         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21460         Require also OPTION_MASK_ISA_AVX512F in addition to
21461         OPTION_MASK_ISA_GFNI.
21462         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21463         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21464         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21465         to OPTION_MASK_ISA_GFNI.
21466         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21467         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21468         OPTION_MASK_ISA_AVX512BW.
21469         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21470         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21471         addition to OPTION_MASK_ISA_GFNI.
21472         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21473         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21474         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21475         to OPTION_MASK_ISA_GFNI.
21476         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21477         a requirement for all ISAs rather than any of them with a few
21478         exceptions.
21479         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21480         processing.
21481         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21482         bitmasks to be enabled with 3 exceptions, instead of requiring any
21483         enabled ISA with lots of exceptions.
21484         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21485         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21486         Change avx512bw in isa attribute to avx512f.
21487         * config/i386/sgxintrin.h: Add license boilerplate.
21488         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21489         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21490         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21491         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21492         defined.
21493         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21494         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21495         temporarily sse2 rather than sse if not enabled already.
21497         PR target/83604
21498         * config/i386/sse.md (VI248_VLBW): Rename to ...
21499         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21500         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21501         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21502         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21503         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21504         mode iterator instead of VI248_VLBW.
21506 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21508         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21509         (record_modified): Skip clobbers; add debug output.
21510         (param_change_prob): Use sreal frequencies.
21512 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21514         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21515         punt for user-aligned variables.
21517 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21519         * tree-chrec.c (chrec_contains_symbols): Return true for
21520         POLY_INT_CST.
21522 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21524         PR target/82439
21525         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21526         of (x|y) == x for BICS pattern.
21528 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21530         PR tree-optimization/83605
21531         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21532         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21533         can throw.
21535 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21537         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21538         * config/epiphany/rtems.h: New file.
21540 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21541             Uros Bizjak  <ubizjak@gmail.com>
21543         PR target/83554
21544         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21545         QIreg_operand instead of register_operand predicate.
21546         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21547         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21548         comments instead of -fmitigate[-_]rop.
21550 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21552         PR bootstrap/81926
21553         * cgraphunit.c (symbol_table::compile): Switch to text_section
21554         before calling assembly_start debug hook.
21555         * run-rtl-passes.c (run_rtl_passes): Likewise.
21556         Include output.h.
21558 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21560         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21561         range_int_cst_p rather than !symbolic_range_p before calling
21562         extract_range_from_multiplicative_op_1.
21564 2018-01-04  Jeff Law  <law@redhat.com>
21566         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21567         redundant test in assertion.
21569 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21571         * doc/rtl.texi: Document machine_mode wrapper classes.
21573 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21575         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21576         using tree_to_uhwi.
21578 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21580         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21581         the VEC_PERM_EXPR fold to fail.
21583 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21585         PR debug/83585
21586         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21587         to switched_sections.
21589 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21591         PR target/83680
21592         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21593         test for d.testing.
21595 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21597         PR target/83387
21598         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21599         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21601 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21603         PR debug/83666
21604         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21605         is BLKmode and bitpos not zero or mode change is needed.
21607 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21609         PR target/83675
21610         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21611         TARGET_VIS2.
21613 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21615         PR target/83628
21616         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21617         instead of MULT rtx.  Update all corresponding splitters.
21618         (*saddl_se): Ditto.
21619         (*ssub<modesuffix>): Ditto.
21620         (*ssubl_se): Ditto.
21621         (*cmp_sadd_di): Update split patterns.
21622         (*cmp_sadd_si): Ditto.
21623         (*cmp_sadd_sidi): Ditto.
21624         (*cmp_ssub_di): Ditto.
21625         (*cmp_ssub_si): Ditto.
21626         (*cmp_ssub_sidi): Ditto.
21627         * config/alpha/predicates.md (const23_operand): New predicate.
21628         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21629         Look for ASHIFT, not MULT inner operand.
21630         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21632 2018-01-04  Martin Liska  <mliska@suse.cz>
21634         PR gcov-profile/83669
21635         * gcov.c (output_intermediate_file): Add version to intermediate
21636         gcov file.
21637         * doc/gcov.texi: Document new field 'version' in intermediate
21638         file format. Fix location of '-k' option of gcov command.
21640 2018-01-04  Martin Liska  <mliska@suse.cz>
21642         PR ipa/82352
21643         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21645 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21647         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21649 2018-01-03  Martin Sebor  <msebor@redhat.com>
21651         PR tree-optimization/83655
21652         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21653         checking calls with invalid arguments.
21655 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21657         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21658         (vectorizable_mask_load_store): Delete.
21659         (vectorizable_call): Return false for masked loads and stores.
21660         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21661         instead of gimple_assign_rhs1.
21662         (vectorizable_load): Handle IFN_MASK_LOAD.
21663         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21667         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21668         split out from..,
21669         (vectorizable_mask_load_store): ...here.
21670         (vectorizable_load): ...and here.
21672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21674         * tree-vect-stmts.c (vect_build_all_ones_mask)
21675         (vect_build_zero_merge_argument): New functions, split out from...
21676         (vectorizable_load): ...here.
21678 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21680         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21681         split out from...
21682         (vectorizable_mask_load_store): ...here.
21683         (vectorizable_store): ...and here.
21685 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21687         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21688         split out from...
21689         (vectorizable_mask_load_store): ...here.
21691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21693         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21694         (vect_model_store_cost): Take a vec_load_store_type instead of a
21695         vect_def_type.
21696         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21697         (vect_model_store_cost): Take a vec_load_store_type instead of a
21698         vect_def_type.
21699         (vectorizable_mask_load_store): Update accordingly.
21700         (vectorizable_store): Likewise.
21701         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21703 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21705         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21706         IFN_MASK_LOAD calls here rather than...
21707         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21709 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21710             Alan Hayward  <alan.hayward@arm.com>
21711             David Sherwood  <david.sherwood@arm.com>
21713         * expmed.c (extract_bit_field_1): For vector extracts,
21714         fall back to extract_bit_field_as_subreg if vec_extract
21715         isn't available.
21717 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21718             Alan Hayward  <alan.hayward@arm.com>
21719             David Sherwood  <david.sherwood@arm.com>
21721         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21722         they are variable or constant sized.
21723         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21724         slots for constant-sized data.
21726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21727             Alan Hayward  <alan.hayward@arm.com>
21728             David Sherwood  <david.sherwood@arm.com>
21730         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21731         handling COND_EXPRs with boolean comparisons, try to find a better
21732         basis for the mask type than the boolean itself.
21734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21736         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21737         is calculated and how it can be overridden.
21738         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21739         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21740         if defined.
21741         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21742         if nonzero.
21744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21745             Alan Hayward  <alan.hayward@arm.com>
21746             David Sherwood  <david.sherwood@arm.com>
21748         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21749         Remove the mode argument.
21750         (aarch64_simd_valid_immediate): Remove the mode and inverse
21751         arguments.
21752         * config/aarch64/iterators.md (bitsize): New iterator.
21753         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21754         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21755         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21756         aarch64_simd_valid_immediate.
21757         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21758         (aarch64_reg_or_bic_imm): Likewise.
21759         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21760         with an insn_type enum and msl with a modifier_type enum.
21761         Replace element_width with a scalar_mode.  Change the shift
21762         to unsigned int.  Add constructors for scalar_float_mode and
21763         scalar_int_mode elements.
21764         (aarch64_vect_float_const_representable_p): Delete.
21765         (aarch64_can_const_movi_rtx_p)
21766         (aarch64_simd_scalar_immediate_valid_for_move)
21767         (aarch64_simd_make_constant): Update call to
21768         aarch64_simd_valid_immediate.
21769         (aarch64_advsimd_valid_immediate_hs): New function.
21770         (aarch64_advsimd_valid_immediate): Likewise.
21771         (aarch64_simd_valid_immediate): Remove mode and inverse
21772         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21773         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21774         and aarch64_float_const_representable_p on the result.
21775         (aarch64_output_simd_mov_immediate): Remove mode argument.
21776         Update call to aarch64_simd_valid_immediate and use of
21777         simd_immediate_info.
21778         (aarch64_output_scalar_simd_mov_immediate): Update call
21779         accordingly.
21781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21782             Alan Hayward  <alan.hayward@arm.com>
21783             David Sherwood  <david.sherwood@arm.com>
21785         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21786         (mode_nunits): Likewise CONST_MODE_NUNITS.
21787         * machmode.def (ADJUST_NUNITS): Document.
21788         * genmodes.c (mode_data::need_nunits_adj): New field.
21789         (blank_mode): Update accordingly.
21790         (adj_nunits): New variable.
21791         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21792         parameter.
21793         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21794         listed in adj_nunits.
21795         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21796         listed in adj_nunits.  Don't emit case statements for such modes.
21797         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21798         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21799         nothing if adj_nunits is nonnull.
21800         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21801         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21802         (emit_mode_fbit): Update use of print_maybe_const_decl.
21803         (emit_move_size): Likewise.  Treat the array as non-const
21804         if adj_nunits.
21805         (emit_mode_adjustments): Handle adj_nunits.
21807 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21809         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21810         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21811         (VECTOR_MODES): Use it.
21812         (make_vector_modes): Take the prefix as an argument.
21814 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21815             Alan Hayward  <alan.hayward@arm.com>
21816             David Sherwood  <david.sherwood@arm.com>
21818         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21819         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21820         for MODE_VECTOR_BOOL.
21821         * machmode.def (VECTOR_BOOL_MODE): Document.
21822         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21823         (make_vector_bool_mode): New function.
21824         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21825         MODE_VECTOR_BOOL.
21826         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21827         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21828         Likewise.
21829         * stor-layout.c (int_mode_for_mode): Likewise.
21830         * tree.c (build_vector_type_for_mode): Likewise.
21831         * varasm.c (output_constant_pool_2): Likewise.
21832         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21833         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21834         for MODE_VECTOR_BOOL.
21835         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21836         of mode class checks.
21837         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21838         instead of a list of mode class checks.
21839         (expand_vector_scalar_condition): Likewise.
21840         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21843             Alan Hayward  <alan.hayward@arm.com>
21844             David Sherwood  <david.sherwood@arm.com>
21846         * machmode.h (mode_size): Change from unsigned short to
21847         poly_uint16_pod.
21848         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21849         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21850         or if measurement_type is not polynomial.
21851         (fixed_size_mode::includes_p): Check for constant-sized modes.
21852         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21853         return a poly_uint16 rather than an unsigned short.
21854         (emit_mode_size): Change the type of mode_size from unsigned short
21855         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21856         (emit_mode_adjustments): Cope with polynomial vector sizes.
21857         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21858         for GET_MODE_SIZE.
21859         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21860         for GET_MODE_SIZE.
21861         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21862         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21863         * caller-save.c (setup_save_areas): Likewise.
21864         (replace_reg_with_saved_mem): Likewise.
21865         * calls.c (emit_library_call_value_1): Likewise.
21866         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21867         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21868         (gen_lowpart_for_combine): Likewise.
21869         * convert.c (convert_to_integer_1): Likewise.
21870         * cse.c (equiv_constant, cse_insn): Likewise.
21871         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21872         (cselib_subst_to_values): Likewise.
21873         * dce.c (word_dce_process_block): Likewise.
21874         * df-problems.c (df_word_lr_mark_ref): Likewise.
21875         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21876         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21877         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21878         (rtl_for_decl_location): Likewise.
21879         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21880         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21881         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21882         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21883         (expand_expr_real_1): Likewise.
21884         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21885         (pad_below): Likewise.
21886         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21887         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21888         * ira.c (get_subreg_tracking_sizes): Likewise.
21889         * ira-build.c (ira_create_allocno_objects): Likewise.
21890         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21891         (ira_sort_regnos_for_alter_reg): Likewise.
21892         * ira-costs.c (record_operand_costs): Likewise.
21893         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21894         (resolve_simple_move): Likewise.
21895         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21896         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21897         (lra_constraints): Likewise.
21898         (CONST_POOL_OK_P): Reject variable-sized modes.
21899         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21900         (add_pseudo_to_slot, lra_spill): Likewise.
21901         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21902         * optabs-query.c (get_best_extraction_insn): Likewise.
21903         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21904         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21905         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21906         * recog.c (offsettable_address_addr_space_p): Likewise.
21907         * regcprop.c (maybe_mode_change): Likewise.
21908         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21909         * regrename.c (build_def_use): Likewise.
21910         * regstat.c (dump_reg_info): Likewise.
21911         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21912         (find_reloads, find_reloads_subreg_address): Likewise.
21913         * reload1.c (eliminate_regs_1): Likewise.
21914         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21915         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21916         (simplify_binary_operation_1, simplify_subreg): Likewise.
21917         * targhooks.c (default_function_arg_padding): Likewise.
21918         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21919         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21920         (verify_gimple_assign_ternary): Likewise.
21921         * tree-inline.c (estimate_move_cost): Likewise.
21922         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21923         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21924         (get_address_cost_ainc): Likewise.
21925         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21926         (vect_supportable_dr_alignment): Likewise.
21927         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21928         (vectorizable_reduction): Likewise.
21929         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21930         (vectorizable_operation, vectorizable_load): Likewise.
21931         * tree.c (build_same_sized_truth_vector_type): Likewise.
21932         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21933         * var-tracking.c (emit_note_insn_var_location): Likewise.
21934         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21935         (ADDR_VEC_ALIGN): Likewise.
21937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21938             Alan Hayward  <alan.hayward@arm.com>
21939             David Sherwood  <david.sherwood@arm.com>
21941         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21942         unsigned short.
21943         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21944         or if measurement_type is polynomial.
21945         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21946         * combine.c (make_extraction): Likewise.
21947         * dse.c (find_shift_sequence): Likewise.
21948         * dwarf2out.c (mem_loc_descriptor): Likewise.
21949         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21950         (extract_bit_field, extract_low_bits): Likewise.
21951         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21952         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21953         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21954         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21955         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21956         * reload.c (find_reloads): Likewise.
21957         * reload1.c (alter_reg): Likewise.
21958         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21959         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21960         * tree-if-conv.c (predicate_mem_writes): Likewise.
21961         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21962         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21963         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21964         * valtrack.c (dead_debug_insert_temp): Likewise.
21965         * varasm.c (mergeable_constant_section): Likewise.
21966         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21969             Alan Hayward  <alan.hayward@arm.com>
21970             David Sherwood  <david.sherwood@arm.com>
21972         * expr.c (expand_assignment): Cope with polynomial mode sizes
21973         when assigning to a CONCAT.
21975 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21976             Alan Hayward  <alan.hayward@arm.com>
21977             David Sherwood  <david.sherwood@arm.com>
21979         * machmode.h (mode_precision): Change from unsigned short to
21980         poly_uint16_pod.
21981         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21982         short.
21983         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21984         or if measurement_type is not polynomial.
21985         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21986         in which the mode is already known to be a scalar_int_mode.
21987         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21988         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21989         initializer.
21990         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21991         for GET_MODE_PRECISION.
21992         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21993         for GET_MODE_PRECISION.
21994         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21995         as polynomial.
21996         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21997         (expand_field_assignment, make_extraction): Likewise.
21998         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21999         (get_last_value): Likewise.
22000         * convert.c (convert_to_integer_1): Likewise.
22001         * cse.c (cse_insn): Likewise.
22002         * expr.c (expand_expr_real_1): Likewise.
22003         * lra-constraints.c (simplify_operand_subreg): Likewise.
22004         * optabs-query.c (can_atomic_load_p): Likewise.
22005         * optabs.c (expand_atomic_load): Likewise.
22006         (expand_atomic_store): Likewise.
22007         * ree.c (combine_reaching_defs): Likewise.
22008         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22009         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22010         * tree.h (type_has_mode_precision_p): Likewise.
22011         * ubsan.c (instrument_si_overflow): Likewise.
22013 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22014             Alan Hayward  <alan.hayward@arm.com>
22015             David Sherwood  <david.sherwood@arm.com>
22017         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22018         polynomial numbers of units.
22019         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22020         (valid_vector_subparts_p): New function.
22021         (build_vector_type): Remove temporary shim and take the number
22022         of units as a poly_uint64 rather than an int.
22023         (build_opaque_vector_type): Take the number of units as a
22024         poly_uint64 rather than an int.
22025         * tree.c (build_vector_from_ctor): Handle polynomial
22026         TYPE_VECTOR_SUBPARTS.
22027         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22028         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22029         (build_vector_from_val): If the number of units is variable,
22030         use build_vec_duplicate_cst for constant operands and
22031         VEC_DUPLICATE_EXPR otherwise.
22032         (make_vector_type): Remove temporary is_constant ().
22033         (build_vector_type, build_opaque_vector_type): Take the number of
22034         units as a poly_uint64 rather than an int.
22035         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22036         VECTOR_CST_NELTS.
22037         * cfgexpand.c (expand_debug_expr): Likewise.
22038         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22039         (store_constructor, expand_expr_real_1): Likewise.
22040         (const_scalar_mask_from_tree): Likewise.
22041         * fold-const-call.c (fold_const_reduction): Likewise.
22042         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22043         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22044         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22045         (fold_relational_const): Likewise.
22046         (native_interpret_vector): Likewise.  Change the size from an
22047         int to an unsigned int.
22048         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22049         TYPE_VECTOR_SUBPARTS.
22050         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22051         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22052         duplicating a non-constant operand into a variable-length vector.
22053         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22054         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22055         * ipa-icf.c (sem_variable::equals): Likewise.
22056         * match.pd: Likewise.
22057         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22058         * print-tree.c (print_node): Likewise.
22059         * stor-layout.c (layout_type): Likewise.
22060         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22061         * tree-cfg.c (verify_gimple_comparison): Likewise.
22062         (verify_gimple_assign_binary): Likewise.
22063         (verify_gimple_assign_ternary): Likewise.
22064         (verify_gimple_assign_single): Likewise.
22065         * tree-pretty-print.c (dump_generic_node): Likewise.
22066         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22067         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22068         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22069         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22070         (vect_shift_permute_load_chain): Likewise.
22071         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22072         (expand_vector_condition, optimize_vector_constructor): Likewise.
22073         (lower_vec_perm, get_compute_type): Likewise.
22074         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22075         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22076         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22077         (vect_recog_mask_conversion_pattern): Likewise.
22078         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22079         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22080         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22081         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22082         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22083         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22084         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22085         (supportable_widening_operation): Likewise.
22086         (supportable_narrowing_operation): Likewise.
22087         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22088         Likewise.
22089         * varasm.c (output_constant): Likewise.
22091 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22092             Alan Hayward  <alan.hayward@arm.com>
22093             David Sherwood  <david.sherwood@arm.com>
22095         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22096         so that both the length == 3 and length != 3 cases set up their
22097         own permute vectors.  Add comments explaining why we know the
22098         number of elements is constant.
22099         (vect_permute_load_chain): Likewise.
22101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22102             Alan Hayward  <alan.hayward@arm.com>
22103             David Sherwood  <david.sherwood@arm.com>
22105         * machmode.h (mode_nunits): Change from unsigned char to
22106         poly_uint16_pod.
22107         (ONLY_FIXED_SIZE_MODES): New macro.
22108         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22109         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22110         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22111         New typedefs.
22112         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22113         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22114         or if measurement_type is not polynomial.
22115         * genmodes.c (ZERO_COEFFS): New macro.
22116         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22117         poly_uint16.
22118         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22119         Use ZERO_COEFFS when emitting initializers.
22120         * data-streamer.h (bp_pack_poly_value): New function.
22121         (bp_unpack_poly_value): Likewise.
22122         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22123         for GET_MODE_NUNITS.
22124         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22125         for GET_MODE_NUNITS.
22126         * tree.c (make_vector_type): Remove temporary shim and make
22127         the real function take the number of units as a poly_uint64
22128         rather than an int.
22129         (build_vector_type_for_mode): Handle polynomial nunits.
22130         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22131         * emit-rtl.c (const_vec_series_p_1): Likewise.
22132         (gen_rtx_CONST_VECTOR): Likewise.
22133         * fold-const.c (test_vec_duplicate_folding): Likewise.
22134         * genrecog.c (validate_pattern): Likewise.
22135         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22136         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22137         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22138         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22139         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22140         * rtlanal.c (subreg_get_info): Likewise.
22141         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22142         (vect_grouped_load_supported): Likewise.
22143         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22144         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22145         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22146         (simplify_const_unary_operation, simplify_binary_operation_1)
22147         (simplify_const_binary_operation, simplify_ternary_operation)
22148         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22149         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22150         instead of CONST_VECTOR_NUNITS.
22151         * varasm.c (output_constant_pool_2): Likewise.
22152         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22153         explicit-encoded elements in the XVEC for variable-length vectors.
22155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22157         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22160             Alan Hayward  <alan.hayward@arm.com>
22161             David Sherwood  <david.sherwood@arm.com>
22163         * coretypes.h (fixed_size_mode): Declare.
22164         (fixed_size_mode_pod): New typedef.
22165         * builtins.h (target_builtins::x_apply_args_mode)
22166         (target_builtins::x_apply_result_mode): Change type to
22167         fixed_size_mode_pod.
22168         * builtins.c (apply_args_size, apply_result_size, result_vector)
22169         (expand_builtin_apply_args_1, expand_builtin_apply)
22170         (expand_builtin_return): Update accordingly.
22172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22174         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22175         * cselib.c (cselib_hash_rtx): Likewise.
22176         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22177         CONST_VECTOR encoding.
22179 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22180             Jeff Law  <law@redhat.com>
22182         PR target/83641
22183         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22184         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22185         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22186         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22188         PR target/83641
22189         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22190         explicitly probe *sp in a noreturn function if there were any callee
22191         register saves or frame pointer is needed.
22193 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22195         PR debug/83621
22196         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22197         BLKmode for ternary, binary or unary expressions.
22199         PR debug/83645
22200         * var-tracking.c (delete_vta_debug_insn): New inline function.
22201         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22202         insns from get_insns () to NULL instead of each bb separately.
22203         Use delete_vta_debug_insn.  No longer static.
22204         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22205         delete_vta_debug_insns callers.
22206         * rtl.h (delete_vta_debug_insns): Declare.
22207         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22208         instead of variable_tracking_main.
22210 2018-01-03  Martin Sebor  <msebor@redhat.com>
22212         PR tree-optimization/83603
22213         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22214         arguments past the endof the argument list in functions declared
22215         without a prototype.
22216         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22217         Avoid checking when arguments are null.
22219 2018-01-03  Martin Sebor  <msebor@redhat.com>
22221         PR c/83559
22222         * doc/extend.texi (attribute const): Fix a typo.
22223         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22224         issuing -Wsuggest-attribute for void functions.
22226 2018-01-03  Martin Sebor  <msebor@redhat.com>
22228         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22229         offset_int::from instead of wide_int::to_shwi.
22230         (maybe_diag_overlap): Remove assertion.
22231         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22232         * gimple-ssa-sprintf.c (format_directive): Same.
22233         (parse_directive): Same.
22234         (sprintf_dom_walker::compute_format_length): Same.
22235         (try_substitute_return_value): Same.
22237 2018-01-03  Jeff Law  <law@redhat.com>
22239         PR middle-end/83654
22240         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22241         non-constant residual for zero at runtime and avoid probing in
22242         that case.  Reorganize code for trailing problem to mirror handling
22243         of the residual.
22245 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22247         PR tree-optimization/83501
22248         * tree-ssa-strlen.c (get_string_cst): New.
22249         (handle_char_store): Call get_string_cst.
22251 2018-01-03  Martin Liska  <mliska@suse.cz>
22253         PR tree-optimization/83593
22254         * tree-ssa-strlen.c: Include tree-cfg.h.
22255         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22256         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22257         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22258         to false.
22259         (strlen_dom_walker::before_dom_children): Call
22260         gimple_purge_dead_eh_edges. Dump tranformation with details
22261         dump flags.
22262         (strlen_dom_walker::before_dom_children): Update call by adding
22263         new argument cleanup_eh.
22264         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22266 2018-01-03  Martin Liska  <mliska@suse.cz>
22268         PR ipa/83549
22269         * cif-code.def (VARIADIC_THUNK): New enum value.
22270         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22271         thunks.
22273 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22275         * sse.md (mov<mode>_internal): Tighten condition for when to use
22276         vmovdqu<ssescalarsize> for TI and OI modes.
22278 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22280         Update copyright years.
22282 2018-01-03  Martin Liska  <mliska@suse.cz>
22284         PR ipa/83594
22285         * ipa-visibility.c (function_and_variable_visibility): Skip
22286         functions with noipa attribure.
22288 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22290         * gcc.c (process_command): Update copyright notice dates.
22291         * gcov-dump.c (print_version): Ditto.
22292         * gcov.c (print_version): Ditto.
22293         * gcov-tool.c (print_version): Ditto.
22294         * gengtype.c (create_file): Ditto.
22295         * doc/cpp.texi: Bump @copying's copyright year.
22296         * doc/cppinternals.texi: Ditto.
22297         * doc/gcc.texi: Ditto.
22298         * doc/gccint.texi: Ditto.
22299         * doc/gcov.texi: Ditto.
22300         * doc/install.texi: Ditto.
22301         * doc/invoke.texi: Ditto.
22303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22305         * vector-builder.h (vector_builder::m_full_nelts): Change from
22306         unsigned int to poly_uint64.
22307         (vector_builder::full_nelts): Update prototype accordingly.
22308         (vector_builder::new_vector): Likewise.
22309         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22310         (vector_builder::operator ==): Likewise.
22311         (vector_builder::finalize): Likewise.
22312         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22313         Take the number of elements as a poly_uint64 rather than an
22314         unsigned int.
22315         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22316         from unsigned int to poly_uint64.
22317         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22318         (vec_perm_indices::new_vector): Likewise.
22319         (vec_perm_indices::length): Likewise.
22320         (vec_perm_indices::nelts_per_input): Likewise.
22321         (vec_perm_indices::input_nelts): Likewise.
22322         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22323         number of elements per input as a poly_uint64 rather than an
22324         unsigned int.  Use the original encoding for variable-length
22325         vectors, rather than clamping each individual element.
22326         For the second and subsequent elements in each pattern,
22327         clamp the step and base before clamping their sum.
22328         (vec_perm_indices::series_p): Handle polynomial element counts.
22329         (vec_perm_indices::all_in_range_p): Likewise.
22330         (vec_perm_indices_to_tree): Likewise.
22331         (vec_perm_indices_to_rtx): Likewise.
22332         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22333         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22334         (tree_vector_builder::new_binary_operation): Handle polynomial
22335         element counts.  Return false if we need to know the number
22336         of elements at compile time.
22337         * fold-const.c (fold_vec_perm): Punt if the number of elements
22338         isn't known at compile time.
22340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22342         * vec-perm-indices.h (vec_perm_builder): Change element type
22343         from HOST_WIDE_INT to poly_int64.
22344         (vec_perm_indices::element_type): Update accordingly.
22345         (vec_perm_indices::clamp): Handle polynomial element_types.
22346         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22347         (vec_perm_indices::all_in_range_p): Likewise.
22348         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22349         than shwi trees.
22350         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22351         polynomial vec_perm_indices element types.
22352         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22353         * fold-const.c (fold_vec_perm): Likewise.
22354         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22355         * tree-vect-generic.c (lower_vec_perm): Likewise.
22356         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22357         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22358         element type to HOST_WIDE_INT.
22360 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22361             Alan Hayward  <alan.hayward@arm.com>
22362             David Sherwood  <david.sherwood@arm.com>
22364         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22365         rather than an int.  Use plus_constant.
22366         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22367         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22369 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22370             Alan Hayward  <alan.hayward@arm.com>
22371             David Sherwood  <david.sherwood@arm.com>
22373         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22374         a HOST_WIDE_INT to a poly_int64.
22376 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22377             Alan Hayward  <alan.hayward@arm.com>
22378             David Sherwood  <david.sherwood@arm.com>
22380         * calls.c (load_register_parameters): Cope with polynomial
22381         mode sizes.  Require a constant size for BLKmode parameters
22382         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22383         forces a parameter to be padded at the lsb end in order to
22384         fill a complete number of words, require the parameter size
22385         to be ordered wrt UNITS_PER_WORD.
22387 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22388             Alan Hayward  <alan.hayward@arm.com>
22389             David Sherwood  <david.sherwood@arm.com>
22391         * reload1.c (spill_stack_slot_width): Change element type
22392         from unsigned int to poly_uint64_pod.
22393         (alter_reg): Treat mode sizes as polynomial.
22395 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22396             Alan Hayward  <alan.hayward@arm.com>
22397             David Sherwood  <david.sherwood@arm.com>
22399         * reload.c (complex_word_subreg_p): New function.
22400         (reload_inner_reg_of_subreg, push_reload): Use it.
22402 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22403             Alan Hayward  <alan.hayward@arm.com>
22404             David Sherwood  <david.sherwood@arm.com>
22406         * lra-constraints.c (process_alt_operands): Reject matched
22407         operands whose sizes aren't ordered.
22408         (match_reload): Refer to this check here.
22410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22411             Alan Hayward  <alan.hayward@arm.com>
22412             David Sherwood  <david.sherwood@arm.com>
22414         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22415         that the mode size is in the set {1, 2, 4, 8, 16}.
22417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22418             Alan Hayward  <alan.hayward@arm.com>
22419             David Sherwood  <david.sherwood@arm.com>
22421         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22422         Use plus_constant instead of gen_rtx_PLUS.
22424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22425             Alan Hayward  <alan.hayward@arm.com>
22426             David Sherwood  <david.sherwood@arm.com>
22428         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22429         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22430         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22431         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22432         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22433         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22434         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22435         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22436         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22437         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22438         a poly_int64.
22439         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22440         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22441         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22442         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22443         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22444         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22445         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22446         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22447         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22448         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22449         function.
22450         * expr.c (emit_move_resolve_push): Treat the input and result
22451         of PUSH_ROUNDING as a poly_int64.
22452         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22453         (emit_push_insn): Likewise.
22454         * lra-eliminations.c (mark_not_eliminable): Likewise.
22455         * recog.c (push_operand): Likewise.
22456         * reload1.c (elimination_effects): Likewise.
22457         * rtlanal.c (nonzero_bits1): Likewise.
22458         * calls.c (store_one_arg): Likewise.  Require the padding to be
22459         known at compile time.
22461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22462             Alan Hayward  <alan.hayward@arm.com>
22463             David Sherwood  <david.sherwood@arm.com>
22465         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22466         Use plus_constant instead of gen_rtx_PLUS.
22468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22469             Alan Hayward  <alan.hayward@arm.com>
22470             David Sherwood  <david.sherwood@arm.com>
22472         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22473         rather than an int.
22475 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22476             Alan Hayward  <alan.hayward@arm.com>
22477             David Sherwood  <david.sherwood@arm.com>
22479         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22480         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22481         via stack temporaries.  Treat the mode size as polynomial too.
22483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22484             Alan Hayward  <alan.hayward@arm.com>
22485             David Sherwood  <david.sherwood@arm.com>
22487         * expr.c (expand_expr_real_2): When handling conversions involving
22488         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22489         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22490         as a poly_uint64 too.
22492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22493             Alan Hayward  <alan.hayward@arm.com>
22494             David Sherwood  <david.sherwood@arm.com>
22496         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22498 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22499             Alan Hayward  <alan.hayward@arm.com>
22500             David Sherwood  <david.sherwood@arm.com>
22502         * combine.c (can_change_dest_mode): Handle polynomial
22503         REGMODE_NATURAL_SIZE.
22504         * expmed.c (store_bit_field_1): Likewise.
22505         * expr.c (store_constructor): Likewise.
22506         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22507         and polynomial REGMODE_NATURAL_SIZE.
22508         (gen_lowpart_common): Likewise.
22509         * reginfo.c (record_subregs_of_mode): Likewise.
22510         * rtlanal.c (read_modify_subreg_p): Likewise.
22512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22513             Alan Hayward  <alan.hayward@arm.com>
22514             David Sherwood  <david.sherwood@arm.com>
22516         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22517         numbers of elements.
22519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22520             Alan Hayward  <alan.hayward@arm.com>
22521             David Sherwood  <david.sherwood@arm.com>
22523         * match.pd: Cope with polynomial numbers of vector elements.
22525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22526             Alan Hayward  <alan.hayward@arm.com>
22527             David Sherwood  <david.sherwood@arm.com>
22529         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22530         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
22537         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22538         (ipa_simd_modify_function_body): Likewise.
22540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22541             Alan Hayward  <alan.hayward@arm.com>
22542             David Sherwood  <david.sherwood@arm.com>
22544         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22545         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22546         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22547         (expand_vector_condition, vector_element): Likewise.
22548         (subparts_gt): New function.
22549         (get_compute_type): Use subparts_gt.
22550         (count_type_subparts): Delete.
22551         (expand_vector_operations_1): Use subparts_gt instead of
22552         count_type_subparts.
22554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22555             Alan Hayward  <alan.hayward@arm.com>
22556             David Sherwood  <david.sherwood@arm.com>
22558         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22559         (vect_compile_time_alias): ...this new function.  Do the calculation
22560         on poly_ints rather than trees.
22561         (vect_prune_runtime_alias_test_list): Update call accordingly.
22563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22564             Alan Hayward  <alan.hayward@arm.com>
22565             David Sherwood  <david.sherwood@arm.com>
22567         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22568         numbers of units.
22569         (vect_schedule_slp_instance): Likewise.
22571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22572             Alan Hayward  <alan.hayward@arm.com>
22573             David Sherwood  <david.sherwood@arm.com>
22575         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22576         constant and extern definitions for variable-length vectors.
22577         (vect_get_constant_vectors): Note that the number of units
22578         is known to be constant.
22580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22581             Alan Hayward  <alan.hayward@arm.com>
22582             David Sherwood  <david.sherwood@arm.com>
22584         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22585         of units as polynomial.  Choose between WIDE and NARROW based
22586         on multiple_p.
22588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22589             Alan Hayward  <alan.hayward@arm.com>
22590             David Sherwood  <david.sherwood@arm.com>
22592         * tree-vect-stmts.c (simd_clone_subparts): New function.
22593         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22596             Alan Hayward  <alan.hayward@arm.com>
22597             David Sherwood  <david.sherwood@arm.com>
22599         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22600         vectors as polynomial.  Use build_index_vector for
22601         IFN_GOMP_SIMD_LANE.
22603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22604             Alan Hayward  <alan.hayward@arm.com>
22605             David Sherwood  <david.sherwood@arm.com>
22607         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22608         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22609         for variable-length vectors.
22610         (vectorizable_mask_load_store): Treat the number of units as
22611         polynomial, asserting that it is constant if the condition has
22612         already been enforced.
22613         (vectorizable_store, vectorizable_load): Likewise.
22615 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22616             Alan Hayward  <alan.hayward@arm.com>
22617             David Sherwood  <david.sherwood@arm.com>
22619         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22620         of units as polynomial.  Punt if we can't tell at compile time
22621         which vector contains the final result.
22623 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22624             Alan Hayward  <alan.hayward@arm.com>
22625             David Sherwood  <david.sherwood@arm.com>
22627         * tree-vect-loop.c (vectorizable_induction): Treat the number
22628         of units as polynomial.  Punt on SLP inductions.  Use an integer
22629         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22630         cast of such a series for variable-length floating-point
22631         reductions.
22633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22634             Alan Hayward  <alan.hayward@arm.com>
22635             David Sherwood  <david.sherwood@arm.com>
22637         * tree.h (build_index_vector): Declare.
22638         * tree.c (build_index_vector): New function.
22639         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22640         of units as polynomial, forcibly converting it to a constant if
22641         vectorizable_reduction has already enforced the condition.
22642         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22643         to create a {1,2,3,...} vector.
22644         (vectorizable_reduction): Treat the number of units as polynomial.
22645         Choose vectype_in based on the largest scalar element size rather
22646         than the smallest number of units.  Enforce the restrictions
22647         relied on above.
22649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22650             Alan Hayward  <alan.hayward@arm.com>
22651             David Sherwood  <david.sherwood@arm.com>
22653         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22654         number of units as polynomial.
22656 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22657             Alan Hayward  <alan.hayward@arm.com>
22658             David Sherwood  <david.sherwood@arm.com>
22660         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22661         * target.def (autovectorize_vector_sizes): Return the vector sizes
22662         by pointer, using vector_sizes rather than a bitmask.
22663         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22664         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22665         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22666         Likewise.
22667         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22668         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22669         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22670         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22671         * omp-general.c (omp_max_vf): Likewise.
22672         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22673         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22674         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22675         * tree-vect-slp.c (vect_slp_bb): Likewise.
22676         * doc/tm.texi: Regenerate.
22677         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22678         to a poly_uint64.
22679         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22680         the vector size as a poly_uint64 rather than an unsigned int.
22681         (current_vector_size): Change from an unsigned int to a poly_uint64.
22682         (get_vectype_for_scalar_type): Update accordingly.
22683         * tree.h (build_truth_vector_type): Take the size and number of
22684         units as a poly_uint64 rather than an unsigned int.
22685         (build_vector_type): Add a temporary overload that takes
22686         the number of units as a poly_uint64 rather than an unsigned int.
22687         * tree.c (make_vector_type): Likewise.
22688         (build_truth_vector_type): Take the number of units as a poly_uint64
22689         rather than an unsigned int.
22691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22692             Alan Hayward  <alan.hayward@arm.com>
22693             David Sherwood  <david.sherwood@arm.com>
22695         * target.def (get_mask_mode): Take the number of units and length
22696         as poly_uint64s rather than unsigned ints.
22697         * targhooks.h (default_get_mask_mode): Update accordingly.
22698         * targhooks.c (default_get_mask_mode): Likewise.
22699         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22700         * doc/tm.texi: Regenerate.
22702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22703             Alan Hayward  <alan.hayward@arm.com>
22704             David Sherwood  <david.sherwood@arm.com>
22706         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22707         * omp-general.c (omp_max_vf): Likewise.
22708         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22709         (expand_omp_simd): Handle polynomial safelen.
22710         * omp-low.c (omplow_simd_context): Add a default constructor.
22711         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22712         (lower_rec_simd_input_clauses): Update accordingly.
22713         (lower_rec_input_clauses): Likewise.
22715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22716             Alan Hayward  <alan.hayward@arm.com>
22717             David Sherwood  <david.sherwood@arm.com>
22719         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22720         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22721         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22722         (vect_analyze_slp_cost): Likewise.
22723         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22724         (vect_model_load_cost): Likewise.
22726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22727             Alan Hayward  <alan.hayward@arm.com>
22728             David Sherwood  <david.sherwood@arm.com>
22730         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22731         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22732         from an unsigned int * to a poly_uint64_pod *.
22733         (calculate_unrolling_factor): New function.
22734         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22737             Alan Hayward  <alan.hayward@arm.com>
22738             David Sherwood  <david.sherwood@arm.com>
22740         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22741         from an unsigned int to a poly_uint64.
22742         (_loop_vec_info::slp_unrolling_factor): Likewise.
22743         (_loop_vec_info::vectorization_factor): Change from an int
22744         to a poly_uint64.
22745         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22746         (vect_get_num_vectors): New function.
22747         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22748         (vect_get_num_copies): Use vect_get_num_vectors.
22749         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22750         to an unsigned int *.
22751         (vect_analyze_data_refs): Change min_vf from an int * to a
22752         poly_uint64 *.
22753         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22754         than an unsigned HOST_WIDE_INT.
22755         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22756         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22757         to an unsigned int *.
22758         (vect_analyze_data_ref_dependences): Likewise.
22759         (vect_compute_data_ref_alignment): Handle polynomial vf.
22760         (vect_enhance_data_refs_alignment): Likewise.
22761         (vect_prune_runtime_alias_test_list): Likewise.
22762         (vect_shift_permute_load_chain): Likewise.
22763         (vect_supportable_dr_alignment): Likewise.
22764         (dependence_distance_ge_vf): Take the vectorization factor as a
22765         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22766         (vect_analyze_data_refs): Change min_vf from an int * to a
22767         poly_uint64 *.
22768         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22769         vfm1 as a poly_uint64 rather than an int.  Make the same change
22770         for the returned bound_scalar.
22771         (vect_gen_vector_loop_niters): Handle polynomial vf.
22772         (vect_do_peeling): Likewise.  Update call to
22773         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22774         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22775         be constant.
22776         * tree-vect-loop.c (vect_determine_vectorization_factor)
22777         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22778         (vect_get_known_peeling_cost): Likewise.
22779         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22780         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22781         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22782         updating the upper bounds of the loop.
22783         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22784         rather than an int.
22785         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22786         polynomial unroll factors.
22787         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22788         (vect_make_slp_decision): Likewise.
22789         (vect_supported_load_permutation_p): Likewise, and polynomial
22790         vf too.
22791         (vect_analyze_slp_cost): Handle polynomial vf.
22792         (vect_slp_analyze_node_operations): Likewise.
22793         (vect_slp_analyze_bb_1): Likewise.
22794         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22795         than an unsigned HOST_WIDE_INT.
22796         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22797         (vectorizable_load): Handle polynomial vf.
22798         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22799         a poly_uint64.
22800         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22803             Alan Hayward  <alan.hayward@arm.com>
22804             David Sherwood  <david.sherwood@arm.com>
22806         * match.pd: Handle bit operations involving three constants
22807         and try to fold one pair.
22809 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22811         * tree-vect-loop-manip.c: Include gimple-fold.h.
22812         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22813         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22814         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22815         Add a path that uses a step of VF instead of 1, but disable it
22816         for now.
22817         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22818         and niters_no_overflow parameters.  Update calls to
22819         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22820         Create a new SSA name if the latter choses to use a ste other
22821         than zero, and return it via niters_vector_mult_vf_var.
22822         * tree-vect-loop.c (vect_transform_loop): Update calls to
22823         vect_do_peeling, vect_gen_vector_loop_niters and
22824         slpeel_make_loop_iterate_ntimes.
22825         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22826         (vect_gen_vector_loop_niters): Update declarations after above changes.
22828 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22830         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22831         128-bit round to integer instructions.
22832         (ceil<mode>2): Likewise.
22833         (btrunc<mode>2): Likewise.
22834         (round<mode>2): Likewise.
22836 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22838         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22839         unaligned VSX load/store on P8/P9.
22840         (expand_block_clear): Allow the use of unaligned VSX
22841         load/store on P8/P9.
22843 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22845         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22846         New function.
22847         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22848         swap associated with both a load and a store.
22850 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22852         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22853         * config/riscv/riscv.md (clear_cache): Use it.
22855 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22857         * web.c: Remove out-of-date comment.
22859 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22861         * expr.c (fixup_args_size_notes): Check that any existing
22862         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22863         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22864         (emit_single_push_insn): ...here.
22866 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22868         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22869         (const_vector_encoded_nelts): New function.
22870         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22871         (const_vector_int_elt, const_vector_elt): Declare.
22872         * emit-rtl.c (const_vector_int_elt_1): New function.
22873         (const_vector_elt): Likewise.
22874         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22875         of CONST_VECTOR_ELT.
22877 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22879         * expr.c: Include rtx-vector-builder.h.
22880         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22881         directly on the tree encoding.
22882         (const_vector_from_tree): Likewise.
22883         * optabs.c: Include rtx-vector-builder.h.
22884         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22885         sequence of "u" values.
22886         * vec-perm-indices.c: Include rtx-vector-builder.h.
22887         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22888         directly on the vec_perm_indices encoding.
22890 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22892         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22893         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22894         * rtx-vector-builder.h: New file.
22895         * rtx-vector-builder.c: Likewise.
22896         * rtl.h (rtx_def::u2): Add a const_vector field.
22897         (CONST_VECTOR_NPATTERNS): New macro.
22898         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22899         (CONST_VECTOR_DUPLICATE_P): Likewise.
22900         (CONST_VECTOR_STEPPED_P): Likewise.
22901         (CONST_VECTOR_ENCODED_ELT): Likewise.
22902         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22903         (unwrap_const_vec_duplicate): Likewise.
22904         (const_vec_series_p): Check for a non-duplicated vector encoding.
22905         Say that the function only returns true for integer vectors.
22906         * emit-rtl.c: Include rtx-vector-builder.h.
22907         (gen_const_vec_duplicate_1): Delete.
22908         (gen_const_vector): Call gen_const_vec_duplicate instead of
22909         gen_const_vec_duplicate_1.
22910         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22911         (gen_const_vec_duplicate): Use rtx_vector_builder.
22912         (gen_const_vec_series): Likewise.
22913         (gen_rtx_CONST_VECTOR): Likewise.
22914         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22915         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22916         Build a new vector rather than modifying a CONST_VECTOR in-place.
22917         (handle_special_swappables): Update call accordingly.
22918         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22919         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22920         Build a new vector rather than modifying a CONST_VECTOR in-place.
22921         (handle_special_swappables): Update call accordingly.
22923 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22925         * simplify-rtx.c (simplify_const_binary_operation): Use
22926         CONST_VECTOR_ELT instead of XVECEXP.
22928 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22930         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22931         the selector elements to be different from the data elements
22932         if the selector is a VECTOR_CST.
22933         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22934         ssizetype for the selector.
22936 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22938         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22939         before testing each element individually.
22940         * tree-vect-generic.c (lower_vec_perm): Likewise.
22942 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22944         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22945         * selftest-run-tests.c (selftest::run_tests): Call it.
22946         * vector-builder.h (vector_builder::operator ==): New function.
22947         (vector_builder::operator !=): Likewise.
22948         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22949         (vec_perm_indices::all_from_input_p): New function.
22950         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22951         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22952         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22953         instead of reading the VECTOR_CST directly.  Detect whether both
22954         vector inputs are the same before constructing the vec_perm_indices,
22955         and update the number of inputs argument accordingly.  Use the
22956         utility functions added above.  Only construct sel2 if we need to.
22958 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22960         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22961         the broadcast of the low byte.
22962         (expand_mult_highpart): Use an explicit encoding for the permutes.
22963         * optabs-query.c (can_mult_highpart_p): Likewise.
22964         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22965         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22966         (vectorizable_bswap): Likewise.
22967         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22968         explicit encoding for the power-of-2 permutes.
22969         (vect_permute_store_chain): Likewise.
22970         (vect_grouped_load_supported): Likewise.
22971         (vect_permute_load_chain): Likewise.
22973 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22975         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22976         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22977         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22978         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22979         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22980         (vect_gen_perm_mask_any): Likewise.
22982 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22984         * int-vector-builder.h: New file.
22985         * vec-perm-indices.h: Include int-vector-builder.h.
22986         (vec_perm_indices): Redefine as an int_vector_builder.
22987         (auto_vec_perm_indices): Delete.
22988         (vec_perm_builder): Redefine as a stand-alone class.
22989         (vec_perm_indices::vec_perm_indices): New function.
22990         (vec_perm_indices::clamp): Likewise.
22991         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22992         (vec_perm_indices::new_vector): New function.
22993         (vec_perm_indices::new_expanded_vector): Update for new
22994         vec_perm_indices class.
22995         (vec_perm_indices::rotate_inputs): New function.
22996         (vec_perm_indices::all_in_range_p): Operate directly on the
22997         encoded form, without computing elided elements.
22998         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22999         encoding.  Update for new vec_perm_indices class.
23000         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23001         the given vec_perm_builder.
23002         (expand_vec_perm_var): Update vec_perm_builder constructor.
23003         (expand_mult_highpart): Use vec_perm_builder instead of
23004         auto_vec_perm_indices.
23005         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23006         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23007         or double series encoding as appropriate.
23008         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23009         vec_perm_indices instead of auto_vec_perm_indices.
23010         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23011         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23012         (vect_permute_store_chain): Likewise.
23013         (vect_grouped_load_supported): Likewise.
23014         (vect_permute_load_chain): Likewise.
23015         (vect_shift_permute_load_chain): Likewise.
23016         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23017         (vect_transform_slp_perm_load): Likewise.
23018         (vect_schedule_slp_instance): Likewise.
23019         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23020         (vectorizable_mask_load_store): Likewise.
23021         (vectorizable_bswap): Likewise.
23022         (vectorizable_store): Likewise.
23023         (vectorizable_load): Likewise.
23024         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23025         vec_perm_indices instead of auto_vec_perm_indices.  Use
23026         tree_to_vec_perm_builder to read the vector from a tree.
23027         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23028         vec_perm_builder instead of a vec_perm_indices.
23029         (have_whole_vector_shift): Use vec_perm_builder and
23030         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23031         truncation to calc_vec_perm_mask_for_shift.
23032         (vect_create_epilog_for_reduction): Likewise.
23033         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23034         from auto_vec_perm_indices to vec_perm_indices.
23035         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23036         instead of changing individual elements.
23037         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23038         the vector in d.perm.
23039         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23040         from auto_vec_perm_indices to vec_perm_indices.
23041         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23042         instead of changing individual elements.
23043         (arm_vectorize_vec_perm_const): Use new_vector to install
23044         the vector in d.perm.
23045         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23046         Update vec_perm_builder constructor.
23047         (rs6000_expand_interleave): Likewise.
23048         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23049         (rs6000_expand_interleave): Likewise.
23051 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23053         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23054         to qimode could truncate the indices.
23055         * optabs.c (expand_vec_perm_var): Likewise.
23057 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23059         * Makefile.in (OBJS): Add vec-perm-indices.o.
23060         * vec-perm-indices.h: New file.
23061         * vec-perm-indices.c: Likewise.
23062         * target.h (vec_perm_indices): Replace with a forward class
23063         declaration.
23064         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23065         * optabs.h: Include vec-perm-indices.h.
23066         (expand_vec_perm): Delete.
23067         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23068         (expand_vec_perm_const): Declare.
23069         * target.def (vec_perm_const_ok): Replace with...
23070         (vec_perm_const): ...this new hook.
23071         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23072         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23073         * doc/tm.texi: Regenerate.
23074         * optabs.def (vec_perm_const): Delete.
23075         * doc/md.texi (vec_perm_const): Likewise.
23076         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23077         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23078         expand_vec_perm for constant permutation vectors.  Assert that
23079         the mode of variable permutation vectors is the integer equivalent
23080         of the mode that is being permuted.
23081         * optabs-query.h (selector_fits_mode_p): Declare.
23082         * optabs-query.c: Include vec-perm-indices.h.
23083         (selector_fits_mode_p): New function.
23084         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23085         is defined, instead of checking whether the vec_perm_const_optab
23086         exists.  Use targetm.vectorize.vec_perm_const instead of
23087         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23088         fit in the vector mode before using a variable permute.
23089         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23090         vec_perm_indices instead of an rtx.
23091         (expand_vec_perm): Replace with...
23092         (expand_vec_perm_const): ...this new function.  Take the selector
23093         as a vec_perm_indices rather than an rtx.  Also take the mode of
23094         the selector.  Update call to shift_amt_for_vec_perm_mask.
23095         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23096         Use vec_perm_indices::new_expanded_vector to expand the original
23097         selector into bytes.  Check whether the indices fit in the vector
23098         mode before using a variable permute.
23099         (expand_vec_perm_var): Make global.
23100         (expand_mult_highpart): Use expand_vec_perm_const.
23101         * fold-const.c: Includes vec-perm-indices.h.
23102         * tree-ssa-forwprop.c: Likewise.
23103         * tree-vect-data-refs.c: Likewise.
23104         * tree-vect-generic.c: Likewise.
23105         * tree-vect-loop.c: Likewise.
23106         * tree-vect-slp.c: Likewise.
23107         * tree-vect-stmts.c: Likewise.
23108         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23109         Delete.
23110         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23111         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23112         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23113         (aarch64_vectorize_vec_perm_const): ...this new function.
23114         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23115         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23116         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23117         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23118         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23119         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23120         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23121         into...
23122         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23123         check for NEON modes.
23124         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23125         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23126         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23127         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23128         into...
23129         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23130         the old VEC_PERM_CONST conditions.
23131         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23132         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23133         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23134         (ia64_vectorize_vec_perm_const_ok): Merge into...
23135         (ia64_vectorize_vec_perm_const): ...this new function.
23136         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23137         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23138         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23139         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23140         * config/mips/mips.c (mips_expand_vec_perm_const)
23141         (mips_vectorize_vec_perm_const_ok): Merge into...
23142         (mips_vectorize_vec_perm_const): ...this new function.
23143         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23144         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23145         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23146         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23147         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23148         (rs6000_expand_vec_perm_const): Delete.
23149         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23150         Delete.
23151         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23152         (altivec_expand_vec_perm_const_le): Take each operand individually.
23153         Operate on constant selectors rather than rtxes.
23154         (altivec_expand_vec_perm_const): Likewise.  Update call to
23155         altivec_expand_vec_perm_const_le.
23156         (rs6000_expand_vec_perm_const): Delete.
23157         (rs6000_vectorize_vec_perm_const_ok): Delete.
23158         (rs6000_vectorize_vec_perm_const): New function.
23159         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23160         an element count and rtx array.
23161         (rs6000_expand_extract_even): Update call accordingly.
23162         (rs6000_expand_interleave): Likewise.
23163         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23164         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23165         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23166         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23167         (rs6000_expand_vec_perm_const): Delete.
23168         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23169         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23170         (altivec_expand_vec_perm_const_le): Take each operand individually.
23171         Operate on constant selectors rather than rtxes.
23172         (altivec_expand_vec_perm_const): Likewise.  Update call to
23173         altivec_expand_vec_perm_const_le.
23174         (rs6000_expand_vec_perm_const): Delete.
23175         (rs6000_vectorize_vec_perm_const_ok): Delete.
23176         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23177         reference to the SPE evmerge intructions.
23178         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23179         an element count and rtx array.
23180         (rs6000_expand_extract_even): Update call accordingly.
23181         (rs6000_expand_interleave): Likewise.
23182         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23183         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23184         new function.
23185         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23187 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23189         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23190         vector mode and that that mode matches the mode of the data
23191         being permuted.
23192         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23193         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23194         directly using expand_vec_perm_1 when forcing selectors into
23195         registers.
23196         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23198 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23200         * optabs-query.h (can_vec_perm_p): Delete.
23201         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23202         * optabs-query.c (can_vec_perm_p): Split into...
23203         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23204         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23205         particular selector is valid.
23206         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23207         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23208         (vect_grouped_load_supported): Likewise.
23209         (vect_shift_permute_load_chain): Likewise.
23210         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23211         (vect_transform_slp_perm_load): Likewise.
23212         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23213         (vectorizable_bswap): Likewise.
23214         (vect_gen_perm_mask_checked): Likewise.
23215         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23216         implementations of variable permutation vectors into account
23217         when deciding which selector to use.
23218         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23219         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23220         with a false third argument.
23221         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23222         to test whether the constant selector is valid and can_vec_perm_var_p
23223         to test whether a variable selector is valid.
23225 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23227         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23228         * optabs-query.c (can_vec_perm_p): Likewise.
23229         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23230         instead of vec_perm_indices.
23231         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23232         (vect_gen_perm_mask_checked): Likewise,
23233         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23234         (vect_gen_perm_mask_checked): Likewise,
23236 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23238         * optabs-query.h (qimode_for_vec_perm): Declare.
23239         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23240         (qimode_for_vec_perm): ...this new function.
23241         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23243 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23245         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23246         does not have a conditional at the top.
23248 2018-01-02  Richard Biener  <rguenther@suse.de>
23250         * ipa-inline.c (big_speedup_p): Fix expression.
23252 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23254         PR target/81616
23255         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23256         for generic 4->6.
23258 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23260         PR target/81616
23261         Generic tuning.
23262         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23263         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23264         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23265         cond_taken_branch_cost 3->4.
23267 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23269         PR tree-optimization/83581
23270         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23271         TODO_cleanup_cfg if any changes have been made.
23273         PR middle-end/83608
23274         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23275         convert_modes if target mode has the right side, but different mode
23276         class.
23278         PR middle-end/83609
23279         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23280         last argument when extracting from CONCAT.  If either from_real or
23281         from_imag is NULL, use expansion through memory.  If result is not
23282         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23283         the parts directly to inner mode, if even that fails, use expansion
23284         through memory.
23286         PR middle-end/83623
23287         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23288         check for bswap in mode rather than HImode and use that in expand_unop
23289         too.
23291 Copyright (C) 2018 Free Software Foundation, Inc.
23293 Copying and distribution of this file, with or without modification,
23294 are permitted in any medium without royalty provided the copyright
23295 notice and this notice are preserved.