PR tree-optimization/71625 - missing strlen optimization on different array
[official-gcc.git] / gcc / ChangeLog
blob8ca8b562a0e71e1a0524b571045700b9ba6b438d
1 2018-08-15  Martin Sebor  <msebor@redhat.com>
3         PR tree-optimization/71625
4         * config/aarch64/aarch64-builtins.c
5         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
9         * config/s390/s390.c (s390_reorg): Remove loop.
11 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
13         * config/darwin.c
14          (darwin_function_switched_text_sections): Delete.
15         * gcc/config/darwin.h
16          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
18 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
20         PR target/81685
21         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
22         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
23         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
25 2018-08-15  Martin Liska  <mliska@suse.cz>
27         PR tree-optimization/86925
28         * predict.c (expr_expected_value_1): When taking
29         later predictor, assign also probability.
30         Use fold_build2_initializer_loc in order to fold
31         the expression in -frounding-math.
33 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
35         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
36         patterns.
37         (expand_vec_perm_1): Try the new method.
39 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
41         PR target/86547
42         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
43         Check whether lra_live_max_point is 0 before dividing.
45 2018-08-14  Martin Sebor  <msebor@redhat.com>
47         PR tree-optimization/86650
48         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
49         (vrp_prop::check_mem_ref): Same.
51 2018-08-13  Liu Hao <lh_mouse@126.com>
53         * pretty-print.c (eat_esc_sequence): Swap the foreground and
54         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
55         and clear it thereafter, as it only works for DBCS.
57 2018-08-13  Liu Hao <lh_mouse@126.com>
59         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
60         handle returned by _get_osf_handle().
62 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
64         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
65         for folding vec_perm.
67 2018-08-13 Will Schmidt  <will_schmidt@vnet.ibm.com>
69         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
70         Add support for gimple-folding of vec_pack() and vec_unpack()
71         intrinsics.
73 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
75         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
76         vec_xst variants to the list.
77         (rs6000_gimple_fold_builtin): Add support for folding unaligned
78         vector loads and stores.
80 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
82         * config.gcc (rs6000-ibm-aix4.x): Delete.
83         (rs6000-ibm-aix5.1): Delete.
84         (rs6000-ibm-aix5.2): Delete.
85         (rs6000-ibm-aix5.3): Delete.
86         * config/rs6000/aix43.h: Delete.
87         * config/rs6000/aix51.h: Delete.
88         * config/rs6000/aix52.h: Delete.
89         * config/rs6000/t-aix43: Delete.
91 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
93         * config/s390/s390.c (s390_decompose_constant_pool_ref):
94         New function.
95         (s390_decompose_address): Factor out constant pool ref
96         decomposition.
98 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
100         * config/nds32/nds32-predicates.c
101         (nds32_can_use_bclr_p): Change return type as bool.
102         (nds32_can_use_bset_p): Ditto.
103         (nds32_can_use_btgl_p): Ditto.
104         (nds32_can_use_bitci_p): Ditto.
105         * config/nds32/nds32-protos.h
106         (nds32_can_use_bclr_p): Change declaration.
107         (nds32_can_use_bset_p): Ditto.
108         (nds32_can_use_btgl_p): Ditto.
109         (nds32_can_use_bitci_p): Ditto.
111 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
113         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
114         Support -msched-prolog-epilog option.
115         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
117 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
119         * common/config/nds32/nds32-common.c
120         (nds32_option_optimization_table): Enalbe -malways-align.
122 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
124         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
125         extra_headers.
126         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
127         OPT_misr_secure_ case.
128         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
129         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
130         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
131         secure attribute.
132         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
133         (nds32_isr_info): New field security_level.
134         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
135         * config/nds32/nds32.md (return_internal): Consider critical attribute.
136         * config/nds32/nds32.opt (misr-secure): New option.
137         * config/nds32/nds32_init.inc: New file.
138         * config/nds32/nds32_isr.h: New file.
140 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
142         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
143         Update comment for atomic instructions.
144         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
145         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
146         Remove.
147         (atomic_loaddi): Revise fence expansion to only emit fence prior to
148         load for __ATOMIC_SEQ_CST model.
149         (atomic_loaddi_1): Remove float register target.
150         (atomic_storedi): Handle CONST_INT values.
151         (atomic_storedi_1): Remove float register source.  Add special case
152         for zero value.
153         (memory_barrier): New expander and insn.
155 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
157         PR tree-optimization/86835
158         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
159         new_stmt after def_gsi, make sure to insert new_square_stmt after
160         that stmt, not 2 stmts before it.
162 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
164         PR target/82418
165         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
166         instead of SWI48.
168 2018-08-10  Martin Liska  <mliska@suse.cz>
170         PR target/83610
171         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
172         function type.
173         * builtins.c (expand_builtin_expect_with_probability):
174         New function.
175         (expand_builtin_expect_with_probability): New function.
176         (build_builtin_expect_predicate): Add new argumnet probability
177         for BUILT_IN_EXPECT_WITH_PROBABILITY.
178         (fold_builtin_expect):
179         (fold_builtin_2):
180         (fold_builtin_3):
181         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
182         * builtins.h (fold_builtin_expect): Set new argument.
183         * doc/extend.texi: Document __builtin_expect_with_probability.
184         * doc/invoke.texi: Likewise.
185         * gimple-fold.c (gimple_fold_call): Pass new argument.
186         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
187         also BUILT_IN_EXPECT_WITH_PROBABILITY.
188         * predict.c (get_predictor_value): New function.
189         (expr_expected_value): Add new argument probability. Assume
190         that predictor and probability are always non-null.
191         (expr_expected_value_1): Likewise.  For __builtin_expect and
192         __builtin_expect_with_probability set probability.  Handle
193         combination in binary expressions.
194         (tree_predict_by_opcode): Simplify code by simply calling
195         get_predictor_value.
196         (pass_strip_predict_hints::execute): Add handling of
197         BUILT_IN_EXPECT_WITH_PROBABILITY.
198         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
199         new predictor.
200         * tree.h (DECL_BUILT_IN_P): New function.
202 2018-08-10  Martin Liska  <mliska@suse.cz>
204         PR tree-optimization/85799
205         * passes.def: Add argument for pass_strip_predict_hints.
206         * predict.c (class pass_strip_predict_hints): Add new argument
207         early_p.
208         (strip_predictor_early): New function.
209         (pass_strip_predict_hints::execute): Call the function to
210         strip predictors.
211         (strip_predict_hints): New function.
212         * predict.def: Fix comment.
214 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
216         * Makefile.in: Clarify which tm.texi to copy over to assert the
217         right to grant a GFDL license for all.
219 2018-08-09  Jeff Law  <law@redhat.com>
221         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
222         unused variable.
224 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
226         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
227         prototype.
229 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
231         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
232         reductions for variable-length vectors.
234 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
236         PR other/84889
237         * common.opt (fdiagnostics-show-line-numbers): New option.
238         * diagnostic-show-locus.c (class layout): Add fields
239         "m_show_line_numbers_p" and "m_linenum_width";
240         (num_digits): New function.
241         (test_num_digits): New function.
242         (layout::layout): Initialize new fields.  Update m_x_offset
243         logic to handle any left margin.
244         (layout::print_source_line): Print line number when requested.
245         (layout::start_annotation_line): New member function.
246         (layout::print_annotation_line): Call it.
247         (layout::print_leading_fixits): Likewise.
248         (layout::print_trailing_fixits): Likewise.  Update calls to
249         move_to_column for new parameter.
250         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
251         it to potentially call start_annotation_line.
252         (layout::show_ruler): Call start_annotation_line.
253         (selftest::test_line_numbers_multiline_range): New selftest.
254         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
255         and selftest::test_line_numbers_multiline_range.
256         * diagnostic.c (diagnostic_initialize): Initialize
257         show_line_numbers_p.
258         * diagnostic.h (struct diagnostic_context): Add field
259         "show_line_numbers_p".
260         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
261         -fno-diagnostics-show-line-numbers.
262         * dwarf2out.c (gen_producer_string): Add
263         OPT_fdiagnostics_show_line_numbers to the ignored options.
264         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
265         one setting" options.
266         (append_compiler_options): Likewise to the dropped options.
267         (append_diag_options): Likewise to the passed-on options.
268         * opts.c (common_handle_option): Handle the new option.
269         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
271 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
273         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
274         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
275         third argument of type "const signed char" to descriptions of
276         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
277         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
278         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
279         __builtin_bcdsub_ov functions.
281 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
283         PR tree-optimization/86858
284         * tree-vect-loop.c (vect_is_simple_reduction): Restore
285         flow_bb_inside_loop_p calls.
287 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
289         PR tree-optimization/86871
290         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
291         instead of gimple_assign_lhs.
293 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
295         PR target/86887
296         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
297         register constraint to operand 0.
298         (add<mode>3_carryinC): Likewise.
299         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
301 2018-08-09  Martin Liska  <mliska@suse.cz>
303         PR c/86895
304         * common.opt: Remove extra line.
306 2018-08-09  Martin Liska  <mliska@suse.cz>
308         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
309         at the end of a line, make first letter capital and end up
310         a sentence with a dot.
311         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
312         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
313         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
314         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
315         (PARAM_MAX_ISL_OPERATIONS): Likewise.
316         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
317         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
318         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
319         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
320         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
321         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
322         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
323         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
324         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
325         (PARAM_TREE_REASSOC_WIDTH): Likewise.
326         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
327         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
328         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
330 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
332         PR target/84332
333         * config/s390/s390.c (s390_option_override_internal): Reduce the
334         stack-clash-protection-probe-interval param if it would be too big
335         for z900.
337 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
339         PR target/46179
340         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
341         * config/m68k/m68k.c (handle_move_double): Don't call
342         m68k_final_prescan_insn.
343         (m68k_adjust_decorated_operand): Renamed from
344         m68k_final_prescan_insn, remove first and third operand and
345         simplify.
346         (print_operand): Call it.
347         (print_operand_address): Call it.
349 2018-08-08  Nathan Sidwell  <nathan@acm.org>
351         * diagnostic.c (diagnostic_report_current_module): Use
352         linemap_included_from & linemap_included_from_linemap.
354 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
356         * config/aarch64/aarch64-cores.def: Add phecda core.
357         * config/aarch64/aarch64-tune.md: Regenerate.
358         * doc/invoke.texi: Add phecda core.
360 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
362         PR target/85295
363         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
364         definitions.
365         * config/s390/s390.md ("movti"): Add more alternatives for
366         constant to GPR copies.
368 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
370         * config/s390/s390.c: Fix whitespace damage throughout the file.
371         * config/s390/s390.h: Likewise.
372         * config/s390/tpf.h: Likewise.
374 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
376         * config/s390/s390.c (s390_loadrelative_operand_p):
377         Remove TARGET_CPU_ZARCH usages.
378         (s390_rtx_costs): Likewise.
379         (s390_legitimate_constant_p): Likewise.
380         (s390_cannot_force_const_mem): Likewise.
381         (legitimate_reload_constant_p): Likewise.
382         (s390_preferred_reload_class): Likewise.
383         (legitimize_pic_address): Likewise.
384         (legitimize_tls_address): Likewise.
385         (s390_split_branches): Removed.
386         (s390_add_execute): Removed.
387         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
388         (s390_mainpool_start): Likewise.
389         (s390_mainpool_finish): Likewise.
390         (s390_mainpool_cancel): Removed.
391         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
392         (s390_chunkify_cancel): Likewise.
393         (s390_return_addr_rtx): Likewise.
394         (s390_register_info): Remove split_branches_pending_p uages.
395         (s390_optimize_register_info): Likewise.
396         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
397         split_branches_pending_p usages.
398         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
399         (s390_load_got): Likewise.
400         (s390_expand_split_stack_prologue): Likewise.
401         (output_asm_nops): Likewise.
402         (s390_function_profiler): Likewise.
403         (s390_emit_call): Likewise.
404         (s390_conditional_register_usage): Likewise.
405         (s390_optimize_prologue): Likewise.
406         (s390_reorg): Remove TARGET_CPU_ZARCH and
407         split_branches_pending_p usages.
408         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
409         usages.
410         (s390_output_indirect_thunk_function): Likewise.
411         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
412         (TARGET_CPU_ZARCH_P): Removed.
413         (struct machine_function): Remove split_branches_pending_p.
414         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
416 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
418         * common/config/s390/s390-common.c (processor_flags_table):
419         Remove flags.
420         * config.gcc: Remove with_arch/with_tune support.
421         * config/s390/2064.md: Remove cpu attribute comparisons.
422         * config/s390/driver-native.c (s390_host_detect_local_cpu):
423         Remove MTN.
424         * config/s390/linux.h (ASM_SPEC):
425         Remove -march support.
426         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
427         Use a table to get an arch level.
428         * config/s390/s390-opts.h (enum processor_type):
429         Remove enum values.
430         * config/s390/s390.c
431         (processor_table): Remove entries, add arch_level values.
432         (s390_issue_rate): Remove cases.
433         (s390_option_override): Adjust
434         s390_option_override_internal() call.
435         (s390_option_override_internal): Remove deprecation warning.
436         (s390_valid_target_attribute_tree): Adjust
437         s390_option_override_internal() call.
438         * config/s390/s390.h (struct s390_processor):
439         Share with s390-c.c, add arch_level field.
440         * config/s390/s390.md:
441         Remove occurrences in cpu attribute.
442         * config/s390/s390.opt: Remove -march/-mtune support.
443         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
444         * doc/invoke.texi: Remove deprecation warning.
446 2018-08-08  Luis Machado  <luis.machado@linaro.org>
448         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
449         global.
450         (qdf24xx_tunings): Set vector cost structure to
451         qdf24xx_vector_cost.
453         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
454         <register_sextend>: Set to 3.
456 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
458         PR target/86838
459         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
460         * config/aarch64/aarch64-simd.md
461         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
462         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
463         (aarch64_frecpx<mode>): ...this new pattern.
464         * config/aarch64/aarch64-simd-builtins.def: Remove comment
465         about aarch64_frecp<FRECP:frecp_suffix><mode>.
467 2018-08-07  Martin Liska  <mliska@suse.cz>
469         PR middle-end/83023
470         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
471         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
472         * predict.def (PRED_MALLOC_NONNULL): New predictor.
473         * doc/extend.texi: Document that malloc attribute adds
474         hit to compiler.
476 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
478         PR target/86785
479         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
480         Define to speculation_safe_value_not_needed.
482 2018-08-06  Jeff Law  <law@redhat.com>
484         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
485         the vr_values instance to cprop_into_stmt.
486         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
487         (cprop_operand): Also query EVRP to determine if OP is a constant.
488         
489 2018-08-06  Nathan Sidwell  <nathan@acm.org>
491         * diagnostic.c (diagnostic_report_current_module): Reroll
492         included-at loop.  Translate text.
494 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
496         * function-tests.c (selftest::test_expansion_to_rtl): Call
497         free_after_compilation.
499 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
501         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
503 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
505         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
506         loops with memory block operations from getting unrolled.
508 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
510         PR target/86807
511         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
512         Define to speculation_safe_value_not_needed.
514 2018-08-06  Jeff Law  <law@redhat.com>
516         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
517         assert.
519 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
521         PR target/86662
522         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
523         with all enabled __intN types.
525         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
527 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
529         * alias.c (record_set): Check for clobber high.
530         * cfgexpand.c (expand_gimple_stmt): Likewise.
531         * combine-stack-adj.c (single_set_for_csa): Likewise.
532         * combine.c (find_single_use_1): Likewise.
533         (set_nonzero_bits_and_sign_copies): Likewise.
534         (get_combine_src_dest): Likewise.
535         (is_parallel_of_n_reg_sets): Likewise.
536         (try_combine): Likewise.
537         (record_dead_and_set_regs_1): Likewise.
538         (reg_dead_at_p_1): Likewise.
539         (reg_dead_at_p): Likewise.
540         * dce.c (deletable_insn_p): Likewise.
541         (mark_nonreg_stores_1): Likewise.
542         (mark_nonreg_stores_2): Likewise.
543         * df-scan.c (df_find_hard_reg_defs): Likewise.
544         (df_uses_record): Likewise.
545         (df_get_call_refs): Likewise.
546         * dwarf2out.c (mem_loc_descriptor): Likewise.
547         * haifa-sched.c (haifa_classify_rtx): Likewise.
548         * ira-build.c (create_insn_allocnos): Likewise.
549         * ira-costs.c (scan_one_insn): Likewise.
550         * ira.c (equiv_init_movable_p): Likewise.
551         (rtx_moveable_p): Likewise.
552         (interesting_dest_for_shprep): Likewise.
553         * jump.c (mark_jump_label_1): Likewise.
554         * postreload-gcse.c (record_opr_changes): Likewise.
555         * postreload.c (reload_cse_simplify): Likewise.
556         (struct reg_use): Add source expr.
557         (reload_combine): Check for clobber high.
558         (reload_combine_note_use): Likewise.
559         (reload_cse_move2add): Likewise.
560         (move2add_note_store): Likewise.
561         * print-rtl.c (print_pattern): Likewise.
562         * recog.c (decode_asm_operands): Likewise.
563         (store_data_bypass_p): Likewise.
564         (if_test_bypass_p): Likewise.
565         * regcprop.c (kill_clobbered_value): Likewise.
566         (kill_set_value): Likewise.
567         * reginfo.c (reg_scan_mark_refs): Likewise.
568         * reload1.c (maybe_fix_stack_asms): Likewise.
569         (eliminate_regs_1): Likewise.
570         (elimination_effects): Likewise.
571         (mark_not_eliminable): Likewise.
572         (scan_paradoxical_subregs): Likewise.
573         (forget_old_reloads_1): Likewise.
574         * reorg.c (find_end_label): Likewise.
575         (try_merge_delay_insns): Likewise.
576         (redundant_insn): Likewise.
577         (own_thread_p): Likewise.
578         (fill_simple_delay_slots): Likewise.
579         (fill_slots_from_thread): Likewise.
580         (dbr_schedule): Likewise.
581         * resource.c (update_live_status): Likewise.
582         (mark_referenced_resources): Likewise.
583         (mark_set_resources): Likewise.
584         * rtl.c (copy_rtx): Likewise.
585         * rtlanal.c (reg_referenced_p): Likewise.
586         (single_set_2): Likewise.
587         (noop_move_p): Likewise.
588         (note_stores): Likewise.
589         * sched-deps.c (sched_analyze_reg): Likewise.
590         (sched_analyze_insn): Likewise.
592 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
594         * cse.c (invalidate_reg): New function extracted from...
595         (invalidate): ...here.
596         (canonicalize_insn): Check for clobber high.
597         (invalidate_from_clobbers): invalidate clobber highs.
598         (invalidate_from_sets_and_clobbers): Likewise.
599         (count_reg_usage): Check for clobber high.
600         (insn_live_p): Likewise.
601         * cselib.c (cselib_expand_value_rtx_1):Likewise.
602         (cselib_invalidate_regno): Check for clobber in setter.
603         (cselib_invalidate_rtx): Pass through setter.
604         (cselib_invalidate_rtx_note_stores):
605         (cselib_process_insn): Check for clobber high.
606         * cselib.h (cselib_invalidate_rtx): Add operand.
608 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
610         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
611         (mark_not_eliminable): Likewise.
612         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
613         * lra-lives.c (process_bb_lives): Check for clobber high.
614         * lra.c (new_insn_reg): Remember clobber highs.
615         (collect_non_operand_hard_regs): Check for clobber high.
616         (lra_set_insn_recog_data): Likewise.
617         (add_regs_to_insn_regno_info): Likewise.
618         (lra_update_insn_regno_info): Likewise.
620 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
622         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
623         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
625 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
627         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
628         (copy_insn_1): Likewise.
629         (gen_hard_reg_clobber_high): New gen function.
630         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
631         * genemit.c (gen_exp): Likewise.
632         (gen_emit_seq): Pass through info.
633         (gen_insn): Check for CLOBBER_HIGH.
634         (gen_expand): Pass through info.
635         (gen_split): Likewise.
636         (output_add_clobbers): Likewise.
637         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
638         (remove_clobbers): Likewise.
639         * rtl.h (gen_hard_reg_clobber_high): New declaration.
641 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
643         * doc/rtl.texi (clobber_high): Add.
644         (parallel): Add in clobber high
645         * rtl.c (rtl_check_failed_code3): Add function.
646         * rtl.def (CLOBBER_HIGH): Add expression.
647         * rtl.h (RTL_CHECKC3): Add macro.
648         (rtl_check_failed_code3): Add declaration.
649         (XC3EXP): Add macro.
651 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
653         PR target/86386
654         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
655         cfun->machine->max_used_stack_alignment if needed.
657 2018-08-04  Martin Sebor  <msebor@redhat.com>
659         PR tree-optimization/86571
660         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
661         NaN output to 4.
663 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
665         PR target/86799
666         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
667         Define.
669 2018-08-03  Jeff Law  <law@redhat.com>
671         PR target/86795
672         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
673         Define to speculation_safe_value_not_needed.
675 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
677         * doc/gcov.texi (-x): Remove duplicate "to".
678         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
679         (-Wif-not-aligned): Remove duplicate "is".
680         (-flto): Remove duplicate "the".
681         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
682         duplicate "v5.00.b".
683         (MSP430 Options): Remove duplicate "and" from the description
684         of "-mgprel-sec=regexp".
685         (x86 Options): Remove duplicate copies of "vmldLog102" and
686         vmlsLog104 from description of "-mveclibabi=type".
688 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
690         * internal-fn.h (first_commutative_argument): Declare.
691         * internal-fn.c (first_commutative_argument): New function.
692         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
693         restrictions for pattern statements.  Use first_commutative_argument
694         to look for commutative operands in calls to internal functions.
696 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
698         * Makefile.in (wide-int-range.o): New.
699         * tree-vrp.c: Move all the wide_int_* functions to...
700         * wide-int-range.cc: ...here.
701         * tree-vrp.h: Move all the wide_int_* prototypes to...
702         * wide-int-range.h: ...here.
704 2018-08-03  Tom de Vries  <tdevries@suse.de>
706         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
707         UI_NONE.
708         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
709         * except.c (output_function_exception_table): Do early exit if
710         targetm_common.except_unwind_info (&global_options) == UI_NONE.
712 2018-08-03  Martin Liska  <mliska@suse.cz>
714         * predict.c (dump_prediction): Change to 2 digits
715         in fraction part.
717 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
719         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
720         neon_dup_q to...
721         (falkor_am_1_gtov_gtov): ... a new insn reservation.
723 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
725         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
726         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
727         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
728         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
729         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
731 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
733         * diagnostic-show-locus.c (diagnostic_show_locus): Use
734         pp_take_prefix when saving the existing prefix.
735         * diagnostic.c (diagnostic_append_note): Likewise.
736         * langhooks.c (lhd_print_error_function): Likewise.
737         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
738         param's type.  Free the existing prefix.
739         (pp_take_prefix): New function.
740         (pretty_printer::pretty_printer): Drop the prefix parameter.
741         Rename the length parameter to match the comment.
742         (pretty_printer::~pretty_printer): Free the prefix.
743         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
744         parameter.
745         (struct pretty_printer): Drop the "const" from "prefix" field's
746         type and clarify memory management.
747         (pp_set_prefix): Drop the "const" from the 2nd param.
748         (pp_take_prefix): New decl.
750 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
752         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
753         for word_mode_ok here instead of passing as argument.
754         (expand_block_compare): Change select_block_compare_mode() call.
755         (expand_strncmp_gpr_sequence): New function.
756         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
758 2018-08-02  Jeff Law  <law@redhat.com>
760         PR target/86790
761         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
762         Define to speculation_safe_value_not_needed.
764         PR target/86784
765         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
766         Define to speculation_safe_value_not_needed.
768 2018-08-02  Tom de Vries  <tdevries@suse.de>
770         PR target/86660
771         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
772         function.  Return UI_TARGET unconditionally.
773         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
774         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
776 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
778         * genemit.c (print_overload_test): Fix typo.
780 2018-08-02  Richard Biener  <rguenther@suse.de>
782         PR tree-optimization/86816
783         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
784         which checks for value availability before querying it.
785         (gvn_uses_equal): Use it.
786         (same_succ_hash): Likewise.
787         (gimple_equal_p): Likewise.
789 2018-08-02  Nick Clifton  <nickc@redhat.com>
791         PR target/86813
792         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
793         Define to speculation_safe_value_not_needed.
795         PR target/86810
796         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
797         Define to speculation_safe_value_not_needed.
799         PR target/86810
800         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
801         Define to speculation_safe_value_not_needed.
803         PR target/86803
804         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
805         Define to speculation_safe_value_not_needed.
807         PR target/86797
808         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
809         Define to speculation_safe_value_not_needed.
811         PR target/86791
812         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
813         Define to speculation_safe_value_not_needed.
815         PR target/86789
816         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
817         Define to speculation_safe_value_not_needed.
819         PR target/86787
820         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
821         Define to speculation_safe_value_not_needed.
823         PR target/86782
824         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
825         speculation_safe_value_not_needed.
827         PR target/86781
828         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
829         to speculation_safe_value_not_needed.
831 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
833         * doc/md.texi: Expand the documentation of instruction names
834         to mention port-local uses.  Document '@' in pattern names.
835         * read-md.h (overloaded_instance, overloaded_name): New structs.
836         (mapping): Declare.
837         (md_reader::handle_overloaded_name): New member function.
838         (md_reader::get_overloads): Likewise.
839         (md_reader::m_first_overload): New member variable.
840         (md_reader::m_next_overload_ptr): Likewise.
841         (md_reader::m_overloads_htab): Likewise.
842         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
843         m_next_overload_ptr and m_overloads_htab.
844         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
845         (get_mode_token, get_code_token, get_int_token): New functions.
846         (map_attr_string): Add an optional argument that passes back
847         the associated iterator.
848         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
849         (md_reader::handle_overloaded_name, add_overload_instance): New
850         functions.
851         (apply_iterators): Handle '@' names.  Report an error if '@'
852         is used without iterators.
853         (initialize_iterators): Initialize the new iterator_group fields.
854         * genopinit.c (handle_overloaded_code_for)
855         (handle_overloaded_gen): New functions.
856         (main): Use them to print declarations of maybe_code_for_* and
857         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
858         * genemit.c (print_overload_arguments, print_overload_test)
859         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
860         (main): Use it to print definitions of maybe_code_for_* and
861         maybe_gen_* functions.
862         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
863         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
864         instead of explicit mode checks.
865         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
866         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
867         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
868         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
869         (aarch64_expand_compare_and_swap): Likewise
870         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
871         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
872         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
873         (aarch64_constant_pool_reload_icode): Delete.
874         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
875         instead of aarch64_constant_pool_reload_icode.  Use
876         code_for_aarch64_reload_mov instead of explicit mode checks.
877         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
878         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
879         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
880         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
881         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
882         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
883         (aarch64_atomic_load_op_code): Delete.
884         (aarch64_emit_atomic_load_op): Likewise.
885         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
886         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
887         instead of aarch64_emit_atomic_load_op.
888         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
889         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
890         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
891         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
892         character before the pattern name.
893         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
894         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
895         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
896         (aarch64_frecps<mode>): Likewise.
897         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
898         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
899         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
900         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
901         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
903 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
905         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
906         Allow HFmode constants if TARGET_FP_F16INST.
908 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
910         PR target/86014
911         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
912         No longer check last store for clobber of address register.
914 2018-08-02  Martin Liska  <mliska@suse.cz>
916         PR gcov-profile/86817
917         * gcov.c (process_all_functions): New function.
918         (main): Call it.
919         (process_file): Move functions processing to
920         process_all_functions.
922 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
924         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
925         "const" to the "gimple *" and "rtx_insn *" parameters.
926         * dumpfile.h (dump_user_location_t::dump_user_location_t):
927         Likewise.
928         (dump_location_t::dump_location_t): Likewise.
930 2018-08-01  Martin Sebor  <msebor@redhat.com>
932         PR tree-optimization/86650
933         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
934         rather than a "gcall *".  Directly pass the data of interest
935         to percent_K_format, rather than building a temporary CALL_EXPR
936         to hold it.
937         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
938         (gimple_fold_builtin_strncat): Adjust.
939         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
940         gcall* argument with gimple*.
941         * gimple-ssa-warn-restrict.c (check_call): Same.
942         (wrestrict_dom_walker::before_dom_children): Same.
943         (builtin_access::builtin_access): Same.
944         (check_bounds_or_overlap): Same
945         (maybe_diag_overlap): Same.
946         (maybe_diag_offset_bounds): Same.
947         * tree-diagnostic.c (default_tree_printer): Move usage of
948         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
949         to this callsite.
950         * tree-pretty-print.c (percent_K_format): Add argument.
951         * tree-pretty-print.h: Add argument.
952         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
953         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
954         (maybe_diag_stxncpy_trunc): Same.
955         (handle_builtin_stxncpy): Same.
956         (handle_builtin_strcat): Same.
958 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
960         * match.pd: Optimise pointer range checks.
962 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
964         PR tree-optimization/86758
965         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
966         to remove pattern statements.
968 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
970         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
971         result of dfs_enumerate_from when constructing stmt_vec_infos,
972         instead of additionally calling get_loop_body.
974 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
976         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
977         parameter.
978         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
979         When creating an iv, assert that the step is not known to be zero.
980         (vect_setup_realignment): Update call accordingly.
981         * tree-vect-stmts.c (vectorizable_store): Likewise.
982         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
984 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
986         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
987         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
988         (vectorizable_reduction): Likewise.
989         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
990         (vect_detect_hybrid_slp_stmts): Likewise.
991         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
993 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
995         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
996         (wide_int_set_zero_nonzero_bits): ...this.
997         (zero_nonzero_bits_from_vr): Rename to...
998         (vrp_set_zero_nonzero_bits): ...this.
999         (extract_range_from_multiplicative_op_1): Abstract wide int
1000         code...
1001         (wide_int_range_multiplicative_op): ...here.
1002         (extract_range_from_binary_expr_1): Extract wide int binary
1003         operations into their own functions.
1004         (wide_int_range_lshift): New.
1005         (wide_int_range_can_optimize_bit_op): New.
1006         (wide_int_range_shift_undefined_p): New.
1007         (wide_int_range_bit_xor): New.
1008         (wide_int_range_bit_ior): New.
1009         (wide_int_range_bit_and): New.
1010         (wide_int_range_trunc_mod): New.
1011         (extract_range_into_wide_ints): New.
1012         (vrp_shift_undefined_p): New.
1013         (extract_range_from_multiplicative_op): New.
1014         (vrp_can_optimize_bit_op): New.
1015         * tree-vrp.h (value_range::dump): New.
1016         (wide_int_range_multiplicative_op): New.
1017         (wide_int_range_lshift):New.
1018         (wide_int_range_shift_undefined_p): New.
1019         (wide_int_range_bit_xor): New.
1020         (wide_int_range_bit_ior): New.
1021         (wide_int_range_bit_and): New.
1022         (wide_int_range_trunc_mod): New.
1023         (zero_nonzero_bits_from_bounds): Rename to...
1024         (wide_int_set_zero_nonzero_bits): ...this.
1025         (zero_nonzero_bits_from_vr): Rename to...
1026         (vrp_set_zero_nonzero_bits): ...this.
1027         (range_easy_mask_min_max): Rename to...
1028         (wide_int_range_can_optimize_bit_op): this.
1029         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1030         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1032 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1034         * tree-vectorizer.h (vect_orig_stmt): New function.
1035         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1036         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1037         (vect_create_epilog_for_reduction): Likewise.
1038         (vectorizable_live_operation): Likewise.
1039         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1040         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1041         * tree-vect-stmts.c (vectorizable_call): Likewise.
1042         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1044 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1046         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1047         argument.
1048         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1049         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1050         (vect_transform_loop): Likewise.
1051         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1053 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1055         * tree-vectorizer.h (vect_schedule_slp): Return void.
1056         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1057         (vect_schedule_slp): Likewise.
1059 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1061         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1062         argument.
1063         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1064         instances before the main loop, if any exist.
1066 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1068         PR tree-optimization/86749
1069         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1070         If the lhs is used in a COND_EXPR, check that it is being used
1071         as the "then" or "else" value.
1073 2018-08-01  Tom de Vries  <tdevries@suse.de>
1075         PR target/86800
1076         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1077         speculation_safe_value_not_needed.
1079 2018-08-01  Richard Biener  <rguenther@suse.de>
1081         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1082         as base and offset.
1084 2018-08-01  Martin Liska  <mliska@suse.cz>
1086         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1087         format how successful transformation is dumped.
1088         (gimple_mod_pow2_value_transform): Likewise.
1089         (gimple_mod_subtract_transform): Likewise.
1090         (gimple_stringops_transform): Likewise.
1092 2018-08-01  Martin Liska  <mliska@suse.cz>
1094         PR value-prof/35543
1095         * value-prof.c (interesting_stringop_to_profile_p):
1096         Simplify the code and add BUILT_IN_MEMMOVE.
1097         (gimple_stringops_transform): Likewise.
1099 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1101         * config/aarch64/aarch64-simd.md
1102         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1103         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1104         use GPI iterator instead of SI mode.
1106 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1108         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1109         rs6000_speculation_barrier.
1110         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1111         new barrier pattern name.
1113 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1115         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1116         (speculation_barrier): New insn.
1118 2018-08-01  Richard Biener  <rguenther@suse.de>
1120         PR bootstrap/86724
1121         * graphite.h: Include isl/id.h and isl/space.h to allow build
1122         with ISL 0.20.
1124 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
1126         PR target/86651
1127         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1128         mode for COFF targets.
1129         * defaults.h (TARGET_COFF): Define.
1130         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1131         TARGET_COFF): Define.
1132         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1133         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1134         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1136 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1138         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1139         * gimple-streamer-out.c (output_bb): Save it.
1140         * lto-streamer-in.c (input_struct_function_base): Restore
1141         instance discriminator if available.  Create map on demand.
1142         * lto-streamer-out.c (output_struct_function_base): Save it if
1143         available.
1144         * final.c (decl_to_instance_map): Document LTO strategy.
1146 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1147             Olivier Hainque  <hainque@adacore.com>
1149         * debug.h (decl_to_instance_map_t): New type.
1150         (decl_to_instance_map): Declare.
1151         (maybe_create_decl_to_instance_map): New inline function.
1152         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1153         to track basic block discriminators.
1154         (final_start_function_1): Initialize them.
1155         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1156         bb_discriminator.
1157         (decl_to_instance_map): New variable.
1158         (map_decl_to_instance, maybe_set_discriminator): New functions.
1159         (notice_source_line): Set discriminator.
1161 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1163         * targhooks.c (default_have_speculation_safe_value): Add
1164         ATTRIBUTE_UNUSED.
1166 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1168         * dump-context.h: Include "pretty-print.h".
1169         (dump_context::refresh_dumps_are_enabled): New decl.
1170         (dump_context::emit_item): New decl.
1171         (class dump_context): Add fields "m_test_pp" and
1172         "m_test_pp_flags".
1173         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1174         (temp_dump_context::get_dumped_text): New decl.
1175         (class temp_dump_context): Add field "m_pp".
1176         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1177         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1178         m_test_pp.
1179         (set_dump_file): Update for above change.
1180         (set_alt_dump_file): Likewise.
1181         (dump_loc): New overload, taking a pretty_printer *.
1182         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1183         to any test pretty-printer.
1184         (make_item_for_dump_gimple_stmt): New function, adapted from
1185         optinfo::add_gimple_stmt.
1186         (dump_context::dump_gimple_stmt): Call it, and use the result,
1187         eliminating the direct usage of dump_file and alt_dump_file in
1188         favor of indirectly using them via emit_item.
1189         (make_item_for_dump_gimple_expr): New function, adapted from
1190         optinfo::add_gimple_expr.
1191         (dump_context::dump_gimple_expr): Call it, and use the result,
1192         eliminating the direct usage of dump_file and alt_dump_file in
1193         favor of indirectly using them via emit_item.
1194         (make_item_for_dump_generic_expr): New function, adapted from
1195         optinfo::add_tree.
1196         (dump_context::dump_generic_expr): Call it, and use the result,
1197         eliminating the direct usage of dump_file and alt_dump_file in
1198         favor of indirectly using them via emit_item.
1199         (make_item_for_dump_printf_va): New function, adapted from
1200         optinfo::add_printf_va.
1201         (make_item_for_dump_printf): New function.
1202         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1203         and use the result, eliminating the direct usage of dump_file and
1204         alt_dump_file in favor of indirectly using them via emit_item.
1205         (make_item_for_dump_dec): New function.
1206         (dump_context::dump_dec): Call it, and use the result,
1207         eliminating the direct usage of dump_file and alt_dump_file in
1208         favor of indirectly using them via emit_item.
1209         (make_item_for_dump_symtab_node): New function, adapted from
1210         optinfo::add_symtab_node.
1211         (dump_context::dump_symtab_node): Call it, and use the result,
1212         eliminating the direct usage of dump_file and alt_dump_file in
1213         favor of indirectly using them via emit_item.
1214         (dump_context::begin_scope): Reimplement, avoiding direct usage
1215         of dump_file and alt_dump_file in favor of indirectly using them
1216         via emit_item.
1217         (dump_context::emit_item): New member function.
1218         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1219         Set up test pretty-printer on the underlying context.  Call
1220         refresh_dumps_are_enabled.
1221         (temp_dump_context::~temp_dump_context): Call
1222         refresh_dumps_are_enabled.
1223         (temp_dump_context::get_dumped_text): New member function.
1224         (selftest::verify_dumped_text): New function.
1225         (ASSERT_DUMPED_TEXT_EQ): New macro.
1226         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1227         and then without optinfo enabled.  Add uses of
1228         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1229         * dumpfile.h: Update comment for the dump_* API.
1230         * optinfo-emit-json.cc
1231         (selftest::test_building_json_from_dump_calls): Update for new
1232         param for temp_dump_context ctor.
1233         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1234         and "m_owned" field.
1235         (optinfo_item::~optinfo_item): Likewise.
1236         (optinfo::add_item): New member function.
1237         (optinfo::emit): Update comment.
1238         (optinfo::add_string): Delete.
1239         (optinfo::add_printf): Delete.
1240         (optinfo::add_printf_va): Delete.
1241         (optinfo::add_gimple_stmt): Delete.
1242         (optinfo::add_gimple_expr): Delete.
1243         (optinfo::add_tree): Delete.
1244         (optinfo::add_symtab_node): Delete.
1245         (optinfo::add_dec): Delete.
1246         * optinfo.h (class dump_context): New forward decl.
1247         (optinfo::add_item): New decl.
1248         (optinfo::add_string): Delete.
1249         (optinfo::add_printf): Delete.
1250         (optinfo::add_printf_va): Delete.
1251         (optinfo::add_gimple_stmt): Delete.
1252         (optinfo::add_gimple_expr): Delete.
1253         (optinfo::add_tree): Delete.
1254         (optinfo::add_symtab_node): Delete.
1255         (optinfo::add_dec): Delete.
1256         (optinfo::add_poly_int): Delete.
1257         (optinfo_item::optinfo_item): Remove "owned" param.
1258         (class optinfo_item): Remove field "m_owned".
1260 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1262         PR middle-end/86705
1263         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1264         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1265         requested variable alignment.
1266         (expand_one_ssa_partition): Likewise.
1267         (expand_one_var): Likewise.
1269 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1271         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1272         to speculation_safe_value_not_needed.
1274 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1276         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1277         * targhooks.c (speculation_safe_value_not_needed): New function.
1278         * target.def (have_speculation_safe_value): Update documentation.
1279         * doc/tm.texi: Regenerated.
1281 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1283         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1284         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1285         expand.
1286         (despeculate_copy<ALLI:mode>_insn): New insn.
1287         (despeculate_copyti_insn): New insn.
1288         (despeculate_simple<ALLI:mode>): New insn
1289         (despeculate_simpleti): New insn.
1290         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1291         function.
1292         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1293         aarch64_speculation_safe_value.
1294         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1296 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1298         * config/aarch64/aarch64-speculation.cc: New file.
1299         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1300         before pass_reorder_blocks.
1301         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1302         prototype.
1303         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1304         X14 and X15 when tracking speculation.
1305         * config/aarch64/aarch64.md (register name constants): Add
1306         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1307         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1308         (speculation_barrier): New insn attribute.
1309         (cmp<mode>): Allow SP in comparisons.
1310         (speculation_tracker): New insn.
1311         (speculation_barrier): Add speculation_barrier attribute.
1312         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1313         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1314         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1316 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1318         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1319         aarch64_track_speculation is true.
1320         (tb<optab><mode>1): Likewise.
1321         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1322         generate CB[N]Z when tracking speculation.
1323         (aarch64_split_compare_and_swap): Likewise.
1324         (aarch64_split_atomic_op): Likewise.
1326 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1328         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1330 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1332         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1333         (speculation_barrier): New insn.
1335 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1337         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1338         * config/arm/arm.md (speculation_barrier): New expand.
1339         (speculation_barrier_insn): New pattern.
1341 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1343         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1344         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1345         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1346         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1347         list.
1348         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1349         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1350         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1351         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1352         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1353         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1354         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1355         * builtins.c (expand_speculation_safe_value): New function.
1356         (expand_builtin): Call it.
1357         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1358         * doc/extend.texi: Document __builtin_speculation_safe_value.
1359         * doc/md.texi: Document "speculation_barrier" pattern.
1360         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1361         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1362         * doc/tm.texi: Regenerated.
1363         * target.def (have_speculation_safe_value, speculation_safe_value): New
1364         hooks.
1365         * targhooks.c (default_have_speculation_safe_value): New function.
1366         (default_speculation_safe_value): New function.
1367         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1368         (default_speculation_safe_value): Add prototype.
1370 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1372         * dump-context.h (dump_context::dump_loc): New decl.
1373         * dumpfile.c (dump_context::dump_loc): New member function.
1374         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1375         and dump_gimple_stmt.
1376         (dump_context::dump_gimple_expr_loc): Likewise, using
1377         dump_gimple_expr.
1378         (dump_context::dump_generic_expr_loc): Likewise, using
1379         dump_generic_expr.
1380         (dump_context::dump_printf_loc_va): Likewise, using
1381         dump_printf_va.
1382         (dump_context::begin_scope): Explicitly using the global function
1383         "dump_loc", rather than the member function.
1385 2018-07-31  Martin Sebor  <msebor@redhat.com>
1387         PR tree-optimization/86741
1388         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1390 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1392         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1393         depend on whether prefetch instructions will be emitted or not.
1394         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1395         will be emitted or not.
1396         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1397         (TARGET_SETMEM_PFD): New macros.
1399 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1401         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1402         (NULL_STMT_VEC_INFO): Delete.
1403         (stmt_vec_info::operator*): Likewise.
1404         (stmt_vec_info::operator gimple *): Likewise.
1405         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1406         of NULL_STMT_VEC_INFO.
1407         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1408         (vect_reassociating_reduction_p): Likewise.
1409         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1410         (vectorizable_store): Likewise.
1411         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1412         (vec_info::free_stmt_vec_infos): Likewise.
1414 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1416         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1417         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1419 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1421         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1422         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1423         (vec_info::free_stmt_vec_info): New private member functions.
1424         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1425         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1426         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1427         set_stmt_vec_info_vec and free_stmt_vec_infos.
1428         * tree-vect-loop.c (_loop_vec_info): Remove call to
1429         set_stmt_vec_info_vec.
1430         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1431         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1432         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1433         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1434         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1435         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1436         with the clearing in the xcalloc.
1437         (stmt_vec_info_vec): Delete.
1438         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1439         (vectorize_loops): Likewise.
1440         (vec_info::~vec_info): Remove argument from call to
1441         free_stmt_vec_infos.
1442         (vec_info::add_stmt): Remove vinfo argument from call to
1443         new_stmt_vec_info.
1445 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1447         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1448         rather than a gimple stmt.
1449         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1450         information for pattern statements when passed the original
1451         statement; instead wait to be passed the pattern statement itself.
1452         Don't call set_vinfo_for_stmt here.
1453         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1454         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1455         stmt_vec_infos here.
1456         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1457         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1458         stmt_vec_infos entry.
1460 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1462         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1463         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1464         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1465         * tree-vect-stmts.c (vectorizable_call): Likewise.
1466         (vectorizable_simd_clone_call): Likewise.
1468 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1470         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1471         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1472         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1473         * tree-vect-loop.c (vect_transform_loop): Likewise.
1474         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1475         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1477 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1479         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1480         (vect_dr_stmt): Delete.
1481         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1482         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1483         of DR_VECT_AUX.
1484         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1485         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1486         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1487         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1488         (vect_analyze_data_refs): Likewise.
1489         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1490         argument.
1491         (vect_find_same_alignment_drs): Likewise.
1492         (vect_slp_analyze_node_dependences): Update calls accordingly.
1493         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1494         instead of DR_VECT_AUX.
1495         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1496         of a vector data references.  Use vec_info::lookup_dr instead of
1497         DR_VECT_AUX.
1498         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1499         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1500         instead of DR_VECT_AUX.
1502 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1504         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1505         dr_vec_info.
1506         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1507         accordingly.
1508         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1509         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1510         (vect_gen_prolog_loop_niters): Likewise.
1512 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1514         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1515         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1516         (vect_known_alignment_in_bytes, vect_dr_behavior)
1517         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1518         instead of data_references.  Update calls to other routines for
1519         which the same change has been made.
1520         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1521         dr_vec_infos instead of stmt_vec_infos.
1522         (vect_analyze_data_ref_dependence): Update call accordingly.
1523         (vect_slp_analyze_data_ref_dependence)
1524         (vect_record_base_alignments): Use DR_VECT_AUX.
1525         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1526         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1527         (vector_alignment_reachable_p, vect_get_data_access_cost)
1528         (vect_peeling_supportable, vect_analyze_group_access_1)
1529         (vect_analyze_group_access, vect_analyze_data_ref_access)
1530         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1531         (vect_compile_time_alias, vect_small_gap_p)
1532         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1533         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1534         instead of data_references.  Update calls to other routines for
1535         which the same change has been made.
1536         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1537         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1538         (vect_slp_analyze_and_verify_node_alignment)
1539         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1540         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1541         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1542         above changes.
1543         (_vect_peel_info::dr): Replace with...
1544         (_vect_peel_info::dr_info): ...this new field.
1545         (vect_peeling_hash_get_most_frequent)
1546         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1547         (vect_peeling_hash_get_lowest_cost):
1548         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1549         routines for which the same change has been made.
1550         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1551         data_reference.
1552         * tree-vect-loop-manip.c (get_misalign_in_elems)
1553         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1554         above changes.
1555         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1556         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1557         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1558         (get_group_load_store_type, get_negative_load_store_type)
1559         (vect_get_data_ptr_increment, vectorizable_store)
1560         (vectorizable_load): Likewise.
1561         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1562         Update calls to other routines for which the same change has been made.
1564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1566         * tree-vectorizer.h (vec_info::move_dr): New member function.
1567         (dataref_aux): Rename to...
1568         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1569         (_stmt_vec_info::dr_aux): Update accordingly.
1570         (_stmt_vec_info::data_ref_info): Delete.
1571         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1572         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1573         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1574         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1575         of data_ref.
1576         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1577         (STMT_VINFO_DR_INFO): New macro.
1578         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1579         (set_dr_misalignment): Update after rename of dataref_aux.
1580         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1581         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1582         initialization of STMT_VINFO_DATA_REF.
1583         * tree-vectorizer.c (vec_info::move_dr): New function.
1584         * tree-vect-patterns.c (vect_recog_bool_pattern)
1585         (vect_recog_mask_conversion_pattern)
1586         (vect_recog_gather_scatter_pattern): Use it.
1587         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1588         the "dr" and "stmt" fields of dr_vec_info instead of
1589         STMT_VINFO_DATA_REF.
1591 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1593         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1594         (is_pattern_stmt_p): Use it.
1595         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1596         on pattern statements.
1598 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1600         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1601         original stmt as a stmt_vec_info rather than a gimple stmt.
1602         (vect_pattern_recog_1): Take the statement directly as a
1603         stmt_vec_info, rather than via a gimple_stmt_iterator.
1604         Update call to vect_mark_pattern_stmts.
1605         (vect_pattern_recog): Update calls accordingly.
1607 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1609         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1610         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1611         a vect_def_type for the first argument.
1612         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1613         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1614         operand if it isn't defined by a vectorized statement.
1615         (vect_build_gather_load_calls): Remove the mask_dt argument and
1616         update calls to vect_get_vec_def_for_stmt_copy.
1617         (vectorizable_bswap): Likewise the dt argument.
1618         (vectorizable_call): Update calls to vectorizable_bswap and
1619         vect_get_vec_def_for_stmt_copy.
1620         (vectorizable_simd_clone_call, vectorizable_assignment)
1621         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1622         (vectorizable_comparison): Update calls to
1623         vect_get_vec_def_for_stmt_copy.
1624         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1625         vect_is_simple_use.
1626         (vect_get_loop_based_defs): Remove dt argument and update call
1627         to vect_get_vec_def_for_stmt_copy.
1628         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1629         and vect_get_vec_def_for_stmt_copy.
1630         (vectorizable_load): Update calls to vect_build_gather_load_calls
1631         and vect_get_vec_def_for_stmt_copy.
1632         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1633         (vectorizable_reduction, vectorizable_live_operation): Update calls
1634         to vect_get_vec_def_for_stmt_copy.
1636 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1638         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1639         and gimple stmt arguments with a stmt_vec_info.
1640         (vect_record_base_alignments): Update calls accordingly.
1641         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1642         and gimple stmt arguments with a stmt_vec_info.
1643         (vect_build_slp_tree_1): Remove vinfo argument and update call
1644         to vect_record_max_nunits.
1645         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1646         and vect_record_max_nunits.
1648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1650         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1651         file and take a stmt_vec_info instead of a gimple stmt.
1652         (supportable_widening_operation, vect_finish_replace_stmt)
1653         (vect_finish_stmt_generation, vect_get_store_rhs)
1654         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1655         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1656         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1657         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1658         (vect_create_data_ref_ptr, bump_vector_ptr)
1659         (vect_permute_store_chain, vect_setup_realignment)
1660         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1661         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1662         (vectorizable_reduction, vectorizable_induction)
1663         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1664         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1665         than gimple stmts as arguments.
1666         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1667         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1668         (can_group_stmts_p, vect_check_gather_scatter)
1669         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1670         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1671         (vect_permute_load_chain, vect_shift_permute_load_chain)
1672         (vect_transform_grouped_load)
1673         (vect_record_grouped_load_vectors): Likewise.
1674         * tree-vect-loop.c (vect_fixup_reduc_chain)
1675         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1676         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1677         (vectorizable_reduction, vectorizable_induction)
1678         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1679         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1680         (vect_get_load_store_mask): Likewise.
1681         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1682         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1683         * tree-vect-stmts.c (vect_mark_relevant)
1684         (is_simple_and_all_uses_invariant)
1685         (exist_non_indexing_operands_for_use_p, process_use)
1686         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1687         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1688         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1689         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1690         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1691         (get_negative_load_store_type, get_load_store_type)
1692         (vect_check_load_store_mask, vect_check_store_rhs)
1693         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1694         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1695         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1696         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1697         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1698         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1699         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1700         (supportable_widening_operation): Likewise.
1702 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1704         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1705         a stmt_vec_info instead of a gcall.
1706         (vect_check_gather_scatter): Update call accordingly.
1707         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1708         of a gphi.
1709         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1710         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1711         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1712         instead of a gimple stmt.
1713         (vect_transform_loop): Update calls accordingly.
1714         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1715         stmt_vec_infos instead of gimple stmts.
1716         (vect_analyze_slp_instance): Update use accordingly.
1717         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1718         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1719         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1720         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1721         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1722         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1723         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1724         down to subroutines.
1726 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1728         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1729         of the worklist from a vector of gimple stmts to a vector of
1730         stmt_vec_infos.
1731         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1732         (vect_mark_stmts_to_be_vectorized): Likewise
1734 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1736         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1737         statement before passing it to vect_analyze_stmt.
1738         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1739         the chain of phi vector definitions.  Track the exit phi via its
1740         stmt_vec_info.
1741         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1742         STMT_VINFO_REDUC_DEF.
1743         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1744         stmt_vec_infos to handle the statement chains.
1745         (vect_get_slp_defs): Record the first statement in the node
1746         using a stmt_vec_info.
1747         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1748         statements here and pass their stmt_vec_info down to subroutines.
1749         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1750         down to vect_finish_stmt_generation.
1751         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1752         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1753         stmt_vec_infos to subroutines.
1754         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1755         chains.
1757 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1759         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1760         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1761         (vect_permute_store_chain, vect_setup_realignment)
1762         (vect_permute_load_chain, vect_shift_permute_load_chain)
1763         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1764         stmts internally, and when passing values to other vectorizer routines.
1765         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1766         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1767         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1768         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1769         (vectorizable_reduction, vectorizable_induction)
1770         (vectorizable_live_operation, vect_transform_loop_stmt)
1771         (vect_transform_loop): Likewise.
1772         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1773         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1774         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1775         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1776         (vect_slp_analyze_node_operations_1): Likewise.
1777         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1778         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1779         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1780         (vect_finish_stmt_generation_1, get_group_load_store_type)
1781         (get_load_store_type, vect_build_gather_load_calls)
1782         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1783         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1784         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1785         (vectorizable_store, vectorizable_load, vectorizable_condition)
1786         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1787         (supportable_widening_operation): Likewise.
1788         (vect_get_vector_types_for_stmt): Likewise.
1789         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1791 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1793         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1794         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1795         (vect_permute_store_chain, vect_permute_load_chain)
1796         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1797         repeated stmt_vec_info lookups.
1798         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1799         (vect_update_ivs_after_vectorizer): Likewise.
1800         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1801         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1802         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1803         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1804         (vect_bb_slp_scalar_cost): Likewise.
1805         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1807 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1809         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1810         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1811         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1812         to get gassigns and gcalls, rather than operating on generc gimple
1813         stmts.
1814         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1815         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1816         (vectorizable_load, vect_analyze_stmt): Likewise.
1817         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1819 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1821         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1822         return stmt_vec_infos rather than gimple stmts.  Do not accept
1823         null arguments.
1824         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1825         of a gimple stmt.
1826         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1827         Update use of get_later_stmt.
1828         (vect_get_constant_vectors): Update call accordingly.
1829         (vect_schedule_slp_instance): Likewise
1830         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1831         (vect_slp_analyze_instance_dependence): Likewise.
1832         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1834 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1836         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1837         (stmt_info_for_cost::stmt_info): ...this new field.
1838         (add_stmt_costs): Update accordingly.
1839         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1840         (vect_get_known_peeling_cost): Likewise.
1841         (vect_estimate_min_profitable_iters): Likewise.
1842         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1844 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1846         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1847         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1848         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1849         accordingly.
1850         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1852 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1854         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1855         a gimple stmt to a stmt_vec_info.
1856         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1860         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1861         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1862         (_loop_vec_info::reduction_chains): Likewise.
1863         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1864         accordingly.
1865         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1867 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1869         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1870         a gimple stmt to a stmt_vec_info.
1871         (_stmt_vec_info::next_element): Likewise.
1872         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1873         (vect_slp_analyze_and_verify_node_alignment)
1874         (vect_analyze_group_access_1, vect_analyze_group_access)
1875         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1876         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1877         (vect_supportable_dr_alignment): Update accordingly.
1878         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1879         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1880         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1881         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1882         * tree-vect-slp.c (vect_build_slp_tree_1)
1883         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1884         (vect_split_slp_store_group, vect_analyze_slp_instance)
1885         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1886         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1887         (get_group_load_store_type, get_load_store_type)
1888         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1889         (vect_transform_stmt, vect_remove_stores): Likewise.
1891 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1893         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1894         than a gimple stmt.
1895         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1896         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1897         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1898         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1899         (vector_alignment_reachable_p, vect_get_data_access_cost)
1900         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1901         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1902         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1903         (vect_analyze_group_access_1, vect_analyze_group_access)
1904         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1905         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1906         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1907         result of vect_dr_stmt and use the stmt_vec_info instead of
1908         the associated gimple stmt.
1909         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1910         (vect_gen_prolog_loop_niters): Likewise.
1911         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1913 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1915         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1916         to a vec<stmt_vec_info>.
1917         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1918         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1919         vec<stmt_vec_info>.
1920         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1921         to a vec<stmt_vec_info>.
1922         (bst_traits::value_type, bst_traits::value_type): Likewise.
1923         (bst_traits::hash): Update accordingly.
1924         (vect_get_and_check_slp_defs): Change the stmts parameter from
1925         a vec<gimple *> to a vec<stmt_vec_info>.
1926         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1927         (vect_build_slp_tree): Likewise.
1928         (vect_build_slp_tree_2): Likewise.  Update uses of
1929         SLP_TREE_SCALAR_STMTS.
1930         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1931         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1932         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1933         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1934         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1935         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1936         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1937         (vect_get_constant_vectors, vect_get_slp_defs)
1938         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1939         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1940         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1941         instead of gimple stmts.
1942         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1943         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1944         (vect_slp_analyze_instance_dependence): Update uses of
1945         SLP_TREE_SCALAR_STMTS.
1946         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1947         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1948         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1949         (get_initial_defs_for_reduction): Likewise.
1950         (vect_create_epilog_for_reduction): Likewise.
1951         (vectorize_fold_left_reduction): Likewise.
1952         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1953         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1954         (can_vectorize_live_stmts): Likewise.
1956 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1958         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1959         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1960         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1961         than gimple stmts.
1962         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1963         of a gimple stmt.
1964         (gather_scalar_reductions): Update after above interface changes.
1965         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1966         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1967         than gimple stmts.
1968         (vect_force_simple_reduction): Likewise.
1969         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1970         LOOP_VINFO_REDUCTIONS.
1971         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1973 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1975         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1976         a gimple stmt to a stmt_vec_info.
1977         * tree-vect-loop.c (vect_active_double_reduction_p)
1978         (vect_force_simple_reduction, vectorizable_reduction): Update
1979         accordingly.
1981 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1983         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1984         vec<gimple *> to a vec<stmt_vec_info>.
1985         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1986         the reduction_phis argument from a vec<gimple *> to a
1987         vec<stmt_vec_info>.
1988         (vectorizable_reduction): Likewise the phis local variable that
1989         is passed to vect_create_epilog_for_reduction.  Update for new type
1990         of SLP_TREE_VEC_STMTS.
1991         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1992         (vectorizable_live_operation): Likewise.
1993         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1994         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1996 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1998         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1999         a gimple stmt to a stmt_vec_info.
2000         (vectorizable_condition, vectorizable_live_operation)
2001         (vectorizable_reduction, vectorizable_induction): Pass back the
2002         vectorized statement as a stmt_vec_info.
2003         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2004         use of STMT_VINFO_VEC_STMT.
2005         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2006         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2007         as stmt_vec_infos rather than gimple stmts.
2008         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2009         to a stmt_vec_info.
2010         (vectorizable_live_operation): Likewise.
2011         (vectorizable_reduction, vectorizable_induction): Likewise,
2012         updating use of STMT_VINFO_VEC_STMT.
2013         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2014         of STMT_VINFO_VEC_STMT.
2015         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2016         (vectorizable_simd_clone_call, vectorizable_conversion)
2017         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2018         (vectorizable_store, vectorizable_load, vectorizable_condition)
2019         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2020         from a gimple stmt to a stmt_vec_info.
2021         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2022         pointer to a stmt_vec_info to the vectorizable_* routines.
2024 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2026         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2027         a gimple stmt to a stmt_vec_info.
2028         (is_pattern_stmt_p): Update accordingly.
2029         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2030         (vect_record_grouped_load_vectors): Likewise.
2031         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2032         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2033         (vect_model_reduction_cost): Likewise.
2034         (vect_create_epilog_for_reduction): Likewise.
2035         (vectorizable_reduction, vectorizable_induction): Likewise.
2036         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2037         Return the stmt_vec_info for the pattern statement.
2038         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2039         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2040         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2041         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2042         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2043         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2044         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2045         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2047 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2049         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2050         (vect_finish_stmt_generation): Likewise.
2051         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2052         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2053         (vect_build_gather_load_calls): Use the return value of the above
2054         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2055         scopes for the input gimple stmt and wider scopes for the associated
2056         stmt_vec_info.  Use vec_info::lookup_def when setting these
2057         stmt_vec_infos from an SSA_NAME definition.
2058         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2059         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2060         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2061         (vectorizable_store, vectorizable_load, vectorizable_condition)
2062         (vectorizable_comparison): Likewise.
2063         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2064         (vectorizable_reduction): Likewise.
2066 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2068         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2069         stmt_vec_info * parameter before the optional gimple **.
2070         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2071         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2072         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2073         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2074         (vectorizable_live_operation): Likewise.
2075         * tree-vect-patterns.c (type_conversion_p): Likewise.
2076         (vect_look_through_possible_promotion): Likewise.
2077         (vect_recog_rotate_pattern): Likewise.
2078         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2080 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2082         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2083         a typedef to a wrapper class.
2084         (NULL_STMT_VEC_INFO): New macro.
2085         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2086         (stmt_vec_info::operator*): New function.
2087         (stmt_vec_info::operator gimple *): Likewise.
2088         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2089         (add_stmt_costs): Likewise.
2090         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2091         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2092         (vect_get_known_peeling_cost): Likewise.
2093         (vect_estimate_min_profitable_iters): Likewise.
2094         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2095         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2096         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2097         (vectorizable_store, free_stmt_vec_infos): Likewise.
2098         (new_stmt_vec_info): Change return type of xcalloc to
2099         _stmt_vec_info *.
2101 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2103         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2104         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2105         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2106         a single_imm_use-based sequence.
2107         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2109 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2111         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2112         * tree-vectorizer.c (vec_info::lookup_def): New function.
2113         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2114         (vect_widened_op_tree): Likewise.
2115         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2116         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2117         (vectorizable_reduction): Likewise.
2118         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2119         of a gimple *.
2120         (vect_is_slp_reduction): Update calls accordingly.  Use
2121         vec_info::lookup_def.
2122         (vect_is_simple_reduction): Likewise
2123         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2125 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2127         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2128         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2129         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2130         of vinfo_for_stmt.
2131         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2132         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2133         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2134         (vect_is_slp_reduction, vectorizable_induction)
2135         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2136         * tree-vect-patterns.c (vect_init_pattern_stmt):
2137         (vect_determine_min_output_precision_1, vect_determine_precisions)
2138         (vect_pattern_recog): Likewise.
2139         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2140         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2141         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2142         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2143         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2144         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2145         info field from a loop to a loop_vec_info.
2147 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2149         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2150         (vec_info::add_stmt): Declare.
2151         * tree-vectorizer.c (vec_info::add_stmt): New function.
2152         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2153         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2154         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2155         (vectorizable_induction): Likewise.
2156         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2157         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2158         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2159         (vectorizable_load): Likewise.
2160         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2161         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2162         (vect_recog_gather_scatter_pattern): Likewise.
2163         (append_pattern_def_seq): Likewise.  Remove a check that is
2164         performed by add_stmt itself.
2166 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2168         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2169         which make_ssa_name was called with new_stmt before new_stmt
2170         had been created.
2172 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2174         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2175         split out from...
2176         (vect_is_slp_reduction): ...here...
2177         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2178         that are already known to be false.
2180 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2182         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2183         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2184         STMT_VINFO_NUM_SLP_USES when it's true.
2185         (vect_free_slp_instance): Add a final_p parameter and pass it to
2186         vect_free_slp_tree.
2187         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2188         (vect_analyze_slp_instance): Likewise.
2189         (vect_slp_analyze_operations): Likewise.
2190         (vect_slp_analyze_bb_1): Likewise.
2191         * tree-vectorizer.c (vec_info): Likewise.
2192         * tree-vect-loop.c (vect_transform_loop): Likewise.
2194 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2196         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2197         function is not called for second and subsequent members of
2198         a reduction group.
2200 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2202         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2203         cases for nested loops from here to ...
2204         (vect_create_epilog_for_reduction): ...here.  Only call
2205         vect_is_simple_use for inner-loop reductions.
2207 2018-07-31  Martin Liska  <mliska@suse.cz>
2209         PR gcov-profile/85338
2210         PR gcov-profile/85350
2211         PR gcov-profile/85372
2212         * profile.c (struct location_triplet): New.
2213         (struct location_triplet_hash): Likewise.
2214         (output_location): Do not output a BB that
2215         is already recorded for a line.
2216         (branch_prob): Use streamed_locations.
2218 2018-07-31  Martin Liska  <mliska@suse.cz>
2220         PR gcov-profile/85370
2221         * coverage.c (coverage_begin_function): Do not mark target
2222         clones as artificial functions.
2224 2018-07-31  Martin Liska  <mliska@suse.cz>
2226         PR gcov-profile/83813
2227         PR gcov-profile/84758
2228         PR gcov-profile/85217
2229         PR gcov-profile/85332
2230         * profile.c (branch_prob): Do not record GOTO expressions
2231         for GIMPLE statements which locations are already streamed.
2233 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2235         * gcc.c (handle_spec_function): Accept a soft_matched_part
2236         argument, as do_spec_1.  Pass it down to ...
2237         (eval_spec_function): Accept a soft_matched_part argument,
2238         and pass it down to ...
2239         (do_spec_2): Accept a soft_matched_part argument, and pass
2240         it down to do_spec_1.
2241         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2242         (handle_braces): Update call to handle_spec_function.
2243         (driver::set_up_specs): Update calls to do_spec_2.
2244         (compare_debug_dump_opt_spec_function): Likewise.
2245         (compare_debug_self_opt_spec_function): Likewise.
2247 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2249         * common.opt (nolibc): New option.
2250         * doc/invoke.texi (Link Options): Document it.
2251         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2252         * config/alpha/linux.h: Likewise.
2253         * config/arc/elf.h: Likewise.
2254         * config/arm/uclinux-elf.h: Likewise.
2255         * config/arm/unknown-elf.h: Likewise.
2256         * config/avr/avrlibc.h: Likewise.
2257         * config/bfin/bfin.h: Likewise.
2258         * config/bfin/linux.h: Likewise.
2259         * config/bfin/uclinux.h: Likewise.
2260         * config/darwin.h: Likewise.
2261         * config/darwin10.h: Likewise.
2262         * config/darwin12.h: Likewise.
2263         * config/gnu-user.h: Likewise.
2264         * config/lm32/uclinux-elf.h: Likewise.
2265         * config/pa/pa-hpux11.h: Likewise.
2266         * config/pa/pa64-hpux.h: Likewise.
2267         * config/sparc/sparc.h: Likewise.
2269 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2271         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2272         undefined variables.
2274 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2276         PR target/86640
2277         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2278         instead of GEN_INT.
2280 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2282         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2283         terminated string literal.
2285 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2287         PR rtl-optimization/85160
2288         * combine.c (is_just_move): New function.
2289         (try_combine): Allow combining two instructions into two if neither of
2290         the original instructions was a move.
2292 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2294         PR target/86673
2295         * doc/extend.texi (Global Register Variables): Discourage use of type
2296         qualifiers.
2297         (Local Register Variables): Likewise.
2299 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2301         PR tree-optimization/86506
2302         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2304 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2306         PR target/86547
2307         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2308         hard_regno, make sure no insn between `from` and `to` clobbers it.
2310 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2311             Tom de Vries  <tdevries@suse.de>
2313         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2314         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2315         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2316         PTX_DEFAULT_RUNTIME_DIM.
2317         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2319 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2321         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2322         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2323         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2325 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2327         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2328         used.
2329         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2330         predicate to reflect toc fusion has been deleted.
2331         (toc_fusion_mem_raw): Delete, no longer used.
2332         (toc_fusion_mem_wrapped): Likewise.
2333         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2334         fusion mask bit.
2335         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2336         Delete, no longer used.
2337         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2338         meant to be used for toc fusion.
2339         (rs6000_debug_print_mode): Delete toc fusion debugging.
2340         (rs6000_debug_reg_global): Likewise.
2341         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2342         fusion and secondary reload support that were never used.
2343         (rs6000_option_override_internal): Delete TOC fusion, that was only
2344         partially defined, and it did not work unless you also used the
2345         -mcmodel= switch.
2346         (rs6000_legitimate_address_p): Delete TOC fusion support.
2347         (rs6000_opt_masks): Likewise.
2348         (fusion_wrap_memory_address): Delete function, no longer used.
2349         (fusion_split_address); Delete TOC fusion support.
2350         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2351         longer used with toc fusion being deleted.
2352         (TARGET_TOC_FUSION_FP): Likewise.
2353         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2354         UNSPEC.
2355         (toc fusion spliter): Delete TOC fusion support.
2356         (toc_fusionload_<mode>): Likewise.
2357         (toc_fusionload_di): Likewise.
2358         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2359         longer needs to be named.  Rename predicate to delete TOC fusion.
2360         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2361         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2362         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2363         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2364         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2366 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2368         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2369         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2370         __int128 in built-in function prototypes.
2371         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2372         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2374 2018-07-27  Martin Sebor  <msebor@redhat.com>
2376         PR tree-optimization/86696
2377         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2378         types, including enums.
2379         (handle_char_store): Be prepared for the above function to fail.
2381 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2383         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2384         when optimization level is lower than 2 or optimize for size.
2386 2018-07-26  Martin Sebor  <msebor@redhat.com>
2388         PR tree-optimization/86043
2389         PR tree-optimization/86042
2390         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2391         (get_string_cst_length): Rename...
2392         (get_min_string_length): ...to this.  Add argument.
2393         (handle_char_store): Extend to handle multi-character stores by
2394         MEM_REF.
2395         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2396         * tree.h (initializer_zerop): Add argument.
2398 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2400         PR middle-end/86660
2401         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2402         declare target to variables if they have always,{to,from,tofrom} map
2403         kinds.
2405 2018-07-26  Martin Liska  <mliska@suse.cz>
2407         PR lto/86548
2408         * lto-wrapper.c: Add linker_output as prefix
2409         for ltrans_output_file.
2411 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2413         PR rtl-optimization/85805
2414         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2415         value for hard registers if that was written in the same mode.
2417 2018-07-26  Martin Liska  <mliska@suse.cz>
2419         PR gcov-profile/86536
2420         * gcov.c (format_gcov): Use printf format %.*f directly
2421         and do not handle special values.
2423 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2425         * common/config/arc/arc-common.c (arc_option_optimization_table):
2426         Update default optimizations for size.
2428 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2430         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2431         * config/arc/constraints.md (CfZ): New constraint.
2432         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2433         (subsf3_fpu): Likewise.
2434         (cmpsf_fpu): Likewise.
2435         (cmpsf_fpu_uneq): Likewise.
2437 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2439         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2440         accesses as well.
2441         (arc_is_uncached_mem_p): uncached applies to both the variable and
2442         the pointer.
2444 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2446         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2447         register names.
2449 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2451         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2452         field "m_scopes" from vec to auto_vec.
2454 2018-07-25  Martin Liska  <mliska@suse.cz>
2456         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2457         return type.
2459 2018-07-25  Richard Biener  <rguenther@suse.de>
2461         PR debug/86654
2462         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2463         special wrt context_die late.
2464         (gen_subprogram_die): Re-use DIEs in local scope.
2466 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2468         PR tree-optimization/86644
2469         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2471 2018-07-25  Martin Liska  <mliska@suse.cz>
2473         PR middle-end/86645
2474         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2475         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2477 2018-07-25  Martin Liska  <mliska@suse.cz>
2479         PR sanitizer/79635
2480         * params.def: Explain ASan abbreviation and provide
2481         a documentation link.
2483 2018-07-24  Martin Sebor  <msebor@redhat.com>
2485         PR tree-optimization/86622
2486         PR tree-optimization/86532
2487         * builtins.h (string_length): Declare.
2488         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
2489         (check_access): Be prepared for non-constant length ranges.
2490         (string_length): Make extern.
2491         * expr.c (string_constant): Only handle the minor non-constant
2492         array index.  Use string_constant to compute the length of
2493         a generic string constant.
2495 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2497         PR tree-optimization/86618
2498         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2499         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2501 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2503         PR tree-optimization/86636
2504         * json.cc (json::object::set): Fix comment.  Add assertions.
2505         (json::array::append): Move here from json.h.  Add comment and an
2506         assertion.
2507         (json::string::string): Likewise.
2508         * json.h (json::array::append): Move to json.cc.
2509         (json::string::string): Likewise.
2510         * optinfo-emit-json.cc
2511         (optrecord_json_writer::impl_location_to_json): Assert that we
2512         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2513         wrapper around it.  Expand the location once, rather than three
2514         times.
2515         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2516         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2517         wrappers.
2518         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2519         places.  Fix some overlong lines.
2521 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2523         * config/aarch64/aarch64-simd.md
2524         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2525         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2526         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2527         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2528         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2529         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2530         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2531         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2532         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2534 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2536         PR middle-end/86627
2537         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2538         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2539         and abs_d == d, do the power of two handling if profitable.
2541 2018-07-24  Richard Biener  <rguenther@suse.de>
2543         * match.pd: Add BIT_FIELD_REF canonicalizations.
2545 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2547         PR c/86617
2548         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2550 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2552         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2553         terminated STRING_CST object.
2555 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2557         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2559 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2561         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2562         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2563         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2564         the elements into a register.
2565         (rs6000_split_v4si_init_di_reg): Delete.
2566         (rs6000_split_v4si_init): Delete.
2567         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2568         (vsx_init_v4si): Rewrite as a define_expand.
2570 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2572         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2573         zero_extend argument from memory): New.
2575 2018-07-22  Martin Sebor  <msebor@redhat.com>
2577         PR bootstrap/86621
2578         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2579         diagnosing calls with unknown arguments unless -Walloca-larger-than
2580         is restricted to less than PTRDIFF_MAX bytes.
2582 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2584         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2586 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2588         * pretty-print.c (text_info::set_location): Remove redundant
2589         "line_table" parameter from call to rich_location::set_range.
2591 2018-07-20  Martin Sebor  <msebor@redhat.com>
2593         PR middle-end/82063
2594         * builtins.c (expand_builtin_alloca): Adjust.
2595         * calls.c (alloc_max_size): Simplify.
2596         * cgraphunit.c (cgraph_node::expand): Adjust.
2597         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2598         variables.
2599         (frame_larger_than_size): Same.
2600         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2601         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2602         Initialize.
2603         * doc/invoke.texi (GCC Command Options): Document option arguments.
2604         Explain byte-size arguments and suffixes.
2605         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2606         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2607         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2608         * doc/options.texi (UInteger): Expand.
2609         (Host_Wide_Int, ByteSize): Document new properties.
2610         * final.c (final_start_function_1): Include sizes in an error message.
2611         * function.c (frame_offset_overflow): Same.
2612         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2613         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2614         Diagnose unbounded alloca calls only for limits of less than
2615         PTRDIFF_MAX.
2616         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2617         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2618         for alloca(0).
2619         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2620         only for limits of less than PTRDIFF_MAX.
2621         * langhooks-def.h (lhd_handle_option): Change function argument
2622         to HOST_WIDE_INT.
2623         * langhooks.c (lhd_handle_option): Same.
2624         * langhooks.h (handle_option): Same.
2625         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2626         ByteSize flags.
2627         (var_type, var_type_struct): Same.
2628         (var_set): Handle ByteSize flag.
2629         * optc-gen.awk: Add comments to output to ease debugging.  Make
2630         use of HOST_WIDE_INT where appropriate.
2631         * opts-gen-save.awk:  Use %lx to format unsigned long.
2632         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2633         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2634         arguments.  Parse bytes-size suffixes.
2635         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2636         (enum_value_to_arg): Same.
2637         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2638         (handle_option): Adjust.
2639         (generate_option): Change function argument to HOST_WIDE_INT.
2640         (cmdline_handle_error): Adjust.
2641         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2642         (set_option): Change function argument to HOST_WIDE_INT.
2643         (option_enabled): Handle cl_host_wide_int.
2644         (get_option_state): Handle CLVC_SIZE.
2645         (control_warning_option): Same.
2646         * opts.c (common_handle_option): Change function argument to
2647         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2648         OPT_Wvla_larger_than_.
2649         * opts.h (enum cl_var_type): Add an enumerator.
2650         * stor-layout.c (layout_decl): Print a more meaningful warning.
2651         * toplev.c (output_stack_usage): Adjust.
2653 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2655         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2656         call to inline_expand_builtin_string_cmp.
2657         (expand_builtin_strcmp): Likewise.
2658         (expand_builtin_strncmp): Likewise.
2659         (inline_string_cmp): Delete the last parameter, change char_type_node
2660         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2661         two operands.
2662         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2663         the inlining expansion on target where the type of the call has same or 
2664         narrower precision than unsigned char.
2666 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2668         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2669         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2670         * common.opt (fsave-optimization-record): New option.
2671         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2672         * doc/invoke.texi (-fsave-optimization-record): New option.
2673         * dumpfile.c: Include "optinfo-emit-json.h".
2674         (struct kv_pair): Move to coretypes.h.
2675         (optgroup_options): Make non-static.
2676         (dump_context::end_scope): Call
2677         optimization_records_maybe_pop_dump_scope.
2678         * dumpfile.h (optgroup_options): New decl.
2679         * json.cc: New file.
2680         * json.h: New file.
2681         * optinfo-emit-json.cc: New file.
2682         * optinfo-emit-json.h: New file.
2683         * optinfo.cc: Include "optinfo-emit-json.h".
2684         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2685         (optinfo_enabled_p): Check optimization_records_enabled_p.
2686         (optinfo_wants_inlining_info_p): Likewise.
2687         * optinfo.h: Update comment.
2688         * profile-count.c (profile_quality_as_string): New function.
2689         * profile-count.h (profile_quality_as_string): New decl.
2690         (profile_count::quality): New accessor.
2691         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2692         and optinfo_emit_json_cc_tests.
2693         * selftest.h (selftest::json_cc_tests): New decl.
2694         (selftest::optinfo_emit_json_cc_tests): New decl.
2695         * toplev.c: Include "optinfo-emit-json.h".
2696         (compile_file): Call optimization_records_finish.
2697         (do_compile): Call optimization_records_start.
2698         * tree-ssa-live.c: Include optinfo.h.
2699         (remove_unused_scope_block_p): Retain inlining information if
2700         optinfo_wants_inlining_info_p returns true.
2702 2018-07-20  Richard Biener  <rguenther@suse.de>
2704         PR debug/86585
2705         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2706         to cover -flto-partition=none.
2708 2018-07-20  Martin Liska  <mliska@suse.cz>
2710         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2711         (get_decl_source_range): Remove unused function.
2713 2018-07-20  Richard Biener  <rguenther@suse.de>
2715         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2716         (struct vn_phi_s): Likewise.
2717         (struct vn_reference_s): Likewise.
2718         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2719         for searching the slot of an entry known to be in the hash itself.
2720         (vn_phi_hasher::equal): Likewise.
2721         (vn_reference_hasher::equal): Likewise.
2722         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2723         globals.
2724         (optimistic_info, current_info): Remove, keeping only valid_info.
2725         (vn_reference_lookup_1): Remove fallback lookup.
2726         (vn_reference_lookup_2): Likewise.
2727         (vn_nary_op_lookup_1): Likewise.
2728         (vn_phi_lookup): Likewise.
2729         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2730         hash element.
2731         (vn_reference_insert): Adjust, chain the inserted hash element
2732         at last_inserted_ref.
2733         (vn_reference_insert_pieces): Likewise.
2734         (visit_reference_op_call): Likewise.
2735         (vn_nary_op_insert_into): Chain the inserted hash element at
2736         last_inserted_nary.
2737         (vn_nary_op_insert_pieces): Adjust.
2738         (vn_nary_op_insert): Likewise.
2739         (vn_nary_op_insert_stmt): Likewise.
2740         (vn_phi_insert): Adjust, chain the inserted hash element at
2741         last_inserted_phi.
2742         (process_scc): Remove clearing and copying the optimistic
2743         table.  Instead remove elements inserted during an optimistic
2744         iteration from the single table we maintain.
2745         (init_scc_vn): Adjust.
2746         (free_scc_vn): Likewise.
2747         (sccvn_dom_walker::record_cond): Likewise.
2748         (sccvn_dom_walker::after_dom_children): Likewise.
2750 2018-07-19  Martin Sebor  <msebor@redhat.com>
2752         PR tree-optimization/84047
2753         PR tree-optimization/83776
2754         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2755         (check_array_bounds): Call it.
2757 2018-07-19  Martin Sebor  <msebor@redhat.com>
2759         * align.h (align_flags): Use member initialization.
2761 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2763         * Makefile.in (OBJS): Add optinfo.o.
2764         * coretypes.h (class symtab_node): New forward decl.
2765         (struct cgraph_node): New forward decl.
2766         (class varpool_node): New forward decl.
2767         * dump-context.h: New file.
2768         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2769         "tree-pass.h".
2770         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2771         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2772         (set_alt_dump_file): Likewise.
2773         (dump_context::~dump_context): New dtor.
2774         (dump_gimple_stmt): Move implementation to...
2775         (dump_context::dump_gimple_stmt): ...this new member function.
2776         Add the stmt to any pending optinfo, creating one if need be.
2777         (dump_gimple_stmt_loc): Move implementation to...
2778         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2779         Start a new optinfo and add the stmt to it.
2780         (dump_gimple_expr): Move implementation to...
2781         (dump_context::dump_gimple_expr): ...this new member function.
2782         Add the stmt to any pending optinfo, creating one if need be.
2783         (dump_gimple_expr_loc): Move implementation to...
2784         (dump_context::dump_gimple_expr_loc): ...this new member function.
2785         Start a new optinfo and add the stmt to it.
2786         (dump_generic_expr): Move implementation to...
2787         (dump_context::dump_generic_expr): ...this new member function.
2788         Add the tree to any pending optinfo, creating one if need be.
2789         (dump_generic_expr_loc): Move implementation to...
2790         (dump_context::dump_generic_expr_loc): ...this new member
2791         function.  Add the tree to any pending optinfo, creating one if
2792         need be.
2793         (dump_printf): Move implementation to...
2794         (dump_context::dump_printf_va): ...this new member function.  Add
2795         the text to any pending optinfo, creating one if need be.
2796         (dump_printf_loc): Move implementation to...
2797         (dump_context::dump_printf_loc_va): ...this new member function.
2798         Start a new optinfo and add the stmt to it.
2799         (dump_dec): Move implementation to...
2800         (dump_context::dump_dec): ...this new member function.  Add the
2801         value to any pending optinfo, creating one if need be.
2802         (dump_context::dump_symtab_node): New member function.
2803         (dump_context::get_scope_depth): New member function.
2804         (dump_context::begin_scope): New member function.
2805         (dump_context::end_scope): New member function.
2806         (dump_context::ensure_pending_optinfo): New member function.
2807         (dump_context::begin_next_optinfo): New member function.
2808         (dump_context::end_any_optinfo): New member function.
2809         (dump_context::s_current): New global.
2810         (dump_context::s_default): New global.
2811         (dump_scope_depth): Delete global.
2812         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2813         (dump_symtab_node): New function.
2814         (get_dump_scope_depth): Reimplement in terms of dump_context.
2815         (dump_begin_scope): Likewise.
2816         (dump_end_scope): Likewise.
2817         (selftest::temp_dump_context::temp_dump_context): New ctor.
2818         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2819         (selftest::verify_item): New function.
2820         (ASSERT_IS_TEXT): New macro.
2821         (ASSERT_IS_TREE): New macro.
2822         (ASSERT_IS_GIMPLE): New macro.
2823         (selftest::test_capture_of_dump_calls): New test.
2824         (selftest::dumpfile_c_tests): Call it.
2825         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2826         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2827         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2828         descriptive comment.
2829         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2830         (dump_node, dump_bb): Move these unrelated decls.
2831         (class dump_manager): Add leading comment.
2832         * optinfo.cc: New file.
2833         * optinfo.h: New file.
2835 2018-07-19  Michael Collison  <michael.collison@arm.com>
2836             Richard Henderson <rth@redhat.com>
2838         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2839         (subti): Handle op1 zero.
2840         (subvti4, usub4ti4): New.
2841         (*sub<GPI>3_compare1_imm): New.
2842         (sub<GPI>3_carryinCV): New.
2843         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2844         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2846 2018-07-19  Michael Collison  <michael.collison@arm.com>
2847             Richard Henderson <rth@redhat.com>
2849         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2850         (addti3): Create simpler code if low part is already known to be 0.
2851         (addvti4, uaddvti4): New.
2852         (*add<GPI>3_compareC_cconly_imm): New.
2853         (*add<GPI>3_compareC_cconly): New.
2854         (*add<GPI>3_compareC_imm): New.
2855         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2856         handle constants within this pattern..
2857         (*add<GPI>3_compareV_cconly_imm): New.
2858         (*add<GPI>3_compareV_cconly): New.
2859         (*add<GPI>3_compareV_imm): New.
2860         (add<GPI>3_compareV): New.
2861         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2862         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2863         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2864         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2865         with 'comparison' operator.
2866         (*add<GPI>3_compareV_cconly_imm): Ditto.
2867         (*add<GPI>3_compareV_cconly): Ditto.
2868         (*add<GPI>3_compareV_imm): Ditto.
2869         (add<GPI>3_compareV): Ditto.
2870         (add<mode>3_carryinC): Ditto.
2871         (*add<mode>3_carryinC_zero): Ditto.
2872         (*add<mode>3_carryinC): Ditto.
2873         (add<mode>3_carryinV): Ditto.
2874         (*add<mode>3_carryinV_zero): Ditto.
2875         (*add<mode>3_carryinV): Ditto.
2877 2018-07-19  Michael Collison  <michael.collison@arm.com>
2878             Richard Henderson <rth@redhat.com>
2880         * config/aarch64/aarch64-modes.def (CC_V): New.
2881         * config/aarch64/aarch64-protos.h
2882         (aarch64_addti_scratch_regs): Declare
2883         (aarch64_subvti_scratch_regs): Declare.
2884         (aarch64_expand_subvti): Declare.
2885         (aarch64_gen_unlikely_cbranch): Declare
2886         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2887         for signed overflow using CC_Vmode.
2888         (aarch64_get_condition_code_1): Handle CC_Vmode.
2889         (aarch64_gen_unlikely_cbranch): New function.
2890         (aarch64_addti_scratch_regs): New function.
2891         (aarch64_subvti_scratch_regs): New function.
2892         (aarch64_expand_subvti): New function.
2894 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2896         * config/aarch64/aarch64-option-extensions.def: New entry for profile
2897         extension.
2898         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2899         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2900         extension.
2902 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2904         PR target/83009
2905         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2906         address check not strict.
2908 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2910         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2911         Umq with Umn.
2912         (store_pair_lanes<mode>): Likewise.
2913         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2914         enum value 'ADDR_QUERY_LDP_STP_N'.
2915         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2916         (aarch64_print_address_internal): Add declaration.
2917         (aarch64_print_ldpstp_address): Remove.
2918         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2919         (aarch64_print_operand): Change printing of 'y'.
2920         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2921         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2922         'true' rather than '1'.
2923         * config/aarch64/constraints.md (Uml): Likewise.
2924         (Uml): Rename to Umn.
2925         (Umq): Remove.
2927 2018-07-19  Richard Biener  <rguenther@suse.de>
2929         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2930         a trailing array.
2931         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2932         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2933         (vn_reference_hasher): Likewise.
2934         (struct vn_tables_s): Remove obstack and alloc-pool members.
2935         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2936         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2937         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2938         (vn_reference_insert_pieces): Likewise.
2939         (alloc_vn_nary_op_noinit): Adjust.
2940         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2941         (vn_phi_eq): Adjust.
2942         (shared_lookup_phiargs): Remove.
2943         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2944         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2945         (visit_reference_op_call): Likewise.
2946         (copy_nary, copy_phi, copy_reference): Remove.
2947         (process_scc): Rewind the obstack when iterating.  Do not
2948         copy the elements to valid_info but just move them from one
2949         hashtable to the other.
2950         (allocate_vn_table): Adjust.
2951         (free_vn_table): Likewise.
2952         (init_scc_vn): Likewise.
2953         (free_scc_vn): Likewise.
2955 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2957         PR target/86560
2958         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2959         indirect_return as function type attribute.
2960         (ix86_attribute_table): Change indirect_return to function
2961         type attribute.
2962         * doc/extend.texi: Update indirect_return attribute.
2964 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
2966         * wide-int.h (widest2_int): New.
2967         * gimple-fold.c (arith_overflowed_p): Use it.
2968         * tree.h (widest2_int_cst): New.
2969         * tree-vrp.c (wide_int_binop_overflow): Rename from
2970         vrp_int_const_binop.
2971         Rewrite to work on trees.
2972         (extract_range_from_multiplicative_op_1): Abstract code to...
2973         (wide_int_range_min_max): ...here.
2974         (wide_int_range_cross_product): ...and here.
2975         (extract_range_from_binary_expr_1): Abstract overflow code to...
2976         (wide_int_range_mult_wrapping): ...here.
2977         * tree-vrp.h (wide_int_range_cross_product): New.
2978         (wide_int_range_mult_wrapping): New.
2980 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
2981             Julia Koval  <julia.koval@intel.com>
2983         * config/i386/x86-tune-costs.h (skylake_memcpy,
2984         skylake_memset): Replace rep_prefix with unrolling for size 512.
2986 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
2988         PR middle-end/86544
2989         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2990         in last stmt.
2992 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2994         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2995         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2996         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2997         previously known as "PowerPC AltiVec Built-in Functions".  Move
2998         some material to new subsubsections "PowerPC AltiVec Built-in
2999         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3000         ISA 2.07".
3001         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3002         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3003         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3004         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3006 2018-07-18  Richard Biener  <rguenther@suse.de>
3008         PR tree-optimization/86557
3009         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3010         EXACT_DIV_EXPR.
3012 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3014         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3016 2018-07-17  Jeff Law  <law@redhat.com>
3018         * config/arm/arm.c (get_label_padding): Update for recent
3019         changes to label_to_alignment.
3021         PR tree-optimization/86010
3022         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3024         * config/mips/mips.c (vr4130_align_insns): Update for recent
3025         changes to label_to_alignment.
3027         * config/frv/frv.c (frv_label_align): Update for recent changes
3028         to label_to_alignment.
3030         * config/nios2/nios2.c (nios2_label_align): Update for recent
3031         changes which dropped ALIGN_LABELS_LOG.
3033 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3035         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3036         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3038 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3040         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3041         deprecated align_labels_log.
3043 2018-07-17  Richard Biener  <rguenther@suse.de>
3045         PR lto/86456
3046         * dwarf2out.c (init_sections_and_labels): Always generate
3047         a debug_line_str_section for early LTO debug.
3048         (dwarf2out_finish): Reset debug_line_str_hash output early.
3049         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3050         with fat LTO part.
3051         (dwarf2out_early_finish): Output debug_line_str.
3053 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3055         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3056         index register on z196 or later.
3058 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3060         * config/s390/s390.c (s390_default_align): Set default function
3061         alignment to 16.
3062         (s390_override_options_after_change): Call s390_default align.
3063         (s390_option_override_internal): Call s390_default_align.
3064         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3066 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3068         PR middle-end/86542
3069         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3070         to _looptemp_ clauses, other than the first two.
3072 2018-07-17  Martin Liska  <mliska@suse.cz>
3074         * opts.c: Do not enable OPT_falign_* for -Os.
3076 2018-07-17  Martin Liska  <mliska@suse.cz>
3078         * align.h (MAX_CODE_ALIGN): New.
3079         (MAX_CODE_ALIGN_VALUE): New.
3080         * common/config/i386/i386-common.c (ix86_handle_option):
3081         (MAX_CODE_ALIGN): Moved to align.h.
3082         * final.c (MAX_CODE_ALIGN): Likewise.
3083         * opts.c (parse_and_check_align_values):
3084         (MAX_CODE_ALIGN): Likewise.
3085         (MAX_CODE_ALIGN_VALUE): Likewise.
3087 2018-07-17  Martin Liska  <mliska@suse.cz>
3089         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3090         in order to fulfil coding style.
3091         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3092         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3093         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3094         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3095         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3096         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3097         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3098         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3099         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3101 2018-07-17  Martin Liska  <mliska@suse.cz>
3103         * align.h: New file.
3104         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
3105         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3106         align_flags of label_to_alignment.
3107         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
3108         class.
3109         * config/m68k/m68k.c: Do not use removed align_labels_value and
3110         align_loops_value.
3111         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3112         (LOOP_ALIGN): Likewise.
3113         (LABEL_ALIGN): Likewise.
3114         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3115         Remove not used macro.
3116         (rs6000_loop_align): Change return type to align_flags.
3117         (rs6000_loop_align_max_skip): Remove.
3118         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3119         Change return type to align_flags.
3120         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3121         Remove not used macro.
3122         (rs6000_loop_align):  Change return type to align_flags.
3123         (rs6000_loop_align_max_skip): Remove.
3124         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3125         * config/rx/rx-protos.h (rx_align_for_label): Make it
3126         static function.
3127         * config/rx/rx.c (rx_align_for_label): Change return type
3128         to align_flags.
3129         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3130         macro definitions.
3131         into align_flags class.
3132         (LABEL_ALIGN): Likewise.
3133         (LOOP_ALIGN): Likewise.
3134         * config/s390/s390.c (s390_label_align): Use align_flags
3135         class member.
3136         (s390_asm_output_function_label): Likewise.
3137         * config/sh/sh.c (sh_override_options_after_change):
3138         Use align_flags class directly without macros.
3139         (find_barrier): Likewise.
3140         (barrier_align): Likewise.
3141         (sh_loop_align): Likewise.
3142         * config/spu/spu.c (spu_option_override):
3143         Use align_flags_tuple::get_value instead of removed macros.
3144         (spu_sched_init): Likewise.
3145         * config/spu/spu.h (GTY): Likewise.
3146         * config/visium/visium.c (visium_option_override):
3147         Set "8" as default secondary alignment.
3148         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3149         in order to guarantee secondary alignment of 8.
3150         * coretypes.h: Include align.h header file.
3151         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3152         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3153         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3154         * doc/tm.texi.in: Likewise.
3155         * final.c (struct label_alignment): Remove not used structure.
3156         (LABEL_ALIGN): Change type to align_flags.
3157         (LOOP_ALIGN): Likewise.
3158         (JUMP_ALIGN): Likewise.
3159         (default_loop_align_max_skip): Remove.
3160         (default_label_align_max_skip): Likewise.
3161         (default_jump_align_max_skip): Likewise.
3162         (default_label_align_after_barrier_max_skip):
3163         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3164         (LABEL_TO_MAX_SKIP): Remove.
3165         (label_to_alignment): Return align_flags type instead of integer.
3166         (label_to_max_skip): Remove.
3167         (align_fuzz): Use align_flags type.
3168         (compute_alignments): Use align_flags type and use align_flags::max
3169         to combine multiple alignments.
3170         (grow_label_align): Grow vec instead of C array.
3171         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3172         (shorten_branches):  Use align_flags type and use align_flags::max
3173         to combine multiple alignments.
3174         (final_scan_insn_1): Remove usage of secondary alignment that comes
3175         from label alignment, but instead use proper secondary alignment
3176         which is computed in grow_label_align.
3177         * flags.h (struct align_flags_tuple): Move to align.h.
3178         (struct align_flags): Likewise.
3179         (state_align_loops): Rename to align_loops.
3180         (state_align_jumps): Rename to align_jumps.
3181         (state_align_labels): Rename to align_labels.
3182         (state_align_functions): Rename to align_functions.
3183         (align_loops_log): Remove.
3184         (align_jumps_log): Remove.
3185         (align_labels_log): Remove.
3186         (align_functions_log): Remove.
3187         (align_loops_max_skip): Remove.
3188         (align_jumps_max_skip): Remove.
3189         (align_labels_max_skip): Remove.
3190         (align_functions_max_skip): Remove.
3191         (align_loops_value): Remove.
3192         (align_jumps_value): Remove.
3193         (align_labels_value): Remove.
3194         (align_functions_value): Remove.
3195         * output.h (label_to_alignment): Change return type to align_flags.
3196         (label_to_max_skip): Remove.
3197         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3198         jump_align_max_skip macros.
3199         * targhooks.h (default_loop_align_max_skip): Remove.
3200         (default_label_align_max_skip): Likewise.
3201         (default_jump_align_max_skip): Likewise.
3202         (default_label_align_after_barrier_max_skip): Remove.
3203         * toplev.c (read_log_maxskip): Use ::normalize function.
3204         (parse_N_M): Remove not used argument and also call ::normalize.
3205         (parse_alignment_opts): Do not pass unused arguments.
3206         * varasm.c (assemble_start_function): Use directly align_functions
3207         instead of removed macros.
3208         * system.h: Do not poison removed macros.
3210 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3212         PR middle-end/86539
3213         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3214         and cond temporaries don't have reference type if iterator has
3215         pointer type.  For init use &for_pre_body instead of pre_p if
3216         for_pre_body is non-empty.
3218 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3220         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3221         double-double modes to SFmode directly directly.
3222         (trunc<mode>sf2_fprs): Delete.
3224 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3226         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3227         for conversions between IFmode and the decimal floating point modes.
3228         (init_float128_ieee): Use the correct names for conversions between
3229         KFmode and the decimal floating point modes.
3231 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3233         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3234         for the conversions between TDmode and IFmode.
3235         (init_float128_ieee): Use more correct names for the conversions
3236         between TDmode and KFmode.
3238 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3240         PR tree-optimization/86526
3241         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3242         (inline_expand_builtin_string_cmp): Likewise.
3243         (inline_string_cmp): Likewise.  Use c_readstr instead of
3244         builtin_memcpy_read_str.  Add unit_mode temporary.
3246 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3248         PR middle-end/86528
3249         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3250         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3252 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3254         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3255         Alphabetize prototypes of built-in functions, separating out
3256         built-in functions that are listed in this section but should be
3257         described elsewhere.
3259 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3261         PR target/86511
3262         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3263         conditional move when trapping comparison was split to a
3264         non-trapping one (and vice versa).
3266 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3268         * config/s390/s390.c (s390_function_profiler): Generate nops
3269         instead of profiler call sequences.
3270         * config/s390/s390.opt: Add the new option.
3272 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3274         * config/s390/s390.c (s390_function_profiler): Generate
3275         __mcount_loc section.
3276         * config/s390/s390.opt: Add the new option.
3278 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3280         * common.opt: Add the new warning.
3281         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3282         %r0,__fentry__" when -mfentry is specified.
3283         (s390_option_override_internal): Disallow -mfentry for 31-bit
3284         CPUs.
3285         * config/s390/s390.opt: Add the new option.
3287 2018-07-16  Richard Biener  <rguenther@suse.de>
3289         PR lto/86523
3290         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3291         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3293 2018-07-16  Martin Liska  <mliska@suse.cz>
3295         PR ipa/86529
3296         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3297         to ::get_create.
3299 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3301         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3303 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3305         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3306         for ARCHS4x.
3307         * config/arc/arc-cpus.def (hs4x): New cpu.
3308         (hs4xd): Likewise.
3309         * config/arc/arc-tables.opt: Regenerate.
3310         * config/arc/arc.c (arc_sched_issue_rate): New function.
3311         (TARGET_SCHED_ISSUE_RATE): Define.
3312         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3313         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3314         fpu_cvt.
3315         (attr tune): Add ARCHS4x tune values.
3316         (attr tune_dspmpy): Define.
3317         (*tst): Correct instruction type.
3318         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3319         * config/arc/arcHS4x.md: New file.
3320         * config/arc/fpu.md: Update instruction type attributes.
3321         * config/arc/t-multilib: Regenerate.
3323 2018-07-16  Tom de Vries  <tdevries@suse.de>
3325         PR debug/86455
3326         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3328 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3330         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3331         early clobber.
3333 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3335         PR tree-optimization/86514
3336         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3337         conversion to a boolean type from a type with greater precision.
3339 2018-07-16  Tom de Vries  <tdevries@suse.de>
3341         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3342         dump_flags request TDF_SLIM.
3344 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3346         * fold-const.c (int_const_binop_1): Abstract...
3347         (wide_int_binop): ...wide int code here.
3348         (poly_int_binop): ...poly int code here.
3349         Abstract the rest of int_const_binop_1 into int_const_binop.
3350         * fold-const.h (wide_int_binop): New.
3351         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3352         Remove useless PLUS/MINUS_EXPR case.
3353         (zero_nonzero_bits_from_vr): Move wide int code...
3354         (zero_nonzero_bits_from_bounds): ...here.
3355         (extract_range_from_binary_expr_1): Move mask optimization code...
3356         (range_easy_mask_min_max): ...here.
3357         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3358         (range_easy_mask_min_max): New.
3360 2018-07-15  Jeff Law  <law@redhat.com>
3362         PR target/85993
3363         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3364         block.
3366 2018-07-14  Jim Wilson  <jimw@sifive.com>
3368         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3370 2018-07-14  Paul Koning  <ni1d@arrl.net>
3372         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3374 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3376         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3377         copying section.
3379 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3380             Steve Munroe  <munroesj52@gmail.com>
3382         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3383         (_mm_andnot_si128): Likewise.
3384         (_mm_or_si128): Likewise.
3385         (_mm_xor_si128): Likewise.
3387 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3389         PR middle-end/78809
3390         * builtins.c (expand_builtin_memcmp): Inline the calls first
3391         when result_eq is false.
3392         (expand_builtin_strcmp): Inline the calls first.
3393         (expand_builtin_strncmp): Likewise.
3394         (inline_string_cmp): New routine. Expand a string compare
3395         call by using a sequence of char comparison.
3396         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3397         a call to str(n)cmp/memcmp.
3398         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3399         New option.
3400         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3402 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3404         * config/arm/driver-arm.c: Include arm-native.h.
3405         (host_detect_local_cpu): Use auto-generated data tables.
3406         (vendors, arm_cpu_table): Delete.  Move part information to ...
3407         * config/arm/arm-cpus.in: ... here.
3408         * config/arm/parsecpu.awk (gen_native): New function.
3409         (vendor, part): New CPU fields.
3410         (END): Add support for building the native CPU detection tables.
3411         * config/arm/t-arm (arm-native.h): Add build rule.
3412         (driver-arm.o): Add dependency on arm-native.h.
3414 2018-07-13  Richard Biener  <rguenther@suse.de>
3416         PR middle-end/85974
3417         * match.pd (addr1 - addr2): Allow either of the operand to
3418         have a conversion.
3420 2018-07-13  Tom de Vries  <tdevries@suse.de>
3422         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3423         in remap_ssa_name.
3425 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3427         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3428         arrays instead of numbered variables.
3430 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3432         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3433         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3435 2018-07-13  Richard Biener  <rguenther@suse.de>
3437         PR debug/86452
3438         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3439         instead of get_context_die.
3441 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3442             Richard Biener  <rguenther@suse.de>
3444         PR middle-end/86489
3445         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3446         that the loop latch destination where phi is defined.
3448 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3450         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3451         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3452         (riscv_set_current_function): Extract getting interrupt type to new
3453         function.
3454         (riscv_get_interrupt_type): New function.
3455         (riscv_merge_decl_attributes): New function, checking interrupt type is
3456         same.
3457         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3459 2018-07-12  Paul Koning  <ni1d@arrl.net>
3461         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3462         directive.
3464 2018-07-12  Paul Koning  <ni1d@arrl.net>
3466         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3467         zero reference, add doloop_end instead.
3468         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3469         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3470         detail for doloop_end.
3472 2018-07-12  Martin Sebor  <msebor@redhat.com>
3474         PR c/86453
3475         * attribs.c (decl_attributes): Reject conflicting attributes before
3476         calling attribute handlers.
3478 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3480         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3481          parameter.
3482         (gcc::dump_manager::get_dump_file_name): likewise.
3483         (dump_begin): Likewise.
3484         * dumpfile.h (dump_begin): Update prototype.
3485         (gcc::dump_manager::get_dump_file_name,
3486         gcc::dump_manager::get_dump_file_name): Update prototype.
3488 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3490         * internal-fn.h (vectorizable_internal_fn_p): New function.
3491         * tree-vect-slp.c (compatible_calls_p): Likewise.
3492         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3493         to internal functions.
3494         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3496 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3498         * fold-const.h (inverse_conditions_p): Declare.
3499         * fold-const.c (inverse_conditions_p): New function.
3500         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3501         that test the inverse condition of a conditional internal function.
3502         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3503         * internal-fn.c (internal_fn_mask_index): Handle conditional
3504         internal functions.
3505         (vectorized_internal_fn_supported_p): New function.
3506         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3507         (any_pred_load_store): Replace with...
3508         (need_to_predicate): ...this new variable.
3509         (redundant_ssa_names): New variable.
3510         (ifcvt_can_use_mask_load_store): Move initial checks to...
3511         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3512         for which a conditional internal function exists.
3513         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3514         instead of ifcvt_can_use_mask_load_store.  Update after variable
3515         name change.
3516         (predicate_load_or_store): New function, split out from
3517         predicate_mem_writes.
3518         (check_redundant_cond_expr): New function.
3519         (value_available_p): Likewise.
3520         (predicate_rhs_code): Likewise.
3521         (predicate_mem_writes): Rename to...
3522         (predicate_statements): ...this.  Use predicate_load_or_store
3523         and predicate_rhs_code.
3524         (combine_blocks, tree_if_conversion): Update after above name changes.
3525         (ifcvt_local_dce): Handle redundant_ssa_names.
3526         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3527         general conditional functions.
3528         * tree-vect-stmts.c (vectorizable_call): Likewise.
3530 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3531             Alan Hayward  <alan.hayward@arm.com>
3532             David Sherwood  <david.sherwood@arm.com>
3534         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3535         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3536         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3537         plus and minus and convert them into IFN_COND_FMA-based sequences.
3538         (convert_mult_to_fma): Handle conditional plus and minus.
3540 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3542         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3543         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3544         (cond_fnms_optab): New optabs.
3545         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3546         internal functions.
3547         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3548         * internal-fn.h (get_conditional_internal_fn): Declare.
3549         (get_unconditional_internal_fn): Likewise.
3550         * internal-fn.c (cond_ternary_direct): New macro.
3551         (expand_cond_ternary_optab_fn): Likewise.
3552         (direct_cond_ternary_optab_supported_p): Likewise.
3553         (FOR_EACH_COND_FN_PAIR): Likewise.
3554         (get_conditional_internal_fn): New function.
3555         (get_unconditional_internal_fn): Likewise.
3556         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3557         (gimple_match_op::gimple_match_op): Add a new overload for 5
3558         operands.
3559         (gimple_match_op::set_op): Likewise.
3560         (gimple_resimplify5): Declare.
3561         * genmatch.c (decision_tree::gen): Generate simplifications for
3562         5 operands.
3563         * gimple-match-head.c (gimple_simplify): Define an overload for
3564         5 operands.  Handle calls with 5 arguments in the top-level overload.
3565         (convert_conditional_op): Handle conversions from unconditional
3566         internal functions to conditional ones.
3567         (gimple_resimplify5): New function.
3568         (build_call_internal): Pass a fifth operand.
3569         (maybe_push_res_to_seq): Likewise.
3570         (try_conditional_simplification): Try converting conditional
3571         internal functions to unconditional internal functions.
3572         Handle 3-operand unconditional forms.
3573         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3574         Define ternary equivalents of the current rules for binary conditional
3575         internal functions.
3576         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3577         ternary operations.
3578         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3579         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3580         (optab): Handle them.
3581         (SVE_COND_FP_TERNARY): New int iterator.
3582         (sve_fmla_op, sve_fmad_op): New int attributes.
3583         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3584         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3585         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3587 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3589         * target.def (preferred_else_value): New target hook.
3590         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3591         * doc/tm.texi: Regenerate.
3592         * targhooks.h (default_preferred_else_value): Declare.
3593         * targhooks.c (default_preferred_else_value): New function.
3594         * internal-fn.h (conditional_internal_fn_code): Declare.
3595         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3596         (get_conditional_internal_fn): Use it.
3597         (conditional_internal_fn_code): New function.
3598         * gimple-match.h (gimple_match_cond): New struct.
3599         (gimple_match_op): Add a cond member function.
3600         (gimple_match_op::gimple_match_op): Update all forms to take a
3601         gimple_match_cond.
3602         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3603         for the suboperation, but don't specify a particular else_value.
3604         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3605         (visit_nary_op, visit_reference_op_load): Pass
3606         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3607         * gimple-match-head.c: Include tree-eh.h
3608         (convert_conditional_op): New function.
3609         (maybe_resimplify_conditional_op): Likewise.
3610         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3611         (gimple_resimplify2): Likewise.
3612         (gimple_resimplify3): Likewise.
3613         (gimple_resimplify4): Likewise.
3614         (maybe_push_res_to_seq): Return null for conditional operations.
3615         (try_conditional_simplification): New function.
3616         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3617         constructor.
3618         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3619         IFN_COND_* call.
3620         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3621         function.
3622         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3624 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3626         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3627         DECL_FCONTEXT
3628         (hash_tree): Do not hash DECL_FCONTEXT
3629         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3630         Do not stream DECL_FCONTEXT.
3631         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3632         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3634 2018-07-12  Richard Biener  <rguenther@suse.de>
3636         PR debug/86462
3637         * dwarf2out.c (gen_block_die): Only output blocks when they have
3638         at least one !DECL_IGNORED_P variable.
3640 2018-07-12  Richard Biener  <rguenther@suse.de>
3642         PR target/84829
3643         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3644         Remove -mieee-fp handling.
3646 2018-07-12  Richard Biener  <rguenther@suse.de>
3648         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3649         left-over from last patch.
3651 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3653         PR tree-optimization/86492
3654         * gimple-ssa-store-merging.c
3655         (imm_store_chain_info::coalesce_immediate_stores): Call
3656         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3658 2018-07-12  Richard Biener  <rguenther@suse.de>
3660         PR middle-end/86479
3661         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3662         move possibly trapping operations into the conditional.
3664 2018-07-12  Richard Biener  <rguenther@suse.de>
3666         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3667         (vn_lookup_simplify_result): Remove recursion limit applied
3668         here.
3669         (vn_nary_build_or_lookup_1): Adjust.
3670         (try_to_simplify): Likewise.
3671         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3672         here.
3673         (gimple_resimplify2): Likewise.
3674         (gimple_resimplify3): Likewise.
3675         (gimple_resimplify4): Likewise.
3677 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3679         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3680         Use __mmask64 type instead of __mmask8 for __M argument.
3681         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3682         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3683         __U argument.
3684         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3685         __mmask16 for __M argument.
3686         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3687         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3688         to __mmask16 instead of __mmask8.
3689         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3690         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3691         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3692         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3693         instead of __mmask16 for __U argument.
3694         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3695         __mmask16 instead of __mmask8 for __U argument.
3696         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3697         __U argument.
3698         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3699         __mmask16.
3700         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3701         argument.
3702         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3703         __U argument.
3704         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3705         __mmask16.
3706         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3707         of __mmask16.
3708         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3709         __U argument.
3710         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3711         __U argument.
3712         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3713         __U argument.
3714         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3715         __U argument.
3716         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3717         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3718         return type as well as __M argument type and all casts from __mmask8
3719         to __mmask32.
3720         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3721         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3722         return type as well as __M argument type and all casts from __mmask8
3723         to __mmask16.
3724         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3725         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3726         return type as well as __M argument type and all casts from __mmask8
3727         to __mmask32.
3728         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3729         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3730         return type as well as __M argument type and all casts from __mmask8
3731         to __mmask16.
3732         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3733         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3734         __mmask16.
3736 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3738         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3739         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3740         for __U argument.
3742 2018-07-11  Paul Koning  <ni1d@arrl.net>
3744         * doc/md.texi (define_subst): Document how multiple occurrences of
3745         the same argument in the replacement pattern are handled.
3747 2018-07-11  Paul Koning  <ni1d@arrl.net>
3749         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3750         alphabetical order.
3751         (Common Type Attributes): Add "mode" attribute.
3753 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3755         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3756         stream DECL_ORIGINAL_TYPE.
3757         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3758         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3759         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3760         Do not walk original type.
3761         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3762         external decls.
3763         (write_ts_decl_non_common_tree_pointers): Do not stream
3764         DECL_ORIGINAL_TYPE
3765         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3766         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3768 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3770         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3771         thread twice from the same starting edge.
3773 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3775         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3776         * gimple.c (gimple_call_nonnull_result_p): ...here...
3777         (gimple_call_nonnull_arg): ...and here.
3778         * gimple.h (gimple_call_nonnull_result_p): New.
3779         (gimple_call_nonnull_arg): New.
3781 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3783         * config/arm/arm-cpus.in: Move information from fpu field of each
3784         cpu definition to the isa field.
3785         * config/arm/parsecpu.awk (fpu): Delete match rule.
3786         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3788 2018-07-11  Richard Biener  <rguenther@suse.de>
3790         PR debug/86457
3791         * dwarf2out.c (init_sections_and_labels): Use
3792         output_asm_line_debug_info consistently.
3793         (dwarf2out_early_finish): Likewise.
3794         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3795         type units.
3797 2018-07-11  Richard Biener  <rguenther@suse.de>
3799         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3800         Rework father_bb setting in a way to avoid propagating constants
3801         multiple times on a loop body.
3803 2018-07-10  Mark Wielaard  <mark@klomp.org>
3805         PR debug/86459
3806         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3808 2018-07-10  Richard Biener  <rguenther@suse.de>
3810         * hash-map.h (hash_map::iterator::operator*): Return
3811         references to key and value.
3813 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3815         PR c++/86443
3816         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3817         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3818         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3819         (gimplify_omp_for): For composite loops, move outer
3820         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3821         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3822         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3823         TREE_LIST for both the original class iterator and the "last" helper
3824         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3825         loop, remember has_decl_expr from outer composite loops for the
3826         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3828 2018-07-09  Martin Sebor  <msebor@redhat.com>
3830         PR middle-end/77357
3831         PR middle-end/86428
3832         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3833         accessing implicitly initialized array elements.
3834         * expr.c (string_constant): Handle string initializers of
3835         character arrays within aggregates.
3836         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3837         Store element offset.  As a special case, handle zero size.
3838         (fold_nonarray_ctor_reference): Same.
3839         (fold_ctor_reference): Add argument.  Store subobject offset.
3840         * gimple-fold.h (fold_ctor_reference): Add argument.
3842 2018-07-09  Paul Koning  <ni1d@arrl.net>
3844         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3845         (pdp11_insn_cost): New function.
3846         (pdp11_md_asm_adjust): New function.
3847         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3848         (pdp11_rtx_costs): Update to match machine better.
3849         (output_addr_const_pdp11): Correct format mismatch warnings.
3850         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3851         * config/pdp11/pdp11.md: General change to add base_cost and/or
3852         length attributes for use by new pdp11_insn_cost function.
3853         (MIN_BRANCH): Correct definition.
3854         (MIN_SOB): Ditto.
3855         (doloop_end): Use standard pattern name for looping pattern.
3856         (doloop_end_nocc): New.
3857         (movsf): Add another constraint alternative.
3858         (zero_extendqihi2): Add constraint alternatives for not in place
3859         extend.
3860         (zero_extendhisi2): Remove.
3861         (shift patterns): Add CC handling variants.
3862         (bswaphi2): New.
3863         (bswapsi2): New.
3864         (rothi3): New.
3865         (define_peephole2): New peephole to recognize mov that sets CC for
3866         subsequent test.
3868 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3870         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3871         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3872         wi::add.
3874 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
3876         PR c/86420
3877         * real.c (real_nextafter): Return true if result is denormal.
3879 2018-07-09  Martin Liska  <mliska@suse.cz>
3881         * common.opt: Add back wrongly removed attribute.
3883 2018-07-09  Richard Biener  <rguenther@suse.de>
3885         PR debug/86413
3886         * dwarf2out.c (gen_block_die): For an early generated DIE
3887         always output high/low PC attributes.
3889 2018-07-09  Tom de Vries  <tdevries@suse.de>
3891         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3892         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3893         onto VAR_DECL with abstract origin.
3895 2018-07-07  Jim Wilson  <jimw@sifive.com>
3897         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3899 2018-07-07  Tom de Vries  <tdevries@suse.de>
3901         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3903 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
3905         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3906         overflow_type.
3907         (combine_bound): Use wide-int overflow calculation instead of
3908         rolling our own.
3909         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3910         overflow_type.
3911         * fold-const.c (int_const_binop_2): Same.
3912         (extract_muldiv_1): Same.
3913         (fold_div_compare): Same.
3914         (fold_abs_const): Same.
3915         * match.pd: Same.
3916         * poly-int.h (add): Same.
3917         (sub): Same.
3918         (neg): Same.
3919         (mul): Same.
3920         * predict.c (predict_iv_comparison): Same.
3921         * profile-count.c (slow_safe_scale_64bit): Same.
3922         * simplify-rtx.c (simplify_const_binary_operation): Same.
3923         * tree-chrec.c (tree_fold_binomial): Same.
3924         * tree-data-ref.c (split_constant_offset_1): Same.
3925         * tree-if-conv.c (idx_within_array_bound): Same.
3926         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3927         * tree-ssa-phiopt.c (minmax_replacement): Same.
3928         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3929         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3930         * vr-values.c (vr_values::adjust_range_with_scev): Same.
3931         * wide-int.cc (wi::add_large): Same.
3932         (wi::mul_internal): Same.
3933         (wi::sub_large): Same.
3934         (wi::divmod_internal): Same.
3935         * wide-int.h: Change overflow type to overflow_type for neg, add,
3936         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3937         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3938         mul_internal, divmod_internal.
3939         (overflow_type): New enum.
3940         (accumulate_overflow): New.
3942 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3944         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3945         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3947 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3949         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3950         argument is checked for zero before entering loop, avoid checking again.
3952 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3954         * gimplify.h (generic_expr_could_trap_p): Set as global function.
3955         * gimplify.h (generic_expr_could_trap_p): Likwise.
3956         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3958 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
3960         PR tree-optimization/86401
3961         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3962         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3963         (fold_bit_and_mask): ... here.  New helper function for match.pd.
3964         * fold-const.h (fold_bit_and_mask): Declare.
3965         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3967 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3969         PR target/86324
3970         * target.def (translate_mode_attribute): New hook.
3971         * targhooks.h (default_translate_mode_attribute): Declare.
3972         * targhooks.c (default_translate_mode_attribute): New function.
3973         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3974         * doc/tm.texi: Regenerate.
3975         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3976         (rs6000_translate_mode_attribute): New function.
3978 2018-07-06  Paul Koning  <ni1d@arrl.net>
3980         * doc/md.texi (define_split): Document DONE and FAIL.
3981         (define_peephole2): Ditto.
3983 2018-07-05  Jeff Law  <law@redhat.com>
3985         PR tree-optimization/86010
3986         * tree-ssa-dse.c (compute_trims): More aggressively trim at
3987         both the head and tail of mem* and str* calls.
3989 2018-07-05  Jim Wilson  <jimw@sifive.com>
3991         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3993 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
3995         * config/aarch64/aarch64-simd.md: correct flags text for
3996         MIN_EXPR replacement.
3998 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4000         * configure: Regenerated.
4002 2018-07-05  Carl Love  <cel@us.ibm.com>
4004         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4005         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4006         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4007         VSX_BUILTIN_DOUBLEL_V4SF.
4009 2018-07-05  Martin Sebor  <msebor@redhat.com>
4011         PR c++/86400
4012         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4013         than its domain to compute its the upper bound of a char array.
4015 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4017         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4018         * doc/cpp.texi: Update comment.
4019         * doc/tm.texi: Rebuilt.
4020         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4021         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4022         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4023         headers affected by extern "C".
4024         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4025         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4026         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4027         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4028         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4029         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4030         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4031         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4032         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4033         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4034         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4035         config/sparc/sp64-elf.h, config/spu/spu.h,
4036         config/stormy16/stormy16.h, config/v850/v850.h,
4037         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4038         define NO_IMPLICIT_EXTERN_C.
4039         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4041 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4043         PR target/84711
4044         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4045         instead of GET_MODE_SIZE when comparing Units.
4047 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4049         PR target/84711
4050         * rtlanal.c (set_noop_p): Constrain on mode change,
4051         include hard-reg-set.h
4053 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4055         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4057 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4059         Revert
4060         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4062         PR sanitizer/84250
4063         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4064         libasan.
4065         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4067 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4069         PR sanitizer/84250
4070         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4071         libasan.
4072         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4074 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4076         PR middle-end/86380
4077         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4079 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4081         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4082         neg_*_op* variables.
4084 2018-07-04  Martin Liska  <mliska@suse.cz>
4086         * tree-switch-conversion.c: Define
4087         max_ratio_for_speed and max_ratio_for_size constants.
4089 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4090             Martin Liska  <mliska@suse.cz>
4092         PR middle-end/66240
4093         PR target/45996
4094         PR c/84100
4095         * common.opt: Rename align options with 'str_' prefix.
4096         * common/config/i386/i386-common.c (set_malign_value): New
4097         function.
4098         (ix86_handle_option): Use it to set -falign-* options/
4099         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4100         type from int to string.
4101         * config/aarch64/aarch64.c: Update default values from int
4102         to string.
4103         * config/alpha/alpha.c (alpha_override_options_after_change):
4104         Likewise.
4105         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4106         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4107         max skip conditionally.
4108         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4109         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4110         max skip conditionally.
4111         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4112         max skip conditionally.
4113         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4114         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4115         max skip conditionally.
4116         * config/i386/i386.c (struct ptt): Change type from int to
4117         string.
4118         (ix86_default_align): Set default values.
4119         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4120         max skip conditionally.
4121         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4122         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4123         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4124         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4125         max skip conditionally.
4126         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4127         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4128         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4129         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4130         max skip conditionally.
4131         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4132         * config/ia64/ia64.c (ia64_option_override): Set default values
4133         for alignment options.
4134         * config/m68k/m68k.c: Handle new str_align_* options.
4135         * config/mips/mips.c (mips_set_compression_mode): Change
4136         type of constants.
4137         (mips_option_override): Set default values for options.
4138         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4139         Likewise.
4140         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4141         Likewise.
4142         * config/rx/rx.c (rx_option_override): Likewise.
4143         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4144         (LABEL_ALIGN): Use align_labels_log.
4145         (LOOP_ALIGN): Use align_loops_align.
4146         * config/s390/s390.c (s390_asm_output_function_label): Use new
4147         macros.
4148         * config/sh/sh.c (sh_override_options_after_change):
4149         Change type of constants.
4150         * config/spu/spu.c (spu_sched_init): Likewise.
4151         * config/sparc/sparc.c (sparc_option_override): Set default
4152         values for options.
4153         * config/visium/visium.c (visium_option_override): Likewise.
4154         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4155         emit p2align format with last argument if it's not needed.
4156         * doc/invoke.texi: Document extended format of -falign-*.
4157         * final.c: Use align_labels alignment.
4158         * flags.h (struct target_flag_state): Change type to use
4159         align_flags.
4160         (struct align_flags_tuple): New.
4161         (struct align_flags): Likewise.
4162         (align_loops_log): Redefine macro to use new types.
4163         (align_loops_max_skip): Redefine macro to use new types.
4164         (align_jumps_log): Redefine macro to use new types.
4165         (align_jumps_max_skip): Redefine macro to use new types.
4166         (align_labels_log): Redefine macro to use new types.
4167         (align_labels_max_skip): Redefine macro to use new types.
4168         (align_functions_log): Redefine macro to use new types.
4169         (align_loops): Redefine macro to use new types.
4170         (align_jumps): Redefine macro to use new types.
4171         (align_labels): Redefine macro to use new types.
4172         (align_functions): Redefine macro to use new types.
4173         (align_functions_max_skip): Redefine macro to use new types.
4174         (align_loops_value): New macro.
4175         (align_jumps_value): New macro.
4176         (align_labels_value): New macro.
4177         (align_functions_value): New macro.
4178         * function.c (invoke_set_current_function_hook): Propagate
4179         alignment values from flags to global variables default in
4180         topleev.h.
4181         * ipa-icf.c (sem_function::equals_wpa): Use
4182         cl_optimization_option_eq instead of memcmp.
4183         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4184         of string types.
4185         (cl_optimization_stream_in): Likewise.
4186         * optc-save-gen.awk: Support strings in cl_optimization.
4187         * opth-gen.awk: Likewise.
4188         * opts.c (finish_options): Remove error checking of invalid
4189         value ranges.
4190         (MAX_CODE_ALIGN): Remove.
4191         (MAX_CODE_ALIGN_VALUE): Likewise.
4192         (parse_and_check_align_values): New function.
4193         (check_alignment_argument): Likewise.
4194         (common_handle_option): Use check_alignment_argument.
4195         * opts.h (parse_and_check_align_values): Declare.
4196         * toplev.c (init_alignments): Remove.
4197         (read_log_maxskip): New.
4198         (parse_N_M): Likewise.
4199         (parse_alignment_opts): Likewise.
4200         (backend_init_target): Remove usage of init_alignments.
4201         * toplev.h (parse_alignment_opts): Declare.
4202         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4203         argument.
4204         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4205         * tree.c (cl_option_hasher::equal): New.
4206         * varasm.c: Use new global macros.
4208 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4210         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4211         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4212         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4213         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4214         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4215         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4216         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4217         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4218         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4219         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4220         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4221         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4222         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4224 2018-07-04  Martin Liska  <mliska@suse.cz>
4225             Jonathan Wakely  <jwakely@redhat.com>
4227         * coverage.c: Use correct type.
4228         * doc/invoke.texi: Language correction.
4230 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4232         PR target/85620
4233         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4234         ENDBRANCH for non-tail call which may return via indirect branch.
4235         * doc/extend.texi: Document indirect_return attribute.
4237 2018-07-03  Martin Sebor  <msebor@redhat.com>
4239         PR tree-optimization/86274
4240         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4241         precondition.
4242         (format_floating): Correct handling of infinities and NaNs.
4244 2018-07-03  Martin Sebor  <msebor@redhat.com>
4246         * print-tree.c (print_real_cst): New function.
4247         (print_node_brief): Call it.
4248         (print_node): Ditto.
4250 2018-07-03  Jeff Law  <law@redhat.com>
4252         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4253         into a single pattern.
4255         * config/h8300/h8300.md (ors code_iterator): New.
4256         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4257         a single pattern and single splitter.
4258         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4259         (iorqi3_1, xorqi3_1): Likewise.
4260         (iorqi3, xorqi3 expanders): Similarly.
4262         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4263         (movmd_internal) into a single pattern using the P mode iterator.
4264         (movmd splitters): Similarly.
4265         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4266         (movsd splitters): Similarly.
4268         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4269         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4270         right table based on the size of the operand.
4271         * config/h8300/h8300.md (length_table): Corresponding changes. All
4272         references to "addb", "addw" and "addl" changed to "add".
4273         (btst patterns): Merge two variants into a single pattern.
4274         (tstqi, tsthi): Likewise.
4275         (addhi3_incdec, addsi3_incdec): Likewise.
4276         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4277         (mulhi3, mulsi3): Likewise.
4278         (udivhi3, udivsi3): Likewise.
4279         (divhi3, divsi3): Likewise.
4280         (andorqi3, andorhi3, andorsi3): Likewise.
4282 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4284         PR target/85694
4285         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4286         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4288 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4290         PR tree-optimization/85694
4291         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4292         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4293         UNSPEC_URHADD.
4294         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4295         (<u>avg<mode>3_ceil): New patterns.
4297 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4299         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4300         scan-tree-dump directive.
4301         * gcc.dg/vect/slp-perm-2.c: Likewise.
4302         * gcc.dg/vect/slp-perm-3.c: Likewise.
4303         * gcc.dg/vect/slp-perm-5.c: Likewise.
4304         * gcc.dg/vect/slp-perm-6.c: Likewise.
4305         * gcc.dg/vect/slp-perm-7.c: Likewise.
4306         * gcc.dg/vect/slp-perm-8.c: Likewise.
4308 2018-07-03  Marek Polacek  <polacek@redhat.com>
4310         PR middle-end/86202
4311         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4313 2018-07-03  Richard Biener  <rguenther@suse.de>
4315         PR ipa/86389
4316         * tree-ssa-structalias.c (find_func_clobbers): Properly
4317         handle indirect calls.
4319 2018-07-03  Jeff Law  <law@redhat.com>
4321         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4322         (shifts): New code iterator.
4323         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4324         expander.  Fix HImode handling on H8/SX.
4325         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4326         (subqi3, subhi3, subsi3 expanders): Likewise.
4327         (andqi3, andhi3, andsi3 expanders): Likewise.
4328         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4329         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4330         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4331         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4332         (zero_extendqihi2, zero_extendqisi2): Likewise.
4333         (extendqihi2, extendqisi2): Likewise.
4334         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4335         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4336         (rotlqi3_1, rotlhi3_1): Likewise.
4337         (logicalhi3_sn, logicalsi3_sn): Likewise.
4338         (logicalhi3, logicalsi3): Likewise.
4340 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4342         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4343         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4344         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4345         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4346         type to append_pattern_def_seq instead of creating a stmt_vec_info
4347         directly.
4348         (build_mask_conversion): Likewise.  Remove vinfo argument.
4349         (vect_add_conversion_to_patterm): Likewise, renaming to...
4350         (vect_add_conversion_to_pattern): ...this.
4351         (vect_recog_mask_conversion_pattern): Update call to
4352         build_mask_conversion.  Pass the vector type to
4353         append_pattern_def_seq here too.
4354         (vect_recog_gather_scatter_pattern): Update call to
4355         vect_add_conversion_to_pattern.
4357 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4359         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4360         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4361         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4362         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4363         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4364         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4365         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4366         append_pattern_def_seq instead of new_pattern_def_seq.
4367         (vect_recog_divmod_pattern): Do both of the above.
4368         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4369         is null.
4371 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4373         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4374         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4375         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4376         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4377         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4378         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4379         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4380         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4381         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4382         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4383         parameter with a single stmt_vec_info.
4384         (vect_recog_func_ptr): Likewise.
4385         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4386         (vect_try_gather_scatter_pattern): ...this.
4387         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4388         the stmt_vec_info of the statement to be matched.  Don't clear
4389         STMT_VINFO_RELATED_STMT.
4390         (vect_pattern_recog): Update call accordingly.
4392 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4394         PR tree-optimization/85694
4395         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4396         (uavgM3_ceil): Document new optabs.
4397         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4398         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4399         functions.
4400         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4401         (savg_ceil_optab): New optabs.
4402         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4403         (vect_vect_recog_func_ptrs): Add it.
4404         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4405         constant directly from the associated lhs.
4407 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4409         * tree-vect-patterns.c (vect_split_statement): New function.
4410         (vect_convert_input): Use it to try to split an existing cast.
4412 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4414         * poly-int.h (print_hex): New function.
4415         * dumpfile.h (dump_dec, dump_hex): Declare.
4416         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4417         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4418         min_input_precision, operation_precision and operation_sign.
4419         * tree-vect-patterns.c (vect_get_range_info): New function.
4420         (vect_same_loop_or_bb_p, vect_single_imm_use)
4421         (vect_operation_fits_smaller_type): Delete.
4422         (vect_look_through_possible_promotion): Add an optional
4423         single_use_p parameter.
4424         (vect_recog_over_widening_pattern): Rewrite to use new
4425         stmt_vec_info infomration.  Handle one operation at a time.
4426         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4427         (vect_truncatable_operation_p, vect_set_operation_type)
4428         (vect_set_min_input_precision): New functions.
4429         (vect_determine_min_output_precision_1): Likewise.
4430         (vect_determine_min_output_precision): Likewise.
4431         (vect_determine_precisions_from_range): Likewise.
4432         (vect_determine_precisions_from_users): Likewise.
4433         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4434         (vect_vect_recog_func_ptrs): Put over_widening first.
4435         Add cast_forwprop.
4436         (vect_pattern_recog): Call vect_determine_precisions.
4438 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4440         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4441         statements that have been replaced by further pattern statements.
4442         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4444 2018-07-03  Richard Biener  <rguenther@suse.de>
4446         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4447         always set *dt.  Dump vectype in vectype overload.
4448         * dumpfile.h (dump_gimple_expr): New function.
4449         (dump_gimple_expr_loc): Likewise.
4450         * dumpfile.c (dump_gimple_expr): New function.
4451         (dump_gimple_expr_loc): Likewise.
4453 2018-07-02  Jeff Law  <law@redhat.com>
4455         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4456         the H8/300, H8/300H and H8/S variants into a single pattern.
4457         (movhi_h8300, movqi_h8300hs): Similarly.
4458         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4459         (QHI mode iterator): New.
4461         * config/h8300/h8300.md: Remove trailing whitespace.
4463 2018-07-02  Jim Wilson  <jimw@sifive.com>
4465         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4466         instead of emit_insn for interrupt returns.
4467         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4468         (riscv_sret, riscv_uret): Likewise.
4470 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4472         * pretty-print.c (selftest::test_pp_format): Move save and restore
4473         of quotes to class auto_fix_quotes, and add an instance.
4474         * selftest.c: Include "intl.h".
4475         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4476         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4477         * selftest.h (selftest::auto_fix_quotes): New class.
4479 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4481         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4482         (aarch64_sve_prepare_conditional_op): Remove.
4483         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4484         Allow aarch64_simd_reg_or_zero as select operand; remove
4485         the aarch64_sve_prepare_conditional_op call.
4486         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4487         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4488         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4489         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4490         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4491         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4492         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4493         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4494         and a splitters to match all of the *_any patterns.
4495         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4497         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4498         (SVE_COND_FP_BINARY_REV): Remove.
4499         (sve_int_op_rev, sve_fp_op_rev): New.
4500         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4501         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4502         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4503         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4504         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4505         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4506         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4507         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4508         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4510         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4511         Remove match_dup 1 from the inner unspec.
4512         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4514         * config/aarch64/aarch64.md (movprfx): New attr.
4515         (length): Default movprfx to 8.
4516         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4517         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4518         (*<su>mul<SVE_I>3_highpart): Likewise.
4519         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4520         (*v<ASHIFT><SVE_I>3): Likewise.
4521         (*<su><MAXMIN><SVE_I>3): Likewise.
4522         (*<su><MAXMIN><SVE_F>3): Likewise.
4523         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4524         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4525         (*div<SVE_F>4): Likewise.
4527 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4529         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4530         in dump string.
4532 2018-07-02  Richard Biener  <rguenther@suse.de>
4534         PR tree-optimization/86363
4535         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4536         memset argument refers to a non-variable address.
4538 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4540         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4541         {PLUS,MINUS}_EXPR code to...
4542         (adjust_symbolic_bound): ...here,
4543         (combine_bound): ...here,
4544         (set_value_range_with_overflow): ...and here.
4546 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4548         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4549         code...
4550         (extract_range_from_abs_expr): ...here.
4552 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4554         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4555         -fno-omit-frame-pointer when not optimizing.
4557 2018-07-02  Martin Liska  <mliska@suse.cz>
4559         PR ipa/86279
4560         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4561         (propagate_nothrow): Likewise.
4563 2018-07-02  Martin Liska  <mliska@suse.cz>
4565         PR ipa/86323
4566         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4568 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4570         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4571         function in r262149, changing "loc" param from source_location to
4572         const dump_location_t &.
4573         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4574         declaration, as above.
4576 2018-07-01  Paul Koning  <ni1d@arrl.net>
4578         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4579         -munit-asm, -mgnu-asm, -mdec-asm.
4580         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4581         (pdp11_output_labelref): New.
4582         (pdp11_output_def): New.
4583         (pdp11_output_addr_vec_elt): New.
4584         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4585         %# and %@ format codes.
4586         (pdp11_option_override): New.
4587         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4588         (pdp11_output_ident): New.
4589         (pdp11_asm_named_section): New.
4590         (pdp11_asm_init_sections): New.
4591         (pdp11_file_start): New.
4592         (pdp11_file_end): New.
4593         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4594         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4595         %o, like %c but octal.
4596         (pdp11_option_override): New.
4597         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4598         -mdec-asm.
4599         (DATA_SECTION_ASM_OP): Ditto.
4600         (READONLY_DATA_SECTION_ASM_OP): New.
4601         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4602         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4603         (ASM_OUTPUT_LABELREF): Ditto.
4604         (ASM_OUTPUT_DEF): Ditto.
4605         (ASM_OUTPUT_EXTERNAL): New.
4606         (ASM_OUTPUT_SOURCE_FILENAME): New.
4607         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4608         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4609         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4610         %# and %@ format codes.
4611         * config/pdp11/pdp11.opt (mgnu-asm): New.
4612         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4613         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4614         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4616 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4618         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4619         dereferencing path[] beyond its length.
4620         (debug_path): New.
4621         (debug_all_paths): New.
4622         (rewire_first_differing_edge): New.
4623         (adjust_paths_after_duplication): New.
4624         (duplicate_thread_path): Call adjust_paths_after_duplication.
4625         Add new argument.
4626         (thread_through_all_blocks): Add new argument to
4627         duplicate_thread_path.
4629 2018-06-30  Jim Wilson  <jimw@sifive.com>
4631         * config/riscv/predicates.md (p2m1_shift_operand): New.
4632         (high_mask_shift_operand): New.
4633         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4634         pattern using p2m1_shift_operand.
4635         (lshsi3_zero_extend_3+2): New combiner pattern using
4636         high_mask_shift_operand.
4638 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4640         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4641         split out from...
4642         (vect_recog_rotate_pattern): ...here.
4643         (vect_convert_input): Try to insert casts of invariants in the
4644         preheader.
4645         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4646         preheader to be empty.
4648 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4650         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4651         vector type.  If given, install it in the new statement's
4652         STMT_VINFO_VECTYPE.
4653         (vect_element_precision): New function.
4654         (vect_unpromoted_value): New struct.
4655         (vect_unpromoted_value::vect_unpromoted_value): New function.
4656         (vect_unpromoted_value::set_op): Likewise.
4657         (vect_look_through_possible_promotion): Likewise.
4658         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4659         (vect_widened_op_tree, vect_convert_input): Likewise.
4660         (vect_convert_inputs, vect_convert_output): Likewise.
4661         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4662         to handle the optional cast of the multiplication result and
4663         vect_widened_op_tree to detect the widened multiplication itself.
4664         Do not require the input and output of promotion casts to have
4665         the same sign, but base the signedness of the operation on the
4666         input rather than the result.  If the pattern includes two
4667         promotions, check that those promotions have the same sign.
4668         Do not restrict the MULT_EXPR handling to a double-width result;
4669         handle quadruple-width results and wider.  Use vect_convert_inputs
4670         to convert the inputs to the common type.
4671         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4672         to handle the optional cast of the ABS result.  Also allow a sign
4673         change or a sign extension between the ABS and MINUS.
4674         Use vect_widened_op_tree to detect the widened subtraction and use
4675         vect_convert_inputs to convert the inputs to the common type.
4676         (vect_handle_widen_op_by_const): Delete.
4677         (vect_recog_widen_op_pattern): New function.
4678         (vect_recog_widen_mult_pattern): Use it.
4679         (vect_recog_widen_shift_pattern): Likewise.
4680         (vect_recog_widen_sum_pattern): Use
4681         vect_look_through_possible_promotion to handle the promoted
4682         PLUS_EXPR operand.
4684 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4686         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4687         the containing gimple_seq *.
4688         * gimple-iterator.h (gsi_for_stmt): Declare it.
4689         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4690         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4691         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4692         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4693         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4694         checks.
4695         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4696         split out from...
4697         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4698         statement being replaced is part of an existing pattern
4699         definition sequence, inserting the new pattern statements before
4700         the original one.
4701         (vect_pattern_recog_1): Don't return a bool.  If the statement
4702         is already part of a pattern, instead apply pattern matching
4703         to the pattern definition statements.  Don't clear the
4704         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4705         (vect_pattern_recog): Don't break after the first match;
4706         continue processing the pattern definition statements instead.
4707         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4709 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4711         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4712         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4713         (vect_recog_widen_sum_pattern): Use it.
4715 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4717         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4718         phi is not a pattern statement and has not been replaced by
4719         a pattern statement.
4720         * tree-vect-patterns.c (type_conversion_p): Don't check
4721         STMT_VINFO_IN_PATTERN_P.
4722         (vect_recog_vector_vector_shift_pattern): Likewise.
4723         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4724         the pattern statement rather than the original statement; check
4725         directly for a WIDEN_MULT_EXPR here.
4726         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4727         vect_is_simple_use to return the pattern statement rather
4728         than the original statement; use is_pattern_stmt_p to check
4729         for such a pattern statement.
4730         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4731         to return the pattern statement rather than the original statement;
4732         don't do the same transformation here.
4733         (vect_is_simple_use): If the defining statement has been replaced
4734         by a pattern statement, return the pattern statement instead.
4735         Remove the corresponding (local) transformation from the vectype
4736         overload.
4738 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4740         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4741         end and default to null.
4742         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4743         (vectorizable_reduction): Update calls accordingly, dropping the
4744         gimple ** argument if the passed-back statement isn't needed.
4745         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4746         (vect_recog_rotate_pattern): Likewise.
4747         (vect_recog_mask_conversion_pattern): Likewise.
4748         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4749         (vect_mask_constant_operand_p): Likewise.
4750         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4751         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4752         (get_group_load_store_type, get_load_store_type): Likewise.
4753         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4754         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4755         (vectorizable_conversion, vectorizable_assignment): Likewise.
4756         (vectorizable_shift, vectorizable_operation): Likewise.
4757         (vectorizable_store, vect_is_simple_cond): Likewise.
4758         (vectorizable_condition, vectorizable_comparison): Likewise.
4759         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4760         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4761         and move it to the end.  Cope with null def_stmt_outs.
4763 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4765         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4767 2018-06-29  Jeff Law  <law@redhat.com>
4769         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4770         displacements for TARGET_V850E2V3 and newer.
4771         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4772         * config/v850/v850.md (sign23byte_load): Remove.
4773         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4774         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4776 2018-06-29  Martin Liska  <mliska@suse.cz>
4778         PR lto/85759
4779         * coverage.c (coverage_init): Mangle full path name.
4780         * doc/invoke.texi: Document the change.
4781         * gcov-io.c (mangle_path): New.
4782         * gcov-io.h (mangle_path): Likewise.
4783         * gcov.c (mangle_name): Use mangle_path for path mangling.
4785 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4787         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4788         if starting source register is not even.
4790 2018-06-29  Martin Liska  <mliska@suse.cz>
4792         PR tree-optimization/86263
4793         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4794         Make edge redirection.
4796 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4798         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4799         (dump_scope_depth): New variable.
4800         (get_dump_scope_depth): New function.
4801         (dump_begin_scope): New function.
4802         (dump_end_scope): New function.
4803         * dumpfile.h (get_dump_scope_depth): New declaration.
4804         (dump_begin_scope): New declaration.
4805         (dump_end_scope): New declaration.
4806         (class auto_dump_scope): New class.
4807         (AUTO_DUMP_SCOPE): New macro.
4808         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4809         AUTO_DUMP_SCOPE.
4811 2018-06-29  Richard Biener  <rguenther@suse.de>
4813         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4814         compute_all_dependences succeeds.
4815         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4816         exceed --param loop-max-datarefs-for-datadeps.
4818 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4820         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4822 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4824         PR target/86348
4825         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4826         alternative 0 in preferred_for_speed attribute.
4828 2018-06-28  Paul Koning  <ni1d@arrl.net>
4830         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4831         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4832         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4833         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4834         for shift insn patterns.
4836 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4838         * cgraph.c (cgraph_node::get_body): Replace assignments to
4839         "dump_file" with calls to set_dump_file.
4840         * dumpfile.c (alt_dump_file): Make static, and group with...
4841         (alt_flags): ...this definition.
4842         (dumps_are_enabled): New variable.
4843         (refresh_dumps_are_enabled): New function.
4844         (set_dump_file): New function.
4845         (set_alt_dump_file): New function.
4846         (gcc::dump_manager::dump_start): Replace assignments to
4847         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4848         set_alt_dump_file.
4849         (gcc::dump_manager::dump_finish): Likewise.
4850         * dumpfile.h (alt_dump_file): Delete decl.
4851         (dumps_are_enabled): New variable decl.
4852         (set_dump_file): New function decl.
4853         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4854         global.
4855         * tree-nested.c (lower_nested_functions): Replace assignments to
4856         "dump_file" with calls to set_dump_file.
4858 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4860         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4861         goto_locus of each outgoing edge of each basic block.
4863 2018-06-28  Richard Biener  <rguenther@suse.de>
4865         * dwarf2out.c (decl_scope_table): Remove.
4866         (push_decl_scope): Likewise.
4867         (pop_decl_scope): Likewise.
4868         (gen_type_die_for_member): Do not call push/pop_decl_scope.
4869         (gen_struct_or_union_type_die): Likewise.
4870         (gen_tagged_type_die): Likewise.
4871         (dwarf2out_init): Do not initialize decl_scope_table.
4872         (dwarf2out_c_finalize): Do not free it.
4874 2018-06-28  Richard Biener  <rguenther@suse.de>
4876         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4877         deciding whether to not re-use a DIE.
4879 2018-06-28  Richard Biener  <rguenther@suse.de>
4881         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4882         DW_AT_abstract_origin attribute.
4884 2018-06-28  Martin Liska  <mliska@suse.cz>
4886         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4887         Use newly introduced constants.
4888         * tree-switch-conversion.h (struct jump_table_cluster):
4889         Define max_ratio_for_size and max_ratio_for_speed.
4891 2018-06-28  Martin Liska  <mliska@suse.cz>
4893         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4894         Add new checking assert to catch invalid state.
4895         (jump_table_cluster::can_be_handled): Handle single case
4896         clusters.
4897         (jump_table_cluster::is_beneficial): Bail out for such case.
4898         (bit_test_cluster::find_bit_tests):
4899         Add new checking assert to catch invalid state.
4900         (bit_test_cluster::can_be_handled): Handle single case
4901         clusters.
4902         (bit_test_cluster::is_beneficial): Bail out for such case.
4903         (switch_decision_tree::analyze_switch_statement):
4904         Fix comment.
4906 2018-06-28  Martin Liska  <mliska@suse.cz>
4908         * common.opt: Introduce -completion option.
4909         * gcc.c (driver_handle_option): Handle it.
4910         (driver::main): Print completions if completion
4911         is set.
4912         * opt-suggestions.c (option_proposer::get_completions):
4913         New function.
4914         (option_proposer::suggest_completion): Likewise.
4915         (option_proposer::find_param_completions): Likewise.
4916         (verify_autocompletions): Likewise.
4917         (test_completion_valid_options): Likewise.
4918         (test_completion_valid_params): Likewise.
4919         (in_completion_p): Likewise.
4920         (empty_completion_p): Likewise.
4921         (test_completion_partial_match): Likewise.
4922         (test_completion_garbage): Likewise.
4923         (opt_proposer_c_tests): Likewise.
4924         * opt-suggestions.h: Declare new functions.
4925         * opts.c (common_handle_option): Handle OPT__completion_.
4926         * selftest-run-tests.c (selftest::run_tests): Add
4927         opt_proposer_c_tests.
4928         * selftest.c (assert_str_startswith): New.
4929         * selftest.h (assert_str_startswith): Likewise.
4930         (opt_proposer_c_tests): New.
4931         (ASSERT_STR_STARTSWITH): Likewise.
4933 2018-06-28  Martin Liska  <mliska@suse.cz>
4935         * Makefile.in: Add opt-suggestions.o.
4936         * gcc-main.c: Include opt-suggestions.h.
4937         * gcc.c (driver::driver): Likewise.
4938         (driver::~driver): Remove m_option_suggestions.
4939         (driver::build_option_suggestions): Moved to option_proposer.
4940         (driver::suggest_option): Likewise.
4941         (driver::handle_unrecognized_options): Use option_proposer.
4942         * gcc.h (class driver): Add new memver m_option_proposer.
4943         * opt-suggestions.c: New file.
4944         * opt-suggestions.h: New file.
4946 2018-06-28  Martin Liska  <mliska@suse.cz>
4948         * vec.h (class auto_string_vec): New (moved from auto_argvec).
4949         (auto_string_vec::~auto_string_vec): Likewise.
4951 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4953         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4954         prevent_decl_creation_for_types fields up and add reset_location field.
4955         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4956         statement if id->reset_location is true.
4957         (copy_edges_for_bb): Do not set goto_locus on the new edges if
4958         id->reset_location is true.
4959         (copy_phis_for_bb): Force input_location on the arguments if
4960         id->reset_location is true.
4961         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4962         is set on the function to be inlined.
4964 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
4966         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4968 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
4970         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4971         registers for Pmode.
4972         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4973         hard registers for the clobbered pseudo.
4975 2018-06-27  Paul Koning  <ni1d@arrl.net>
4977         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4978         mutually exclusive options.
4979         * config/pdp11/constraints.md (h): New constraint.
4980         (O): Update definition to match shift code generation.
4981         (D): New constraint.
4982         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4983         (CCFP): Remove.
4984         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4985         function.
4986         (output_jump): Change arguments.
4987         (pdp11_fixed_cc_regs): New function.
4988         (pdp11_cc_mode): Ditto.
4989         (pdp11_expand_shift): Ditto.
4990         (pdp11_assemble_shift): Ditto.
4991         (pdp11_small_shift): Ditto.
4992         (pdp11_branch_cost): Remove.
4993         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4994         from output.
4995         (pdp11_register_move_cost): Update for CC registers.
4996         (pdp11_rtx_costs): Add case for LSHIFTRT.
4997         (pdp11_output_jump): Add CCNZ mode conditional branches.
4998         (notice_update_cc_on_set): Remove.
4999         (pdp11_cc_mode): New function.
5000         (simple_memory_operand): Correct pre/post decrement case.
5001         (no_side_effect_operand): New function.
5002         (pdp11_regno_reg_class): Add CC_REGS class.
5003         (pdp11_fixed_cc_regs): New function.
5004         (pdp11_small_shift): New function.
5005         (pdp11_expand_shift): New function to expand shift insns.
5006         (pdp11_assemble_shift): New function to output shifts.
5007         (pdp11_branch_cost): Remove.
5008         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5009         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5010         (WCHAR_TYPE): Ditto.
5011         (PTRDIFF_TYPE): Ditto.
5012         (ADJUST_INSN_LENGTH): New macro.
5013         (FIXED_REGISTERS): Add CC registers.
5014         (CALL_USED_REGISTERS): Ditto.
5015         (reg_class): Ditto.
5016         (REG_CLASS_NAMES): Ditto.
5017         (REG_CLASS_CONTENTS): Ditto.
5018         (SELECT_CC_MODE): Use new function.
5019         (TARGET_FLAGS_REGNUM): New macro.
5020         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5021         (cc0_reg_rtx): Remove.
5022         (CC_STATUS_MDEP): Remove.
5023         (CC_STATUS_MDEFP_INIT): Remove.
5024         (CC_IN_FPU): Remove.
5025         (NOTICE_UPDATE_CC): Remove.
5026         (REGISTER_NAMES): Add CC registers.
5027         (BRANCH_COST): Change to constant 1.
5028         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5029         handling.
5030         * config/pdp11/pdp11.opt (mbcopy): Remove.
5031         (mbcopy-builtin): Remove.
5032         (mbranch-cheap): Remove.
5033         (mbranch-expensive): Remove.
5034         * config/pdp11/predicates.md (expand_shift_operand): Update to
5035         match shift code generation.
5036         (ccnz_operator): New predicate.
5037         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5038         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5039         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5040         exclusive options.
5041         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5042         description of O constraint.
5044 2018-06-27  Jeff Law  <law@redhat.com>
5045             Austin Law  <austinklaw@gmail.com>
5047         * config/v850/v850.md (addsi3_set_flags): New pattern.
5048         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5049         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5050         (zero_extendhisi2_v850_set_flags): Likewise.
5051         (zero_extendqisi2_v850_set_flags): Likewise.
5052         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5053         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5054         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5056         * config/v850/v850-protos.h (notice_update_cc): Remove.
5057         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5058         (v850_print_operand): Handle 'D' and "d".
5059         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5060         Add handling of arithmetic/logical operations compared against zero.
5061         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5062         Do not look at v850_compare_op, instead get mode from last argument.
5063         (v850_gen_compare): Remove
5064         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5065         after reload for prologue insns.
5066         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5067         patterns.
5068         (construct_save_jarl): Likewise.
5069         (TARGET_FLAGS_REGNUM): Define.
5070         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5071         (NOTICE_UPDATE_CC): Remove.
5072         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5073         than cc0.  Conditionalize on reload_completed.
5074         (cmpsi_insn, setfcc_insn): Likewise.
5075         (tst1 splitter): Turn into define_and_split which sets the flags
5076         after reload.
5077         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5078         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5079         (cstoresf4, cstoredf4): Clobber the flags.
5080         (cmpsi, cmpsf, cmpdf): Remove expanders.
5081         (setf_insn): Remove pattern.
5082         (addsi3): Turn into define_and_split which clobbers the flags after
5083         reload and a suitable pattern (addsi3_clobber_flags) for use after
5084         reload.
5085         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5086         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5087         (ashrsi3, ashrsi3_v850e2): Likewise.
5088         (bins): Clobber the flags.
5089         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5090         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5091         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5092         (call_value_internal_short, call_value_internal_long): Likewise.
5093         (callt_save_interrupt, callt_return_interrupt): Likewise.
5094         (save_interrupt, return_interrupt): Likewise.
5095         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5096         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5097         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5098         (All FP comparisons): Only allow after reload has completed.
5099         (trfsr): Likewise.
5100         (divh, divhu): Tweak output template.
5101         (branch_z_normal, branch_z_invert): Remove
5102         (branch_nz_normal, branch_nz_invert): Likewise.
5103         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5105         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5106         * config/v850/v850.c (notice_update_cc): Remove.
5107         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5108         (CC_NO_CARRY): Likewise.
5109         (NOTICE_UPDATE_CC): Define to nothing.
5110         * config/v850/v850.md: Remove block comment on cc0 handling
5111         Remove "cc" attribute from all patterns.  Remove cc_status handling
5112         from all patterns.  Minor formatting fixes.
5114 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5116         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5117         (cortex-a76.cortex-a55): Likewise.
5118         * config/aarch64/aarch64-tune.md: Regenerate.
5119         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5120         cortex-a76.cortex-a55.
5122 2018-06-27  Jeff Law  <law@redhat.com>
5124         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5125         (MULTILIB_DIRNAMES): Similarly.
5127 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5129         * gimple.h (gimple_return_retbnd): Delete.
5130         (gimple_return_set_retbnd): Likewise.
5131         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5132         gimple_return_set_retbnd.
5133         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5134         gimple_return_retbnd and adjust.
5135         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5136         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5137         Explicitly return NULL in a couple more cases.  Move assertion
5138         on debug statements and remove unreachable code.
5139         (reset_debug_binding): Do not test id->retbnd.
5140         (expand_call_inline): Do not set it.
5142 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5144         * configure.ac: Add --disable-gcov option.
5145         * configure: Regenerate.
5146         * Makefile.in: Honour @enable_gcov@.
5147         * doc/install.texi: Document --disable-gcov.
5149 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5151         * config/arm/arm-cpus.in (cortex-a76): New entry.
5152         (cortex-a76.cortex-a55): Likewise.
5153         * config/arm/arm-tables.opt: Regenerate.
5154         * config/arm/arm-tune.md: Likewise.
5155         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5156         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5157         cortex-a76.cortex-a55.
5159 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
5161         PR target/85769
5162         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5164 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5166         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5167         comment.
5168         (EPILOGUE_USES): Likewise.
5170 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5172         * tree-inline.c (remap_location): New function extracted from...
5173         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5174         (copy_phis_for_bb): ...here.  Call remap_location.
5175         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5177 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5179         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5180         unaligned vsx for 16B memset.
5182 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5184         PR target/86285
5185         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5186         ieee128_float_type_node to long_double_type_node unless
5187         TARGET_LONG_DOUBLE_128 is set.
5189 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5191         * cfgloop.c (get_loop_location): Convert return type from
5192         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5193         by implicit construction from rtx_insn *, and using
5194         dump_user_location_t::from_function_decl for the fallback case.
5195         * cfgloop.h (get_loop_location): Convert return type from
5196         location_t to dump_user_location_t.
5197         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5198         dump_printf_loc to pass in a dump_location_t rather than a
5199         location_t, via the gimple stmt.
5200         * coverage.c (get_coverage_counts): Update calls to
5201         dump_printf_loc to pass in dump_location_t rather than a
5202         location_t.
5203         * doc/optinfo.texi (Dump types): Convert example of
5204         dump_printf_loc from taking "locus" to taking "insn".  Update
5205         description of the "_loc" calls to cover dump_location_t.
5206         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5207         "selftest.h".
5208         (dump_user_location_t::dump_user_location_t): New constructors,
5209         from gimple *stmt and rtx_insn *.
5210         (dump_user_location_t::from_function_decl): New function.
5211         (dump_loc): Make static.
5212         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5213         const dump_location_t &.
5214         (dump_generic_expr_loc): Delete.
5215         (dump_printf_loc): Convert param "loc" from location_t to
5216         const dump_location_t &.
5217         (selftest::test_impl_location): New function.
5218         (selftest::dumpfile_c_tests): New function.
5219         * dumpfile.h: Include "profile-count.h".
5220         (class dump_user_location_t): New class.
5221         (struct dump_impl_location_t): New struct.
5222         (class dump_location_t): New class.
5223         (dump_printf_loc): Convert 2nd param from source_location to
5224         const dump_location_t &.
5225         (dump_generic_expr_loc): Delete.
5226         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5227         const dump_location_t &.
5228         * gimple-fold.c (fold_gimple_assign): Update call to
5229         dump_printf_loc to pass in a dump_location_t rather than a
5230         location_t, via the gimple stmt.
5231         (gimple_fold_call): Likewise.
5232         * gimple-loop-interchange.cc
5233         (loop_cand::analyze_iloop_reduction_var): Update for change to
5234         check_reduction_path.
5235         (tree_loop_interchange::interchange): Update for change to
5236         find_loop_location.
5237         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5238         change in return-type of find_loop_location.
5239         (graphite_regenerate_ast_isl): Likewise.
5240         * graphite-optimize-isl.c (optimize_isl): Likewise.
5241         * graphite.c (graphite_transform_loops): Likewise.
5242         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5243         pass in a dump_location_t rather than a location_t, via the
5244         gimple stmt.
5245         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5246         * ipa.c (walk_polymorphic_call_targets): Likewise.
5247         * loop-unroll.c (report_unroll): Convert "locus" param from
5248         location_t to dump_location_t.
5249         (decide_unrolling): Update for change to get_loop_location's
5250         return type.
5251         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5252         location_t to dump_user_location_t.
5253         (grid_find_single_omp_among_assignments_1): Updates calls to
5254         dump_printf_loc to pass in a dump_location_t rather than a
5255         location_t, via the gimple stmt.
5256         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5257         location_t to dump_location_t.  Updates calls to dump_printf_loc
5258         to pass in a dump_location_t rather than a location_t, via the
5259         gimple stmt.
5260         (grid_inner_loop_gridifiable_p): Likewise.
5261         (grid_dist_follows_simple_pattern): Likewise.
5262         (grid_gfor_follows_tiling_pattern): Likewise.
5263         (grid_target_follows_gridifiable_pattern): Likewise.
5264         (grid_attempt_target_gridification): Convert initialization
5265         of local "grid" from memset to zero-initialization; FIXME: does
5266         this require C++11?  Update call to dump_printf_loc to pass in a
5267         optinfo_location rather than a location_t, via the gimple stmt.
5268         * profile.c (read_profile_edge_counts): Updates call to
5269         dump_printf_loc to pass in a dump_location_t rather than a
5270         location_t
5271         (compute_branch_probabilities): Likewise.
5272         * selftest-run-tests.c (selftest::run_tests): Call
5273         dumpfile_c_tests.
5274         * selftest.h (dumpfile_c_tests): New decl.
5275         * tree-loop-distribution.c (pass_loop_distribution::execute):
5276         Update for change in return type of find_loop_location.
5277         * tree-parloops.c (parallelize_loops): Likewise.
5278         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5279         "locus" from location_t to dump_user_location_t.
5280         (canonicalize_loop_induction_variables): Likewise.
5281         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5282         for change in return type of find_loop_location.
5283         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5284         to dump_printf_loc to pass in a dump_location_t rather than a
5285         location_t, via the stmt.
5286         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5287         Likewise.
5288         * tree-vect-loop-manip.c (find_loop_location): Convert return
5289         type from source_location to dump_user_location_t.
5290         (vect_do_peeling): Update for above change.
5291         (vect_loop_versioning): Update for change in type of
5292         vect_location.
5293         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5294         from location_t to dump_user_location_t.
5295         (vect_estimate_min_profitable_iters): Update for change in type
5296         of vect_location.
5297         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5298         location_t to dump_location_t.
5299         (vect_slp_bb): Update for change in type of vect_location.
5300         * tree-vectorizer.c (vect_location): Convert from source_location
5301         to dump_user_location_t.
5302         (try_vectorize_loop_1): Update for change in vect_location's type.
5303         (vectorize_loops): Likewise.
5304         (increase_alignment): Likewise.
5305         * tree-vectorizer.h (vect_location): Convert from source_location
5306         to dump_user_location_t.
5307         (find_loop_location): Convert return type from source_location to
5308         dump_user_location_t.
5309         (check_reduction_path): Convert 1st param from location_t to
5310         dump_user_location_t.
5311         * value-prof.c (check_counter): Update call to dump_printf_loc to
5312         pass in a dump_user_location_t rather than a location_t; update
5313         call to error_at for change in type of "locus".
5314         (check_ic_target): Update call to dump_printf_loc to
5315         pass in a dump_user_location_t rather than a location_t, via the
5316         call_stmt.
5318 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5320         * config/s390/s390.h (enum processor_flags): Do not use
5321         default tune parameter when -march was specified.
5323 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5325         PR target/86314
5326         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5327         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5328         operands.
5330 2018-06-26  Richard Biener  <rguenther@suse.de>
5332         PR tree-optimization/86287
5333         PR bootstrap/86316
5334         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5335         (vect_analyze_loop): Initialize n_stmts.
5337 2018-06-26  Richard Biener  <rguenther@suse.de>
5339         PR middle-end/86271
5340         * fold-const.c (fold_convertible_p): Pointer extension
5341         isn't valid.
5343 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5345         PR debug/86064
5346         * dwarf2out.c (loc_list_has_views): Adjust comments.
5347         (dw_loc_list): Split single cross-partition range with
5348         nonzero locview.
5350 2018-06-25  Jeff Law  <law@redhat.com>
5352         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5353         on -mbig-switch by default.
5355         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5356         test.
5357         (const_float_0_operand): Remove unused predicate.
5358         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5359         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5360         (recipsf2): New expander.  Original pattern now called
5361         (recipsf2_insn).
5362         (recipdf2, recipdf2_insn): Similarly.
5363         (rsqrtsf2, rsqrtsf2_insn): Similarly
5364         (rsqrtdf2, rsqrtdf2_insn): Similarly
5366 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5368         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5369         Simplify logic for FreeBSD (twice).
5371 2018-06-25  Martin Sebor  <msebor@redhat.com>
5373         PR tree-optimization/86204
5374         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5375         a strnlen result if it's less than the length of the string.
5377 2018-06-25  Martin Sebor  <msebor@redhat.com>
5379         PR tree-optimization/85700
5380         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5381         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5382         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5384 2018-06-25  Martin Sebor  <msebor@redhat.com>
5386         * doc/extend.texi (Zero-length arrays): Update and clarify.
5388 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5390         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5391         added IEEE/IBM long double multilib support on PowerPC little
5392         endian Linux systems.
5393         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5394         (MULTILIB_DEFAULTS): Likewise.
5395         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5396         Likewise.
5397         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5398         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5399         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5401 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5403         PR middle-end/86311
5404         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5405         (REORDER_45): Likewise.
5407 2018-06-25  Jeff Law  <law@redhat.com>
5409         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5410         dividend to 32 bits.  Adjust length.
5411         (udivmodhi4): Cleanup output template.  Fix length.
5413 2018-06-25  Carl Love  <cel@us.ibm.com>
5415         * config/rs6000/vsx.md: Change word selector to prefered location.
5417 2018-06-25  Richard Biener  <rguenther@suse.de>
5419         PR tree-optimization/86304
5420         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5421         epilogue-if-converted loops as well.
5423 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5425         * lto-section-out.c (lto_begin_section): Do not print section
5426         name for noaddr and unnumbered dumps.
5428 2018-06-25  Richard Biener  <rguenther@suse.de>
5430         * tree-vectorizer.h (struct vec_info_shared): New structure
5431         with parts split out from struct vec_info and loop_nest from
5432         struct _loop_vec_info.
5433         (struct vec_info): Adjust accordingly.
5434         (struct _loop_vec_info): Likewise.
5435         (LOOP_VINFO_LOOP_NEST): Adjust.
5436         (LOOP_VINFO_DATAREFS): Likewise.
5437         (LOOP_VINFO_DDRS): Likewise.
5438         (struct _bb_vec_info): Likewise.
5439         (BB_VINFO_DATAREFS): Likewise.
5440         (BB_VINFO_DDRS): Likewise.
5441         (struct _stmt_vec_info): Add dr_aux member.
5442         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5443         (DR_MISALIGNMENT_UNINITIALIZED): New.
5444         (set_dr_misalignment): Adjust.
5445         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5446         (vect_analyze_loop): Adjust prototype.
5447         (vect_analyze_loop_form): Likewise.
5448         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5449         Compute dependences lazily.
5450         (vect_record_base_alignments): Use shared datarefs/ddrs.
5451         (vect_verify_datarefs_alignment): Likewise.
5452         (vect_analyze_data_refs_alignment): Likewise.
5453         (vect_analyze_data_ref_accesses): Likewise.
5454         (vect_analyze_data_refs): Likewise.
5455         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5456         constructor parameter for shared part.
5457         (vect_analyze_loop_form): Pass in shared part and adjust.
5458         (vect_analyze_loop_2): Pass in storage for the number of
5459         stmts.  Move loop nest finding to the caller.  Compute
5460         datarefs lazily.
5461         (vect_analyze_loop): Pass in shared part.
5462         (vect_transform_loop): Verify shared datarefs are unchanged.
5463         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5464         constructor parameter for shared part.
5465         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5466         (vect_slp_bb): Verify shared datarefs are unchanged before
5467         transform.
5468         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5469         change.
5470         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5471         DR_MISALIGNMENT_UNINITIALIZED.
5472         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5473         parameter for shared part.
5474         (vec_info::~vec_info): Adjust.
5475         (vec_info_shared::vec_info_shared): New.
5476         (vec_info_shared::~vec_info_shared): Likewise.
5477         (vec_info_shared::save_datarefs): Likewise.
5478         (vec_info_shared::check_datarefs): Likewise.
5479         (try_vectorize_loop_1): Construct shared part live for analyses
5480         of a single loop for multiple vector sizes.
5481         * tree-parloops.c (gather_scalar_reductions): Adjust.
5483 2018-06-25  Richard Biener  <rguenther@suse.de>
5485         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5486         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5487         (vect_analyze_data_refs): Remove similar code from here and
5488         simplify accordingly.
5490 2018-06-25  Richard Biener  <rguenther@suse.de>
5492         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5493         for reverse storage order accesses rather than asserting
5494         they cannot happen here.
5496 2018-06-25  Tom de Vries  <tdevries@suse.de>
5498         PR debug/86257
5499         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5500         Use data16 instead of .byte for insn prefix.
5502 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5504         PR C++/86082
5505         * parser.c (make_char_string_pack): Pass this literal chars
5506         through cpp_interpret_string.
5507         (cp_parser_userdef_numeric_literal): Check the result of
5508         make_char_string_pack.
5510 2018-06-24  Maya Rashish  <coypu@sdf.org>
5512         * ginclude/stddef.h: Simplify conditions around avoiding
5513         re-definition of __size_t.
5515 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5517         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5518         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5520 2018-06-22  Maya Rashish  <coypu@sdf.org>
5522         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5523         made to OpenBSD and NetBSD through the years.
5525 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5527         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5528         behavior of vec_pack (vector double, vector double) to match
5529         behavior of vec_float2 (vector double, vector double).
5531 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5533         * gimplify.c (gimplify_function_tree): Prevent creation
5534         of a trampoline for the address of the current function
5535         passed to entry/exit instrumentation hooks.
5537 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5539         PR target/86222
5540         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5541         correctly.
5543 2018-06-22  Martin Liska  <mliska@suse.cz>
5545         PR tree-optimization/86263
5546         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5547         Bail out if is_enabled is false.
5548         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5549         New declaration.
5550         (jump_table_cluster::is_enabled): New function.
5552 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5554         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5555         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5556         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5557         (lto_input_ts_binfo_tree_pointers): Likewise.
5558         * tree-streamer-out.c (streamer_write_tree_bitfields,
5559         write_ts_binfo_tree_pointers): Likewise.
5560         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5562 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5564         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5566 2018-06-22  Martin Liska  <mliska@suse.cz>
5568         * symbol-summary.h (get): Make it pure and inline move
5569         functionality from ::get function.
5570         (get): Remove and inline into ::get and ::get_create.
5571         (get_create): Move code from ::get function.
5573 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5575         PR target/85994
5576         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5577         -x assembler-with-cpp.
5579 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5581         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5582         _FILE_OFFSET_BITS=64 for C++.
5584 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5586         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5587         conversion insn that shows up when pr85657-3.c is compiled using
5588         IEEE 128-bit long double.
5589         (neg<mode>2_internal): Use the correct mode to check whether the
5590         mode is IBM extended.
5591         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5592         multiply and divide external functions from being created more
5593         than once.
5595 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5597         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5598         functions.
5599         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5600         the edge can be forwarded.
5601         (cfg_layout_merge_blocks): Likewise.
5603 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5605         * except.c (finish_eh_generation): Commit edge insertions only after
5606         the EH edges have been redirected from post-landing to landing pads.
5608 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5610         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5611         create_tmp_var_for to create the FRAME decl.
5612         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5614 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5616         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5617         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5618         debug statement when resetting its value.
5619         (expand_call_inline): Copy the locus of the call onto the assignment
5620         of the return value, if any.  Use local variable in more cases.
5622 2018-06-21  Martin Liska  <mliska@suse.cz>
5624         * ipa-pure-const.c (propagate_nothrow): Use
5625         funct_state_summaries->get.
5626         (dump_malloc_lattice): Likewise.
5627         (propagate_malloc): Likewise.
5629 2018-06-21  Richard Biener  <rguenther@suse.de>
5631         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5632         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5633         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5634         comment.
5635         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5636         BLOCK_ABSTRACT_ORIGIN unconditionally.
5638 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5640         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5641         deleting it.
5642         * ipa-reference.c (ipa_reference_c_finalize): Delete
5643         ipa_ref_opt_sum_summaries and set it to NULL.
5645 2018-06-21  Tom de Vries  <tdevries@suse.de>
5647         PR tree-optimization/85859
5648         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5649         test with comment from bb_no_side_effects_p.
5651 2018-06-21  Richard Biener  <rguenther@suse.de>
5653         PR tree-optimization/86232
5654         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5655         max for constant niter.
5657 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5659         * config/aarch64/aarch64-simd.md
5660         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5662 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5664         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5665         Make opernads of the unspec commutative.
5667 2018-06-21  Richard Biener  <rguenther@suse.de>
5669         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5670         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5671         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5672         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5673         NULL DR_STEP.
5674         (vect_record_base_alignments): Do not record base alignment
5675         for gathers or scatters.
5676         (vect_compute_data_ref_alignment): Drop return value that is always
5677         true.  Bail out early for gathers or scatters.
5678         (vect_enhance_data_refs_alignment): Bail out early for gathers
5679         or scatters.
5680         (vect_find_same_alignment_drs): Likewise.
5681         (vect_analyze_data_refs_alignment): Remove dead code.
5682         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5683         (vect_analyze_data_refs): For possible gathers or scatters do
5684         not create an alternate DR, just check their possible validity
5685         and mark them.  Adjust DECL_NONALIASED handling to not rely
5686         on DR_BASE_ADDRESS.
5687         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5688         update inits of gathers or scatters.
5689         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5690         Also copy gather/scatter flag to pattern vinfo.
5692 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5694         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5695         behavior of vec_packsu (vector unsigned long long, vector unsigned
5696         long long) to match behavior of vec_packs with same signature.
5698 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5699             Thomas Schwinge <thomas@codesourcery.com>
5700             Cesar Philippidis  <cesar@codesourcery.com>
5702         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5703         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5704         (gimplify_adjust_omp_clauses): Likewise.
5705         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5706         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5707         (gimplify_omp_target_update): Update handling of acc update and
5708         enter/exit data.
5709         * omp-low.c (install_var_field): Remove unused parameter
5710         base_pointers_restrict.
5711         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5712         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5713         FINALIZE}
5714         (omp_target_base_pointers_restrict_p): Delete.
5715         (scan_omp_target): Update call to scan_sharing_clauses.
5716         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5717         FINALIZE}.
5718         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5719         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5720         (convert_local_omp_clauses): Likewise.
5721         * tree-pretty-print.c (dump_omp_clause): Likewise.
5722         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5723         FINALIZE}.
5724         (omp_clause_code_name): Likewise.
5726 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5728         PR debug/86194
5729         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5730         be narrowed.
5732         PR tree-optimization/86231
5733         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5734         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5736 2018-06-20  Tom de Vries  <tdevries@suse.de>
5738         PR tree-optimization/86097
5739         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5740         iv type if signedness of iv type is not the same as that of *nit.
5742 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5744         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5745         EDGE_EH edges, verify they are all EDGE_EH.
5747 2018-06-20  Maya Rashish  <coypu@sdf.org>
5749         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5751 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5753         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5754         * config/aarch64/aarch64.c (xgene1_tunings): Add
5755         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5756         (aarch64_mode_valid_for_sched_fusion_p):
5757         Allow 16-byte modes.
5758         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5759         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5760         128-bit modes.
5761         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5762         New pattern.
5763         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5764         * config/aarch64/iterators.md (VQ2): New mode iterator.
5766 2018-06-20  Martin Liska  <mliska@suse.cz>
5768         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5769         Change default ratio from 10 to 8.
5771 2018-06-20  Martin Liska  <mliska@suse.cz>
5773         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5774         New.
5775         (bit_test_cluster::find_bit_tests): Likewise.
5776         (switch_decision_tree::analyze_switch_statement): Find clusters.
5777         * tree-switch-conversion.h (struct jump_table_cluster): Document
5778         hierarchy.
5780 2018-06-20  Martin Liska  <mliska@suse.cz>
5782         * tree-switch-conversion.c (switch_conversion::collect):
5783         Record m_uniq property.
5784         (switch_conversion::expand): Bail out for special conditions.
5785         (group_cluster::~group_cluster): New.
5786         (group_cluster::group_cluster): Likewise.
5787         (group_cluster::dump): Likewise.
5788         (jump_table_cluster::emit): New.
5789         (switch_decision_tree::fix_phi_operands_for_edges): New.
5790         (struct case_node): Remove struct.
5791         (jump_table_cluster::can_be_handled): New.
5792         (case_values_threshold): Moved to header.
5793         (reset_out_edges_aux): Likewise.
5794         (jump_table_cluster::is_beneficial): New.
5795         (bit_test_cluster::can_be_handled): Likewise.
5796         (add_case_node): Remove.
5797         (bit_test_cluster::is_beneficial): New.
5798         (case_bit_test::cmp): New.
5799         (bit_test_cluster::emit): New.
5800         (expand_switch_as_decision_tree_p): Remove.
5801         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5802         (fix_phi_operands_for_edge): Likewise.
5803         (switch_decision_tree::analyze_switch_statement): New.
5804         (compute_cases_per_edge): Move ...
5805         (switch_decision_tree::compute_cases_per_edge): ... here.
5806         (try_switch_expansion): Likewise.
5807         (switch_decision_tree::try_switch_expansion): Likewise.
5808         (record_phi_operand_mapping): Likewise.
5809         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5810         (emit_case_decision_tree): Likewise.
5811         (switch_decision_tree::emit): Likewise.
5812         (balance_case_nodes): Likewise.
5813         (switch_decision_tree::balance_case_nodes): Likewise.
5814         (dump_case_nodes): Likewise.
5815         (switch_decision_tree::dump_case_nodes): Likewise.
5816         (emit_jump): Likewise.
5817         (switch_decision_tree::emit_jump): Likewise.
5818         (emit_cmp_and_jump_insns): Likewise.
5819         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5820         (emit_case_nodes): Likewise.
5821         (switch_decision_tree::emit_case_nodes): Likewise.
5822         (conditional_probability): Remove.
5823         * tree-switch-conversion.h (enum cluster_type): New.
5824         (PRINT_CASE): New.
5825         (struct cluster): Likewise.
5826         (cluster::cluster): Likewise.
5827         (struct simple_cluster): Likewise.
5828         (simple_cluster::simple_cluster): Likewise.
5829         (struct group_cluster): Likewise.
5830         (struct jump_table_cluster): Likewise.
5831         (struct bit_test_cluster): Likewise.
5832         (struct min_cluster_item): Likewise.
5833         (struct case_tree_node): Likewise.
5834         (case_tree_node::case_tree_node): Likewise.
5835         (jump_table_cluster::case_values_threshold): Likewise.
5836         (struct case_bit_test): Likewise.
5837         (struct switch_decision_tree): Likewise.
5838         (struct switch_conversion): Likewise.
5839         (switch_decision_tree::reset_out_edges_aux): Likewise.
5841 2018-06-20  Martin Liska  <mliska@suse.cz>
5843         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5844         (hoist_edge_and_branch_if_true): Likewise.
5845         (expand_switch_using_bit_tests_p): Likewise.
5846         (struct case_bit_test): Likewise.
5847         (case_bit_test_cmp): Likewise.
5848         (emit_case_bit_tests): Likewise.
5849         (switch_conversion::switch_conversion): New class.
5850         (struct switch_conv_info): Remove old struct.
5851         (collect_switch_conv_info): More to ...
5852         (switch_conversion::collect): ... this.
5853         (check_range): Likewise.
5854         (switch_conversion::check_range): Likewise.
5855         (check_all_empty_except_final): Likewise.
5856         (switch_conversion::check_all_empty_except_final): Likewise.
5857         (check_final_bb): Likewise.
5858         (switch_conversion::check_final_bb): Likewise.
5859         (create_temp_arrays): Likewise.
5860         (switch_conversion::create_temp_arrays): Likewise.
5861         (free_temp_arrays): Likewise.
5862         (gather_default_values): Likewise.
5863         (switch_conversion::gather_default_values): Likewise.
5864         (build_constructors): Likewise.
5865         (switch_conversion::build_constructors): Likewise.
5866         (constructor_contains_same_values_p): Likewise.
5867         (switch_conversion::contains_same_values_p): Likewise.
5868         (array_value_type): Likewise.
5869         (switch_conversion::array_value_type): Likewise.
5870         (build_one_array): Likewise.
5871         (switch_conversion::build_one_array): Likewise.
5872         (build_arrays): Likewise.
5873         (switch_conversion::build_arrays): Likewise.
5874         (gen_def_assigns): Likewise.
5875         (switch_conversion::gen_def_assigns): Likewise.
5876         (prune_bbs): Likewise.
5877         (switch_conversion::prune_bbs): Likewise.
5878         (fix_phi_nodes): Likewise.
5879         (switch_conversion::fix_phi_nodes): Likewise.
5880         (gen_inbound_check): Likewise.
5881         (switch_conversion::gen_inbound_check): Likewise.
5882         (process_switch): Use the newly created class.
5883         (switch_conversion::expand): New.
5884         (switch_conversion::~switch_conversion): New.
5885         * tree-switch-conversion.h: New file.
5887 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5889         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5890         tree-vect-patterns.c.
5891         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5892         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
5893         (vect_recog_sad_pattern): Likewise.
5894         (vect_recog_widen_sum_pattern): Likewise.
5895         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
5896         (vect_recog_widen_shift_pattern): Remove the type_in argument.
5897         (vect_recog_rotate_pattern): Likewise.
5898         (vect_recog_mult_pattern): Likewise.
5899         (vect_recog_vector_vector_shift_pattern): Likewise.
5900         (vect_recog_divmod_pattern): Likewise.
5901         (vect_recog_mixed_size_cond_pattern): Likewise.
5902         (vect_recog_bool_pattern): Likewise.
5903         (vect_recog_mask_conversion_pattern): Likewise.
5904         (vect_try_gather_scatter_pattern): Likewise.
5905         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
5906         (vect_recog_over_widening_pattern): Likewise.
5907         (vect_recog_gather_scatter_pattern): Likewise.
5908         (vect_recog_func_ptr): Move from tree-vectorizer.h
5909         (vect_vect_recog_func_ptrs): Move further down the file.
5910         (vect_recog_func): Likewise.  Remove the third argument.
5911         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5912         (vect_pattern_recog_1): Expect the pattern function to do any
5913         necessary target tests.  Also expect it to provide a vector type.
5914         Remove the type_in handling.
5916 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5918         * tree-vect-patterns.c (vect_pattern_detected): New function.
5919         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5920         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5921         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5922         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5923         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5924         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5925         (vect_recog_mask_conversion_pattern)
5926         (vect_try_gather_scatter_pattern): Likewise.
5928 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5930         * tree-vect-patterns.c (vect_get_internal_def): New function.
5931         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5932         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5933         (search_type_for_mask_1): Use it.
5935 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5937         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5938         redundant WIDEN_SUM_EXPR handling.
5939         (vect_recog_sad_pattern): Likewise.
5941 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5943         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5944         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5945         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5946         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5947         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5949 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5951         * tree-vect-stmts.c (vectorizable_call): Make sure that we
5952         use the stmt_vec_info of the original bb statement for the
5953         new zero assignment, even if the call is part of a pattern.
5955 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5957         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5958         that the sequence is attached to the original statement rather
5959         than the pattern statement.
5960         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5961         PATTERN_DEF_SEQ from the original statement rather than
5962         the main pattern statement.
5963         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5964         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5965         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5967 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5969         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5970         definition statements before the early exit for statements that aren't
5971         live or relevant.
5972         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5973         split out from...
5974         (vect_transform_loop): ...here.  Process pattern definition
5975         statements without first checking whether the main pattern
5976         statement is live or relevant.
5978 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5980         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5981         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5983 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
5985         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5986         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5987         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5988         (expand_block_compare): Change select_block_compare_mode call.
5989         (expand_strncmp_align_check): Use new functions, fix comment.
5990         (emit_final_str_compare_gpr): New function.
5991         (expand_strn_compare): Refactor and clean up code.
5992         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5994 2018-06-19  Tony Reix  <tony.reix@atos.com>
5995             Damien Bergamini  <damien.bergamini@atos.com>
5996             David Edelsohn  <dje.gcc@gmail.com>
5998         * collect2.c (static_obj): New variable.
5999         (static_libs): New variable.
6000         (is_in_list): Uncomment declaration.
6001         (main): Track AIX libraries linked statically.
6002         (is_in_list): Uncomment definition.
6003         (scan_prog_file): Don't add AIX shared libraries initializer
6004         to constructor list if linking statically.
6006 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6008         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6009         constant.
6010         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6012 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6014         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6015         blocks.
6017 2018-06-19  Martin Liska  <mliska@suse.cz>
6019         * config/i386/i386.c (ix86_can_inline_p): Do not use
6020         ipa_fn_summaries::get_create.
6021         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6022         get.
6023         (devirtualization_time_bonus): Likewise.
6024         (ipcp_propagate_stage): Likewise.
6025         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6026         (edge_set_predicate): Likewise.
6027         (evaluate_conditions_for_known_args): Likewise.
6028         (evaluate_properties_for_edge): Likewise.
6029         (ipa_call_summary::reset): Tranform to ...
6030         (ipa_call_summary::~ipa_call_summary): ... this.
6031         (ipa_fn_summary::reset): Transform to ...
6032         (ipa_fn_summary::~ipa_fn_summary): ... this.
6033         (ipa_fn_summary_t::remove): Rename to ...
6034         (ipa_fn_summary_t::remove_callees): ... this.
6035         (ipa_fn_summary_t::duplicate): Use placement new
6036         instead of memory copy.
6037         (ipa_call_summary_t::duplicate): Likewise.
6038         (ipa_call_summary_t::remove): Remove.
6039         (dump_ipa_call_summary): Change get_create to get.
6040         (ipa_dump_fn_summary): Dump only when summary exists.
6041         (analyze_function_body): Use symbol_summary::get instead
6042         of get_create.
6043         (compute_fn_summary): Likewise.
6044         (estimate_edge_devirt_benefit): Likewise.
6045         (estimate_edge_size_and_time): Likewise.
6046         (inline_update_callee_summaries): Likewise.
6047         (remap_edge_change_prob): Likewise.
6048         (remap_edge_summaries): Likewise.
6049         (ipa_merge_fn_summary_after_inlining): Likewise.
6050         (write_ipa_call_summary): Likewise.
6051         (ipa_fn_summary_write): Likewise.
6052         (ipa_free_fn_summary): Likewise.
6053         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6054         (struct ipa_call_summary): Likewise.
6055         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6056         of get_create.
6057         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6058         (estimate_size_after_inlining): Likewise.
6059         (estimate_growth): Likewise.
6060         (growth_likely_positive): Likewise.
6061         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6062         (inline_call): Likewise.
6063         * ipa-inline.c (caller_growth_limits): Likewise.
6064         (can_inline_edge_p): Likewise.
6065         (can_inline_edge_by_limits_p): Likewise.
6066         (compute_uninlined_call_time): Likewise.
6067         (compute_inlined_call_time): Likewise.
6068         (want_inline_small_function_p): Likewise.
6069         (edge_badness): Likewise.
6070         (update_caller_keys): Likewise.
6071         (update_callee_keys): Likewise.
6072         (inline_small_functions): Likewise.
6073         (inline_to_all_callers_1): Likewise.
6074         (dump_overall_stats): Likewise.
6075         (early_inline_small_functions): Likewise.
6076         (early_inliner): Likewise.
6077         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6078         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6079         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6080         * ipa-split.c (execute_split_functions): Likewise.
6081         * symbol-summary.h: Likewise.
6082         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6084 2018-06-19  Richard Biener  <rguenther@suse.de>
6086         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6087         (vectorize_loops): ... here.  Fix dbgcnt handling.
6088         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6090 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6092         PR target/86197
6093         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6094         ieee128 argument takes up only one (vector) register, not two (floating
6095         point) registers.
6097 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6099         * gimplify.c (gimplify_init_constructor): Really never clear for an
6100         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6102 2018-06-19  Richard Biener  <rguenther@suse.de>
6104         PR tree-optimization/86179
6105         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6106         after failed recognition.
6108 2018-06-18  Martin Sebor  <msebor@redhat.com>
6110         PR middle-end/85602
6111         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6112         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6113         Handle integer subtraction.
6114         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6115         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6117 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6119         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6120         param from rtx to rtx_insn *.
6121         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6122         param.
6123         (frv_ifcvt_modify_insn): Likwise.
6124         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6125         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6126         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6127         as_a <rtx_insn *> cast to local "unprotected_region" once
6128         it's been established that it's not NULL or pc_rtx.
6129         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6130         param "sethi" from rtx to rtx_insn *.
6131         (nds32_group_float_insns): Likewise for param "insn".
6132         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6133         param.
6134         (vax_output_int_subtract): Likewise.
6135         * config/vax/vax.c (vax_output_int_add): Likewise for param
6136         "insn".
6137         (vax_output_int_subtract): Likewise.
6138         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6139         (emit_pattern_after): Likewise for param "after".
6140         (emit_insn_after): Likewise.
6141         (emit_jump_insn_after): Likewise.
6142         (emit_call_insn_after): Likewise.
6143         (emit_debug_insn_after): Likewise.
6144         (emit_pattern_before): Likewise for param "before".
6145         (emit_insn_before): Likewise.
6146         (emit_jump_insn_before): Likewise.
6147         * final.c (get_insn_template): Likewise for param "insn", removing
6148         a cast.
6149         * output.h (get_insn_template): Likewise for 2nd param.
6150         * rtl.h (emit_insn_before): Likewise.
6151         (emit_jump_insn_before): Likewise.
6152         (emit_debug_insn_before_noloc): Likewise.
6153         (emit_insn_after): Likewise.
6154         (emit_jump_insn_after): Likewise.
6155         (emit_call_insn_after): Likewise.
6156         (emit_debug_insn_after): Likewise.
6157         (set_insn_deleted): Likewise for param.
6159 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6161         PR target/85358
6162         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6163         floating point modes, so that IFmode is numerically greater than
6164         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6165         to declare the ordering.  This prevents IFmode from being
6166         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6167         machine.  Include rs6000-modes.h to share the fractional values
6168         between genmodes* and the rest of the compiler.
6169         (IFmode): Likewise.
6170         (KFmode): Likewise.
6171         (TFmode): Likewise.
6172         * config/rs6000/rs6000-modes.h: New file.
6173         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6174         meaning of rs6000_long_double_size so that 126..128 selects an
6175         appropriate 128-bit floating point type.
6176         (rs6000_option_override_internal): Likewise.
6177         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6178         (TARGET_LONG_DOUBLE_128): Change the meaning of
6179         rs6000_long_double_size so that 126..128 selects an appropriate
6180         128-bit floating point type.
6181         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6182         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6183         source and destination to match the standard usage.
6184         (truncifkf2): Likewise.
6185         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6186         ISA 2.07 to use an explicit clobber, instead of passing in a
6187         temporary.
6188         (copysign<mode>3_soft): Likewise.
6190 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6192         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6193         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6194         (vect_slp_analyze_instance_dependence): Likewise.
6195         (vect_enhance_data_refs_alignment): Likewise.
6196         (vect_analyze_data_refs_alignment): Likewise.
6197         (vect_slp_analyze_and_verify_instance_alignment
6198         (vect_analyze_data_ref_accesses): Likewise.
6199         (vect_prune_runtime_alias_test_list): Likewise.
6200         (vect_analyze_data_refs): Likewise.
6201         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6202         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6203         (vect_analyze_scalar_cycles_1): Likewise.
6204         (vect_get_loop_niters): Likewise.
6205         (vect_analyze_loop_form_1): Likewise.
6206         (vect_update_vf_for_slp): Likewise.
6207         (vect_analyze_loop_operations): Likewise.
6208         (vect_analyze_loop): Likewise.
6209         (vectorizable_induction): Likewise.
6210         (vect_transform_loop): Likewise.
6211         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6212         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6213         (vect_make_slp_decision): Likewise.
6214         (vect_detect_hybrid_slp): Likewise.
6215         (vect_slp_analyze_operations): Likewise.
6216         (vect_slp_bb): Likewise.
6217         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6218         (vectorizable_bswap): Likewise.
6219         (vectorizable_call): Likewise.
6220         (vectorizable_simd_clone_call): Likewise.
6221         (vectorizable_conversion): Likewise.
6222         (vectorizable_assignment): Likewise.
6223         (vectorizable_shift): Likewise.
6224         (vectorizable_operation): Likewise.
6225         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6227 2018-06-18  Martin Sebor  <msebor@redhat.com>
6229         PR tree-optimization/81384
6230         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6231         * builtins.c (expand_builtin_strnlen): New function.
6232         (expand_builtin): Call it.
6233         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6234         * builtins.def (BUILT_IN_STRNLEN): New.
6235         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6236         Warn for bounds in excess of maximum object size.
6237         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6238         single-value ranges.  Handle strnlen.
6239         (handle_builtin_strlen): Handle strnlen.
6240         (strlen_check_and_optimize_stmt): Same.
6241         * doc/extend.texi (Other Builtins): Document strnlen.
6243 2018-06-18  Maya Rashish  <coypu@sdf.org>
6245         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6246         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6247         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6249         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6250         here to ...
6251         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6253 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6255         * tree.c (escaped_string::escape): Replace cast to char * by
6256         const_cast<char *> (unescaped).
6258 2018-06-18  Nick Clifton  <nickc@redhat.com>
6260         PR 84195
6261         * tree.c (escaped_string): New class.  Converts an unescaped
6262         string into its escaped equivalent.
6263         (warn_deprecated_use): Use the new class to convert the
6264         deprecation message, if present.
6265         (test_escaped_strings): New self test.
6266         (test_c_tests): Add test_escaped_strings.
6267         * doc/extend.texi (deprecated): Add a note that the
6268         deprecation message is affected by the -fmessage-length
6269         option, and that control characters will be escaped.
6270         (#pragma GCC error): Document this pragma.
6271         (#pragma GCC warning): Likewise.
6272         * doc/invoke.texi (-fmessage-length): Document this option's
6273         effect on the #warning and #error preprocessor directives and
6274         the deprecated attribute.
6276 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6278         * tree.c (decl_value_expr_lookup): Revert latest change.
6279         (decl_value_expr_insert): Likewise.
6281 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6283         * gimplify.c (nonlocal_vlas): Delete.
6284         (nonlocal_vla_vars): Likewise.
6285         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6286         referenced VLAs.
6287         (gimplify_body): Do not create and destroy nonlocal_vlas.
6288         * tree-nested.c: Include diagnostic.h.
6289         (use_pointer_in_frame): Tweak.
6290         (lookup_field_for_decl): Add assertion and declare the transformation.
6291         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6292         internal error when the reference is in a wrong context.  Do not
6293         create a debug decl by default.
6294         (note_nonlocal_block_vlas): Delete.
6295         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6296         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6297         create a debug decl by default.
6298         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6299         call is in a wrong context.
6300         (fixup_vla_decls): New function.
6301         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6302         debug variables were created.
6303         * tree.c (decl_value_expr_lookup): Add checking assertion.
6304         (decl_value_expr_insert): Likewise.
6306 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6308         PR middle-end/82479
6309         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6310         * tree-scalar-evolution.c (interpret_expr): Likewise.
6311         (expression_expensive_p): Likewise.
6312         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6313         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6314         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6315         (ssa_defined_by_minus_one_stmt_p): New.
6317 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6319         PR middle-end/64946
6320         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6321         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6322         * dojump.c (do_jump): Likewise.
6323         * expr.c (expand_expr_real_2): Check operand type's sign.
6324         * fold-const.c (const_unop): Handle ABSU_EXPR.
6325         (fold_abs_const): Likewise.
6326         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6327         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6328         (strip_sign_op_1): Likesise.
6329         * match.pd: Add new pattern to generate ABSU_EXPR.
6330         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6331         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6332         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6333         * tree-inline.c (estimate_operator_cost): Likewise.
6334         * tree-pretty-print.c (dump_generic_node): Likewise.
6335         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6336         * tree.def (ABSU_EXPR): New.
6338 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6340         PR middle-end/86095
6341         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6342         documented as preserved for backward compatibility only.
6343         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6345         PR rtl-optimization/86108
6346         * bb-reorder.c (create_forwarder_block): Renamed to ...
6347         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6348         jump from new landing pad to the second part.
6349         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6350         Adjust callers.
6352 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6354         PR middle-end/85878
6355         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6356         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6357         Only call store_expr for halves if the mode is the same.
6359         PR middle-end/86123
6360         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6361         Fix up comment formatting.
6363 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6365         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6366         (typed_splay_tree::closure,
6367         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6368         (typed_splay_tree::typed_splay_tree,
6369         typed_splay_tree::operator =): Declared private.
6370         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6371         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6372         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6373         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6374         typed_splay_tree::splay_tree_splay,
6375         typed_splay_tree::splay_tree_foreach_helper,
6376         typed_splay_tree::splay_tree_insert,
6377         typed_splay_tree::splay_tree_remove,
6378         typed_splay_tree::splay_tree_lookup,
6379         typed_splay_tree::splay_tree_predecessor,
6380         typed_splay_tree::splay_tree_successor,
6381         typed_splay_tree::splay_tree_min,
6382         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6383         (typed_splay_tree::root, typed_splay_tree::comp,
6384         typed_splay_tree::delete_key,
6385         typed_splay_tree::delete_value): New data members.
6386         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6387         typed_splay_tree::remove.
6389 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6391         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6392         -mginv and -mno-ginv to the assembler.
6393         * config/mips/mips.opt (-mcrc): New option.
6394         (-mginv): Likewise.
6395         * doc/invoke.text (-mcrc): Document.
6396         (-mginv): Likewise.
6398 2018-06-15  Nick Clifton  <nickc@redhat.com>
6400         PR 84195
6401         * tree.c (escaped_string): New class.  Converts an unescaped
6402         string into its escaped equivalent.
6403         (warn_deprecated_use): Use the new class to convert the
6404         deprecation message, if present.
6405         (test_escaped_strings): New self test.
6406         (test_c_tests): Add test_escaped_strings.
6407         * doc/extend.texi (deprecated): Add a note that the
6408         deprecation message is affected by the -fmessage-length
6409         option, and that control characters will be escaped.
6410         (#pragma GCC error): Document this pragma.
6411         (#pragma GCC warning): Likewise.
6412         * doc/invoke.texi (-fmessage-length): Document this option's
6413         effect on the #warning and #error preprocessor directives and
6414         the deprecated attribute.
6416 2018-06-15  Richard Biener  <rguenther@suse.de>
6418         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6419         here, also noting vector size used.
6420         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6421         size used in MSG_OPTIMIZED_LOCATIONS dump.
6422         (pass_slp_vectorize::execute): Adjust.
6424 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6426         PR target/85968
6427         * config/arc/arc.c (arc_return_address_register): Fix
6428         if-condition.
6430 2018-06-15  Richard Biener  <rguenther@suse.de>
6432         PR middle-end/86159
6433         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6434         leave useless conversion stripping to force_gimple_operand_gsi.
6435         (gimplify_build2): Likewise.
6436         (gimplify_build1): Likewise.
6438 2018-06-15  Richard Biener  <rguenther@suse.de>
6440         PR middle-end/86076
6441         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6442         before adjusting their block.
6444 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6446         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6447         multilibs for *-*-rtems*.
6448         * config/riscv/t-rtems: New file.
6450 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6452         PR middle-end/86122
6453         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6454         unsigned_type_for returns NULL.
6456         PR target/85945
6457         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6458         subregs of multi-word pseudos unless the float mode has word size.
6460 2018-06-14  Richard Biener  <rguenther@suse.de>
6462         PR middle-end/86139
6463         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6464         duplicate and harmful type_hash_canon.
6465         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6467 2018-06-14  Richard Biener  <rguenther@suse.de>
6469         PR ipa/86124
6470         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6471         NULL cgraph_node.
6473 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6475         * config/rtems.h (STDINT_LONG32): Define.
6477 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6478             Prachi Godbole  <prachi.godbole@imgtec.com>
6480         * config/mips/mips-cpus.def: Define P6600.
6481         * config/mips/mips-tables.opt: Regenerate.
6482         * config/mips/mips.c (mips_ucbranch_type): New enum.
6483         (mips_rtx_cost_data): Add support for P6600.
6484         (mips_issue_rate): Likewise.
6485         (mips_multipass_dfa_lookahead): Likewise.
6486         (mips_avoid_hazard): Likewise.
6487         (mips_reorg_process_insns): Likewise.
6488         (mips_classify_branch_p6600): New function.
6489         * config/mips/mips.h (TUNE_P6600): New define.
6490         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6491         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6492         * config/mips/mips.md: Include p6600.md.
6493         (processor): Add p6600.
6494         * config/mips/p6600.md: New file.
6495         * doc/invoke.texi: Add p6600 to supported architectures.
6497 2018-06-13  Martin Sebor  <msebor@redhat.com>
6499         PR tree-optimization/86114
6500         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6501         of integer types.
6502         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6504 2018-06-13  Richard Biener  <rguenther@suse.de>
6506         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6507         Properly set vector type of the intermediate stmt.
6508         * tree-vect-stmts.c (vectorizable_operation): The destination
6509         var always has vectype_out type.
6511 2018-06-13  Jeff Law  <law@redhat.com>
6513         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6514         integer 0 for argument to print_rtl_with_bb.
6515         (rl78_reorg): Likewise.
6517 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6519         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6520         from rtx to rtx_insn *.
6521         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6522         "label".
6523         (add_sched_insns_for_speculation): Likewise for local "target",
6524         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6525         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6526         from rtx_insn ** to rtx_code_label **.
6527         (reorg_emit_nops): Likewise.
6528         (c6x_reorg): Likewise for local "call_labels".
6529         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6530         rtx to rtx_insn *.
6531         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6532         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6533         the loops over LABEL_REFS.
6534         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6535         braf_label.
6536         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6537         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6538         (split_branches): Strengthen local "olabel" from rtx to
6539         rtx_insn *, adding a safe_as_a cast.
6540         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6541         to "rtx_insn *".
6542         (add_insn_after): Likewise for first two params.
6543         (add_insn_before): Likewise.
6544         (remove_insn): Likewise for param.
6545         (emit_pattern_before_noloc): Likewise for second and third params.
6546         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6547         (emit_call_insn_before_noloc): Likewise.
6548         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6549         to "rtx_insn *".
6550         (emit_barrier_before): Likewise.
6551         (emit_label_before): Strengthen "label" param from "rtx" to
6552         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6553         "rtx_insn *".
6554         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6555         "rtx_insn *".
6556         (emit_pattern_after_noloc): Likewise.
6557         (emit_insn_after_noloc): Likewise.
6558         (emit_jump_insn_after_noloc): Likewise.
6559         (emit_call_insn_after_noloc): Likewise.
6560         (emit_debug_insn_after_noloc): Likewise.
6561         (emit_barrier_after): Likewise.
6562         (emit_label_after): Likewise for both params.
6563         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6564         "loc" param from "int" to "location_t".
6565         (emit_insn_after_setloc): Likewise.
6566         (emit_jump_insn_after_setloc): Likewise.
6567         (emit_call_insn_after_setloc): Likewise.
6568         (emit_debug_insn_after_setloc): Likewise.
6569         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6570         "loc" param from "int" to "location_t".
6571         (emit_pattern_before): Convert NULL_RTX to NULL.
6572         (emit_insn_before_setloc): Convert "loc" param from "int" to
6573         "location_t".
6574         (emit_jump_insn_before_setloc): Likewise.
6575         (emit_call_insn_before_setloc): Likewise.
6576         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6577         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6578         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6579         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6580         Convert 3rd param from "int" to "location_t".
6581         (emit_barrier_before, emit_barrier_after, next_real_insn):
6582         Strengthen param from rtx to rtx_insn *.
6583         (emit_label_before): Strengthen 1st param from "rtx" to
6584         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6585         "rtx_insn *".
6586         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6587         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6588         Strengthen 2nd param from "rtx" to "rtx_insn *".
6589         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6590         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6591         Likewise. Convert 3rd param from "int" to "location_t".
6592         (emit_label_after): Strengthen 1st param from "rtx" to
6593         "rtx_code_label *".
6594         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6595         "rtx_insn *".
6596         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6597         from "rtx" to "rtx_insn *".
6599 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6601         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6602         bodies streamed in with -Q.
6603         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6604         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6605         * gimple-streamer-out.c: Include gimple-pretty-print.h
6606         (output_bb): Dump stmts streamed.
6607         * lto-section-out.c: Include print-tree.h
6608         (lto_begin_section): Dump sections created.
6609         (lto_output_decl_index): Dump decl encoded.
6610         * lto-streamer-out.c: Include print-tree.h
6611         (create_output_block): Dump output block created.
6612         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6613         (output_function): Dump function output.
6614         (output_constructor): Dump constructor streamed.
6615         (write_global_stream): Output indexes encoded.
6616         (produce_asm_for_decls): Dump streams encoded.
6617         * lto-streamer.c (streamer_dump_file): New global var.
6618         * lto-streamer.h (streamer_dump_file): Declare.
6619         * passes.c (ipa_write_summaries): Initialize streamer dump.
6620         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6621         in.
6623 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6625         PR target/86048
6626         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6627         offsets for register save directives.  Emit a second batch of save
6628         directives, if need be, when the function accesses prior frames.
6630 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6632         * config/arc/fpu.md (fmasf4): Force operand to register.
6633         (fnmasf4): Likewise.
6635 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6637         * config/arc/arc-protos.h (arc_pad_return): Remove.
6638         * config/arc/arc.c (machine_function): Remove force_short_suffix
6639         and size_reason.
6640         (arc_print_operand): Adjust printing of '&'.
6641         (arc_verify_short): Remove conditional printing of short suffix.
6642         (arc_final_prescan_insn): Remove reference to size_reason.
6643         (pad_return): New function.
6644         (arc_reorg): Call pad_return.
6645         (arc_pad_return): Remove.
6646         (arc_init_machine_status): Remove reference to force_short_suffix.
6647         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6648         (attr length): When attribute iscompact is true force to 2
6649         regardless; in the case of maybe check if we want to force the
6650         instruction to have 4 bytes length.
6651         (nopv): Change it to generate 4 byte long nop as well.
6652         (blockage): New pattern.
6653         (simple_return): Remove call to arc_pad_return.
6654         (p_return_i): Likewise.
6656 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6658         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6660 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6662         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6663         ARC cores.
6665 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6667         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6668         for ARC700 and ARCv2.
6670 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6672         PR target/86076
6673         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6674         operands[2] instead of operands[1].
6677 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6679         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6680         case, check whether the outer register overlaps an unallocatable
6681         register, not just whether it fits the required class.
6683 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6685         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6686         are poly_ints.
6687         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6688         (memrefs_conflict_p): Likewise.
6689         (init_alias_analysis): Likewise.
6690         * cfgexpand.c (expand_debug_expr): Likewise.
6691         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6692         * cse.c (fold_rtx): Likewise.
6693         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6694         * expr.c (emit_block_move_hints): Likewise.
6695         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6696         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6697         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6698         (emit_group_store): Likewise.
6699         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6700         to read the PRE/POST_MODIFY increment.
6701         * calls.c (store_one_arg): Use strip_offset.
6702         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6703         poly_int_rtx_p.
6704         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6705         by a VEC_SELECT.
6706         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6707         (simplify_binary_operation_1): Extend CONST_INT handling to
6708         poly_int_rtx_p.
6709         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6710         than a HOST_WIDE_INT.
6711         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6712         poly_int64.
6713         (adjust_mems, add_stores): Update accodingly.
6714         (vt_canonicalize_addr): Track polynomial offsets.
6715         (emit_note_insn_var_location): Likewise.
6716         (vt_add_function_parameter): Likewise.
6717         (vt_initialize): Likewise.
6719 2018-06-12  Jeff Law  <law@redhat.com>
6721         * config.gcc (alpha*-*-freebsd*): Remove.
6722         * config/alpha/freebsd.h: Remove.
6724 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6726         PR other/69968
6727         * spellcheck-tree.c (levenshtein_distance): Rename to...
6728         (get_edit_distance): ...this, and update for underlying renaming.
6729         * spellcheck-tree.h (levenshtein_distance): Rename to...
6730         (get_edit_distance): ...this.
6731         * spellcheck.c (levenshtein_distance): Rename to...
6732         (get_edit_distance): ...this.  Convert from Levenshtein distance
6733         to Damerau-Levenshtein distance by supporting transpositions of
6734         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6735         "v_one_ago".
6736         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6737         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6738         update for underlying renaming.
6739         (selftest::levenshtein_distance_unit_test): Rename to...
6740         (selftest::test_get_edit_distance_unit): ...this, and update for
6741         underlying renaming.
6742         (selftest::test_find_closest_string): Add example from PR 69968
6743         where transposition helps
6744         (selftest::test_metric_conditions): Update for renaming.
6745         (selftest::test_metric_conditions): Likewise.
6746         (selftest::spellcheck_c_tests): Likewise.
6747         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6748         (get_edit_distance): ...this.
6749         (best_match::consider): Update for renaming.
6751 2018-06-12  Martin Sebor  <msebor@redhat.com>
6753         PR tree-optimization/85259
6754         * builtins.c (compute_objsize): Handle constant offsets.
6755         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6756         true iff a warning has been issued.
6757         * gimple.h (gimple_nonartificial_location): New function.
6758         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6759         gimple_nonartificial_location and handle -Wno-system-headers.
6760         (handle_builtin_stxncpy): Same.
6762 2018-06-12  Martin Sebor  <msebor@redhat.com>
6764         PR c/85931
6765         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6767 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6769         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6770         BUILTIN_VEC_XST entries for pointer to double and long long.
6772 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6774         PR target/85990
6775         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6776         Update comments.
6777         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6778         Likewise.
6780 2018-06-12  Martin Liska  <mliska@suse.cz>
6782         * doc/options.texi: Document IntegerRange.
6784 2018-06-12  Martin Liska  <mliska@suse.cz>
6786         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6787         * opt-functions.awk: Handle Deprecated flag.
6788         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6789         and report error.
6790         (read_cmdline_option): Report warning for a deprecated option.
6791         * opts.h (struct cl_option): Add new field cl_deprecated.
6792         (CL_ERR_DEPRECATED): New.
6794 2018-06-12  Martin Liska  <mliska@suse.cz>
6796         * doc/options.texi: Document Deprecated option flag.
6798 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6800         * config/arc/arc-arch.h (arc_extras): New enum.
6801         (arc_cpu_t):Add field extra.
6802         (arc_cpu_types): Consider the extras.
6803         * config/arc/arc-cpus.def: Add extras info.
6804         * config/arc/arc-opts.h (processor_type): Consider extra field.
6805         * config/arc/arc.c (arc_override_options): Handle extra field.
6807 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6809         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6810         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6811         field.
6812         * config/arc/arc.c (arc_init): Update pic warning.
6813         (irq_range): Update irq range parsing warnings.
6814         (arc_override_options): Update various warning messages.
6815         (arc_handle_aux_attribute): Likewise.
6817 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6819         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6821 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6823         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6824         compiler messages directives.
6826 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6828         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6829         * config/mips/mips-tables.opt: Regenerate.
6830         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6831         mips64r6.
6832         * doc/invoke.texi: Document -march=i6500.
6834 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6836         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6837         (i6400_gpmul): Add cpu_unit.
6838         (i6400_gpdiv): Likewise.
6839         (i6400_msa_add_d): Update reservations.
6840         (i6400_msa_int_add) Likewise.
6841         (i6400_msa_short_logic3) Likewise.
6842         (i6400_msa_short_logic2) Likewise.
6843         (i6400_msa_short_logic) Likewise.
6844         (i6400_msa_move) Likewise.
6845         (i6400_msa_cmp) Likewise.
6846         (i6400_msa_short_float2) Likewise.
6847         (i6400_msa_div_d) Likewise.
6848         (i6400_msa_long_logic1) Likewise.
6849         (i6400_msa_long_logic2) Likewise.
6850         (i6400_msa_mult) Likewise.
6851         (i6400_msa_long_float2) Likewise.
6852         (i6400_msa_long_float4) Likewise.
6853         (i6400_msa_long_float5) Likewise.
6854         (i6400_msa_long_float8) Likewise.
6855         (i6400_fpu_fadd): Include frint type.
6856         (i6400_fpu_store): New define_insn_reservation.
6857         (i6400_fpu_load): Likewise.
6858         (i6400_fpu_move): Likewise.
6859         (i6400_fpu_fcmp): Likewise.
6860         (i6400_fpu_fmadd): Likewise.
6861         (i6400_int_mult): Include imul3nc type and update reservation.
6862         (i6400_int_div): Include idiv3 type and update reservation.
6863         (i6400_int_load): Update to check type not move_type.
6864         (i6400_int_store): Likewise.
6865         (i6400_int_prefetch): Set zero latency.
6867 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6869         * gcc.c: Document new %@{...} sequence.
6870         (LINK_COMMAND_SPEC): Use it for the -L switches.
6871         (cpp_unique_options): Use it for the -I switches.
6872         (at_file_argbuf): New global variable.
6873         (in_at_file): Likewise.
6874         (alloc_args): Create at_file_argbuf.
6875         (clear_args): Truncate at_file_argbuf.
6876         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6877         (open_at_file): New function.
6878         (close_at_file): Likewise.
6879         (create_at_file): Delete.
6880         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6881         <'o'>: Likewise.
6882         <'@'>: New case.
6883         (validate_switches_from_spec): Deal with %@{...} sequence.
6884         (validate_switches): Likewise.
6885         (driver::finalize): Call clear_args.
6887 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
6889         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6891 2018-06-11  Martin Sebor  <msebor@redhat.com>
6893         * doc/invoke.texi (-Wall): List -Wc++17-compat.
6894         (Wno-class-memaccess): Add @opindex.
6895         (Wno-templates, Wno-multiple-inheritance): Same.
6896         (Wno-virtual-inheritance, Wno-namespaces): Same.
6897         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6898         (Wno-format-overflow, Wno-format-truncation): Same.
6899         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6900         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6901         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6902         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6903         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6904         (Wno-misspelled-isr): Same.
6906 2018-06-11  Martin Sebor  <msebor@redhat.com>
6908         * PR tree-optimization/86083
6909         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6911 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6913         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6915 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
6917         PR target/85755
6918         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6919         on the correct operand.
6920         (*movdi_internal64): Ditto.
6922 2018-06-11  Martin Liska  <mliska@suse.cz>
6924         PR tree-optimization/86089
6925         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6927 2018-06-11  Julia Koval  <julia.koval@intel.com>
6929         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6930         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6931         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6933 2018-06-11  Olivier Hainque  <hainque@adacore.com>
6935         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6936         for Ada with strict dwarf2.
6938 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
6940         PR target/85755
6941         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6942         addresses.
6944 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
6946         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6948 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
6950         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6951         TARGET_ELF.
6953 2018-06-08  Martin Liska  <mliska@suse.cz>
6955         * tree-cfg.h (debug_function): Fix argument type to match
6956         implementation.
6958 2018-06-08  Martin Liska  <mliska@suse.cz>
6960         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6961         Remove usage of MPX-related (and removed) fields.
6962         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6964 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
6966         * cfg.c (debug): Use TDF_NONE rather than 0.
6967         * cfghooks.c (debug): Likewise.
6968         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6969         (struct dump_option_value_info): Convert to...
6970         (struct kv_pair): ...this template type.
6971         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6972         rather than 0.
6973         (optinfo_verbosity_options): Likewise.
6974         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6975         OPTGROUP_NONE.
6976         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6977         than int for "optgroup_flags" param.
6978         (dump_generic_expr_loc): Use dump_flags_t rather than int for
6979         "dump_kind" param.
6980         (dump_dec): Likewise.
6981         (dump_finish): Use TDF_NONE rather than 0.
6982         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6983         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
6984         than 0.  Update for change to option_ptr.
6985         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6986         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
6987         0.  Update for changes to optinfo_verbosity_options and
6988         optgroup_options.
6989         (opt_info_switch_p): Convert optgroup_flags from int to
6990         optgroup_flags_t.
6991         (dump_basic_block): Use dump_flags_t rather than int
6992         for "dump_kind" param.
6993         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6994         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6995         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6996         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6997         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6998         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6999         TDF_NONE): Convert from macros to...
7000         (enum dump_flag): ...this new enum.
7001         (dump_flags_t): Update to use enum.
7002         (operator|, operator&, operator~, operator|=, operator&=):
7003         Implement for dump_flags_t.
7004         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7005         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7006         Convert from macros to...
7007         (enum optgroup_flag): ...this new enum.
7008         (optgroup_flags_t): New typedef.
7009         (operator|, operator|=): Implement for optgroup_flags_t.
7010         (struct dump_file_info): Convert field "alt_flags" to
7011         dump_flags_t.  Convert field "optgroup_flags" to
7012         optgroup_flags_t.
7013         (dump_basic_block): Use dump_flags_t rather than int for param.
7014         (dump_generic_expr_loc): Likewise.
7015         (dump_dec): Likewise.
7016         (dump_register): Convert param "optgroup_flags" to
7017         optgroup_flags_t.
7018         (opt_info_enable_passes): Likewise.
7019         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7020         than 0.
7021         * gimple-pretty-print.c (debug): Likewise.
7022         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7023         (merged_store_group::apply_stores): Likewise.
7024         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7025         * gimple.c (verify_gimple_pp): Likewise.
7026         * graphite-poly.c (print_pbb_body): Likewise.
7027         * passes.c (pass_manager::register_one_dump_file): Convert
7028         local "optgroup_flags" to optgroup_flags_t.
7029         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7030         (debug): Likewise.
7031         (debug_body): Likewise.
7032         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7033         to optgroup_flags_t.
7034         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7035         than 0.
7036         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7037         (convert_mult_to_fma): Likewise.
7038         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7039         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7040         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7041         "dump_kind" to dump_flags_t.
7043 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7045         * config/rs6000/rs6000.c (min, max): Delete.
7047 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7049         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7050         -mabi=spe and -mabi=no-spe.
7052 2018-06-08  Martin Liska  <mliska@suse.cz>
7054         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7055         where we expect an existing summary.
7057 2018-06-08  Martin Liska  <mliska@suse.cz>
7059         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7060         * ipa-inline.h (estimate_edge_growth): Likewise.
7062 2018-06-08  Martin Liska  <mliska@suse.cz>
7064         * cgraph.c (function_version_hasher::hash): Use
7065         cgraph_node::get_uid ().
7066         (function_version_hasher::equal):
7067         * cgraph.h (cgraph_node::get_uid): New method.
7068         * ipa-inline.c (update_caller_keys): Use
7069         cgraph_node::get_uid ().
7070         (update_callee_keys): Likewise.
7071         * ipa-utils.c (searchc): Likewise.
7072         (ipa_reduced_postorder): Likewise.
7073         * lto-cgraph.c (input_node): Likewise.
7074         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7075         * symbol-summary.h (symtab_insertion): Likewise.
7076         (symtab_removal): Likewise.
7077         (symtab_duplication): Likewise.
7078         * tree-pretty-print.c (dump_function_header): Likewise.
7079         * tree-sra.c (convert_callers_for_node): Likewise.
7081 2018-06-08  Martin Liska  <mliska@suse.cz>
7083         * cgraph.c (symbol_table::create_edge): Always assign a new
7084         unique number.
7085         (symbol_table::free_edge): Do not recycle numbers.
7086         * cgraph.h (cgraph_edge::get): New method.
7087         * symbol-summary.h (symtab_removal): Use it.
7088         (symtab_duplication): Likewise.
7089         (call_summary::hashable_uid): Remove.
7091 2018-06-08  Martin Liska  <mliska@suse.cz>
7093         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7094         (initialize_growth_caches): Remove.
7095         (free_growth_caches): Likewise.
7096         (do_estimate_edge_time): Use edge_growth_cache.
7097         (do_estimate_edge_size): Likewise.
7098         (do_estimate_edge_hints): Likewise.
7099         * ipa-inline.c (reset_edge_caches): Likewise.
7100         (recursive_inlining): Likewise.
7101         (inline_small_functions): Likewise.
7102         * ipa-inline.h (initialize_growth_caches): Remove.
7103         (estimate_edge_size): Likewise.
7104         (estimate_edge_time): Likewise.
7105         (estimate_edge_hints): Likewise.
7106         (reset_edge_growth_cache): Likewise.
7107         * symbol-summary.h (call_summary::remove): New method.
7109 2018-06-08  Martin Liska  <mliska@suse.cz>
7111         * ipa-cp.c (class edge_clone_summary): New summary.
7112         (grow_edge_clone_vectors): Remove.
7113         (ipcp_edge_duplication_hook): Remove.
7114         (class edge_clone_summary_t): New call_summary class.
7115         (ipcp_edge_removal_hook): Remove.
7116         (edge_clone_summary_t::duplicate): New function.
7117         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7118         (create_specialized_node): Likewise.
7119         (ipcp_driver): Initialize edge_clone_summaries and do not
7120         register hooks.
7122 2018-06-08  Martin Liska  <mliska@suse.cz>
7124         * symbol-summary.h (get): New function.
7125         (call_summary::m_initialize_when_cloning): New class member.
7127 2018-06-08  Martin Liska  <mliska@suse.cz>
7129         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7130         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7131         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7132         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7133         (remove_cgraph_node_from_order): Use the removed_nodes set.
7134         (do_per_function_toporder): Likwise.
7135         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7136         instead of summary_uid.
7137         (symtab_removal): Likewise.
7138         (symtab_duplication): Likewise.
7140 2018-06-08  Martin Liska  <mliska@suse.cz>
7142         * ipa-cp.c (ipcp_store_bits_results): Use
7143         ipcp_transformation_sum.
7144         (ipcp_store_vr_results): Likewise.
7145         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7146         to ...
7147         (ipcp_transformation_initialize): ... this.
7148         (ipa_set_node_agg_value_chain):
7149         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7150         (write_ipcp_transformation_info): Likewise.
7151         (read_ipcp_transformation_info): Likewise.
7152         (ipcp_update_bits): Likewise.
7153         (ipcp_update_vr): Likewise.
7154         (ipcp_transform_function): Likewise.
7155         * ipa-prop.h: Rename ipcp_transformation_summary to
7156         ipcp_transformation.
7157         (class ipcp_transformation_t): New function summary.
7158         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7159         (ipa_get_agg_replacements_for_node): Likewise.
7161 2018-06-08  Martin Liska  <mliska@suse.cz>
7163         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7164         of struct.
7165         (class funct_state_summary_t): New function_summary class.
7166         (has_function_state): Remove.
7167         (get_function_state): Likewise.
7168         (set_function_state): Likewise.
7169         (add_new_function): Likewise.
7170         (funct_state_summary_t::insert): New function.
7171         (duplicate_node_data): Remove.
7172         (remove_node_data): Remove.
7173         (funct_state_summary_t::duplicate): New function.
7174         (register_hooks): Create new funct_state_summaries.
7175         (pure_const_generate_summary): Use it.
7176         (pure_const_write_summary): Likewise.
7177         (pure_const_read_summary): Likewise.
7178         (propagate_pure_const): Likewise.
7179         (propagate_nothrow): Likewise.
7180         (dump_malloc_lattice): Likewise.
7181         (propagate_malloc): Likewise.
7182         (execute): Do not register hooks, just remove summary
7183         instead.
7184         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7185         constructor.
7187 2018-06-08  Martin Liska  <mliska@suse.cz>
7189         * ipa-reference.c (remove_node_data): Remove.
7190         (duplicate_node_data): Likewise.
7191         (class ipa_ref_var_info_summary_t): New class.
7192         (class ipa_ref_opt_summary_t): Likewise.
7193         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7194         (get_reference_optimization_summary): Use
7195         ipa_ref_opt_sum_summaries.
7196         (set_reference_vars_info): Remove.
7197         (set_reference_optimization_summary): Likewise.
7198         (ipa_init): Create summaries.
7199         (init_function_info): Use function summary.
7200         (ipa_ref_opt_summary_t::duplicate): New function.
7201         (ipa_ref_opt_summary_t::remove): New function.
7202         (get_read_write_all_from_node): Fix GNU coding style.
7203         (propagate): Use function summary.
7204         (write_node_summary_p): Fix GNU coding style.
7205         (stream_out_bitmap): Likewise.
7206         (ipa_reference_read_optimization_summary): Use function summary.
7207         (ipa_reference_c_finalize): Do not release hooks.
7209 2018-06-08  Martin Liska  <mliska@suse.cz>
7211         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7212         (analyze_function_body): Extract multiple calls of get_create.
7213         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7214         * ipa-inline.c (recursive_inlining): Use ::get method.
7215         * ipa-inline.h (estimate_edge_growth): Likewise.
7217 2018-06-08  Martin Liska  <mliska@suse.cz>
7219         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7220         HSA_INVALID.
7221         (hsa_function_summary::hsa_function_summary): Use the new enum
7222         value.
7223         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7224         * hsa-gen.c (hsa_get_host_function): Likewise.
7225         (get_brig_function_name): Likewise.
7226         * ipa-hsa.c (process_hsa_functions): Likewise.
7227         (ipa_hsa_write_summary): Likewise.
7228         * symbol-summary.h (symtab_duplication): Use ::get function/
7229         (get): New function.
7231 2018-06-08  Martin Liska  <mliska@suse.cz>
7233         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7234         of get.
7235         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7236         (hsa_register_kernel): Likewise.
7237         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7238         * hsa-gen.c (hsa_get_host_function): Likewise.
7239         (get_brig_function_name): Likewise.
7240         (generate_hsa): Likewise.
7241         (pass_gen_hsail::execute): Likewise.
7242         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7243         (devirtualization_time_bonus): Likewise.
7244         (ipcp_propagate_stage): Likewise.
7245         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7246         (edge_set_predicate): Likewise.
7247         (evaluate_conditions_for_known_args): Likewise.
7248         (evaluate_properties_for_edge): Likewise.
7249         (ipa_fn_summary::reset): Likewise.
7250         (ipa_fn_summary_t::duplicate): Likewise.
7251         (dump_ipa_call_summary): Likewise.
7252         (ipa_dump_fn_summary): Likewise.
7253         (analyze_function_body): Likewise.
7254         (compute_fn_summary): Likewise.
7255         (estimate_edge_devirt_benefit): Likewise.
7256         (estimate_edge_size_and_time): Likewise.
7257         (estimate_calls_size_and_time): Likewise.
7258         (estimate_node_size_and_time): Likewise.
7259         (inline_update_callee_summaries): Likewise.
7260         (remap_edge_change_prob): Likewise.
7261         (remap_edge_summaries): Likewise.
7262         (ipa_merge_fn_summary_after_inlining): Likewise.
7263         (ipa_update_overall_fn_summary): Likewise.
7264         (read_ipa_call_summary): Likewise.
7265         (inline_read_section): Likewise.
7266         (write_ipa_call_summary): Likewise.
7267         (ipa_fn_summary_write): Likewise.
7268         (ipa_free_fn_summary): Likewise.
7269         * ipa-hsa.c (process_hsa_functions): Likewise.
7270         (ipa_hsa_write_summary): Likewise.
7271         (ipa_hsa_read_section): Likewise.
7272         * ipa-icf.c (sem_function::merge): Likewise.
7273         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7274         (do_estimate_edge_time): Likewise.
7275         (estimate_size_after_inlining): Likewise.
7276         (estimate_growth): Likewise.
7277         (growth_likely_positive): Likewise.
7278         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7279         (inline_call): Likewise.
7280         * ipa-inline.c (caller_growth_limits): Likewise.
7281         (can_inline_edge_p): Likewise.
7282         (can_inline_edge_by_limits_p): Likewise.
7283         (compute_uninlined_call_time): Likewise.
7284         (compute_inlined_call_time): Likewise.
7285         (want_inline_small_function_p): Likewise.
7286         (edge_badness): Likewise.
7287         (update_caller_keys): Likewise.
7288         (update_callee_keys): Likewise.
7289         (recursive_inlining): Likewise.
7290         (inline_small_functions): Likewise.
7291         (inline_to_all_callers_1): Likewise.
7292         (dump_overall_stats): Likewise.
7293         (early_inline_small_functions): Likewise.
7294         (early_inliner): Likewise.
7295         * ipa-inline.h (estimate_edge_growth): Likewise.
7296         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7297         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7298         * ipa-prop.h (IPA_NODE_REF): Likewise.
7299         (IPA_EDGE_REF): Likewise.
7300         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7301         (propagate_malloc): Likewise.
7302         * ipa-split.c (execute_split_functions): Likewise.
7303         * symbol-summary.h: Rename get to get_create.
7304         (get): Likewise.
7305         (get_create): Likewise.
7306         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7308 2018-06-08  Martin Liska  <mliska@suse.cz>
7310         * symbol-summary.h (release): Move definition out of class
7311         declaration.
7312         (symtab_removal): Likewise.
7313         (symtab_duplication): Likewise.
7315 2018-06-08  Martin Liska  <mliska@suse.cz>
7317         * symbol-summary.h (function_summary): Move constructor
7318         implementation out of class declaration.
7319         (release): Likewise.
7320         (symtab_insertion): Likewise.
7321         (symtab_removal): Likewise.
7322         (symtab_duplication): Likewise.
7323         (get): Likewise.
7325 2018-06-08  Martin Liska  <mliska@suse.cz>
7327         * Makefile.in: Remove support for MPX (macros, related functions,
7328         fields in cgraph_node, ...).
7329         * builtin-types.def (BT_BND): Likewise.
7330         (BT_FN_BND_CONST_PTR): Likewise.
7331         (BT_FN_CONST_PTR_BND): Likewise.
7332         (BT_FN_VOID_PTR_BND): Likewise.
7333         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7334         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7335         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7336         (expand_builtin_mempcpy_with_bounds): Likewise.
7337         (expand_builtin_memset_with_bounds): Likewise.
7338         (expand_builtin_memset_args): Likewise.
7339         (std_expand_builtin_va_start): Likewise.
7340         (expand_builtin): Likewise.
7341         (expand_builtin_with_bounds): Likewise.
7342         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7343         (DEF_LIB_BUILTIN_CHKP): Likewise.
7344         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7345         (DEF_CHKP_BUILTIN): Likewise.
7346         (BUILT_IN_MEMCPY): Likewise.
7347         (BUILT_IN_MEMMOVE): Likewise.
7348         (BUILT_IN_MEMPCPY): Likewise.
7349         (BUILT_IN_MEMSET): Likewise.
7350         (BUILT_IN_STPCPY): Likewise.
7351         (BUILT_IN_STRCAT): Likewise.
7352         (BUILT_IN_STRCHR): Likewise.
7353         (BUILT_IN_STRCPY): Likewise.
7354         (BUILT_IN_STRLEN): Likewise.
7355         (BUILT_IN_MEMCPY_CHK): Likewise.
7356         (BUILT_IN_MEMMOVE_CHK): Likewise.
7357         (BUILT_IN_MEMPCPY_CHK): Likewise.
7358         (BUILT_IN_MEMSET_CHK): Likewise.
7359         (BUILT_IN_STPCPY_CHK): Likewise.
7360         (BUILT_IN_STRCAT_CHK): Likewise.
7361         (BUILT_IN_STRCPY_CHK): Likewise.
7362         * calls.c (store_bounds): Likewise.
7363         (emit_call_1): Likewise.
7364         (special_function_p): Likewise.
7365         (maybe_warn_nonstring_arg): Likewise.
7366         (initialize_argument_information): Likewise.
7367         (finalize_must_preallocate): Likewise.
7368         (compute_argument_addresses): Likewise.
7369         (expand_call): Likewise.
7370         * cfgexpand.c (expand_call_stmt): Likewise.
7371         (expand_return): Likewise.
7372         (expand_gimple_stmt_1): Likewise.
7373         (pass_expand::execute): Likewise.
7374         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7375         (cgraph_node::remove): Likewise.
7376         (cgraph_node::dump): Likewise.
7377         (cgraph_node::verify_node): Likewise.
7378         * cgraph.h (chkp_function_instrumented_p): Likewise.
7379         (symtab_node::get_alias_target): Likewise.
7380         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7381         (cgraph_local_p): Likewise.
7382         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7383         (cgraph_edge::rebuild_references): Likewise.
7384         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7385         (walk_polymorphic_call_targets): Likewise.
7386         (cgraph_node::expand_thunk): Likewise.
7387         (symbol_table::output_weakrefs): Likewise.
7388         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7389         (ix86_handle_option): Likewise.
7390         * config/i386/constraints.md: Likewise.
7391         * config/i386/i386-builtin-types.def (BND): Likewise.
7392         (VOID): Likewise.
7393         (PVOID): Likewise.
7394         (ULONG): Likewise.
7395         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7396         (BDESC_FIRST): Likewise.
7397         (BDESC): Likewise.
7398         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7399         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7400         * config/i386/i386.c (enum reg_class): Likewise.
7401         (ix86_target_string): Likewise.
7402         (ix86_option_override_internal): Likewise.
7403         (ix86_conditional_register_usage): Likewise.
7404         (ix86_valid_target_attribute_inner_p): Likewise.
7405         (ix86_set_indirect_branch_type): Likewise.
7406         (ix86_set_current_function): Likewise.
7407         (ix86_function_arg_regno_p): Likewise.
7408         (init_cumulative_args): Likewise.
7409         (ix86_function_arg_advance): Likewise.
7410         (ix86_function_arg): Likewise.
7411         (ix86_pass_by_reference): Likewise.
7412         (ix86_function_value_regno_p): Likewise.
7413         (ix86_function_value_1): Likewise.
7414         (ix86_function_value_bounds): Likewise.
7415         (ix86_return_in_memory): Likewise.
7416         (ix86_setup_incoming_vararg_bounds): Likewise.
7417         (ix86_va_start): Likewise.
7418         (indirect_thunk_need_prefix): Likewise.
7419         (print_reg): Likewise.
7420         (ix86_print_operand): Likewise.
7421         (ix86_expand_call): Likewise.
7422         (ix86_output_function_return): Likewise.
7423         (reg_encoded_number): Likewise.
7424         (BDESC_VERIFYS): Likewise.
7425         (ix86_init_mpx_builtins): Likewise.
7426         (ix86_init_builtins): Likewise.
7427         (ix86_emit_cmove): Likewise.
7428         (ix86_emit_move_max): Likewise.
7429         (ix86_expand_builtin): Likewise.
7430         (ix86_builtin_mpx_function): Likewise.
7431         (ix86_get_arg_address_for_bt): Likewise.
7432         (ix86_load_bounds): Likewise.
7433         (ix86_store_bounds): Likewise.
7434         (ix86_load_returned_bounds): Likewise.
7435         (ix86_store_returned_bounds): Likewise.
7436         (ix86_class_likely_spilled_p): Likewise.
7437         (ix86_hard_regno_mode_ok): Likewise.
7438         (x86_order_regs_for_local_alloc): Likewise.
7439         (ix86_mitigate_rop): Likewise.
7440         (ix86_bnd_prefixed_insn_p): Likewise.
7441         (ix86_mpx_bound_mode): Likewise.
7442         (ix86_make_bounds_constant): Likewise.
7443         (ix86_initialize_bounds): Likewise.
7444         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7445         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7446         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7447         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7448         (TARGET_CHKP_BOUND_MODE): Likewise.
7449         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7450         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7451         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7452         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7453         * config/i386/i386.h (TARGET_MPX): Likewise.
7454         (TARGET_MPX_P): Likewise.
7455         (VALID_BND_REG_MODE): Likewise.
7456         (FIRST_BND_REG): Likewise.
7457         (LAST_BND_REG): Likewise.
7458         (enum reg_class): Likewise.
7459         (BND_REG_P): Likewise.
7460         (BND_REGNO_P): Likewise.
7461         (BNDmode): Likewise.
7462         (ADJUST_INSN_LENGTH): Likewise.
7463         * config/i386/i386.md: Likewise.
7464         * config/i386/i386.opt: Likewise.
7465         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7466         (defined): Likewise.
7467         (LINK_MPX): Likewise.
7468         (MPX_SPEC): Likewise.
7469         (LIBMPX_SPEC): Likewise.
7470         (LIBMPXWRAPPERS_SPEC): Likewise.
7471         (CHKP_SPEC): Likewise.
7472         * config/i386/predicates.md: Likewise.
7473         * dbxout.c (dbxout_type): Likewise.
7474         * doc/extend.texi: Likewise.
7475         * doc/invoke.texi: Likewise.
7476         * doc/md.texi: Likewise.
7477         * doc/tm.texi: Likewise.
7478         * doc/tm.texi.in: Likewise.
7479         * dwarf2out.c (is_base_type): Likewise.
7480         (gen_formal_types_die): Likewise.
7481         (gen_subprogram_die): Likewise.
7482         (gen_type_die_with_usage): Likewise.
7483         (gen_decl_die): Likewise.
7484         (dwarf2out_late_global_decl): Likewise.
7485         * expr.c (expand_assignment): Likewise.
7486         (emit_storent_insn): Likewise.
7487         (store_expr_with_bounds): Likewise.
7488         (store_expr): Likewise.
7489         (expand_expr_real_1): Likewise.
7490         * expr.h (store_expr_with_bounds): Likewise.
7491         * function.c (use_register_for_decl): Likewise.
7492         (struct bounds_parm_data): Likewise.
7493         (assign_parms_augmented_arg_list): Likewise.
7494         (assign_parm_find_entry_rtl): Likewise.
7495         (assign_parm_is_stack_parm): Likewise.
7496         (assign_parm_load_bounds): Likewise.
7497         (assign_bounds): Likewise.
7498         (assign_parms): Likewise.
7499         (expand_function_start): Likewise.
7500         * gcc.c (CHKP_SPEC): Likewise.
7501         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7502         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7503         (wrestrict_dom_walker::check_call): Likewise.
7504         * gimple.c (gimple_build_call_from_tree): Likewise.
7505         * gimple.h (enum gf_mask): Likewise.
7506         (gimple_call_with_bounds_p): Likewise.
7507         (gimple_call_set_with_bounds): Likewise.
7508         * gimplify.c (gimplify_init_constructor): Likewise.
7509         * ipa-cp.c (initialize_node_lattices): Likewise.
7510         (propagate_constants_across_call): Likewise.
7511         (find_more_scalar_values_for_callers_subset): Likewise.
7512         * ipa-hsa.c (process_hsa_functions): Likewise.
7513         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7514         * ipa-icf.c (sem_function::merge): Likewise.
7515         * ipa-inline.c (early_inliner): Likewise.
7516         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7517         (warn_function_cold): Likewise.
7518         (propagate_pure_const): Likewise.
7519         * ipa-ref.h (enum GTY): Likewise.
7520         * ipa-split.c (find_retbnd): Likewise.
7521         (consider_split): Likewise.
7522         (split_function): Likewise.
7523         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7524         * ipa.c (walk_polymorphic_call_targets): Likewise.
7525         (symbol_table::remove_unreachable_nodes): Likewise.
7526         (process_references): Likewise.
7527         (cgraph_build_static_cdtor_1): Likewise.
7528         * lto-cgraph.c (lto_output_node): Likewise.
7529         (output_refs): Likewise.
7530         (compute_ltrans_boundary): Likewise.
7531         (input_overwrite_node): Likewise.
7532         (input_node): Likewise.
7533         (input_cgraph_1): Likewise.
7534         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7535         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7536         (class pass_chkp_instrumentation_passes): Likewise.
7537         (make_pass_chkp_instrumentation_passes): Likewise.
7538         * passes.def: Likewise.
7539         * rtl.h (struct GTY): Likewise.
7540         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7541         * stor-layout.c (layout_type): Likewise.
7542         * symtab.c: Likewise.
7543         * target.def: Likewise.
7544         * targhooks.c (default_chkp_bound_type): Likewise.
7545         (default_chkp_bound_mode): Likewise.
7546         (default_builtin_chkp_function): Likewise.
7547         (default_chkp_function_value_bounds): Likewise.
7548         (default_chkp_make_bounds_constant): Likewise.
7549         (default_chkp_initialize_bounds): Likewise.
7550         * targhooks.h (default_chkp_bound_type): Likewise.
7551         (default_chkp_bound_mode): Likewise.
7552         (default_builtin_chkp_function): Likewise.
7553         (default_chkp_function_value_bounds): Likewise.
7554         (default_chkp_make_bounds_constant): Likewise.
7555         (default_chkp_initialize_bounds): Likewise.
7556         * toplev.c (compile_file): Likewise.
7557         (process_options): Likewise.
7558         * tree-core.h (DEF_BUILTIN): Likewise.
7559         (DEF_BUILTIN_CHKP): Likewise.
7560         * tree-inline.c (declare_return_variable): Likewise.
7561         (remap_gimple_stmt): Likewise.
7562         (copy_bb): Likewise.
7563         (initialize_inlined_parameters): Likewise.
7564         (expand_call_inline): Likewise.
7565         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7566         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7567         (make_pass_ipa_chkp_produce_thunks): Likewise.
7568         (make_pass_chkp): Likewise.
7569         (make_pass_chkp_opt): Likewise.
7570         (make_pass_chkp_instrumentation_passes): Likewise.
7571         * tree-pretty-print.c (dump_generic_node): Likewise.
7572         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7573         * tree-ssa-dce.c (propagate_necessity): Likewise.
7574         (eliminate_unnecessary_stmts): Likewise.
7575         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7576         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7577         * tree-ssa-sccvn.h: Likewise.
7578         * tree-ssa-strlen.c (get_string_length): Likewise.
7579         (valid_builtin_call): Likewise.
7580         (adjust_last_stmt): Likewise.
7581         (handle_builtin_strchr): Likewise.
7582         (handle_builtin_strcpy): Likewise.
7583         (handle_builtin_stxncpy): Likewise.
7584         (handle_builtin_memcpy): Likewise.
7585         (handle_builtin_strcat): Likewise.
7586         (strlen_check_and_optimize_stmt): Likewise.
7587         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7588         * tree-streamer-in.c: Likewise.
7589         * tree-streamer.c (record_common_node): Likewise.
7590         * tree.c (tree_code_size): Likewise.
7591         (wide_int_to_tree_1): Likewise.
7592         (type_contains_placeholder_1): Likewise.
7593         (build_common_tree_nodes): Likewise.
7594         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7595         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7596         (POINTER_BOUNDS_P): Likewise.
7597         (BOUNDED_TYPE_P): Likewise.
7598         (BOUNDED_P): Likewise.
7599         (CALL_WITH_BOUNDS_P): Likewise.
7600         (pointer_bounds_type_node): Likewise.
7601         * value-prof.c (gimple_ic): Likewise.
7602         * var-tracking.c (vt_add_function_parameters): Likewise.
7603         * varasm.c (make_decl_rtl): Likewise.
7604         (assemble_start_function): Likewise.
7605         (output_constant): Likewise.
7606         (maybe_assemble_visibility): Likewise.
7607         * varpool.c (ctor_for_folding): Likewise.
7608         * chkp-builtins.def: Remove.
7609         * ipa-chkp.c: Remove.
7610         * ipa-chkp.h: Remove.
7611         * rtl-chkp.c: Remove.
7612         * rtl-chkp.h: Remove.
7613         * tree-chkp-opt.c: Remove.
7614         * tree-chkp.c: Remove.
7615         * tree-chkp.h: Remove.
7617 2018-06-07  Carl Love  <cel@us.ibm.com>
7619         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7620         vextract_fp_from_shortl): Add BE support.
7622 2018-06-07  Paul Koning  <ni1d@arrl.net>
7624         * compare-elim.c (try_merge_compare): Don't merge compare if
7625         address contains a side effect.
7626         (try_eliminate_compare): Likewise.
7628 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7630         * config.gcc: Support "tremont".
7631         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7632         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7633         PROCESSOR_TREMONT.
7634         * config/i386/i386.c (m_TREMONT): Define.
7635         (processor_target_table): Add "tremont".
7636         (PTA_TREMONT): Define.
7637         (ix86_lea_outperforms): Add TARGET_TREMONT.
7638         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7639         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7640         and M_INTEL_GOLDMONT_PLUS.
7641         (fold_builtin_cpu): Add "tremont".
7642         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7643         (ix86_option_override_internal): Add "tremont".
7644         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7645         (processor_type): Add PROCESSOR_TREMONT.
7646         * config/i386/x86-tune.def: Add m_TREMONT.
7647         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7649 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7651         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7652         symbol defined for msp430i* devices to be lower case.
7654 2018-06-07  Richard Biener  <rguenther@suse.de>
7656         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7657         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7658         Properly wrap signed arithmetic if overflow wraps.
7660 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7662         PR tree-optimization/69615
7663         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7664         of a cast from a same precision integral SSA_NAME in a bb dominated
7665         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7666         cast to utype if rhs2 has already a compatible type.
7668 2018-06-07  Richard Biener  <rguenther@suse.de>
7670         PR tree-optimization/85935
7671         * graphite-scop-detection.c (find_params_in_bb): Analyze
7672         condition operands with respect to the correct loop.  Assert
7673         the analysis doesn't fail.
7675 2018-06-04  Carl Love  <cel@us.ibm.com>
7677         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7678         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7679         as it is slightly cheaper.
7680         (first_match_or_eos_index_<mode>):
7681         Calculate index using natural element order.
7682         (first_match_index_<mode>):
7683         Calculate index using natural element order.
7684         (first_match_or_eos_index_<mode>):
7685         Calculate index using natural order.
7686         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7687         for BE and LE modes.
7688         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7689         P9V_BUILTIN_VCLZLSBB_V16QI.
7690         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7691         specific.
7693 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7695         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7696         indentation and line wrap for many prototypes.  Add missing
7697         @smallexample directives around block of prototypes for vec_xl and
7698         vec_xst.
7700 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7702         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7703         track if we pass or return IEEE 128-bit floating point.
7704         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7705         C++ mangling that is compatible with GCC 8.1.
7706         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7707         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7708         floating point types.
7709         (rs6000_function_arg_advance_1): Likewise.
7710         (rs6000_mangle_type): Optionally generate mangled names that match
7711         what GCC 8.1 generated for IEEE 128-bit floating point types.
7712         (rs6000_globalize_decl_name): If we have an external function that
7713         passes or returns IEEE 128-bit types, generate a weak reference
7714         from the mangled name used in GCC 8.1 to the current mangled
7715         name.
7716         (rs6000_init_builtins): Make __ibm128 use the long double type if
7717         long double is IBM extended double.  Make __float128 use the long
7718         double type if long double is IEEE 128-bit.
7720         PR target/85657
7721         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7722         macro for __ibm128 built-in functions.
7723         (PACK_IF): Add __ibm128 pack/unpack functions.
7724         (UNPACK_IF): Likewise.
7725         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7726         enable long double built-in functions if long double is IEEE
7727         128-bit floating point.
7728         (rs6000_invalid_builtin): Update long double built-in function
7729         error message.
7730         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7731         functions, adjust the built-in function to use the long double
7732         built-in function if __ibm128 and long double are the same type.
7733         * doc/extend.texi (PowerPC builtins): Update documention for
7734         __builtin_{,un}pack_longdouble.  Add documentation for
7735         __builtin_{,un}pack_ibm128.
7737 2018-06-06  Jim Wilson  <jimw@sifive.com>
7739         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7740         (struct machine_function): New field interrupt_mode.
7741         (riscv_handle_type_attribute): New function.  Add forward declaration.
7742         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7743         (riscv_expand_epilogue): Check interrupt_mode field.
7744         (riscv_set_current_function): Check interrupt attribute args and
7745         set interrupt_mode field.
7746         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7747         (riscv_sret, riscv_uret): New.
7748         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7749         new arguments to interrupt attribute.
7751 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7753         PR target/63177
7754         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7755         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7757 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7759         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7760         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7761         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7762         several redundant entries.
7764 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7766         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7767         type from "rtx" to "rtx_insn *".
7768         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7769         for local "call_insn", removing cast.
7770         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7772 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7774         PR tree-optimization/86066
7775         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7776         for BIT_INSERT_EXPR stores.
7778 2018-06-06  Richard Biener  <rguenther@suse.de>
7780         PR tree-optimization/86062
7781         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7782         component refs ontop
7783         of to be offsetted base.
7785 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7787         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7788         to be static and remove check on interrupt attribute name.
7790 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7792         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7793         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7795 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7797         PR target/79924
7798         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7799         second argument.
7800         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7801         Remove second argument, change how error is called.
7802         (aarch64_layout_arg): Remove second argument from
7803         aarch64_err_no_fpadvsimd call.
7804         (aarch64_init_cumulative_args): Ditto.
7805         (aarch64_gimplify_va_arg_expr): Ditto.
7806         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7808 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7810         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7811         (*simple_return_indirect_internal<mode>): Rename from
7812         simple_return_indirect_internal.  Use W mode iterator.
7813         (rstorssp): New expander.
7814         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7815         (clrssbsy): New expander.
7816         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7818 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7820         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7821         __typeof__.
7822         (cmse_check_pointed_object): Likewise.
7824 2018-06-05  Martin Liska  <mliska@suse.cz>
7826         PR gcov-profile/47618
7827         * doc/invoke.texi: Document how -fprofile-dir format
7828         is extended.
7830 2018-06-05  Richard Biener  <rguenther@suse.de>
7832         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7833         removal pretend DOM info isn't available so we do not update
7834         it and only remove edges, not dominated blocks.  Actually free
7835         DOM info in case we removed something.  Remove unreachable blocks.
7836         (mfb_keep_latches): Work with either DOM info or marked backedges.
7837         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7838         first.  Mark backedges if DOM info isn't available.
7839         (Re-)compute DOM info after cleanup_control_flow_pre.
7841 2018-06-05  Richard Biener  <rguenther@suse.de>
7843         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7844         (locus_discrim_hasher::hash): Adjust.
7845         (locus_discrim_hasher::equal): Likewise.
7846         (next_discriminator_for_locus): Work on line directly.
7847         (same_line_p): Pass in expanded locus1 as well.
7848         (assign_discriminators): Avoid redundant location expansions.
7850 2018-06-05  Richard Biener  <rguenther@suse.de>
7852         PR tree-optimization/86046
7853         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7854         if required after clearing TREE_ADDRESSABLE.
7856 2018-06-05  Richard Biener  <rguenther@suse.de>
7858         PR tree-optimization/86047
7859         * tree-ssa-loop.c (for_each_index): Glob handling of all
7860         decls and constants and really handle all of them.
7862 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7864         PR target/81497
7865         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7866         qualifier_void_pointer and qualifier_const_void_pointer.
7867         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7868         (arm_init_builtins): Handle the above.
7869         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7870         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7871         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7872         void intrinsics.
7874 2018-06-05  Martin Liska  <mliska@suse.cz>
7876         * auto-profile.c (read_autofdo_file): Do not use
7877         gcov_ctr_summary struct.
7878         (afdo_callsite_hot_enough_for_early_inline): Likewise.
7879         * coverage.c (struct counts_entry): Likewise.
7880         (read_counts_file): Read just single summary entry.
7881         (get_coverage_counts): Use gcov_summary struct.
7882         * coverage.h (get_coverage_counts): Likewise.
7883         * gcov-dump.c (dump_working_sets): Likewise.
7884         (tag_summary): Dump just single summary.
7885         * gcov-io.c (gcov_write_summary): Write just histogram
7886         summary.
7887         (gcov_read_summary): Read just single summary.
7888         (compute_working_sets): Use gcov_summary struct.
7889         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7890         of GCOV_COUNTERS_SUMMABLE.
7891         (GCOV_COUNTERS_SUMMABLE): Remove.
7892         (GCOV_FIRST_VALUE_COUNTER): Replace with
7893         GCOV_COUNTER_V_INTERVAL.
7894         (struct gcov_ctr_summary): Remove.
7895         (struct gcov_summary): Directly use fields of former
7896         gcov_ctr_summary.
7897         (compute_working_sets): Use gcov_summary struct.
7898         * gcov.c (read_count_file): Do not use ctrs fields.
7899         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7900         struct.
7901         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7902         struct.
7903         * profile.c: Likewise.
7904         * profile.h: Likewise.
7906 2018-06-05  Martin Liska  <mliska@suse.cz>
7908         PR gcov-profile/84846
7909         * gcov.c (output_lines): Print working directory only
7910         in intermediate format.
7912 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
7914         * config/s390/s390-builtin-types.def: Add void function type.
7915         * config/s390/s390-builtins.def: Use the function type for the
7916         tbeginc builtin.
7918 2018-06-04  Jim Wilson  <jimw@sifive.com>
7920         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7921         to int.
7922         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7923         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
7924         handle EH_RETURN_DATA_REGNO registers properly.
7925         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7926         (riscv_expand_epilogue): Update comment.  Change argument name and
7927         type.  Update code to use new name and type.  Pass new args to
7928         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
7929         EXCEPTION_RETURN.
7930         * config/riscv/riscv.md (NORMAL_RETURN): New.
7931         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7932         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7933         (eh_return): Call gen_eh_return_internal and emit barrier.
7934         (eh_return_internal): Call riscv_expand_epilogue.
7936 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7938         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7939         bit_insertion field and declare can_be_merged_into method.
7940         (merged_store_group::can_be_merged_into): New method.
7941         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7942         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
7943         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7945 2018-06-04  Richard Biener  <rguenther@suse.de>
7947         PR tree-optimization/85955
7948         * builtins.c (fold_builtin_sincos): Convert pointers to
7949         destination to appropriate type before dereferencing.
7951 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
7953         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7955 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
7957         * expr.c (expand_expr_real_1): Force the operand into memory if
7958         its TYPE_MODE is BLKmode and if there is no integer mode for
7959         the number of bits being extracted.
7961 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7963         PR target/85832
7964         PR target/86036
7965         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7966         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7968 2018-06-04  Richard Biener  <rguenther@suse.de>
7970         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7971         (cleanup_tree_cfg_noloop): ... single caller.  Do
7972         start_recording_case_labels later.
7974 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
7976         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7977         to _IMMINTRIN_H_INCLUDED.
7978         * config/i386/pconfigintrin.h: Ditto.
7979         * config/i386/waitpkgintrin.h: Ditto.
7980         * config/i386/immintrin.h: Add includes for sgxintrin.h,
7981         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7982         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7983         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7984         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7985         waitpkgintrin.h and cldemoteintrin.h.
7987 2018-06-04  Richard Biener  <rguenther@suse.de>
7989         PR tree-optimization/86038
7990         * tracer.c (find_best_successor): Check probability for
7991         being initialized, bail out if not.
7993 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
7995         PR target/86003
7996         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7997         of bits to ignore when comparing architectures.
7999 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8001         PR tree-optimization/69615
8002         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8003         maximum or minimum of the type, try to merge it also as if
8004         range1 is + [-, x - 1] or + [x + 1, -].
8006         PR c++/86025
8007         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8009 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8011         PR tree-optimization/86034
8012         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8013         the unsigned bitfield type in a bit insertion sequence if it does not
8014         have a larger precision than the bitfield size.
8015         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8017 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8019         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8021 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8023         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8024         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8025         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8026         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8028 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8030         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8031         Disable -fdelete-null-pointer-checks for ELF toolchain.
8033 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8034             Kito Cheng  <kito.cheng@gmail.com>
8036         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8037         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8038         (nds32*-*-*): Add glibc and uclibc conditions.
8039         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8040         (TARGET_EXCEPT_UNWIND_INFO): Define.
8041         * config/nds32/elf.h: New file.
8042         * config/nds32/linux.h: New file.
8043         * config/nds32/nds32-elf.opt: New file.
8044         * config/nds32/nds32-linux.opt: New file.
8045         * config/nds32/nds32-fp-as-gp.c
8046         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8047         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8048         TARGET_LINUX_ABI.
8049         (nds32_asm_file_end): Ditto.
8050         (nds32_print_operand): Ditto.
8051         (nds32_insert_attributes): Ditto.
8052         (nds32_init_libfuncs): New function.
8053         (TARGET_HAVE_TLS): Define.
8054         (TARGET_INIT_LIBFUNCS): Define.
8055         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8056         spec content.
8057         (TARGET_ELF): Apply different mcmodel setting.
8058         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8059         been migrated into elf.h and linux.h files.
8060         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8061         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8062         (mcmodel): The content has been migrated into nds32-elf.opt and
8063         nds32-linux.opt files.
8064         * config/nds32/t-elf: New file.
8065         * config/nds32/t-linux: New file.
8067 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8068             Shiva Chen  <shiva0217@gmail.com>
8070         * config/nds32/constants.md (unspec_volatile_element): Add
8071         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8072         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8073         optimization.
8074         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8075         (make_pass_nds32_fp_as_gp): Declare.
8076         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8077         optmization pass.
8078         (nds32_asm_function_end_prologue): Remove unused asm output.
8079         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8080         (nds32_asm_file_start): Output necessary fp_as_gp information.
8081         (nds32_option_override): Adjust register usage.
8082         (nds32_expand_prologue): Consider fp_as_gp situation.
8083         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8084         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8085         (epilogue): Ditto.
8086         (return): Ditto.
8087         (simple_return): Ditto.
8088         (omit_fp_begin): Output special directive for fp_as_gp.
8089         (omit_fp_end): Output special directive for fp_as_gp.
8090         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8091         mforbid-fp-as-gp): New options.
8093 2018-06-01  Mark Wielaard  <mark@klomp.org>
8095         * dwarf2out.c (dwarf2out_finish): Remove generation of
8096         DW_AT_loclists_base.
8098 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8100         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8101         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8102         (struct merged_store_group): Add bit_insertion field.
8103         (dump_char_array): Use standard hexadecimal format.
8104         (merged_store_group::merged_store_group): Set bit_insertion to false.
8105         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8106         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8107         also print the mask in the dump file.
8108         (pass_store_merging::gate): Minor tweak.
8109         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8110         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8111         stores with INTEGER_CST stores.
8112         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8113         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8114         and use it throughout.  Generate bit insertion sequences if need be.
8115         (pass_store_merging::process_store): Remove redundant condition.
8116         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8118 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8120         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8121         the 128-bit floating point types.  Fix function comment.
8123 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8125         * config/aarch64/aarch64-simd.md
8126         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8127         mnemonics.
8128         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8129         mnemonics.
8131 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8133         PR tree-optimization/85989
8134         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8135         variable.
8136         (backprop::intersect_uses): Check it when deciding whether this
8137         is a backedge reference.
8138         (backprop::process_block): Add each phi to m_visited_phis
8139         after visiting it, then clear it at the end.
8141 2018-06-01  Richard Biener  <rguenther@suse.de>
8143         * tree-vectorizer.h (vect_dr_stmt): New function.
8144         (vect_get_load_cost): Adjust.
8145         (vect_get_store_cost): Likewise.
8146         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8147         Use vect_dr_stmt instead of DR_SMTT.
8148         (vect_record_base_alignments): Likewise.
8149         (vect_calculate_target_alignment): Likewise.
8150         (vect_compute_data_ref_alignment): Likewise and make static.
8151         (vect_update_misalignment_for_peel): Likewise.
8152         (vect_verify_datarefs_alignment): Likewise.
8153         (vector_alignment_reachable_p): Likewise.
8154         (vect_get_data_access_cost): Likewise.  Pass down
8155         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8156         (vect_get_peeling_costs_all_drs): Likewise.
8157         (vect_peeling_hash_get_lowest_cost): Likewise.
8158         (vect_enhance_data_refs_alignment): Likewise.
8159         (vect_find_same_alignment_drs): Likewise.
8160         (vect_analyze_data_refs_alignment): Likewise.
8161         (vect_analyze_group_access_1): Likewise.
8162         (vect_analyze_group_access): Likewise.
8163         (vect_analyze_data_ref_access): Likewise.
8164         (vect_analyze_data_ref_accesses): Likewise.
8165         (vect_vfa_segment_size): Likewise.
8166         (vect_small_gap_p): Likewise.
8167         (vectorizable_with_step_bound_p): Likewise.
8168         (vect_prune_runtime_alias_test_list): Likewise.
8169         (vect_analyze_data_refs): Likewise.
8170         (vect_supportable_dr_alignment): Likewise.
8171         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8172         (vect_gen_prolog_loop_niters): Likewise.
8173         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8174         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8175         modify DR_STMT.
8176         (vect_recog_mask_conversion_pattern): Likewise.
8177         (vect_try_gather_scatter_pattern): Likewise.
8178         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8179         to vect_get_store_cost.
8180         (vect_get_store_cost): Get stmt_info instead of DR.
8181         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8182         (vect_get_load_cost): Get stmt_info instead of DR.
8184 2018-06-01  Richard Biener  <rguenther@suse.de>
8186         PR middle-end/86017
8187         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8188         vars wrapped in MEM_REFs.
8190 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8192         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8193         Fix subreg tests so that we only return a choice between
8194         GENERAL_REGS and FP_REGS if the original classes included both.
8196 2018-06-01  Richard Biener  <rguenther@suse.de>
8198         PR ipa/85960
8199         * tree-ssa-structalias.c (get_function_part_constraint):
8200         Handle NULL fi->decl.
8201         (find_func_aliases_for_call): Properly handle indirect
8202         fi from direct call.
8203         (find_func_clobbers): Likewise.
8204         (ipa_pta_execute): Likewise.
8205         (create_variable_info_for): For functions that are ifunc_resolver
8206         resolve to a varinfo that contains the result of the resolver call.
8207         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8208         aliases.
8210 2018-05-31  Michael Collison  <michael.collison@arm.com>
8212         * config/aarch64/aarch64.md:
8213         (*fix_to_zero_extenddfdi2): New pattern.
8214         * gcc.target/aarch64/fix_extend1.c: New testcase.
8216 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8218         PR middle-end/78809
8219         PR middle-end/83026
8220         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8221         and BUILT_IN_STRNCMP_EQ.
8222         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8223         BUILT_IN_STRNCMP_EQ.
8224         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8225         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8226         (gimple_fold_builtin): Likewise.
8227         * tree-ssa-strlen.c (compute_string_length): New function.
8228         (determine_min_obsize): New function.
8229         (handle_builtin_string_cmp): New function to handle calls to
8230         string compare functions.
8231         (strlen_optimize_stmt): Add handling to builtin string compare
8232         calls.
8233         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8234         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8235         * tree.c (build_common_builtin_nodes): Add new defines of
8236         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8238 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8240         PR target/85984
8241         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8242         functions with naked attribute.
8244 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8246         * config/i386/sse.md (avx_vec_concat<mode>):
8247         Substitute concat_tg_mode mode attribute with xtg_mode.
8248         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8249         (concat_tg_mode): Remove mode attribute.
8251 2018-05-31  Martin Sebor  <msebor@redhat.com>
8253         PR c/82063
8254         * calls.c (alloc_max_size): Correct a logic error/typo.
8255         Treat excessive arguments as infinite.  Warn for invalid arguments.
8256         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8258 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8260         PR target/85829
8261         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8262         and movx for Haswell.
8264 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8265             Cesar Philippidis  <cesar@codesourcery.com>
8267         PR middle-end/85879
8268         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8269         when emitting error on private/firstprivate reductions.
8270         * omp-low.c (lower_omp_target): Avoid reference-type processing
8271         on pointers for firstprivate clause.
8273 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8275         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8276         (st1x2): Likewise.
8277         (st1x3): Likewise.
8278         * config/aarch64/aarch64-simd.md
8279         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8280         (aarch64_ld1_x3_<mode>): Likewise
8281         (aarch64_st1x2<VALLDIF:mode>): Likewise
8282         (aarch64_st1_x2_<mode>): Likewise
8283         (aarch64_st1x3<VALLDIF:mode>): Likewise
8284         (aarch64_st1_x3_<mode>): Likewise
8285         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8286         (vld1_s8_x3): Likewise.
8287         (vld1_u16_x3): Likewise.
8288         (vld1_s16_x3): Likewise.
8289         (vld1_u32_x3): Likewise.
8290         (vld1_s32_x3): Likewise.
8291         (vld1_u64_x3): Likewise.
8292         (vld1_s64_x3): Likewise.
8293         (vld1_f16_x3): Likewise.
8294         (vld1_f32_x3): Likewise.
8295         (vld1_f64_x3): Likewise.
8296         (vld1_p8_x3): Likewise.
8297         (vld1_p16_x3): Likewise.
8298         (vld1_p64_x3): Likewise.
8299         (vld1q_u8_x3): Likewise.
8300         (vld1q_s8_x3): Likewise.
8301         (vld1q_u16_x3): Likewise.
8302         (vld1q_s16_x3): Likewise.
8303         (vld1q_u32_x3): Likewise.
8304         (vld1q_s32_x3): Likewise.
8305         (vld1q_u64_x3): Likewise.
8306         (vld1q_s64_x3): Likewise.
8307         (vld1q_f16_x3): Likewise.
8308         (vld1q_f32_x3): Likewise.
8309         (vld1q_f64_x3): Likewise.
8310         (vld1q_p8_x3): Likewise.
8311         (vld1q_p16_x3): Likewise.
8312         (vld1q_p64_x3): Likewise.
8313         (vst1_s64_x2): Likewise.
8314         (vst1_u64_x2): Likewise.
8315         (vst1_f64_x2): Likewise.
8316         (vst1_s8_x2): Likewise.
8317         (vst1_p8_x2): Likewise.
8318         (vst1_s16_x2): Likewise.
8319         (vst1_p16_x2): Likewise.
8320         (vst1_s32_x2): Likewise.
8321         (vst1_u8_x2): Likewise.
8322         (vst1_u16_x2): Likewise.
8323         (vst1_u32_x2): Likewise.
8324         (vst1_f16_x2): Likewise.
8325         (vst1_f32_x2): Likewise.
8326         (vst1_p64_x2): Likewise.
8327         (vst1q_s8_x2): Likewise.
8328         (vst1q_p8_x2): Likewise.
8329         (vst1q_s16_x2): Likewise.
8330         (vst1q_p16_x2): Likewise.
8331         (vst1q_s32_x2): Likewise.
8332         (vst1q_s64_x2): Likewise.
8333         (vst1q_u8_x2): Likewise.
8334         (vst1q_u16_x2): Likewise.
8335         (vst1q_u32_x2): Likewise.
8336         (vst1q_u64_x2): Likewise.
8337         (vst1q_f16_x2): Likewise.
8338         (vst1q_f32_x2): Likewise.
8339         (vst1q_f64_x2): Likewise.
8340         (vst1q_p64_x2): Likewise.
8341         (vst1_s64_x3): Likewise.
8342         (vst1_u64_x3): Likewise.
8343         (vst1_f64_x3): Likewise.
8344         (vst1_s8_x3): Likewise.
8345         (vst1_p8_x3): Likewise.
8346         (vst1_s16_x3): Likewise.
8347         (vst1_p16_x3): Likewise.
8348         (vst1_s32_x3): Likewise.
8349         (vst1_u8_x3): Likewise.
8350         (vst1_u16_x3): Likewise.
8351         (vst1_u32_x3): Likewise.
8352         (vst1_f16_x3): Likewise.
8353         (vst1_f32_x3): Likewise.
8354         (vst1_p64_x3): Likewise.
8355         (vst1q_s8_x3): Likewise.
8356         (vst1q_p8_x3): Likewise.
8357         (vst1q_s16_x3): Likewise.
8358         (vst1q_p16_x3): Likewise.
8359         (vst1q_s32_x3): Likewise.
8360         (vst1q_s64_x3): Likewise.
8361         (vst1q_u8_x3): Likewise.
8362         (vst1q_u16_x3): Likewise.
8363         (vst1q_u32_x3): Likewise.
8364         (vst1q_u64_x3): Likewise.
8365         (vst1q_f16_x3): Likewise.
8366         (vst1q_f32_x3): Likewise.
8367         (vst1q_f64_x3): Likewise.
8368         (vst1q_p64_x3): Likewise.
8370 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8372         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8373         user_label_prefix to name.
8375         * tree-core.h: Update comment about the format of NAME string
8376         passed to handler in attribute_spec.
8378         * config/msp430/msp430.md: Remove erroneous subreg expression from
8379         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8380         zero_extend{q,h}isi2.
8382 2018-05-30  Borislav Petkov  <bp@suse.de>
8384         * doc/extend.texi: Document some architecture specific
8385         constraints and sort entries.
8387 2018-05-30  Martin Sebor  <msebor@redhat.com>
8389         PR middle-end/85369
8390         * builtins.c (expand_builtin_stpcpy_1): New function.
8391         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8392         only if the former succeeds.
8394 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8396         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8397         in saphira.
8399 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8401         * doc/invoke.texi (-flinker-output): Document
8403 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8405         * passes.c (ipa_write_summaries): Only modify statements if body
8406         is in memory.
8407         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8408         incrementally linking.
8409         (ipa_passes): Likewise.
8410         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8411         pass down resolution info.
8412         * common.opt (flag_incremental_link): Update info.
8413         * gcc.c (plugin specs): Turn flinker-output=* to
8414         -plugin-opt=-linker-output-known
8415         * toplev.c (compile_file): Also cut compilation when doing incremental
8416         link.
8417         * flag-types. (enum lto_partition_model): Add
8418         LTO_LINKER_OUTPUT_NOLTOREL.
8419         (invoke.texi): Add -flinker-output docs.
8420         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8421         link same way as WPA; do not stream in dead initializers.
8423         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8424         darf2out_register_external_decl): Support incremental link.
8426 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8428         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8430 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8432         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8433         it down to simple_object_copy_lto_debug_sections.
8434         (run_gcc): Determine incremental LTO link time and configure
8435         lto1 into non-wpa mode, disable renaming of debug sections.
8437 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8439         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8440         descriptions of various incorrectly documented functions.
8442 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8444         Revert:
8445         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8446         address check not strict.
8448 2018-05-30  Richard Biener  <rguenther@suse.de>
8450         PR tree-optimization/85964
8451         * tracer.c (better_p): Drop initialized count check, we only
8452         call the function with initialized counts now.
8453         (find_best_successor): Do find a best edge if one
8454         has uninitialized count.
8455         (find_best_predecessor): Likewise.  Do BB frequency check only
8456         if count is initialized.
8458 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8460         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8461         (aarch64_ldrstr_offset_compare): New.
8462         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8463         load/store orderings.
8464         (aarch64_gen_adjusted_ldpstp): Likewise.
8466 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8468         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8469         Check for subset of GENERAL_REGS and FP_REGS.
8470         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8471         r=w alternative.
8473 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8475         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8476         and wi::to_poly_offset.  Add the current offset and then check
8477         whether the sum fits, rather than using an unchecked addition of
8478         a checked term.  Check for a shwi rather than a uhwi.
8479         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8480         (store_constructor): Use poly_int_tree_p.
8481         (expand_expr_real_1): Likewise.
8482         * function.c (assign_temp): Likewise.
8483         * fold-const.c (const_binop): Use poly_int_tree_p and
8484         wi::to_poly_offset.
8485         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8486         division.
8487         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8488         to_poly_offset for MEM offsets.
8489         * ipa-icf.c (sem_variable::equals): Likewise.
8490         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8491         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8492         wi::to_poly_offset for BIT_FIELD_REF offsets.
8493         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8494         wi::to_poly_offset.
8495         * var-tracking.c (emit_note_insn_var_location): Use
8496         tree_to_poly_uint64.
8498 2018-05-29  Jim Wilson  <jimw@sifive.com>
8500         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8502 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8504         PR target/85950
8505         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8506         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8507         sequence.
8508         (sse4_1_round<mode>2): Use nonimmediate_operand
8509         for operand 1 predicate.
8511 2018-05-29  Martin Sebor  <msebor@redhat.com>
8512             Richard Biener  <rguenther@suse.de>
8514         PR testsuite/85888
8515         * calls.c (get_size_range): Call determine_value_range instead
8516         of get_value_range..
8517         * tree-vrp.h (determine_value_range): Declared new function.
8518         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8520 2018-05-29  Richard Biener  <rguenther@suse.de>
8522         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8523         sure to use non-pattern stmts for get_earlier_stmt arguments.
8524         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8525         called on pattern stmts.
8526         (get_later_stmt): Likewise.
8528 2018-05-29  Martin Liska  <mliska@suse.cz>
8530         PR gcov-profile/85759
8531         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8532         env variables.
8534 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8536         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8537         VEC_UNPACK_*_EXPR.
8538         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8539         VEC_PACK_*_EXPR.
8541         PR target/85918
8542         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8543         VEC_PACK_FLOAT_EXPR): New tree codes.
8544         * tree-pretty-print.c (op_code_prio): Handle
8545         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8546         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8547         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8548         * tree-inline.c (estimate_operator_cost): Likewise.
8549         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8550         * fold-const.c (const_binop): Likewise.
8551         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8552         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8553         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8554         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8555         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8556         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8557         * expr.c (expand_expr_real_2): Likewise.
8558         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8559         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8560         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8561         optabs.
8562         * optabs.c (expand_widen_pattern_expr): For
8563         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8564         sign from result type rather than operand's type.
8565         (expand_binop_directly): For vec_packu_float_optab and
8566         vec_packs_float_optab allow result type to be different from operand's
8567         type.
8568         * optabs-tree.c (optab_for_tree_code): Handle
8569         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8570         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8571         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8572         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8573         VEC_PACK_FLOAT_EXPR.
8574         * tree-vect-stmts.c (supportable_widening_operation): Handle
8575         FIX_TRUNC_EXPR.
8576         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8577         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8578         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8579         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8580         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8581         mode attributes.
8582         (vec_pack<floatprefix>_float_<mode>): New expander.
8583         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8584         attributes.
8585         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8586         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8587         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8588         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8589         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8590         Document.
8591         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8592         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8593         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8594         VEC_PACK_FLOAT_EXPR): Document.
8596 2018-05-29  Richard Biener  <rguenther@suse.de>
8598         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8599         member.
8600         (stmt_vec_info_vec): Make pointer.
8601         (init_stmt_vec_info_vec): Remove.
8602         (free_stmt_vec_info_vec): Likewise.
8603         (set_stmt_vec_info_vec): New function.
8604         (free_stmt_vec_infos): Likewise.
8605         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8606         (set_vinfo_for_stmt): Likewise.
8607         (get_earlier_stmt): Likewise.
8608         (get_later_stmt): Likewise.
8609         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8610         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8611         (vec_info::~vec_info): Free stmt_vec_infos.
8612         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8613         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8614         (pass_slp_vectorize::execute): Likewise.
8615         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8616         (free_stmt_vec_info_vec): Likewise.
8617         (set_stmt_vec_info_vec): New function.
8618         (free_stmt_vec_infos): Likewise.
8619         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8620         the global stmt_vec_info_vec.
8621         * tree-parloops.c (gather_scalar_reductions): Use
8622         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8623         vector.
8625 2018-05-29  Richard Biener  <rguenther@suse.de>
8627         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8629 2018-05-29  Martin Liska  <mliska@suse.cz>
8630             David Malcolm  <dmalcolm@redhat.com>
8632         * vec.c (test_reverse): New.
8633         (vec_c_tests): Add new test.
8634         * vec.h (vl_ptr>::reverse): New function.
8636 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8638         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8640         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8641         and later.
8643 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8645         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8647 2018-05-28  Richard Biener  <rguenther@suse.de>
8649         PR tree-optimization/85933
8650         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8651         look at stmts marked as vectorizable.
8653 2018-05-28  Richard Biener  <rguenther@suse.de>
8655         PR tree-optimization/85934
8656         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8657         vector boolean check before scalar optimization.
8659 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8661         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8662         for armv5te.
8664 2018-05-28  Mark Wielaard  <mark@klomp.org>
8666         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8667         if it is an expression containing a minus sign.
8669 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8671         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8673 2018-05-27  Paul Koning  <ni1d@arrl.net>
8675         * config/pdp11/pdp11.md (truncsihi2): Remove.
8677 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8678             Chung-Ju Wu  <jasonwucj@gmail.com>
8680         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8681         implementation.
8682         (unaligned_store_dw): Ditto.
8683         * config/nds32/nds32-memory-manipulation.c
8684         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8685         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8686         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8687         (emit_setmem_word_loop): Rename to ...
8688         (emit_setmem_doubleword_loop): ... this.
8689         (nds32_gen_dup_4_byte_to_word_value): New function.
8690         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8691         (nds32_expand_setmem_loop): Refine implementation.
8692         (nds32_expand_setmem_loop_v3m): Ditto.
8693         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8694         pattern.
8696 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8698         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8700 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8702         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8703         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8704         machine->attr_no_prologue_p.
8705         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8706         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8707         (nds32_expand_epilogue): Consider attr_naked_p.
8708         (nds32_expand_epilogue_v3pop): Likewise.
8709         (nds32_can_use_return_insn): Likewise.
8710         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8711         attr_no_prologue_p fields.
8712         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8714 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8716         PR target/85918
8717         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8718         attributes.
8719         * config/i386/sse.md
8720         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8721         Rename to ...
8722         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8723         ... this.
8724         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8725         Rename to ...
8726         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8727         ... this.
8728         (*<floatsuffix>floatv2div2sf2): Rename to ...
8729         (*float<floatunssuffix>v2div2sf2): ... this.
8730         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8731         (float<floatunssuffix>v2div2sf2_mask): ... this.
8732         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8733         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8734         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8735         to ...
8736         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8737         ... this.
8738         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8739         Rename to ...
8740         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8741         ... this.
8742         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8743         Rename to ...
8744         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8745         ... this.
8746         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8747         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8748         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8749         gen_ufix_truncv8dfv8si2.
8750         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8751         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8752         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8753         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8754         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8755         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8756         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8757         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8759 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8761         PR target/85900
8762         PR target/85345
8763         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8765 2018-05-25  Jim Wilson  <jimw@sifive.com>
8767         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8768         * config/riscv/riscv.c (struct machine_function): Add
8769         interrupt_handler_p and attribute_checked_p fields.
8770         (riscv_attribute_table): Add interrupt.
8771         (riscv_interrupt_type_p): New.
8772         (riscv_save_reg_p): Save extra regs for interrupt handler.
8773         (riscv_use_save_libcall): Return false  for interrupt handler.
8774         (riscv_first_stack_step): Add forward declaration.
8775         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8776         for interrupt handler with large frame.  Use it for saved reg list.
8777         (riscv_expand_prologue): Move flag_stack_usage_info support to
8778         eliminate duplication.
8779         (riscv_expand_epilogue): Generate mret for interrupt handler.
8780         (riscv_epilogue_uses): New.
8781         (riscv_can_use_return_insn): Return false for interrupt handler.
8782         (riscv_function_ok_for_sibcall): Likewise.
8783         (riscv_set_current_function): Add interrupt handler support.
8784         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8785         * config/riscv/riscv.md (UNSPECV_MRET): New.
8786         (GP_REGNUM): New.
8787         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8788         (riscv_mret): New.
8789         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8791 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8793         PR tree-optimization/85712
8794         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8795         this candidate has already been replaced in-situ by a copy.
8797 2018-05-25  Jason Merrill  <jason@redhat.com>
8799         PR c++/80485 - inline function non-zero address.
8800         * symtab.c (nonzero_address): Check DECL_COMDAT.
8802 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8804         PR target/83628
8805         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8806         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8807         extension of SImode operation.  Use const123_operand predicate.
8808         (*saddsi_1): Remove.
8809         (*saddl_se_1): Ditto.
8810         (*ssubsi_1): Ditto.
8811         (*ssubl_se_1): Ditto.
8812         * config/alpha/predicates.md (const123_operand): New predicate.
8813         * config/alpha/constraints.md (P): Use IN_RANGE.
8815 2018-05-25  Richard Biener  <rguenther@suse.de>
8817         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8818         defaulted to true.
8819         (ref_maybe_used_by_stmt_p): Likewise.
8820         (stmt_may_clobber_ref_p): Likewise.
8821         (stmt_may_clobber_ref_p_1): Likewise.
8822         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8823         and pass it along.
8824         (ref_maybe_used_by_stmt_p): Likewise.
8825         (stmt_may_clobber_ref_p): Likewise.
8826         (stmt_may_clobber_ref_p_1): Likewise.
8827         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8828         the alias oracle to disambiguate DRs with stmts DR analysis
8829         couldn't handle.
8830         (vect_analyze_data_refs): Do not give up on not analyzable
8831         DRs for BB vectorization.  Remove code truncating the dataref
8832         vector.
8834 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8836         PR target/85832
8837         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8838         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8839         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8841 2018-05-25  Richard Biener  <rguenther@suse.de>
8843         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8844         function, combining stmt data ref gathering and fatal analysis
8845         parts.
8846         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8847         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8848         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8849         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8850         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8852 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8854         PR tree-optimization/85720
8855         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8856         SCC if all partitions are builtins.
8857         (version_loop_by_alias_check): New parameter.  Generate cancelable
8858         runtime alias check if all partitions are builtins.
8859         (distribute_loop): Update call to above function.
8861 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8863         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8864         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8865         (parm_default_def_partition_arg): Ditto.
8866         (set_parm_default_def_partition): Ditto.
8867         (get_parm_default_def_partitions): Ditto and make it static.
8868         (get_undefined_value_partitions): Ditto and make it static.
8869         (remove_ssa_form): Refactor call to init_var_map here.
8870         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8871         computation for loop region.
8872         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8873         (register_default_def): Delete.
8874         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8875         (parm_default_def_partition_arg): Ditto.
8876         (set_parm_default_def_partition): Ditto.
8877         (get_parm_default_def_partitions): Ditto and make it static.
8878         (get_undefined_value_partitions): Ditto and make it static.
8879         (coalesce_with_default, coalesce_with_default): Update comment.
8880         (create_coalesce_list_for_region): New func factored out from
8881         create_outofssa_var_map.
8882         (populate_coalesce_list_for_outofssa): New func factored out from
8883         create_outofssa_var_map and coalesce_ssa_name.
8884         (create_outofssa_var_map): Delete.
8885         (coalesce_ssa_name): Refactor to support live range computation.
8886         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8887         (get_parm_default_def_partitions): Delete.
8888         (get_undefined_value_partitions): Ditto.
8889         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8890         computation for loop region.
8891         (new_tree_live_info, loe_visit_block): Ditto.
8892         (live_worklist, set_var_live_on_entry): Ditto.
8893         (calculate_live_on_exit, verify_live_on_entry): Ditto.
8894         * tree-ssa-live.h (struct _var_map): New fields.
8895         (init_var_map): Change decl.
8896         (region_contains_p): New.
8898 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8900         * tree-ssa-live.h (live_merge_and_clear): Delete.
8902 2018-05-25  Richard Biener  <rguenther@suse.de>
8904         PR c++/85912
8905         * tree-dump.c (dequeue_and_dump): Remove access to removed
8906         operand 2 of a SWITCH_EXPR.
8908 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8910         * doc/sourcebuild.texi (vect_double_cond_arith): Include
8911         multiplication and division.
8912         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8913         (cond_udiv@var{m}, cond_umod@var{m}): Document.
8914         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8915         (cond_udiv_optab, cond_umod_optab): New optabs.
8916         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8917         (IFN_COND_RDIV): New internal functions.
8918         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8919         TRUNC_MOD_EXPR and RDIV_EXPR.
8920         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8921         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8922         New unspecs.
8923         (SVE_INT_BINARY): Include mult.
8924         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8925         (optab, sve_int_op): Handle mult.
8926         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8927         UNSPEC_COND_DIV.
8928         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8929         for SVE_INT_BINARY_SD.
8931 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8933         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8934         (optab, sve_int_op): Handle div and udiv.
8935         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8936         for SVE_INT_BINARY_SD.
8937         (*<optab><mode>3): New insn for the same.
8939 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8941         * tree-vect-patterns.c: Include predict.h.
8942         (vect_recog_divmod_pattern): Restrict check for division support
8943         to when optimizing for size.
8945 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8947         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8948         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8949         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8950         (gimple_match_op::set_op): Likewise.
8951         (gimple_resimplify4): Declare.
8952         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8953         (expr::gen_transform): Likewise.
8954         (decision_tree::gen): Generate a simplification routine for 4 operands.
8955         * gimple-match-head.c (gimple_simplify): Add an overload for
8956         4 operands.  In the top-level function, handle up to 4 call
8957         arguments and call gimple_resimplify4.
8958         (gimple_resimplify4): New function.
8959         (build_call_internal): Pass a fourth operand.
8960         (maybe_push_to_seq): Likewise.
8961         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8962         Fold VEC_COND_EXPRs of an operation and a default value into
8963         an IFN_COND_* function if possible.
8964         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8965         New unspecs.
8966         (SVE_COND_FP_BINARY): Include them.
8967         (optab, sve_fp_op): Handle them.
8968         (SVE_INT_BINARY_REV): New code iterator.
8969         (SVE_COND_FP_BINARY_REV): New int iterator.
8970         (commutative): New int attribute.
8971         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8972         Declare.
8973         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8974         function.
8975         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8976         (*cond_<optab><mode>): New patterns for reversed operands.
8978 2018-05-25  Richard Biener  <rguenther@suse.de>
8980         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8981         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8982         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8983         (STMT_VINFO_GROUPED_ACCESS): Adjust.
8984         * tree-vect-data-refs.c (everywhere): Adjust users.
8985         * tree-vect-loop.c (everywhere): Likewise.
8986         * tree-vect-slp.c (everywhere): Likewise.
8987         * tree-vect-stmts.c (everywhere): Likewise.
8988         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8990 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8992         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8993         Rename to...
8994         (gcc_cv_as_section_exclude): ... this.
8995         Try Solaris as #exclude syntax.
8996         * configure: Regenerate.
8997         * config.in: Regenerate.
8998         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8999         SECTION_EXCLUDE.
9000         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9001         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9003         * varasm.c (default_elf_asm_named_section): Don't check if
9004         HAVE_GAS_SECTION_EXCLUDE is defined.
9006 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9008         * doc/md.texi: Update the documentation of the cond_* optabs
9009         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9010         Describe the scalar case too.
9011         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9012         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9013         instead of 2.
9014         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9015         (get_conditional_internal_fn): Update comment.
9016         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9017         accumulator value as a final argument to conditional functions.
9018         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9019         a define_expand and add an "else" operand.  Assert for now that
9020         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9021         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9022         (*cond_<optab><mode>): New patterns.
9023         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9024         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9025         (UNSPEC_COND_EOR): Delete.
9026         (optab): Remove associated mappings.
9027         (SVE_INT_BINARY): New code iterator.
9028         (sve_int_op): Remove int attribute and add "minus" to the code
9029         attribute.
9030         (SVE_COND_INT_OP): Delete.
9031         (SVE_COND_FP_OP): Rename to...
9032         (SVE_COND_FP_BINARY): ...this.
9034 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9036         * optabs.c (can_reuse_operands_p): New function.
9037         (maybe_legitimize_operands): Try to reuse the results for
9038         earlier operands.
9040 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9042         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9043         Add {q} suffix to insn mnemonic.
9045 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9047         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9048         (msp430_warn_func_return): New.
9050 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9052         * fold-const.c (tree_nonzero_bits): New function.
9053         * fold-const.h (tree_nonzero_bits): Likewise.
9054         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9055         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9057 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9059         PR target/85900
9060         PR target/85345
9061         * varasm.c (assemble_alias): Check ifunc_resolver only on
9062         FUNCTION_DECL.
9064 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9066         PR target/85903
9067         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9068         when memory input operand is handled.
9070 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9072         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9073         global.
9074         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9076 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9078         * match.pd: Delay FMA folds until after vectorization.
9080 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9082         PR target/83009
9083         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9084         address check not strict.
9086 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9088         * gimple-match.h (gimple_match_op): New class.
9089         (mprts_hook): Replace parameters with a gimple_match_op *.
9090         (maybe_build_generic_op): Likewise.
9091         (gimple_simplified_result_is_gimple_val): Replace parameters with
9092         a const gimple_match_op *.
9093         (gimple_simplify): Replace code_helper * and tree * parameters with
9094         a gimple_match_op * parameter.
9095         (gimple_resimplify1): Replace code_helper *, tree and tree *
9096         parameters with a gimple_match_op * parameter.
9097         (gimple_resimplify2): Likewise.
9098         (gimple_resimplify3): Likewise.
9099         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9100         parameters with a gimple_match_op * parameter.
9101         * gimple-match-head.c (gimple_simplify): Change prototypes of
9102         auto-generated functions to take a gimple_match_op * instead of
9103         separate code_helper * and tree * parameters.  Make the same
9104         change in the top-level overload and update calls to the
9105         gimple_resimplify routines.  Update calls to the auto-generated
9106         functions and to maybe_push_res_to_seq in the publicly-facing
9107         operation-specific gimple_simplify overloads.
9108         (gimple_match_op::MAX_NUM_OPS): Define.
9109         (gimple_resimplify1): Replace rcode and ops with a single res_op
9110         parameter.  Update call to gimple_simplify.
9111         (gimple_resimplify2): Likewise.
9112         (gimple_resimplify3): Likewise.
9113         (mprts_hook): Replace parameters with a gimple_match_op *.
9114         (maybe_build_generic_op): Likewise.
9115         (build_call_internal): Replace type, nargs and ops with
9116         a gimple_match_op *.
9117         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9118         with a single gimple_match_op *.  Update calls to mprts_hook,
9119         build_call_internal and gimple_simplified_result_is_gimple_val.
9120         Factor out code that is common to the tree_code and combined_fn cases.
9121         * genmatch.c (expr::gen_transform): Replace tem_code and
9122         tem_ops with a gimple_match_op called tem_op.  Update calls
9123         to the gimple_resimplify functions and maybe_push_res_to_seq.
9124         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9125         res_ops.  Update call to the gimple_resimplify functions.
9126         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9127         (decision_tree::gen): Make the functions take a gimple_match_op *
9128         called res_op instead of separate res_code and res_ops parameters.
9129         Update call accordingly.
9130         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9131         and ops with a single res_op parameter.  Update calls to
9132         maybe_build_generic_op and maybe_push_res_to_seq.
9133         (fold_stmt_1): Update calls to gimple_simplify and
9134         replace_stmt_with_simplification.
9135         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9136         and gimple_simplified_result_is_gimple_val.
9137         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9138         gimple_simplify.
9139         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9140         with a gimple_match_op *.
9141         (vn_nary_build_or_lookup): Likewise.  Update call to
9142         vn_nary_build_or_lookup_1.
9143         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9144         gimple_match_op *.  Update calls to the gimple_resimplify routines
9145         and to gimple_simplified_result_is_gimple_val.
9146         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9147         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9148         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9149         (visit_nary_op): Likewise.
9150         (visit_reference_op_load): Likewise.
9152 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9154         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9155         modifier for printing the step amount.
9157 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9159         PR target/78849
9160         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9161         types.
9163 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9165         * doc/sourcebuild.texi (Endianness): New subsubsection.
9167 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9169         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9170         <prefetch_dynamic_strides>: New const bool field.
9171         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9172         prefetch_dynamic_strides.
9173         (exynosm1_prefetch_tune): Likewise.
9174         (thunderxt88_prefetch_tune): Likewise.
9175         (thunderx_prefetch_tune): Likewise.
9176         (thunderx2t99_prefetch_tune): Likewise.
9177         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9178         false.
9179         (aarch64_override_options_internal): Update to set
9180         PARAM_PREFETCH_DYNAMIC_STRIDES.
9181         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9182         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9183         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9184         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9185         prefetch-dynamic-strides setting.
9187 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9189         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9190         <minimum_stride>: New const int field.
9191         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9192         minimum_stride field defaulting to -1.
9193         (exynosm1_prefetch_tune): Likewise.
9194         (thunderxt88_prefetch_tune): Likewise.
9195         (thunderx_prefetch_tune): Likewise.
9196         (thunderx2t99_prefetch_tune): Likewise.
9197         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9198         <default_opt_level>: Set to 3.
9199         (aarch64_override_options_internal): Update to set
9200         PARAM_PREFETCH_MINIMUM_STRIDE.
9201         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9202         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9203         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9204         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9205         stride is constant and is below the minimum stride threshold.
9207 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9209         * config/arm/arm-cpus.in (mode26): Delete.
9210         (armv4): Delete mode26 reference.
9211         * config/arm/arm.c (arm_configure_build_target): Delete use of
9212         isa_bit_mode26.
9214 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9216         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9217         New insn pattern.
9218         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9219         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9220         for non-SSE modes.
9221         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9222         (floatunsdidf2): Ditto.
9224 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9226         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9227         (fixuns_trunc<mode>si2_avx512f): Ditto.
9228         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9229         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9230         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9232 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9234         PR rtl-optimization/79985
9235         * df-scan.c (df_insn_refs_collect): Remove special case for
9236         global registers and asm statements.
9238 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9240         * extend.texi (Global Register Variables): Rewrite the bullet list.
9241         Note that the register is available for allocation. Note that access
9242         via inline asm must use constraints. Add note about async-signal
9243         handlers. Remove paragraph about automagic register selection.
9245 2018-05-23  Richard Biener  <rguenther@suse.de>
9247         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9248         of fixed offset from memset VN.
9250 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9252         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9253         first_interp field.
9254         (alloc_cand_and_find_basis): Initialize first_interp field.
9255         (slsr_process_mul): Modify first_interp field.
9256         (slsr_process_add): Likewise.
9257         (slsr_process_cast): Modify first_interp field for each new
9258         interpretation.
9259         (slsr_process_copy): Likewise.
9260         (dump_candidate): Dump first_interp field.
9261         (replace_mult_candidate): Process all interpretations, not just
9262         subsequent ones.
9263         (replace_rhs_if_not_dup): Likewise.
9264         (replace_one_candidate): Likewise.
9266 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9268         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9269         Add new boolean.
9270         (aarch64_needs_frame_chain): New function.
9271         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9273 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9275         PR target/84882
9276         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9277         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9278         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9279         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9280         as true for strict-align.
9281         (aarch64_can_inline_p): Perform checks even when callee has no
9282         attributes to check for strict alignment.
9283         * doc/extend.texi (AArch64 Function Attributes): Document
9284         no-strict-align.
9285         * doc/invoke.texi: (AArch64 Options): Likewise.
9287 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9289         PR tree-optimization/85853
9290         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9291         the handling of the root of the node to...
9292         (vect_slp_analyze_node_operations_1): ...this new function,
9293         and run the whole thing with the child nodes' def types
9294         set according to their SLP node's def type.
9296 2018-05-23  Richard Biener  <rguenther@suse.de>
9298         PR middle-end/85874
9299         * tree-data-ref.c (create_runtime_alias_checks): Defer
9300         and ignore overflow warnings.
9302 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9304         PR tree-optimization/85822
9305         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9306         constants.
9308 2018-05-23  Richard Biener  <rguenther@suse.de>
9310         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9311         memset constants via native_interpret_expr.
9313 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9315         PR target/85345
9316         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9317         attribute.
9318         (cgraph_node::create_alias): Likewise.
9319         (cgraph_node::get_availability): Check ifunc_resolver instead
9320         of looking up ifunc attribute.
9321         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9322         * varasm.c (do_assemble_alias): Likewise.
9323         (assemble_alias): Likewise.
9324         (default_binds_local_p_3): Likewise.
9325         * cgraph.h (cgraph_node): Add ifunc_resolver.
9326         (cgraph_node::only_called_directly_or_aliased_p): Return false
9327         for IFUNC resolver.
9328         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9329         attribute.
9330         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9331         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9332         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9333         instead of looking up ifunc attribute.
9335 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9337         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9339 2018-05-22  Martin Sebor  <msebor@redhat.com>
9341         PR middle-end/85359
9342         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9343         only when expasion succeeds.
9344         (expand_builtin_strcmp): Same.
9345         (expand_builtin_strncmp): Same.
9347 2018-05-22  Martin Sebor  <msebor@redhat.com>
9349         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9351 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9352             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9354         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9355         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9356         code.
9357         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9358         Add check for legitimate_address.
9359         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9360         (aarch64_swap_ldrstr_operands): New.
9361         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9362         Define prototype.
9364 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9365             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9367         * config/aarch64/aarch64.md: New patterns to generate stp
9368         and ldp.
9369         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9370         single words and double words.
9371         (load_pair_sw, load_pair_dw): Likewise.
9372         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9373         Delete.
9374         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9375         Delete.
9376         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9377         for different mode ldpstp and add peephole for merged zero stores.
9378         Likewise for loads.
9379         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9380         Add size check.
9381         (aarch64_gen_store_pair): Rename calls to match new patterns.
9382         (aarch64_gen_load_pair): Rename calls to match new patterns.
9383         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9384         (load_pair<DREG:mode><DREG2:mode>): ... This.
9385         (store_pair<mode>): Rename to...
9386         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9387         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9388         New mode iterators.
9389         (V_INT_EQUIV): Handle SImode.
9390         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9391         New predicate.
9393 2018-05-22  Martin Sebor  <msebor@redhat.com>
9395         PR c/85623
9396         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9397         or ajust the presumed bound on an operation to avoid unnecessary
9398         warnings.
9400 2018-05-22  Martin Sebor  <msebor@redhat.com>
9402         PR tree-optimization/85826
9403         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9404         assuming that a DECL necesarily has a constant size.
9406 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9408         PR middle-end/85862
9409         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9411 2018-05-22  Richard Biener  <rguenther@suse.de>
9413         PR tree-optimization/85834
9414         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9415         non-constant and non-zero memset arguments.
9417 2018-05-22  Martin Liska  <mliska@suse.cz>
9419         PR ipa/85607
9420         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9422 2018-05-22  Richard Biener  <rguenther@suse.de>
9424         PR tree-optimization/85863
9425         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9426         comparisons when vectype is specified.
9427         (vectorizable_condition): Do not specify vectype for
9428         vect_is_simple_cond when SLP vectorizing.
9430 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9432         PR target/85657
9433         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9434         define __ibm128 as long double.
9435         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9436         as a distinct type when IEEE 128-bit support is enabled.
9437         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9438         128-bit types to use the correct functions.
9439         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9440         convert between 128-bit floating point types that have different
9441         modes but the same representation, instead of using gen_lowpart to
9442         makean alias.
9443         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9444         KFmode.
9445         (IFKF_reg): New attributes to give the register constraints for
9446         IFmode and KFmode.
9447         (extend<mode>tf2_internal): New insns to mark an explicit
9448         conversion between 128-bit floating point types that have a
9449         different mode but share the same representation.
9451 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9453         PR tree-optimization/85814
9454         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9455         a null return from get_strinfo when unsharing the next
9456         strinfo in the chain.
9458 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9460         PR gcc/84923
9461         * varasm.c (weak_finish): Clean up weak_decls.
9463 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9465         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9466         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9467         UNSPEC_UADALP values.
9468         * config/aarch64/iterators.md (ABAL): New int iterator.
9469         (ABDL2): Likewise.
9470         (ADALP): Likewise.
9471         (sur): Add mappings for the above.
9472         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9473         New define_insn.
9474         (aarch64_<sur>abal<mode>_4): Likewise.
9475         (aarch64_<sur>adalp<mode>_3): Likewise.
9476         (<sur>sadv16qi): New define_expand.
9478 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9480         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9481         (*movdf_internal): Ditto.
9482         (*rcpsf2_sse): Ditto.
9483         (*rsqrtsf2_sse): Ditto.
9484         (*sqrt<mode>2_sse): Ditto.
9486 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9488         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9489         eor3q<mode>4.
9490         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9491         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9492         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9493         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9494         vbcaxq_s64): New.
9495         * config/aarch64/arm_neon.h: Likewise.
9496         * config/aarch64/iterators.md (VQ_I): New.
9498 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9500         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9501         arc*-*-linux*.
9502         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9503         MULTILIB_DIRNAMES
9505 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9507         * config/nds32/constraints.md (S): New constraint.
9508         * config/nds32/nds32.md (call_internal): Use constraint S.
9509         (call_value_internal): Likewise.
9510         (sibcall_internal): Likewise.
9511         (sibcall_value_internal): Likewise.
9513 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9514             Chung-Ju Wu  <jasonwucj@gmail.com>
9516         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9517         into consideration.
9519 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9520             Chung-Ju Wu  <jasonwucj@gmail.com>
9522         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9523         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9524         (nds32_rtx_costs_impl): Simplify.
9525         (nds32_address_cost_impl): Simplify.
9526         (nds32_init_rtx_costs): New function.
9527         (nds32_rtx_costs_speed_prefer): Likewise.
9528         (nds32_rtx_costs_size_prefer): Likewise.
9529         (nds32_address_cost_speed_prefer): Likewise.
9530         (nds32_address_cost_speed_fwprop): Likewise.
9531         (nds32_address_cost_size_prefer): Likewise.
9532         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9533         * config/nds32/nds32.c (nds32_option_override): Use
9534         nds32_init_rtx_costs function.
9536 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9538         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9539         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9540         (TARGET_PIPELINE_N8): Likewise.
9541         (TARGET_PIPELINE_N10): Likewise.
9542         (TARGET_PIPELINE_N13): Likewise.
9543         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9545 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9547         * config/nds32/nds32-fpu.md: Update copyright year.
9549 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9551         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9553 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9555         * config/nds32/nds32.c
9556         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9557         * config/nds32/nds32.opt (minline-asm-r15): New option.
9559 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9561         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9562         MASK_HW_ABS.
9563         * config/nds32/nds32.md (abssi2): New pattern.
9565 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9567         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9568         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9569         Merge insn pattern from sse_cvtsi2ss<round_name> and
9570         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9571         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9572         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9573         using SWI48 mode iterator.
9574         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9575         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9576         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9577         pattern from sse_cvttss2si<round_saeonly_name>
9578         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9579         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9580         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9581         using SWI48 mode iterator.
9582         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9583         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9584         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9585         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9586         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9587         using SWI48 mode iterator.
9588         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9589         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9590         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9591         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9592         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9593         SWI48 mode iterator.
9594         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9595         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9596         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9597         pattern from sse_cvttsd2si<round_saeonly_name>
9598         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9600 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9602         * config/nds32/nds32-md-auxiliary.c
9603         (nds32_valid_smw_lwm_base_p): Refine.
9604         (nds32_output_smw_single_word): Refine.
9605         (nds32_output_smw_double_word): New.
9606         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9608 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9610         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9611         (nds32_output_stack_pop): Refine.
9612         (nds32_expand_unaligned_load): Refine.
9613         (nds32_expand_unaligned_store): Refine.
9615 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9616             Chung-Ju Wu  <jasonwucj@gmail.com>
9618         * config/nds32/constants.md: Add TP_REGNUM constant.
9619         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9620         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9621         UNSPEC_ADD32.
9622         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9623         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9624         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9625         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9626         and PIC code generation.
9627         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9628         code generation.
9629         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9630         optimization.
9631         * config/nds32/nds32.md: Support TLS and PIC.
9632         * config/nds32/nds32.c: Support TLS and PIC.
9633         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9634         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9635         predicate.
9637 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9639         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9640         mode with E_ prefix.
9642 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9643             Chung-Ju Wu  <jasonwucj@gmail.com>
9645         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9646         * config/nds32/nds32-md-auxiliary.c
9647         (symbolic_reference_mentioned_p): New.
9648         (nds32_legitimize_ict_address): New.
9649         (nds32_expand_ict_move): New.
9650         (nds32_indirect_call_referenced_p): New.
9651         (nds32_symbol_binds_local_p): Delete.
9652         (nds32_long_call_p): Modify.
9653         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9654         * config/nds32/nds32-protos.h
9655         (symbolic_reference_mentioned_p): Declare.
9656         (nds32_legitimize_ict_address): Declare.
9657         (nds32_expand_ict_move): Declare.
9658         (nds32_indirect_call_referenced_p): Declare.
9659         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9660         (nds32_relax_group): Use nds32_ict_const_p as condition.
9661         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9662         (nds32_asm_file_start): Output ict_model directive in asm code.
9663         (nds32_legitimate_address_p): Consider indirect call.
9664         (nds32_print_operand): Consider indirect call.
9665         (nds32_print_operand_address): Consider indirect call.
9666         (nds32_insert_attributes): Handle "indirect_call" attribute.
9667         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9668         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9669         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9670         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9671         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9672         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9673         (TARGET_ICT_MODEL_SMALL): Define.
9674         (TARGET_ICT_MODEL_LARGE): Define.
9675         * config/nds32/nds32.md (movsi): Consider ict model.
9676         (call, call_value): Consider ict model.
9677         (sibcall, sibcall_value): Consider ict model.
9678         * config/nds32/nds32.opt (mict-model): New option.
9679         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9680         model.
9682 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9683             Monk Chiang  <sh.chiang04@gmail.com>
9684             Jim Wilson <jimw@sifive.com>
9686         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9687         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9688         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9689         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9690         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9691         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9692         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9693         compute save_libcall_adjustment properly.
9694         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9695         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9696         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9697         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9698         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9699         (ABI_SPEC): Handle mabi=ilp32e.
9700         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9701         (RVE): Add RVE mask.
9702         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9703         <-march>: Add rv32e as an example.
9705 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9707         PR c++/82899
9708         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9709         (intra_create_variable_infos): Handle C++ constructors.
9711 2018-05-18  Martin Liska  <mliska@suse.cz>
9713         * passes.def: Remove a redundant pass.
9715 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9717         PR bootstrap/85838
9718         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9720 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9722         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9723         (ARMv4): Update.
9724         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9725         (ARMv6m): Update.
9726         (armv2, armv2a, armv3, armv3m): Delete architectures.
9727         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9728         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9729         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9730         Delete cpus.
9731         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9732         (*mulsidi3adddi): Likewise.
9733         (mulsidi3): Likewise.
9734         (*mulsidi3_nov6): Likewise.
9735         (umulsidi3): Likewise.
9736         (umulsidi3_nov6): Likewise.
9737         (umaddsidi4): Likewise.
9738         (*umulsidi3adddi): Likewise.
9739         (smulsi3_highpart): Likewise.
9740         (*smulsi3_highpart_nov6): Likewise.
9741         (umulsi3_highpart): Likewise.
9742         (*umulsi3_highpart_nov6): Likewise.
9743         * config/arm/arm.h (arm_arch3m): Delete.
9744         * config/arm/arm.c (arm_arch3m): Delete.
9745         (arm_option_override_internal): Update armv3-related comment.
9746         (arm_configure_build_target): Delete use of isa_bit_mode32.
9747         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9748         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9749         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9750         (mulsa3): Likewise.
9751         (mulusa3): Likewise.
9752         * config/arm/arm-protos.h (arm_arch3m): Delete.
9753         * config/arm/arm-tables.opt: Regenerate.
9754         * config/arm/arm-tune.md: Likewise.
9755         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9756         deleted architectures.
9758 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9760         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9761         (armv5t, armv5te): New features.
9762         (ARMv5, ARMv5e): Delete fgroups.
9763         (ARMv5t, ARMv5te): Adjust for above changes.
9764         (ARMv6m): Likewise.
9765         (armv5, armv5e): Delete arches.
9766         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9767         arm_arch5.
9768         (*call_reg_arm): Likewise.
9769         (*call_value_reg_armv5): Likewise.
9770         (*call_value_reg_arm): Likewise.
9771         (*call_symbol): Likewise.
9772         (*call_value_symbol): Likewise.
9773         (*sibcall_insn): Likewise.
9774         (*sibcall_value_insn): Likewise.
9775         (clzsi2): Likewise.
9776         (prefetch): Likewise.
9777         (define_split and define_peephole2 dependent on arm_arch5):
9778         Likewise.
9779         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9780         arm_arch5e.
9781         (TARGET_ARM_QBIT): Likewise.
9782         (TARGET_DSP_MULTIPLY): Likewise.
9783         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9784         (arm_arch5, arm_arch5e): Delete.
9785         (arm_arch5t, arm_arch5te): Declare.
9786         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9787         (arm_arch5t): Declare.
9788         (arm_option_reconfigure_globals): Update for the above.
9789         (arm_options_perform_arch_sanity_checks): Update comment, replace
9790         use of arm_arch5 with arm_arch5t.
9791         (use_return_insn): Likewise.
9792         (arm_emit_call_insn): Likewise.
9793         (output_return_instruction): Likewise.
9794         (arm_final_prescan_insn): Likewise.
9795         (arm_coproc_builtin_available): Likewise.
9796         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9797         arm_arch5e with arm_arch5t and arm_arch5te.
9798         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9799         (arm_arch5t, arm_arch5te): Declare.
9800         * config/arm/arm-tables.opt: Regenerate.
9801         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9802         * config/arm/t-multilib: Likewise.
9803         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9804         instead of arm_arch5.
9805         (*call_reg_thumb1): Likewise.
9806         (*call_value_reg_thumb1_v5): Likewise.
9807         (*call_value_reg_thumb1): Likewise.
9808         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9809         unreachable path.
9810         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9812 2018-05-18  Martin Liska  <mliska@suse.cz>
9814         PR gcov-profile/84846
9815         * doc/gcov.texi: Document -t option of gcov tool.
9817 2018-05-18  Martin Liska  <mliska@suse.cz>
9819         PR gcov-profile/84846
9820         * gcov.c (print_usage): Add new -t option.
9821         (process_args): Handle the option.
9822         (generate_results): Use stdout as output when requested by
9823         the option.
9825 2018-05-18  Martin Liska  <mliska@suse.cz>
9827         PR gcov-profile/84846
9828         * coverage.c (coverage_init): Write PWD to .gcno file.
9829         * doc/gcov.texi: Document how working directory is printed.
9830         * gcov-dump.c (dump_gcov_file): Print PWD.
9831         * gcov.c (output_intermediate_file): Likewise.
9832         (read_graph_file): Read PWD string.
9833         (output_lines): Print PWD.
9835 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9837         PR middle-end/85817
9838         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9839         for retval and return false if all args to phi are zero.
9841 2018-05-18  Richard Biener  <rguenther@suse.de>
9843         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9844         method.
9845         (evrp_dom_walker::before_dom_children): Call it.
9847 2018-05-18  Richard Biener  <rguenther@suse.de>
9849         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9850         results when processing array refs with variable index.
9852 2018-05-18  Toon Moene  <toon@moene.org>
9854         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9855         directly after that of -floop-interchange. Indicate that both
9856         options are enabled by default when specifying -O3.
9858 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9860         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9861         iterator.  Delete separate integer-mode vec_set<mode> expander.
9862         (aarch64_simd_vec_setv2di): Delete.
9863         (vec_setv2di): Delete.
9864         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9865         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9866         the "w, r" alternative.
9868 2018-05-18  Martin Liska  <mliska@suse.cz>
9870         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9871         * tree-pass.h (make_pass_lower_switch_O0): New function.
9872         * tree-switch-conversion.c (node_has_low_bound): Remove.
9873         (node_has_high_bound): Likewise.
9874         (node_is_bounded): Likewise.
9875         (class pass_lower_switch): Make it a template type and create
9876         two instances.
9877         (pass_lower_switch::execute): Add template argument.
9878         (make_pass_lower_switch): New function.
9879         (make_pass_lower_switch_O0): New function.
9880         (do_jump_if_equal): Remove.
9881         (emit_case_nodes): Simplify to just handle all 3 cases and leave
9882         all the hard work to tree optimization passes.
9884 2018-05-18  Martin Liska  <mliska@suse.cz>
9886         * dbgcnt.c (limit_low): Renamed from limit.
9887         (limit_high): New variable.
9888         (dbg_cnt_is_enabled): Check for upper limit.
9889         (dbg_cnt): Adjust dumping.
9890         (dbg_cnt_set_limit_by_index): Add new argument for high
9891         value.
9892         (dbg_cnt_set_limit_by_name): Likewise.
9893         (dbg_cnt_process_single_pair): Parse new format.
9894         (dbg_cnt_process_opt): Use strtok.
9895         (dbg_cnt_list_all_counters): Remove 'value' and add
9896         'limit_high'.
9897         * doc/invoke.texi: Document changes.
9899 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
9901         * doc/sourcebuild.texi (scalar_all_fma): Document.
9902         * tree.def (FMA_EXPR): Delete.
9903         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9904         * internal-fn.c (ternary_direct): New macro.
9905         (expand_ternary_optab_fn): Likewise.
9906         (direct_ternary_optab_supported_p): Likewise.
9907         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9908         * builtins.c (fold_builtin_fma): Delete.
9909         (fold_builtin_3): Don't call it.
9910         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9911         * expr.c (expand_expr_real_2): Likewise.
9912         * fold-const.c (operand_equal_p): Likewise.
9913         (fold_ternary_loc): Likewise.
9914         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9915         * gimple.c (DEFTREECODE): Likewise.
9916         * gimplify.c (gimplify_expr): Likewise.
9917         * optabs-tree.c (optab_for_tree_code): Likewise.
9918         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9919         * tree-eh.c (operation_could_trap_p): Likewise.
9920         (stmt_could_throw_1_p): Likewise.
9921         * tree-inline.c (estimate_operator_cost): Likewise.
9922         * tree-pretty-print.c (dump_generic_node): Likewise.
9923         (op_code_prio): Likewise.
9924         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9925         * tree-ssa-operands.c (get_expr_operands): Likewise.
9926         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9927         * fold-const-call.h (fold_fma): Delete.
9928         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9929         CFN_FNMA and CFN_FNMS.
9930         (fold_fma): Delete.
9931         * genmatch.c (combined_fn): New enum.
9932         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9933         (commutative_op): New function.
9934         (commutate): Use it.  Handle more than 2 operands.
9935         (dt_operand::gen_gimple_expr): Use commutative_op.
9936         (parser::parse_expr): Allow :c to be used with non-binary
9937         operators if the commutative operand is known.
9938         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9939         CFN_FMS, CFN_FNMA and CFN_FNMS.
9940         (backprop::process_assign_use): Remove FMA_EXPR handling.
9941         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9942         (gen_hsa_fma): New function.
9943         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9944         IFN_FNMA and IFN_FNMS.
9945         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9946         * gimple-fold.h (follow_all_ssa_edges): Declare.
9947         * gimple-fold.c (follow_all_ssa_edges): New function.
9948         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9949         gimple_build interface and use follow_all_ssa_edges to fold the result.
9950         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9951         instead of checking for optabs directly.
9952         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9953         rather than FMA_EXPRs.
9954         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9955         call to IFN_FMA instead of an FMA_EXPR.
9957 2018-05-17  Jim Wilson  <jimw@sifive.com>
9959         * expr.c (do_tablejump): When converting index to Pmode, if we have a
9960         sign extended promoted subreg, and the range does not have the sign bit
9961         set, then do a sign extend.
9963         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9964         test, check for sign extended subreg and/or constant operands, and
9965         do a sign extend in that case.
9967 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
9969         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9970         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9971         Add untyped.
9972         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9973         Change logics_shift_reg to logics_shift_imm.
9974         (thunderx2t99_fp_loadpair_basic): Delete.
9975         (thunderx2t99_fp_storepair_basic): Delete.
9976         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9977         (thunderx2t99_asimd_polynomial): Delete.
9978         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9979         and neon_fp_mul_d_scalar_q.
9980         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9981         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9982         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9983         (thunderx2t99_asimd_lut): Add missing tbl types.
9984         (thunderx2t99_asimd_ext): Delete.
9985         (thunderx2t99_asimd_load1_1_mult): Delete.
9986         (thunderx2t99_asimd_load1_2_mult): Delete.
9987         (thunderx2t99_asimd_load1_ldp): New.
9988         (thunderx2t99_asimd_load1): New.
9989         (thunderx2t99_asimd_load2): Add missing *load2* types.
9990         (thunderx2t99_asimd_load3): New.
9991         (thunderx2t99_asimd_load4): New.
9992         (thunderx2t99_asimd_store1_1_mult): Delete.
9993         (thunderx2t99_asimd_store1_2_mult): Delete.
9994         (thunderx2t99_asimd_store2_mult): Delete.
9995         (thunderx2t99_asimd_store2_onelane): Delete.
9996         (thunderx2t99_asimd_store_stp): New.
9997         (thunderx2t99_asimd_store1): New.
9998         (thunderx2t99_asimd_store2): New.
9999         (thunderx2t99_asimd_store3): New.
10000         (thunderx2t99_asimd_store4): New.
10002 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10004         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10005         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10007 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10008             Segher Boessenkool  <segher@kernel.crashing.org>
10010         PR target/85698
10011         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10012         operand.
10014 2018-05-17  Richard Biener  <rguenther@suse.de>
10016         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10017         for pruning loop and prune defs feeding only already visited PHIs.
10019 2018-05-17  Richard Biener  <rguenther@suse.de>
10021         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10023 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10024             Richard Biener  <rguenther@suse.de>
10026         PR tree-optimization/85793
10027         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10028         for VMAT_ELEMENTWISE.
10030 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10032         * internal-fn.h (lookup_internal_fn): Declare
10033         * internal-fn.c (lookup_internal_fn): New function.
10034         * gimple.c (gimple_build_call_from_tree): Handle calls to
10035         internal functions.
10036         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10037         internal function names.
10038         * tree-pretty-print.c (dump_generic_node): Likewise.
10039         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10041 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10043         * gimple-fold.h (gimple_build): Make the function forms take
10044         combined_fn rather than built_in_function.
10045         (gimple_simplify): Likewise.
10046         * gimple-match-head.c (gimple_simplify): Likewise.
10047         * gimple-fold.c (gimple_build): Likewise.
10048         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10049         rather than gimple_build_call_internal.
10050         (get_initial_defs_for_reduction): Likewise.
10051         (vect_create_epilog_for_reduction): Likewise.
10052         (vectorizable_live_operation): Likewise.
10054 2018-05-17  Martin Liska  <mliska@suse.cz>
10056         * gimple-ssa-sprintf.c (format_directive): Do not use
10057         space in between 'G_' and '('.
10059 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10061         PR target/85323
10062         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10063         even if the mask is not all ones.
10065         PR target/85323
10066         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10067         vector.
10068         (ix86_gimple_fold_builtin): Likewise.
10070         PR target/85323
10071         * config/i386/i386.c: Include tree-vector-builder.h.
10072         (ix86_vector_shift_count): New function.
10073         (ix86_fold_builtin): Fold shift builtins by scalar count.
10074         (ix86_gimple_fold_builtin): Likewise.
10076         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10077         _mm512_setzero): New intrinsics.
10079 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10080             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10082         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10083         code generation for cases where splatting a value is not useful.
10084         * simplify-rtx.c (simplify_ternary_operation): Simplify
10085         vec_merge across a vec_duplicate and a paradoxical subreg forming
10086         a vector mode to a vec_concat.
10088 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10090         * config.gcc: Support "goldmont-plus".
10091         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10092         "goldmont-plus".
10093         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10094         PROCESSOR_GOLDMONT_PLUS.
10095         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10096         (processor_target_table): Add "goldmont-plus".
10097         (PTA_GOLDMONT_PLUS): Define.
10098         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10099         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10100         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10101         (fold_builtin_cpu): Add "goldmont-plus".
10102         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10103         (ix86_option_override_internal): Add "goldmont-plus".
10104         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10105         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10106         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10107         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10109 2018-05-17  Richard Biener  <rguenther@suse.de>
10111         PR tree-optimization/85757
10112         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10113         remove defs that only feed that PHI from further processing.
10115 2018-05-16  Jim Wilson  <jimw@sifive.com>
10117         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10118         asterisk to name.
10119         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10121 2018-05-16  Mark Wielaard  <mark@klomp.org>
10123         * dwarf2out.c (count_index_strings): New function.
10124         (output_indirect_strings): Call count_index_strings and generate
10125         header for dwarf_version >= 5.
10127 2018-05-16  Mark Wielaard  <mark@klomp.org>
10129         * dwarf2out.c (dwarf_FORM): New function.
10130         (set_indirect_string): Use dwarf_FORM.
10131         (reset_indirect_string): Likewise.
10132         (size_of_die): Likewise.
10133         (value_format): Likewise.
10134         (output_die): Likewise.
10135         (add_skeleton_AT_string): Likewise.
10136         (output_macinfo_op): Likewise.
10137         (index_string): Likewise.
10138         (output_index_string_offset): Likewise.
10139         (output_index_string): Likewise.
10140         (count_index_strings): Likewise.
10142 2018-05-16  Carl Love  <cel@us.ibm.com>
10144         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10145         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10147 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10149         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10150         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10152 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10154         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10155         (fnma<mode>4): Likewise.
10156         (fms<mode>4): Likewise.
10157         (fnms<mode>4): Likewise.
10158         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10159         (aarch64_fnma<mode>4): Likewise.
10160         (aarch64_fms<mode>4): Likewise.
10161         (aarch64_fnms<mode>4): Likewise.
10162         (aarch64_fnmadd<mode>4): Likewise.
10164 2018-05-16  Jason Merrill  <jason@redhat.com>
10166         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10168 2018-05-16  Richard Biener  <rguenther@suse.de>
10170         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10171         (dump_stmt_cost): Declare.
10172         (add_stmt_cost): Dump cost we add.
10173         (add_stmt_costs): New function.
10174         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10175         No longer exported.
10176         (vect_analyze_stmt): Adjust prototype.
10177         (vectorizable_condition): Likewise.
10178         (vectorizable_live_operation): Likewise.
10179         (vectorizable_reduction): Likewise.
10180         (vectorizable_induction): Likewise.
10181         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10182         cost vector to pass to vectorizable_ and record afterwards.
10183         (vect_model_reduction_cost): Take cost vector argument and adjust.
10184         (vect_model_induction_cost): Likewise.
10185         (vectorizable_reduction): Likewise.
10186         (vectorizable_induction): Likewise.
10187         (vectorizable_live_operation): Likewise.
10188         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10189         SLP_TREE_NUMBER_OF_VEC_STMTS.
10190         (vect_analyze_slp_cost_1): Remove.
10191         (vect_analyze_slp_cost): Likewise.
10192         (vect_slp_analyze_node_operations): Take visited args and
10193         a target cost vector.  Avoid processing already visited stmt sets.
10194         (vect_slp_analyze_operations): Use a local cost vector to gather
10195         costs and register those of non-discarded instances.
10196         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10197         (vect_schedule_slp_instance): Remove copying of
10198         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10199         zero.
10200         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10201         adding cost.  Record cost entry location.
10202         (vect_prologue_cost_for_slp_op): Function to compute cost of
10203         a constant or invariant generated for SLP vect in the prologue,
10204         split out from vect_analyze_slp_cost_1.
10205         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10206         (vect_model_promotion_demotion_cost): Likewise.
10207         (vect_model_store_cost): Likewise, make static.
10208         (vect_model_load_cost): Likewise.
10209         (vectorizable_bswap): Add cost vector arg and adjust.
10210         (vectorizable_call): Likewise.
10211         (vectorizable_simd_clone_call): Likewise.
10212         (vectorizable_conversion): Likewise.
10213         (vectorizable_assignment): Likewise.
10214         (vectorizable_shift): Likewise.
10215         (vectorizable_operation): Likewise.
10216         (vectorizable_store): Likewise.
10217         (vectorizable_load): Likewise.
10218         (vectorizable_condition): Likewise.
10219         (vectorizable_comparison): Likewise.
10220         (can_vectorize_live_stmts): Likewise.
10221         (vect_analyze_stmt): Likewise.
10222         (vect_transform_stmt): Adjust calls to vectorizable_*.
10223         * tree-vectorizer.c: Include gimple-pretty-print.h.
10224         (dump_stmt_cost): New function.
10226 2018-05-16  Richard Biener  <rguenther@suse.de>
10228         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10229         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10230         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10231         (check_name): New callback.
10232         (dse_classify_store): Track cycles via a visited bitmap of PHI
10233         defs and simplify handling of in-loop and across loop dead stores
10234         and properly fail for loop-variant refs.  Handle byte-tracking with
10235         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10236         limiting the walk.
10238 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10240         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10241         (vect_get_mask_type_for_stmt): Likewise.
10242         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10243         split out from...
10244         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10245         to determine the statement's vector type and the vector type that
10246         should be used for calculating nunits.  Deal with cases in which
10247         the type has to be deferred.
10248         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10249         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10250         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10251         (vect_determine_vf_for_stmt): New functions, split out from...
10252         (vect_determine_vectorization_factor): ...here.
10253         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10254         (vect_get_mask_type_for_stmt): New functions, split out from
10255         vect_determine_vectorization_factor.
10257 2018-05-16  Richard Biener  <rguenther@suse.de>
10259         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10260         verify the [VEC_]COND_EXPR embedded comparison.
10262 2018-05-15  Martin Sebor  <msebor@redhat.com>
10264         PR tree-optimization/85753
10265         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10266         RECORD_TYPE in addition to ARRAY_TYPE.
10268 2018-05-15  Martin Sebor  <msebor@redhat.com>
10270         PR middle-end/85643
10271         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10273 2018-05-15  Richard Biener  <rguenther@suse.de>
10275         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10276         add by_clobber_p one.  Change algorithm to collect all defs
10277         representing uses we need to walk and try reducing them to
10278         a single one before failing.
10279         (dse_dom_walker::dse_optimize_stmt): Adjust.
10281 2018-05-13  Mark Wielaard  <mark@klomp.org>
10283         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10284         (size_of_loc_descr): Likewise.
10285         (output_loc_operands): Likewise.
10286         (output_loc_operands_raw): Likewise.
10287         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10288         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10289         (hash_loc_operands): Likewise.
10290         (compare_loc_operands): Likewise.
10292 2018-05-14  Mark Wielaard  <mark@klomp.org>
10294         * dwarf2out.c (count_index_addrs): New function.
10295         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10297 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10299         PR tree-optimization/83648
10300         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10301         return value as malloc candidate.
10303 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10305         PR ipa/85734
10306         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10307         param as true in call to suggest_attribute.
10309 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10311         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10312         -mreadonly-in-sdata.
10314 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10316         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10317         New pattern.
10318         (aarch64_crypto_aesd_fused): Likewise.
10320 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10322         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10323         (movsi_aarch64): Likewise.
10324         (load_pairsi): Likewise.
10325         (load_pairdi): Likewise.
10326         (store_pairsi): Likewise.
10327         (store_pairdi): Likewise.
10328         (load_pairsf): Likewise.
10329         (load_pairdf): Likewise.
10330         (store_pairsf): Likewise.
10331         (store_pairdf): Likewise.
10332         (zero_extend): Likewise.
10333         (trunc): Swap alternatives.
10334         (fcvt_target): Add '?' to prefer w over r.
10336 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10338         PR target/85756
10339         * config/i386/i386.md: Disallow non-commutative arithmetics in
10340         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10341         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10342         in the peephole2 before it.
10344 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10346         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10347         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10348         (ix86_handle_option): Handle -mcldemote.
10349         * config.gcc: New header.
10350         * config/i386/cldemoteintrin.h: New file.
10351         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10352         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10353         -mcldemote.
10354         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10355         OPTION_MASK_ISA_CLDEMOTE.
10356         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10357         (ix86_valid_target_attribute_inner_p): Ditto.
10358         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10359         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10360         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10361         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10362         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10363         (cldemote): New.
10364         * config/i386/i386.opt: Add -mcldemote.
10365         * config/i386/x86intrin.h: New header.
10366         * doc/invoke.texi: Add -mcldemote.
10368 2018-05-14  Richard Biener  <rguenther@suse.de>
10370         * doc/match-and-simplify.texi: Adjust :s documentation.
10372 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10374         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10375         intended memcpy size.
10376         (REORDER_45): Likewise.
10378 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10380         * sort.cc: New file.
10381         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10382         * vec.c (qsort_chk): Use gcc_qsort.
10383         * Makefile.in (OBJS-libcommon): Add sort.o.
10384         (build/sort.o): New target.  Use it...
10385         (BUILD_RTL): ... here, and...
10386         (build/gencfn-macros): ... here, and...
10387         (build/genmatch): ... here.
10389 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10390             Chung-Ju Wu  <jasonwucj@gmail.com>
10392         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10393         * config/nds32/nds32-graywolf.md: New file.
10394         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10395         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10396         pipeline.
10397         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10398         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10399         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10400         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10401         * config/nds32/pipelines.md: Include n15 settings.
10403 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10404             Chung-Ju Wu  <jasonwucj@gmail.com>
10406         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10407         * config/nds32/nds32-n13.md: New file.
10408         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10409         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10410         pipeline.
10411         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10412         * config/nds32/nds32.md (pipeline_model): Add n13.
10413         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10414         * config/nds32/pipelines.md: Include n13 settings.
10416 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10417             Chung-Ju Wu  <jasonwucj@gmail.com>
10419         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10420         * config/nds32/nds32-n10.md: New file.
10421         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10422         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10423         pipeline.
10424         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10425         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10426         * config/nds32/nds32.md (pipeline_model): Add n10.
10427         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10428         * config/nds32/pipelines.md: Include n10 settings.
10430 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10431             Kito Cheng  <kito.cheng@gmail.com>
10432             Chung-Ju Wu  <jasonwucj@gmail.com>
10434         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10435         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10436         Add enum values for DSP extension instructions.
10437         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10438         New constraints.
10439         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10440         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10441         New code iterators.
10442         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10443         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10444         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10445         * config/nds32/nds32-intrinsic.md: Likewise.
10446         * config/nds32/nds32_intrinsic.h: Likewise.
10447         * config/nds32/nds32-md-auxiliary.c: Likewise.
10448         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10449         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10450         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10451         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10452         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10453         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10454         TYPE_DMAC in switch statement.
10455         * config/nds32/nds32.c: New checking and implementation for DSP
10456         extension instructions.
10457         * config/nds32/nds32.h: Likewise.
10458         * config/nds32/nds32.md: Likewise.
10459         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10460         * config/nds32/predicates.md: Implement new predicates for DSP
10461         extension.
10463 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10465         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10466         Reformat alternatives and attributes so it is easier to identify
10467         which constraints/attributes go with which instruction.
10468         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10469         (mov<mode>_softfloat32, FMOVE64): Likewise.
10470         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10471         (mov<mode>_softfloat64, FMOVE64): Likewise.
10473 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10475         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10476         subsection.
10477         (Basic PowerPC Built-in Functions): The new name of the
10478         subsection previously known as "PowerPC Built-in Functions".
10479         (Basic PowerPC Built-in Functions Available on all Configurations):
10480         New subsubsection.
10481         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10482         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10483         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10484         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10486 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10488         PR ipa/85655
10489         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10490         single const.
10492 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10494         PR target/85733
10495         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10497 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10499         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10500         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10501         (ix86_handle_option): Handle -mwaitpkg.
10502         * config.gcc: New header.
10503         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10504         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10505         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10506         function type.
10507         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10508         OPTION_MASK_ISA_WAITPKG.
10509         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10510         (ix86_option_override_internal): Add PTA_WAITPKG.
10511         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10512         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10513         IX86_BUILTIN_TPAUSE.
10514         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10515         __builtin_ia32_umwait and __builtin_ia32_tpause.
10516         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10517         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10518         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10519         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10520         UNSPECV_TPAUSE): New.
10521         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10522         * config/i386/i386.opt: Add -mwaitpkg.
10523         * config/i386/waitpkgintrin.h: New file.
10524         * config/i386/x86intrin.h: New header.
10525         * doc/invoke.texi: Add -mwaitpkg.
10527 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10529         PR target/85606
10530         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10531         equivalent.
10532         (cortex-m0): Use armv6s-m isa.
10533         (cortex-m0plus): Likewise.
10534         (cortex-m1): Likewise.
10535         (cortex-m0.small-multiply): Likewise.
10536         (cortex-m0plus.small-multiply): Likewise.
10537         (cortex-m1.small-multiply): Likewise.
10539 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10540             Jakub Jelinek  <jakub@redhat.com>
10542         PR tree-optimization/85692
10543         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10544         source permute as well.
10546 2018-05-11  Martin Liska  <mliska@suse.cz>
10548         PR sanitizer/85556
10549         * doc/extend.texi: Document LLVM style format for no_sanitize
10550         attribute.
10552 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10554         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10555         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10556         (mode_supports_vsx_dform_quad): Likewise.
10557         (mode_supports_vmx_dform): Move these functions to be next to the
10558         other mode_supports functions.
10559         (mode_supports_dq_form): Likewise.
10560         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10561         mode_supports_dq_form.
10562         (reg_offset_addressing_ok_p): Likewise.
10563         (offsettable_ok_by_alignment): Likewise.
10564         (rs6000_legitimate_offset_address_p): Likewise.
10565         (legitimate_lo_sum_address_p): Likewise.
10566         (rs6000_legitimize_address): Likewise.
10567         (rs6000_legitimize_reload_address): Likewise.
10568         (rs6000_secondary_reload_inner): Likewise.
10569         (rs6000_preferred_reload_class): Likewise.
10570         (rs6000_output_move_128bit): Likewise.
10572 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10574         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10575         Generate SImode target register for null target.
10576         <case IX86_BUILTIN_XGETBV>: Ditto.
10577         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10578         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10580 2018-05-10  Carl Love  <cel@us.ibm.com>
10582         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10583         dcbtt and dcbtstt if operands[2] is 0.
10585 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10587         PR target/85693
10588         * config/i386/sse.md (usadv64qi): New expander.
10590 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10592         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10593         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10594         -maltivec=be support.
10595         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10596         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10597         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10598         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10599         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10600         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10601         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10602         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10603         altivec_vsumsws): Adjust.
10604         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10605         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10606         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10607         support.
10608         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10609         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10610         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10611         (altivec_lve<VI_char>x): Delete expand.
10612         (*altivec_lve<VI_char>x_internal): Rename to...
10613         (altivec_lve<VI_char>x): ... this.
10614         (altivec_lvxl_<mode>): Delete expand.
10615         (*altivec_lvxl_<mode>_internal): Rename to ...
10616         (altivec_lvxl_<mode>): ... this.
10617         (altivec_stvxl_<mode>): Delete expand.
10618         (*altivec_stvxl_<mode>_internal): Rename to ...
10619         (altivec_stvxl_<mode>): ... this.
10620         (altivec_stve<VI_char>x): Delete expand.
10621         (*altivec_stve<VI_char>x_internal): Rename to ...
10622         (altivec_stve<VI_char>x): ... this.
10623         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10624         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10625         reduc_plus_scal_<mode>): Adjust.
10626         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10627         comment.
10628         (rs6000_cpu_cpp_builtins): Adjust.
10629         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10630         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10631         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10632         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10633         -maltivec=be support.
10634         (rs6000_split_vec_extract_var): Adjust.
10635         (rs6000_split_v4si_init): Adjust.
10636         (swap_selector_for_mode): Delete.
10637         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10638         altivec_expand_stvex_be): Delete.
10639         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10640         -maltivec=be support.
10641         (rs6000_gimple_fold_builtin): Ditto.
10642         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10643         Adjust.
10644         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10645         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10646         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10647         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10648         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10649         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10650         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10651         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10652         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10653         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10654         anonymous split): Adjust.
10655         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10656         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10658 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10660         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10661         when --with-gxx-include-dir is also specified.
10662         * configure: Regenerate.
10664 2018-05-09  Jim Wilson  <jimw@sifive.com>
10666         PR target/84797
10667         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10668         * config/riscv/t-withmultilib: New.
10669         * config/riscv/withmultilib.h: New.
10670         * doc/install.texi: Document RISC-V --with-multilib-list support.
10672 2018-05-09  Richard Biener  <rguenther@suse.de>
10674         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10675         vector.
10676         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10677         actual scalar cost using the cost vector and the add_stmt_cost
10678         machinery.
10680 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10682         PR rtl-optimization/85645
10683         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10684         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10686 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10688         PR rtl-optimization/85645
10689         * shrink-wrap.c (spread_components): Return a boolean saying if
10690         anything was changed.
10691         (try_shrink_wrapping_separate): Iterate spread_components until
10692         nothing changes anymore.
10694 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10696         PR rtl-optimization/85645
10697         * regrename.c (build_def_use): Also kill the chains that include the
10698         destination of a REG_CFA_REGISTER note.
10700 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10702         PR rtl-optimization/85645
10703         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10704         insn that has a REG_CFA_REGISTER note.
10706 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10708         * cfgexpand.c (expand_clobber): New function.
10709         (expand_gimple_stmt_1): Use it.
10710         * tree-vect-stmts.c (vect_clobber_variable): New function,
10711         split out from...
10712         (vectorizable_simd_clone_call): ...here.
10713         (vectorizable_store): Emit a clobber either side of an
10714         IFN_STORE_LANES sequence.
10715         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10717 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10719         PR target/85626
10720         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10721         (define_insn "trap_if_false"): Add exit after trap.
10723 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10725         PR rtl-optimization/85638
10726         * bb-reorder.c: Include common/common-target.h.
10727         (create_forwarder_block): New function extracted from...
10728         (fix_up_crossing_landing_pad): ...here.  Rename into...
10729         (dw2_fix_up_crossing_landing_pad): ...this.
10730         (sjlj_fix_up_crossing_landing_pad): New function.
10731         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10732         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10733         from both partitions and exit the loop after one iteration.
10735 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10737         Revert:
10738         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10739         subsection.
10740         (Basic PowerPC Built-in Functions): The new name of the
10741         subsection previously known as "PowerPC Built-in Functions".
10742         (Basic PowerPC Built-in Functions Available on all Configurations):
10743         New subsubsection.
10744         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10745         subsubsection.
10746         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10747         subsubsection.
10748         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10749         subsubsection.
10750         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10751         subsubsection.
10753 2018-05-08  Jim Wilson  <jimw@sifive.com>
10755         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10756         (LD_EMUL_SUFFIX): New.
10757         (LINK_SPEC): Use it.
10759 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10761         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10762         subsection.
10763         (Basic PowerPC Built-in Functions): The new name of the
10764         subsection previously known as "PowerPC Built-in Functions".
10765         (Basic PowerPC Built-in Functions Available on all Configurations):
10766         New subsubsection.
10767         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10768         subsubsection.
10769         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10770         subsubsection.
10771         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10772         subsubsection.
10773         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10774         subsubsection.
10776 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10778         PR target/85683
10779         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10780         after cmpelim optimization.
10782 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10784         * config.gcc: Support "goldmont".
10785         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10786         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10787         PROCESSOR_GOLDMONT.
10788         * config/i386/i386.c (m_GOLDMONT): Define.
10789         (processor_target_table): Add "goldmont".
10790         (PTA_GOLDMONT): Define.
10791         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10792         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10793         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10794         (fold_builtin_cpu): Add "goldmont".
10795         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10796         (ix86_option_override_internal): Add "goldmont".
10797         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10798         (processor_type): Add PROCESSOR_GOLDMONT.
10799         * config/i386/i386.md: Add CPU "glm".
10800         * config/i386/glm.md: New file.
10801         * config/i386/x86-tune.def: Add m_GOLDMONT.
10802         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10804 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10806         PR target/85572
10807         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10808         E_V4DImode.
10809         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10810         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10811         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10813         PR target/85317
10814         * config/i386/i386.c (ix86_fold_builtin): Handle
10815         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10817         PR target/85480
10818         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10819         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10821 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10823         PR target/85658
10824         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10825         (check_arch): Likewise.
10826         (check_fpu): Return the result rather than printing it.
10827         (end arch): Fix operator precedence.
10828         (end cpu): Likewise.
10829         (END): Print the result from check_fpu.
10831 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10832             Alan Hayward  <alan.hayward@arm.com>
10833             David Sherwood  <david.sherwood@arm.com>
10835         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10836         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10837         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10838         (*fcmuo<mode>_and): New patterns.
10840 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10842         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10843         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10844         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10845         (cmp_op, sve_imm_con): New code attributes.
10846         (SVE_COND_INT_CMP, imm_con): Delete.
10847         (cmp_op): Remove above unspecs from int attribute.
10848         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10849         to...
10850         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10851         comparison-specific unspecs.
10852         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10853         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10854         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10855         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10856         (*vec_fcm<cmp_op><mode>): Rename to...
10857         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10858         (*vec_fcmuo<mode>): Rename to...
10859         (*fcmuo<mode>): ...this and adjust likewise.
10860         (*pred_fcm<cmp_op><mode>): New pattern.
10861         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10862         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10863         functions.
10864         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10865         and UNORDERED.
10866         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10867         (aarch64_emit_sve_predicated_cond): New function.
10868         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10869         (aarch64_emit_unspec_cond_or): Replace with...
10870         (aarch64_emit_sve_or_conds): ...this new function.  Use
10871         aarch64_emit_sve_ptrue_op for the individual comparisons and
10872         aarch64_emit_binop to OR them together.
10873         (aarch64_emit_inverted_unspec_cond): Replace with...
10874         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
10875         aarch64_emit_sve_ptrue_op for the comparison and
10876         aarch64_emit_unop to invert the result.
10877         (aarch64_expand_sve_vec_cmp_float): Update after the above
10878         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
10880 2018-05-07  Nathan Sidwell  <nathan@acm.org>
10882         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10883         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10884         (Backwards Compatibility): Likewise.
10886 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10888         PR bootstrap/85681
10889         Revert:
10890         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10892         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10893         <prefetch_dynamic_strides>: New const bool field.
10894         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10895         prefetch_dynamic_strides.
10896         (exynosm1_prefetch_tune): Likewise.
10897         (thunderxt88_prefetch_tune): Likewise.
10898         (thunderx_prefetch_tune): Likewise.
10899         (thunderx2t99_prefetch_tune): Likewise.
10900         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10901         to false.
10902         (aarch64_override_options_internal): Update to set
10903         PARAM_PREFETCH_DYNAMIC_STRIDES.
10904         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10905         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10906         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10907         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10908         prefetch-dynamic-strides setting.
10910         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10912         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10913         <minimum_stride>: New const int field.
10914         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10915         minimum_stride field.
10916         (exynosm1_prefetch_tune): Likewise.
10917         (thunderxt88_prefetch_tune): Likewise.
10918         (thunderx_prefetch_tune): Likewise.
10919         (thunderx2t99_prefetch_tune): Likewise.
10920         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10921         (aarch64_override_options_internal): Update to set
10922         PARAM_PREFETCH_MINIMUM_STRIDE.
10923         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10924         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10925         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10926         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10927         stride is constant and is below the minimum stride threshold.
10929 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10931         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10932         to 512.
10934 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10936         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10937         <prefetch_dynamic_strides>: New const bool field.
10938         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10939         prefetch_dynamic_strides.
10940         (exynosm1_prefetch_tune): Likewise.
10941         (thunderxt88_prefetch_tune): Likewise.
10942         (thunderx_prefetch_tune): Likewise.
10943         (thunderx2t99_prefetch_tune): Likewise.
10944         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10945         to false.
10946         (aarch64_override_options_internal): Update to set
10947         PARAM_PREFETCH_DYNAMIC_STRIDES.
10948         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10949         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10950         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10951         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10952         prefetch-dynamic-strides setting.
10954 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10956         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10957         <minimum_stride>: New const int field.
10958         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10959         minimum_stride field.
10960         (exynosm1_prefetch_tune): Likewise.
10961         (thunderxt88_prefetch_tune): Likewise.
10962         (thunderx_prefetch_tune): Likewise.
10963         (thunderx2t99_prefetch_tune): Likewise.
10964         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10965         (aarch64_override_options_internal): Update to set
10966         PARAM_PREFETCH_MINIMUM_STRIDE.
10967         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10968         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10969         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10970         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10971         stride is constant and is below the minimum stride threshold.
10973 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
10975         PR c++/85659
10976         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10977         the type is addressable.  Don't force op into register if it has
10978         BLKmode.
10980 2018-05-05  Roland McGrath  <mcgrathr@google.com>
10982         PR other/77609
10983         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10984         any section for which we don't know a specific type it should have,
10985         regardless of name.  Previously this was done only for the exact
10986         names ".init_array", ".fini_array", and ".preinit_array".
10987         (default_elf_asm_named_section): Add comment about
10988         relationship with default_section_type_flags and SECTION_NOTYPE.
10989         (get_section): Don't consider it a type conflict if one side has
10990         SECTION_NOTYPE and the other doesn't, as long as neither has the
10991         SECTION_BSS et al used in the default_section_type_flags logic.
10993 2018-05-05  Tom de Vries  <tom@codesourcery.com>
10995         PR target/85653
10996         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10997         (workaround_barsyncs): New function.
10998         (nvptx_reorg): Use workaround_barsyncs.
10999         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11000         (define_expand "nvptx_membar_cta"): New define_expand.
11001         (define_insn "*nvptx_membar_cta"): New insn.
11003 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11005         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11006         To improve optimization opportunities.
11007         * builtin-types.def: The new needed builtin types for the above.
11009 2018-05-04  Richard Biener  <rguenther@suse.de>
11011         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11012         * gimple-ssa-store-merging.c
11013         (imm_store_chain_info::output_merged_store): Remove redundant create,
11014         release split_store vector contents on failure.
11015         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11016         scalar stmt vector on cache hit.
11018 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11020         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11021         Xilinx FP support.
11022         * config.gcc (powerpc-xilinx-eabi*): Remove.
11023         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11024         support.
11025         (fusion_addis_mem_combo_load): Ditto.
11026         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11027         FP support.
11028         (rs6000_cpu_cpp_builtins): Ditto.
11029         * config/rs6000/rs6000-linux.c
11030         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11031         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11032         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11033         support.
11034         (rs6000_setup_reg_addr_masks): Ditto.
11035         (rs6000_init_hard_regno_mode_ok): Ditto.
11036         (rs6000_option_override_internal): Ditto.
11037         (legitimate_lo_sum_address_p): Ditto.
11038         (rs6000_legitimize_address): Ditto.
11039         (rs6000_legitimize_reload_address): Ditto.
11040         (rs6000_legitimate_address_p): Ditto.
11041         (abi_v4_pass_in_fpr): Ditto.
11042         (setup_incoming_varargs): Ditto.
11043         (rs6000_gimplify_va_arg): Ditto.
11044         (rs6000_split_multireg_move): Ditto.
11045         (rs6000_savres_strategy): Ditto.
11046         (rs6000_emit_prologue_components): Ditto.
11047         (rs6000_emit_epilogue_components): Ditto.
11048         (rs6000_emit_prologue): Ditto.
11049         (rs6000_emit_epilogue): Ditto.
11050         (rs6000_elf_file_end): Ditto.
11051         (rs6000_function_value): Ditto.
11052         (rs6000_libcall_value): Ditto.
11053         * config/rs6000/rs6000.h: Ditto.
11054         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11055         (TARGET_MINMAX): ... this.  New.
11056         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11057         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11058         (*movsi_internal1_single): Delete.
11059         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11060         mfpu=, mxilinx-fpu): Delete.
11061         * config/rs6000/singlefp.h: Delete.
11062         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11063         * config/rs6000/t-rs6000: Ditto.
11064         * config/rs6000/t-xilinx: Delete.
11065         * config/rs6000/titan.md: Adjust for fp_type removal.
11066         * config/rs6000/vsx.md: Remove Xilinx FP support.
11067         (VStype_simple): Delete.
11068         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11069         * config/rs6000/xfpu.h: Delete.
11070         * config/rs6000/xfpu.md: Delete.
11071         * config/rs6000/xilinx.h: Delete.
11072         * config/rs6000/xilinx.opt: Delete.
11073         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11074         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11076 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11078         PR libgomp/85639
11079         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11080         if ignore == 0.
11082 2018-05-04  Richard Biener  <rguenther@suse.de>
11084         PR middle-end/85627
11085         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11086         (expand_complex_div_wide): Likewise.
11087         (expand_complex_operations_1): Likewise.
11088         (expand_complex_libcall): Preserve EH info of the original stmt.
11089         (tree_lower_complex): Handle removed blocks.
11090         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11091         on complex multiplication and division libcall builtins.
11093 2018-05-04  Richard Biener  <rguenther@suse.de>
11095         PR middle-end/85574
11096         * fold-const.c (negate_expr_p): Restrict negation of operand
11097         zero of a division to when we know that can happen without
11098         overflow.
11099         (fold_negate_expr_1): Likewise.
11101 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11103         PR libstdc++/85466
11104         * real.h (real_nextafter): Declare.
11105         * real.c (real_nextafter): New function.
11106         * fold-const-call.c (fold_const_nextafter): New function.
11107         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11108         CASE_CFN_NEXTTOWARD.
11109         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11110         even when arg1_mode is different from arg0_mode.
11112 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11114         * doc/extend.texi (Deprecated Features): Remove
11115         -ffriend-injection.
11116         (Backwards Compatibility): Likewise.
11117         * doc/invoke.texi (C++ Language Options): Likewise.
11118         (C++ Dialect Options): Likewise.
11120 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11122         PR target/85530
11123         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11124         _mm512_mask_mullox_epi64): New intrinsics.
11126 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11128         PR testsuite/85106
11129         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11130         dump files): Add offload-tree.
11132 2018-05-03  Richard Biener  <rguenther@suse.de>
11134         PR tree-optimization/85615
11135         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11136         to loops not nested in BBs loop father to avoid creating multi-entry
11137         loops.
11139 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11141         PR tree-optimization/70291
11142         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11143         arguments.  Change return type to tree.  Emit libcall as a new
11144         statement rather than replacing existing one when inplace_p is true.
11145         (expand_complex_multiplication_components): New function.
11146         (expand_complex_multiplication): Expand floating-point complex
11147         multiplication using the above.
11148         (expand_complex_division): Rename inner_type parameter to type.
11149         Update expand_complex_libcall call-site.
11150         (expand_complex_operations_1): Update expand_complex_multiplication
11151         and expand_complex_division call-sites.
11153 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11155         PR target/85582
11156         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11157         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11158         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11159         the highest significant bit of the shift count mask is clear.  In
11160         check whether and[sq]i3 is needed verify that all significant bits
11161         of the shift count other than the highest are set.
11163 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11165         PR libgomp/82428
11166         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11167         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11168         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11169         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11170         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11171         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11172         __builtin_goacc_parlevel_size.
11174 2018-05-02  Richard Biener  <rguenther@suse.de>
11176         PR tree-optimization/85597
11177         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11178         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11179         directly.
11181 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11183         PR testsuite/85106
11184         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11185         dump files): Add ltrans-tree.
11187 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11189         PR testsuite/85106
11190         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11191         dump files): Add wpa-ipa.
11193 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11195         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11196         powerpc*-*-linux*paired* target.
11197         * config/rs6000/750cl.h: Delete.
11198         * config/rs6000/paired.h: Delete.
11199         * config/rs6000/paired.md: Delete.
11200         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11201         float support.
11202         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11203         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11204         comment.  Remove paired float support.
11205         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11206         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11207         VECTOR_PAIRED.
11208         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11209         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11210         declarations.
11211         * config/rs6000/rs6000.c: Remove paired float support.
11212         (paired_expand_vector_init, paired_expand_vector_move,
11213         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11214         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11215         paired_expand_builtin, paired_expand_predicate_builtin,
11216         paired_init_builtins): Delete.
11217         * config/rs6000/rs6000.h: Remove paired float support.
11218         * config/rs6000/rs6000.md: Remove paired float support.
11219         (move_from_CR_ov_bit): Delete.
11220         * config/rs6000/rs6000.opt (mpaired): Delete.
11221         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11222         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11224 2018-05-02  Richard Biener  <rguenther@suse.de>
11226         PR middle-end/85567
11227         * gimplify.c (gimplify_save_expr): When in SSA form allow
11228         SAVE_EXPRs to compute to SSA vars.
11230 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11232         PR target/85582
11233         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11234         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11235         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11236         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11238 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11240         PR tree-optimization/85586
11241         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11242         exit early for statements in the same group if the accesses are
11243         not strided.
11245 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11247         PR lto/85451
11248         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11249         error message.
11251 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11253         PR tree-optimization/85143
11254         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11256 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11258         PR lto/85451
11259         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11260         not found" error message.
11262 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11264         PR other/83786
11265         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11266         * vec.c (test_ordered_remove_if): New function.
11267         (vec_c_tests): Call test_ordered_remove_if.
11268         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11269         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11270         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11271         VEC_ORDERED_REMOVE_IF.
11273 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11275         PR tree-optimization/82665
11276         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11277         pointer subtraction where arguments come from a memchr call.
11279 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11281         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11282         --push-state --as-needed and --pop-state instead of --as-needed and
11283         --no-as-needed if ld supports it.
11284         * configure: Regenerated.
11286         PR web/85578
11287         * doc/install.texi2html: Replace _002d with - and _002a with * in
11288         generated html files using sed.
11290 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11292         PR c++/85523
11293         * gcc-rich-location.c (blank_line_before_p): New function.
11294         (use_new_line): New function.
11295         (gcc_rich_location::add_fixit_insert_formatted): New function.
11296         * gcc-rich-location.h
11297         (gcc_rich_location::add_fixit_insert_formatted): New function.
11299 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11301         * selftest.c (assert_streq): Rename "expected" and "actual" to
11302         "val1" and "val2".  Extend NULL-handling to cover both inputs
11303         symmetrically, while still requiring both to be non-NULL for a pass.
11304         * selftest.h (assert_streq): Rename "expected" and "actual" to
11305         "val1" and "val2".
11306         (ASSERT_EQ): Likewise.
11307         (ASSERT_EQ_AT): Likewise.
11308         (ASSERT_KNOWN_EQ): Likewise.
11309         (ASSERT_KNOWN_EQ_AT): Likewise.
11310         (ASSERT_NE): Likewise.
11311         (ASSERT_MAYBE_NE): Likewise.
11312         (ASSERT_MAYBE_NE_AT): Likewise.
11313         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11314         the assertion to pass.
11315         (ASSERT_STREQ_AT): Likewise.
11317 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11319         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11320         interaction with -pie.
11322 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11324         * selftest.h: Fix alphabetization of per-source-file selftest
11325         declarations.
11327 2018-04-30  Jason Merrill  <jason@redhat.com>
11329         PR c++/61982 - dead stores to destroyed objects.
11330         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11331         of clobber.
11333 2018-04-30  Jason Merrill  <jason@redhat.com>
11335         * tree.c (build_clobber): New.
11336         * tree.h: Declare it.
11337         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11339 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11341         * diagnostic-show-locus.c (layout::layout): Update for
11342         location_get_source_line returning a char_span.
11343         (struct char_span): Move to input.h.
11344         (struct correction): Update for fields in char_span becoming
11345         private.
11346         (struct source_line): Update for location_get_source_line
11347         returning a char_span.
11348         (layout::print_line): Likewise.
11349         * edit-context.c (edited_file::print_content): Likewise.
11350         (edited_file::print_diff_hunk): Likewise.
11351         (edited_file::print_run_of_changed_lines): Likewise.
11352         (edited_file::get_num_lines): Likewise.
11353         (edited_line::edited_line): Likewise.
11354         * final.c (asm_show_source): Likewise.
11355         * input.c (location_get_source_line): Convert return type
11356         from const char * to char_span, losing the final "line_len"
11357         param.
11358         (dump_location_info): Update for the above.
11359         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11360         when handling the literal within the line.
11361         (test_reading_source_line): Update for location_get_source_line
11362         returning a char_span.
11363         * input.h (class char_span): Move here from
11364         diagnostic-show-locus.c, converting from a struct to a class.
11365         Make data members private.
11366         (char_span::operator bool): New.
11367         (char_span::length): New.
11368         (char_span::get_buffer): New.
11369         (char_span::operator[]): New.
11370         (char_span::subspan): Make const.
11371         (char_span::xstrdup): New.
11372         (location_get_source_line): Convert return type from const char *
11373         to char_span, losing the final "line_size" param.
11375 2018-04-30  Jan Hubicka  <jh@suse.cz>
11377         * lto-wrapper.c (ltrans_priorities): New static var.
11378         (cmp_priority): New.
11379         (run_gcc): Read priorities and if doing parallel build order
11380         the Makefile by them.
11382 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11384         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11386 2018-04-30  Richard Biener  <rguenther@suse.de>
11388         * tree-cfg.c (verify_address): Remove base argument, add
11389         flag whether to check TREE_ADDRESSABLE and do that.
11390         (verify_expr): Remove.
11391         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11392         (verify_gimple_assign_single): Likewise.
11393         (verify_gimple_switch): Likewise.
11394         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11395         piece from verify_expr.
11396         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11398 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11400         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11402 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11404         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11405         (small_data_pattern): Likewise.
11406         (arc_rewrite_small_data): Likewise.
11407         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11408         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11409         (get_symbol_alignment): New function.
11410         (legitimate_small_data_address_p): Likewise.
11411         (legitimate_scaled_address): Update, call
11412         legitimate_small_data_address_p.
11413         (output_sdata): New static variable.
11414         (arc_print_operand): Update how we handle small data operands.
11415         (arc_print_operand_address): Likewise.
11416         (arc_legitimate_address_p): Update, use
11417         legitimate_small_data_address_p.
11418         (arc_rewrite_small_data_p): Remove.
11419         (arc_rewrite_small_data_1): Likewise.
11420         (arc_rewrite_small_data): Likewise.
11421         (small_data_pattern): Likewise.
11422         (compact_sda_memory_operand): Update to use
11423         legitimate_small_data_address_p and get_symbol_alignment.
11424         (prepare_move_operands): Don't rewite sdata pattern.
11425         (prepare_extend_operands): Remove.
11426         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11427         pattern.
11428         (zero_extendqisi2): Likewise.
11429         (zero_extendhisi2): Likewise.
11430         (extendqihi2): Likewise.
11431         (extendqisi2): Likewise.
11432         (extendhisi2): Likewise.
11433         (addsi3): Likewise.
11434         (subsi3): Likewise.
11435         (andsi3): Likewise.
11436         * config/arc/constraints.md (Usd): Change it to memory constraint.
11438 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11440         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11441         as source of std instructions.
11442         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11443         allow 6-bit constants as source for store instructions.
11444         (movdi_insn): Update instruction pattern to allow 6-bit constants
11445         as source for store instructions.
11447 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11449         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11451 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11452             Sandra Loosemore <sandra@codesourcery.com>
11454         * dumpfile.c (dump_open): Allow '-' for stdout.
11455         * doc/invoke.texi (Developer Options): Document dump filename
11456         determination early.  Document stdin/stdout selection.
11458 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
11460         Microblaze Target: PIC data text relative
11462         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11463         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11464         Add declaration.
11465         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11466         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11467         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11468         New addressing mode for data-text relative position indepenedent code.
11469         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11470         'ADDRESS_SYMBOLIC_TXT_REL'.
11471         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11472         (microblaze_legitimate_pic_operand): Exclude function calls from
11473         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11474         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11475         addresses cases.
11476         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11477         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11478         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11479         for 'address + offset'.
11480         (microblaze_expand_prologue): Add new function prologue call for
11481         'r20' assignation.
11482         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11483         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11484         table in case of TARGET_PIC_DATA_TEXT_REL.
11485         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11486         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11487         Add new macros 'UNSPEC_TEXT',
11488         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11489         + exclude function calls from 'UNSPEC_PLT' in case of data text
11490         relative mode.
11491         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11492         new target hook for generating address diff vector tables in case of
11493         flag_pic.
11494         * doc/tm.texi : Regenerate.
11495         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11496         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11497         of addr diff vector generation.
11498         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11499         target hook definition.
11500         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11501         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11502         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11503         option for data text relative.
11505 2018-04-30  Richard Biener  <rguenther@suse.de>
11507         * tree-chrec.h (evolution_function_is_constant_p): Remove
11508         redundant check.
11509         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11511 2018-04-30  Richard Biener  <rguenther@suse.de>
11513         PR bootstrap/85571
11514         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11516 2018-04-30  Richard Biener  <rguenther@suse.de>
11518         PR tree-optimization/28364
11519         PR tree-optimization/85275
11520         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11521         copying first exit test.
11523 2018-04-28  Mark Wielaard  <mark@klomp.org>
11525         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11526         dwarf_version >= 5.
11527         (dwarf_AT): Handle DW_AT_addr_base.
11528         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11530 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11532         PR target/84431
11533         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11534         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11535         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11536         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11538 2018-04-28  Richard Biener  <rguenther@suse.de>
11540         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11541         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11542         to reflect use.  Only add interesting stmts.
11544 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11546         PR ipa/85549
11547         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11548         the jump function allows for passing through aggregate values.
11550 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11552         * input.h (in_system_header_at): Convert from macro to inline
11553         function.
11554         (from_macro_expansion_at): Likewise.
11555         (from_macro_definition_at): Likewise.
11557 2018-04-27  Jeff Law  <law@redhat.com>
11559         * config.gcc: Mark tile* targets as deprecated/obsolete.
11561 2018-04-27  Richard Biener  <rguenther@suse.de>
11563         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11564         fix for ILP32.
11566 2018-04-27  Richard Biener  <rguenther@suse.de>
11568         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11570 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11572         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11573         with Yd constraint. Set "preferred_for_speed" attribute from
11574         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11575         with Yd constraint.
11576         (*movdi_internal): Ditto.
11577         (movti_interunit splitters): Remove
11578         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11579         (movdi_interunit splitters): Ditto.
11580         * config/i386/constraints.md (Ye): Remove.
11581         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11583 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11585         PR target/85512
11586         * config/aarch64/constraints.md (Usg): Limit to 31.
11587         (Usj): Limit to 63.
11589 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11591         PR tree-optimization/85529
11592         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11593         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11594         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11595         zero extension or masking of the MSB bit.
11596         (optimize_range_tests): Add FIRST_BB argument, pass it through
11597         to optimize_range_tests_var_bound.
11598         (maybe_optimize_range_tests, reassociate_bb): Adjust
11599         optimize_range_tests callers.
11601 2018-04-26  Richard Biener  <rguenther@suse.de>
11602             Jakub Jelinek  <jakub@redhat.com>
11604         * cgraph.h (symbol_table): Just declare debug method here.
11605         * symtab.c (symbol_table::debug): Define.
11607 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11609         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11611 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11613         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11614         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11615         (*movdi_internal): Substitute Yi and Yj constraint with x
11616         and Ym and Yn constraint with y constraint.  Update "isa"
11617         attribute and set "preferred_for_speed" attribute from
11618         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11619         (*movsi_internal): Ditto.
11620         (*movdf_internal): Ditto.
11621         (*movsf_internal): Ditto.
11622         (*zero_extendsidi2): Ditto.
11623         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11624         (sse2_loadld): Ditto.
11625         (*vec_extract<ssevecmodelower>_0): Ditto.
11626         (*vec_extractv4si_0_zext_sse4): Ditto.
11627         (vec_concatv2di): Ditto.
11628         (*vec_dup<mode>): Ditto.
11629         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11630         * config/i386/constraints.md (Yi): Remove.
11631         (Yj): Remove.
11632         (Ym): Remove.
11633         (Yn): Remove.
11635 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11637         * dumpfile.c (dump_open): New.
11638         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11639         (dump_finish): Detect stdio/stderr by value not name.
11641 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11643         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11645 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11647         PR target/84952
11648         * config/nvptx/nvptx.c (verify_neutering_jumps)
11649         (verify_neutering_labels): New function
11650         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11652 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11654         PR target/84025
11655         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11656         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11657         need neutering.
11659 2018-04-26  Richard Biener <rguenther@suse.de>
11660             Tom de Vries  <tom@codesourcery.com>
11662         PR lto/85422
11663         * lto-streamer-out.c (output_function): Fixup loops if required to match
11664         discovery done in the reader.
11666 2018-04-26  Richard Biener  <rguenther@suse.de>
11668         PR tree-optimization/85116
11669         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11670         have a loop exit from the single latch predecessor.  Remove
11671         case of header with just condition.
11672         (ch_base::copy_headers): Exclude infinite loops from any
11673         processing.
11674         (pass_ch::execute): Record exits.
11676 2018-04-26  Richard Biener  <rguenther@suse.de>
11678         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11679         prologue cost vector and pass it to vect_get_load_cost.
11680         (vect_get_peeling_costs_all_drs): Likewise.
11681         (vect_peeling_hash_get_lowest_cost): Likewise.
11682         (vect_enhance_data_refs_alignment): Likewise.
11684 2018-04-26  Richard Biener  <rguenther@suse.de>
11686         PR middle-end/85450
11687         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11688         checking of integer<->pointer conversions.
11689         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11690         sign-/zero-extending pointer types.
11691         (expand_omp_for_static_chunk): Likewise.
11693 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11694             Jean Lee  <xiaoyur347@gmail.com>
11696         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11697         (TARGET_ASAN_SHADOW_OFFSET): Define.
11698         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11699         true for -fsanitize=address.
11701 2018-04-25  Mark Wielaard  <mark@klomp.org>
11703         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11704         shorter ones.
11706 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11708         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11709         than "alu", remove explicit "memory" and "imm_disp" attributes.
11710         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11712         PR middle-end/85414
11713         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11714         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11715         gen_lowpart_no_emit.
11717 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11719         PR target/85473
11720         * config/i386/i386.c (ix86_expand_builtin): Change memory
11721         operand to XI, extend p0 to Pmode.
11722         * config/i386/i386.md: Change unspec volatile and operand
11723         1 mode to XI, change operand 0 mode to P.
11725 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11727         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11728         GET_MODE_MASK before any checking.
11729         (nds32_can_use_bset_p): Likewise.
11730         (nds32_can_use_btgl_p): Likewise.
11732 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11734         * config/nds32/nds32-doubleword.md: New define_split pattern for
11735         illegal register number.
11737 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11739         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11741 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11743         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11745 2018-04-25  Richard Biener  <rguenther@suse.de>
11747         * lto-streamer.h (LTO_major_version): Bump to 8.
11749 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11751         * BASE-VER: Set to 9.0.0.
11753 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11755         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11756         in __abskf2 and __powikf2.
11758 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11760         PR target/85512
11761         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11762         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11763         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11764         Use the above on operand 2.  Reindent.
11765         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11767 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11769         PR target/85485
11770         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11771         handle OPT_mcet.
11772         * config/i386/i386.opt (mcet): Removed.
11773         * doc/install.texi: Remove -mcet documentation.
11774         * doc/invoke.texi: Likewise.
11776 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11778         PR target/85485
11779         * doc/install.texi: Remove -mcet from bootstrap-cet.
11781 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11783         PR target/85511
11784         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11785         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11786         if TARGET_64BIT.
11788         PR target/85503
11789         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11790         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11791         containing a CONST_VECTOR.
11793 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11795         * doc/install.texi: Update newlib dependency for nvptx.
11797 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11799         PR target/85508
11800         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11801         instead of INTVAL when shifting x left.
11803 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11805         PR tree-optimization/85478
11806         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11807         vect_grouped_store_supported for single element vectors.
11809 2018-04-24  Richard Biener  <rguenther@suse.de>
11811         PR target/85491
11812         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11813         load cost increase to the case of non-constant step.
11815 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11817         PR target/84828
11818         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11819         destination if any_malformed_asm.
11821 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11823         PR middle-end/85496
11824         * expr.c (store_field): In the bitfield case, if the value comes from
11825         a function call and is returned in registers by means of a PARALLEL,
11826         do not change the mode of the temporary unless BLKmode and VOIDmode.
11828 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11830         PR rtl-optimization/85423
11831         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11832         dependencies to debug insns when the previous insn is non-debug.
11834 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11836         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11837         enums into a single definition.
11838         (fls): Fix predicates and printing.
11839         (seti): Likewise.
11841 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11843         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11844         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11845         and short u6 immediate.
11846         (check_if_valid_sleep_operand): Remove.
11847         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11849 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11851         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11852         flag_always_save_lp condition.
11853         * config/nds32/nds32.opt (malways-save-lp): New option.
11855 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11857         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11858         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11859         * config/nds32/nds32.h
11860         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11861         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11863 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11865         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11866         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11868 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11869             Chung-Ju Wu  <jasonwucj@gmail.com>
11871         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11872         Declare.
11873         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11874         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11876 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11878         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11880 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11882         * config/nds32/nds32-protos.h (nds32_data_alignment,
11883         nds32_local_alignment): Declare.
11884         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11885         nds32_local_alignment): New functions.
11886         (TARGET_CONSTANT_ALIGNMENT): Define.
11887         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11889 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11891         * config/nds32/nds32.c
11892         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11893         (TARGET_MODES_TIEABLE_P): Likewise.
11895 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11897         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11898         level Ofast and Og.
11900 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
11901             Chung-Ju Wu  <jasonwucj@gmail.com>
11903         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11904         for unaligned access.
11905         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11906         unaligned access.
11907         * config/nds32/nds32-intrinsic.md: Likewise.
11908         * config/nds32/nds32_intrinsic.h: Likewise.
11909         * config/nds32/nds32.h (nds32_builtins): Likewise.
11910         * config/nds32/nds32.opt (munaligned-access): New option.
11911         * config/nds32/nds32.c (nds32_asm_file_start): Display
11912         flag_unaligned_access status.
11914 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11916         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11917         -mno-relax is present.
11918         * config/riscv/linux.h (LINK_SPEC): Ditto.
11920 2018-04-20  Martin Sebor  <msebor@redhat.com>
11922         PR c/85365
11923         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11924         for null pointers.
11925         (gimple_fold_builtin_stxcpy_chk): Same.
11926         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11928 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
11930         PR target/85456
11931         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11932         __powikf2 when long double is IEEE 128-bit.
11934 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11936         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11937         step to make sure stack always aligned.
11939 2018-04-20  Carl Love  <cel@us.ibm.com>
11941         PR target/83402
11942         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11943         size check for arg0.
11945 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11946             Tom de Vries  <tom@codesourcery.com>
11948         PR target/85445
11949         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11950         Emit insns for calls too.
11951         (nvptx_find_par): Always look for worker-level predecessor insn.
11952         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
11953         calls.
11954         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11955         (nvptx_process_pars): Propagate frames for calls.
11957 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
11959         PR target/85469
11960         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11961         Removed.
11962         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11963         (ix86_handle_option): Don't handle OPT_mibt.
11964         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11965         __SHSTK__.
11966         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11967         has_ibt and ibt.
11968         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11969         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11970         (ix86_target_macros): Define __CET__ with flag_cf_protection
11971         for -fcf-protection.
11972         * config/i386/i386.c (isa2_opts): Remove -mibt.
11973         * config/i386/i386.h (TARGET_IBT): Removed.
11974         (TARGET_IBT_P): Likewise.
11975         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11976         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11977         * config/i386/i386.opt (mcet): Update help message.
11978         (mshstk): Likewise.
11979         (mibt): Removed.
11980         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
11981         -mcet as an alias for -mshstk.
11983 2018-04-20  Richard Biener <rguenther@suse.de>
11985         PR middle-end/85475
11986         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11987         complexity by forcing a single use of the multiply operand.
11989 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11991         ipa/85449
11992         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11993         recursion dependency to only apply to non-clones.
11995 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11997         ipa/85447
11998         * ipa-cp.c (create_specialized_node): Check that clones of
11999         self-recursive edges exist during IPA-CP.
12001 2018-04-19  Toon Moene  <toon@moene.org>
12003         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12004         by -O3.
12006 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12008         PR tree-optimization/85467
12009         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12010         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12011         VECTOR_CST element to type.
12013 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12015         PR target/85397
12016         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12017         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12018         (builtin_longjmp): Likewise.
12019         (save_stack_nonlocal): New pattern.
12020         (restore_stack_nonlocal): Likewise.
12022 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12024         PR target/85404
12025         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12026         Replace ASM_OUTPUT_LABEL with fprintf.
12028 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12030         PR target/85417
12031         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12032         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12033         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12034         define __IBT__ and __SHSTK__ for -fcf-protection.
12035         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12036         TARGET_IBT.
12037         (ix86_trampoline_init): Likewise.
12038         (x86_output_mi_thunk): Likewise.
12039         (ix86_notrack_prefixed_insn_p): Likewise.
12040         (ix86_option_override_internal): Don't disallow -fcf-protection.
12041         * config/i386/i386.md (rdssp<mode>): Also enable for
12042         -fcf-protection.
12043         (incssp<mode>): Likewise.
12044         (nop_endbr): Likewise.
12045         * config/i386/i386.opt (mcet): Change help message to built-in
12046         functions only.
12047         (mibt): Likewise.
12048         (mshstk): Likewise.
12049         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12050         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12051         enable CET built-in functions.
12053 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12055         * common/config/i386/i386-common.c
12056         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12057         OPTION_MASK_ISA_MOVDIRI_UNSET,
12058         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12059         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12060         * config.gcc (movdirintrin.h): New header.
12061         * config/i386/cpuid.h (bit_MOVDIRI,
12062         bit_MOVDIR64B): New bits.
12063         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12064         and -mmvodir64b.
12065         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12066         (VOID, PVOID, PCVOID)): New function types.
12067         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12068         __builtin_ia32_directstoreu_u64,
12069         __builtin_ia32_movdir64b): New builtins.
12070         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12071         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12072         and -mmovdiri.
12073         (ix86_valid_target_attribute_inner_p): Ditto.
12074         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12075         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12076         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12077         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12078         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12079         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12080         (movdiri<mode>, movdir64b_<mode>): New.
12081         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12082         * config/i386/immintrin.h: Include movdirintrin.h.
12083         * config/i386/movdirintrin.h: New file.
12084         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12086 2018-04-19  Richard Biener  <rguenther@suse.de>
12088         PR middle-end/85455
12089         * cfg.c (clear_bb_flags): When loop state says we have
12090         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12092 2018-04-19  Richard Biener  <rguenther@suse.de>
12094         PR tree-optimization/84737
12095         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12096         copying restrict info.
12097         (vect_setup_realignment): Use it.
12098         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12099         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12100         the first DR to all generated stores.
12101         (vectorizable_load): Likewise for loads.
12103 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12105         PR tree-optimization/85446
12106         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12107         the integral and pointer types to have the same precision.
12109         * doc/install.texi: Document --disable-cet being the default and
12110         --enable-cet=auto.
12112 2018-04-18  Martin Liska  <mliska@suse.cz>
12114         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12115         style.
12117 2018-04-18  Martin Liska  <mliska@suse.cz>
12119         Revert
12120         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12122         PR ipa/83983
12123         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12124         arguments if they are comparable.
12126 2018-04-18  Martin Liska  <mliska@suse.cz>
12128         Revert
12129         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12131         PR lto/84805
12132         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12133         incomplete types.
12135 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12137         PR target/85388
12138         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12139         ENDBR after calling __morestack.
12141 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12143         PR jit/85384
12144         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12145         by using gcc_base_ver to generate a gcc_driver_version, and use
12146         it when generating GCC_DRIVER_NAME.
12147         * configure: Regenerate.
12149 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12151         PR target/81084
12152         * config.gcc: Obsolete powerpc*-*-*spe*.
12154 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12156         PR debug/84637
12157         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12158         (stabstr_D): Change type of unum from unsigned int to
12159         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12160         type.
12162 2018-04-17  Jim Wilson  <jimw@sifive.com>
12164         PR 84856
12165         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12166         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12167         Set arg_pointer_offset after using pretend_args_size.
12169 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12171         PR rtl-optimization/85431
12172         * dse.c (record_store): Ignore zero width stores.
12174         PR sanitizer/85230
12175         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12176         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12177         __builtin_stack_restore rather than after it.
12178         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12179         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12180         argument instead of virtual_dynamic_stack_rtx.
12182 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12184         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12185         New prototype.
12186         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12187         Add note to error message to explain internal mapping of overloaded
12188         built-in function name to non-overloaded built-in function name.
12189         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12190         function.
12192 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12194         PR target/85424
12195         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12196         where the inputs overlap with the output.
12198 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12200         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12201         (=v, v) alternative and explicit "memory" attribute.
12202         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12203         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12204         attributes.
12205         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12206         "sselog1" type instead of "sselog".
12207         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12208         "sselog".  Remove explicit "memory" attribute.
12209         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12210         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12211         attributes.
12212         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12213         "sselog1" type instead of "sselog".  Remove explicit "memory"
12214         attribute.
12215         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12216         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12217         attribute.
12218         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12219         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12220         attributes.
12221         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12222         "sselog1" type instead of "sselog".  Remove explicit "memory"
12223         attribute.
12224         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12225         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12226         attribute.
12228         PR target/85430
12229         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12231         PR middle-end/85414
12232         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12233         on a SUBREG.
12235 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12237         PR ipa/85421
12238         * ipa-cp.c (create_specialized_node): Call
12239         expand_all_artificial_thunks if necessary.
12241 2018-04-17  Martin Liska  <mliska@suse.cz>
12243         PR lto/85405
12244         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12245         in message, remote space in between '_G' and '('.
12247 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12249         PR target/85281
12250         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12251         avx512f_vmcmp<mode>3<round_saeonly_name>,
12252         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12253         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12254         avx512f_rndscale<mode><round_saeonly_name>,
12255         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12256         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12257         Use %<iptr>2 instead of %2 for -masm=intel.
12258         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12259         avx512f_vcvttss2usi<round_saeonly_name>,
12260         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12261         -masm=intel.
12262         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12263         avx512f_vcvttsd2usi<round_saeonly_name>,
12264         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12265         Use %q1 instead of %1 for -masm=intel.
12266         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12267         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12268         of %3 for -masm=intel.
12269         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12270         -masm=intel.
12271         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12272         -masm=intel.
12273         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12274         -masm=intel.
12275         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12276         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12277         %g1.
12278         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12279         -masm=intel.
12280         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12281         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12282         %g1 and one with %0 and %1.
12283         (avx512er_vmrcp28<mode><round_saeonly_name>,
12284         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12285         %1 for -masm=intel.
12286         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12287         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12288         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12289         of %0 and %{%4%} for -masm=intel.
12290         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12291         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12292         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12293         order of %0 and %{%5%}%{z%} for -masm=intel.
12295 2018-04-17  Jan Hubicka  <jh@suse.cz>
12297         PR lto/85405
12298         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12300 2018-04-17  Martin Liska  <mliska@suse.cz>
12302         PR ipa/85329
12303         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12304         for target_clone error message.  Make default implementation
12305         clone to be a local declaration.
12306         (separate_attrs): Add new argument and check for an empty
12307         string.
12308         (expand_target_clones): Handle it.
12309         (ipa_target_clone): Make redirection just for target_clones
12310         functions.
12312 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12313             Tom de Vries  <tom@codesourcery.com>
12315         PR middle-end/84955
12316         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12317         tiled basic blocks without omp continue statements.
12319 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12321         PR target/83660
12322         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12323         vec_extract expression as having side effects to make sure it gets
12324         a cleanup point.
12326 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12328         PR target/85403
12329         * config/i386/i386.c (get_builtin_code_for_version): Check
12330         error_mark_node.
12332 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12334         PR target/84331
12335         * config.gcc: Support "skylake".
12336         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12337         PROCESSOR_SKYLAKE.
12338         * config/i386/i386.c (m_SKYLAKE): Define.
12339         (processor_target_table): Add "skylake".
12340         (ix86_option_override_internal): Add "skylake".
12341         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12342         PROCESSOR_CANNONLAKE.
12343         (get_builtin_code_for_version): Fix priority for
12344         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12345         PROCESSOR_SKYLAKE-AVX512.
12346         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12347         (processor_type): Add PROCESSOR_SKYLAKE.
12349 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12350             Jason Merrill  <jason@redhat.com>
12352         PR c++/85112
12353         * convert.c (convert_to_integer_1): Use direct recursion for
12354         enumeral types and types with a precision less than the number
12355         of bits in their mode.
12357 2018-04-16  Julia Koval  <julia.koval@intel.com>
12359         PR target/84413
12360         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12361         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12363 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12365         PR target/85293
12366         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12367         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12368         and -mno-direct-move.
12370 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12372         PR target/83402
12373         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12374         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12375         Ensure negative shifts result in {0}.
12377 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12379         PR rtl-optimization/79916
12380         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12381         regs (if any) to define how to gnerate SD moves when LRA is in
12382         progress.
12384 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12386         PR rtl-optimization/85393
12387         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12388         * except.c (expand_dw2_landing_pad_for_region): Make static.
12389         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12390         a label and unconditional jump to old_bb, rather than
12391         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12392         basic block.
12394         PR rtl-optimization/85376
12395         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12396         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12397         instead of a specific value.
12399 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12400             Bin Cheng  <bin.cheng@arm.com>
12402         PR tree-optimization/82965
12403         PR tree-optimization/83991
12404         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12405         by_profile_only parameter.
12406         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12407         information if the loop was predicted to iterate too many times.
12408         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12410 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12412         PR lto/71991
12413         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12414         always inline.
12416 2018-04-13  Martin Liska  <mliska@suse.cz>
12417             Jakub Jelinek  <jakub@redhat.com>
12419         PR middle-end/81657
12420         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12421         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12422         * builtins.c (expand_builtin_memory_copy_args): Use
12423         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12424         handle dest_addr == pc_rtx.
12426 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12428         PR target/85291
12429         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12430         asked to not generate direct moves.
12431         (fix_trunc<mode>si2_stfiwx): Similar.
12432         (fix_trunc<mode>si2_internal): Similar.
12434 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12436         PR debug/83157
12437         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12438         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12439         lookup if dest in some wider mode is known to be const0_rtx and
12440         if so, record permanent equivalence for it to be ZERO_EXTEND of
12441         the narrower mode destination.
12443 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12445         * lto-streamer-out.c (output_function): Revert 259346.
12446         * omp-expand.c (expand_oacc_for): Likewise.
12448 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12450         PR rtl-optimization/85354
12451         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12452         * sel-sched.c (sel_global_init): ... here.
12454 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12456         PR target/85238
12457         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12458         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12459         mode for PE-COFF targets.
12460         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12461         (i386_pe_asm_lto_end): Likewise.
12462         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12463         (TARGET_ASM_LTO_END): Likewise.
12464         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12465         (i386_pe_asm_lto_start): New function.
12466         (i386_pe_asm_lto_end): Likewise.
12468 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12469             Richard Biener  <rguenther@suse.de>
12471         PR middle-end/84955
12472         * lto-streamer-out.c (output_function): Fix CFG loop state before
12473         streaming out.
12474         * omp-expand.c (expand_oacc_for): Handle calls to internal
12475         functions like regular functions.
12477 2018-04-12  Richard Biener  <rguenther@suse.de>
12479         PR lto/85371
12480         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12481         for the early LTO debug to properly generate references to it
12482         during DIE emission.  Do not re-use that for the skeleton for
12483         split-dwarf.
12484         (dwarf2out_early_finish): Likewise.
12486 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12488         PR target/85328
12489         * config/i386/sse.md
12490         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12491         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12492         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12493         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12494         and output is a reg, avoid creating invalid lowpart subreg, but
12495         instead split into a 512-bit move.  Don't split if not AVX512VL,
12496         input is xmm16+ reg and output is a mem.
12497         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12498         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12499         xmm16+ reg and output is a mem.
12501 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12503         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12504         also for flag_dwarf2_cfi_asm.
12506 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12508         PR rtl-optimization/85342
12509         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12510         a bool scalar var inside of the loop instead.  Don't try to update
12511         recog_data.operand after failed apply_change_group.
12513 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12515         PR target/85296
12516         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12517         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12518         array with flexible array member as array without given dimension.
12519         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12520         argument for undefined param to true.
12522 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12524         PR target/85321
12525         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12526         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12527         from PowerPC section.
12528         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12529         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12530         help text that is too long.
12531         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12532         help text that is too long.
12533         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12534         help text that is too long.
12536 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12538         * config/alpha/alpha.md (stack_probe_internal): Rename
12539         from "probe_stack".  Update all callers.
12541 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12543         PR rtl-optimization/84566
12544         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12545         sched_macro_fuse_insns.
12547 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12549         PR target/84301
12550         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12551         (compute_block_dependences): ... from here.
12553 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12555         PR tree-optimization/85331
12556         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12557         from int to HOST_WIDE_INT.
12559 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12561         PR ipa/84149
12562         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12563         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12564         not the same as the source val.
12565         (cgraph_edge_brings_value_p): New parameter.
12566         (gather_edges_for_value): Pass destination value to
12567         cgraph_edge_brings_value_p.
12568         (perhaps_add_new_callers): Likewise.
12569         (get_info_about_necessary_edges): Likewise and exclude values brought
12570         only by self-recursive edges.
12571         (create_specialized_node): Redirect only clones of self-calling edges.
12572         (+self_recursive_pass_through_p): New function.
12573         (find_more_scalar_values_for_callers_subset): Use it.
12574         (find_aggregate_values_for_callers_subset): Likewise.
12575         (known_aggs_to_agg_replacement_list): Removed.
12576         (decide_whether_version_node): Re-calculate known constants for all
12577         remaining context clones.
12579 2018-04-11  Richard Biener  <rguenther@suse.de>
12581         PR lto/85339
12582         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12583         from early DWARF output.
12584         (dwarf2out_early_finish): Output line info unconditionally into
12585         early DWARF and add reference to it.
12587 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12589         PR target/85281
12590         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12591         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12592         other than V2DFmode using iptr mode attribute.
12593         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12595 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12597         PR rtl-optimization/84659
12598         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12600 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12602         PR debug/85302
12603         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12604         SIZEP is NULL.
12605         (output_loc_list): Pass address of a dummy size variable even in the
12606         locview handling loop.
12607         (index_location_lists): Add comment on why skip_loc_list_entry can't
12608         call size_of_locs.
12610 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12612         PR target/85261
12613         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12614         into register.
12616 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12618         PR target/85321
12619         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12620         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12621         and -mstring-compare-inline-limit.
12623 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12625         PR target/85287
12626         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12627         for stack clash protection in a register whenever we need it to be in
12628         a register.
12630 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12632         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12633         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12635 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12637         PR target/85321
12638         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12639         the help text.
12640         (mlong-double-): Ditto.
12641         * config/rs6000/sysv4.opt (msdata=): Ditto.
12642         (mtls-size=): Ditto.
12644 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12646         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12647         erroneous entries for
12648         "vector int vec_ldl (int, long int *)", and
12649         "vector unsigned int vec_ldl (int, unsigned long int *)".
12650         Add comments and entries for
12651         "vector bool char vec_ldl (int, bool char *)",
12652         "vector bool short vec_ldl (int, bool short *)",
12653         "vector bool int vec_ldl (int, bool int *)",
12654         "vector bool long long vec_ldl (int, bool long long *)",
12655         "vector pixel vec_ldl (int, pixel *)",
12656         "vector long long vec_ldl (int, long long *)",
12657         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12658         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12659         type tree bool_long_long_type_node and correct definition of
12660         bool_V2DI_type_node to make reference to this new type tree.
12661         (rs6000_mangle_type): Replace erroneous reference to
12662         bool_long_type_node with bool_long_long_type_node.
12663         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12664         comments to emphasize sign distinctions for char and int types and
12665         replace RS6000_BTI_bool_long constant with
12666         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12667         use of RS6000_BTI_pixel.
12668         (bool_long_type_node): Remove this macro definition.
12669         (bool_long_long_type_node): New macro definition
12671 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12673         PR rtl-optimization/85300
12674         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12675         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12676         simplify_unary_operation fails.
12678 2018-04-10  Martin Liska  <mliska@suse.cz>
12680         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12681         cgraph_edge and ipa_ref.
12683 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12685         PR target/85177
12686         PR target/85255
12687         * config/i386/sse.md
12688         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12689         computation of the VEC_MERGE selector from mask.
12690         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12691         Fix decoding of the VEC_MERGE selector into mask.
12693 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12695         PR tree-optimization/85286
12696         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12698 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12700         * final.c (final_1): Set insn_last_address as well as
12701         insn_current_address.
12703 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12705         PR target/85173
12706         * explow.c (emit_stack_probe): Call validize_mem on memory location
12707         before passing it to gen_probe_stack.  Create address operand and
12708         legitimize it for the probe_stack_address case.
12710 2018-04-09  Jan Hubicka  <jh@suse.cz>
12712         PR lto/85078
12713         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12714         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12715         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12716         walk basetypes.
12717         (free_lang_data): Rebuild type inheritance graph.
12719 2018-04-09  Martin Sebor  <msebor@redhat.com>
12721         * invoke.texi (-finline-small-functions): Mention other optimization
12722         options.
12723         (-findirect-inlining, -fpartial-inlining): Same.
12724         (-finline-functions-called-once): Same.
12725         (-freorder-blocks-and-partition): Same.
12727 2018-04-09  Jan Hubicka  <jh@suse.cz>
12729         PR rtl/84058
12730         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12731         jumps; choose last target that matches the criteria (i.e.
12732         no partition changes for non-crossing jumps).
12733         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12734         support for redirecting crossing jumps to non-crossing.
12736 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12738         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12739         also for naked functions.
12741 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12743         * config/arc/arc.md (add_shift): New pattern.
12744         (add_shift2): Likewise.
12745         (sub_shift): Likewise.
12746         (sub_shift_cmp0_noout): Likewise.
12747         (compare_si_ashiftsi): Likewise.
12748         (xbfu_cmp0_noout): New combine pattern.
12749         (xbfu_cmp0"): Likewise.
12750         (movsi_set_cc_insn): Place the predicable variant first.
12751         (commutative_binary_cmp0_noout): Remove clobber.
12752         (commutative_binary_cmp0): New pattern.
12753         (noncommutative_binary_cmp0): Likewise.
12754         (noncommutative_binary_cmp0_noout): Likewise.
12755         (noncommutative_binary_comparison_result_used): Removed.
12756         (rsub_cmp0): New pattern.
12757         (rsub_cmp0_noout): Likewise.
12758         (extzvsi): Changed, keep only meaningful variants.
12759         (SQH, SEZ): New iterators.
12760         (SQH_postfix): New mode attribute.
12761         (SEZ_prefix): New code attribute.
12762         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12763         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12764         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12765         of numerical value.
12766         (noncommutative_operator): Check the availability of barrel
12767         shifter option.
12769 2018-04-09  Richard Biener  <rguenther@suse.de>
12771         PR tree-optimization/85284
12772         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12773         Only use the niter constraining form of simple_iv when the exit
12774         is always executed.
12776 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12778         PR target/84041
12779         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12780         (define_expand "*memory_barrier"): New define_expand.
12781         (define_insn "memory_barrier"): New insn.
12783 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12785         PR rtl-optimization/80463
12786         PR rtl-optimization/83972
12787         PR rtl-optimization/83480
12789         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12790         correct producer for the insn.
12791         (tidy_control_flow): Fixup seqnos in case of debug insns.
12793 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12795         PR rtl-optimization/83913
12797         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12798         different sched-times when merging exprs.
12800 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12802         PR rtl-optimization/83962
12804         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12805         tidy_fallthru_edge and tidy_control_flow.
12807 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12809         PR rtl-optimization/83530
12811         * sel-sched.c (force_next_insn): New global variable.
12812         (remove_insn_for_debug): When force_next_insn is true, also leave only
12813         next insn in the ready list.
12814         (sel_sched_region): When the region wasn't scheduled, make another pass
12815         over it with force_next_insn set to 1.
12817 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12819         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12820         into tm_file.
12821         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12822         for interrupt control.
12823         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12824         functions for interrupt control.
12825         * config/nds32/nds32-intrinsic.md: Likewise.
12826         * config/nds32/nds32_intrinsic.h: Likewise.
12827         * config/nds32/nds32.h (nds32_builtins): Likewise.
12829 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12831         * config/nds32/nds32.c (nds32_init_machine_status,
12832         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12833         strict_aligned_p field.
12834         (nds32_expand_to_rtl_hook): New function.
12835         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12836         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12838 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12839             Chung-Ju Wu  <jasonwucj@gmail.com>
12841         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12842         * config/nds32/nds32-n7.md: New file.
12843         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12844         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12845         pipeline.
12846         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12847         * config/nds32/nds32.md (pipeline_model): Add n7.
12848         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12849         * config/nds32/pipelines.md: Include n7 settings.
12851 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12852             Chung-Ju Wu  <jasonwucj@gmail.com>
12854         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12855         * config/nds32/nds32-e8.md: New file.
12856         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12857         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12858         pipeline.
12859         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12860         * config/nds32/nds32.md (pipeline_model): Add e8.
12861         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12862         * config/nds32/pipelines.md: Include e8 settings.
12864 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12865             Chung-Ju Wu  <jasonwucj@gmail.com>
12867         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12868         * config/nds32/nds32-n8.md: New file.
12869         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12870         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12871         pipeline.
12872         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12873         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12874         * config/nds32/nds32.md (pipeline_model): Add n8.
12875         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12876         * config/nds32/pipelines.md: Include n8 settings.
12878 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12879             Chung-Ju Wu  <jasonwucj@gmail.com>
12881         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12882         * config/nds32/nds32-n9-2r1w.md: New file.
12883         * config/nds32/nds32-n9-3r2w.md: New file.
12884         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12885         nds32_register_ports): New or modify for cpu n9.
12886         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12887         pipeline.
12888         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12889         * config/nds32/nds32-utils.c: New file.
12890         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12891         TARGET_MUL_SLOW): Define.
12892         * config/nds32/nds32.md (pipeline_model): New attribute.
12893         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12894         New options that support cpu n9.
12895         * config/nds32/pipelines.md: Include n9 settings.
12896         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12898 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12900         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12901         information if necessary.
12902         (output_cond_branch_compare_zero): Likewise.
12903         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12904         (nds32_target_alignment): Refine for alignment.
12905         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12906         (FUNCTION_BOUNDARY): Modify.
12907         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12908         align case.
12909         * config/nds32/nds32.opt (malways-align, malign-functions): New.
12911 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12913         * config/nds32/constants.md (unspec_volatile_element): Add values for
12914         TLB operation and data prefetch.
12915         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12916         functions for TLB operation and data prefetch.
12917         * config/nds32/nds32-intrinsic.md: Likewise.
12918         * config/nds32/nds32_intrinsic.h: Likewise.
12919         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12920         (nds32_print_operand): Likewise.
12921         * config/nds32/nds32.h (nds32_builtins): Likewise.
12923 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
12924         Andrew Pinski <pinsika@gcc.gnu.org>
12926         PR middle-end/82976
12927         * match.pd: Use constant_boolean_node of correct type instead of
12928         boolean_true_node or boolean_false_node for simplifying
12929         pointer comparisons to zero.
12931 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12933         PR tree-optimization/80021
12934         * tree.c (verify_type_variant): Make error call in verify_variant_match
12935         translatable and remove final full stop.
12937 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12939         * config/nds32/constants.md (unspec_volatile_element): Add
12940         UNSPEC_VOLATILE_EH_RETURN.
12941         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12942         nds32_output_stack_pop): Support dwarf exception handling process.
12943         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12944         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12945         exception handling process.
12946         (nds32_compute_stack_frame): Likewise.
12947         (nds32_return_addr_rtx): Likewise.
12948         (nds32_initial_elimination_offset): Likewise.
12949         (nds32_expand_prologue): Likewise.
12950         (nds32_expand_epilogue): Likewise.
12951         (nds32_dynamic_chain_address): New function.
12952         * config/nds32/nds32.h (machine_function): Add fields for dwarf
12953         exception handling.
12954         (DYNAMIC_CHAIN_ADDRESS): Define.
12955         (EH_RETURN_DATA_REGNO): Define.
12956         (EH_RETURN_STACKADJ_RTX): Define.
12957         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12958         patterns for dwarf exception handling.
12960 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12962         * config/nds32/nds32.h: Clean up obsolete macros.
12964 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12966         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12967         Add enum values for particular instructions.
12968         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12969         particular intrinsic functions.
12970         * config/nds32/nds32-intrinsic.md: Likewise.
12971         * config/nds32/nds32_intrinsic.h: Likewise.
12972         * config/nds32/nds32.h (nds32_builtins): Likewise.
12973         * config/nds32/nds32.md (type): Add pbsad and pbsada.
12974         (btst, ave): New patterns for particular instructions.
12976 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12978         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12979         Add enum values for atomic load/store and memory sync.
12980         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12981         and memory sync.
12982         * config/nds32/nds32-intrinsic.md: Likewise.
12983         * config/nds32/nds32_intrinsic.h: Likewise.
12984         * config/nds32/nds32.h (nds32_builtins): Likewise.
12986 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12988         PR tree-optimization/85257
12989         * fold-const.c (native_encode_vector): If not all elts could fit
12990         and off is -1, return 0 rather than offset.
12991         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12992         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12993         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
12994         adjust buffer in native_interpret_expr call.
12996 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12998         * config/nds32/constants.md (unspec_volatile_element): Add cache
12999         control enum values.
13000         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13001         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13002         * config/nds32/nds32.c (nds32_cctl_names): New.
13003         (nds32_print_operand): Handle cache control register names.
13004         * config/nds32/nds32.h (nds32_builtins): New enum values.
13005         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13006         macros.
13007         * config/nds32/nds32.md (type): Add mmu.
13008         * config/nds32/pipelines.md (simple_insn): Add mmu.
13010 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13012         * config/nds32/nds32.md (type): Remove call.
13013         * config/nds32/pipelines.md (simple_insn): Likewise.
13015 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13017         * config/nds32/constants.md (unspec_volatile_element): Add
13018         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13019         UNSPEC_VOLATILE_FMFCFG.
13020         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13021         description for fmfcfg and fmfcsr.
13022         (bdesc_1arg): Add fmtcsr.
13023         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13024         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13025         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13026         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13027         unspec_fmfcfg): New patterns.
13028         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13029         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13030         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13031         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13032         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13033         __nds32__fmfcfg): Define.
13035 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13037         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13038         intrinsic register names.
13039         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13040         intrinsic register enum values and macros.
13042 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13044         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13045         for load/store addressing form.
13046         (nds32_print_operand_address): Likewise.
13048 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13050         PR target/85196
13051         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13052         based on LABEL_REF.  Remove useless assertion.
13053         (pic_address_needs_scratch): Fix formatting.
13054         (sparc_legitimize_pic_address): Minor tweaks.
13055         (sparc_delegitimize_address): Adjust assertion accordingly.
13056         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13057         into symbolic_operand.
13058         (movsi_high_pic_label_ref): Likewise.
13059         (movsi_lo_sum_pic_label_ref): Likewise.
13060         (movdi_pic_label_ref): Likewise.
13061         (movdi_high_pic_label_ref): Likewise.
13062         (movdi_lo_sum_pic_label_ref): Likewise.
13064 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13066         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13067         custom LIB_SPEC setup.
13069 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13070             Kito Cheng  <kito.cheng@gmail.com>
13072         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13073         * config/riscv/freebsd.h: New.
13075 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13077         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13078         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13079         file.
13081 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13082             Kito Cheng  <kito.cheng@gmail.com>
13084         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13085         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13086         * config/nds32/nds32-protos.h (nds32_output_call,
13087         nds32_output_return): Declare.
13088         * config/nds32/nds32.md: Refine all the call and return patterns.
13090 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13092         PR debug/85252
13093         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13094         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13096         PR rtl-optimization/84872
13097         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13098         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13099         EDGE_CROSSING edge.
13101 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13103         * expr.c (copy_blkmode_to_reg): Revert 254862.
13104         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13106 2018-04-06  Richard Biener  <rguenther@suse.de>
13108         PR middle-end/85244
13109         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13110         after seeing a component reference with an adjacent field.  Treat
13111         refs to arrays at struct end of external decls similar to
13112         refs to unconstrained commons.
13114 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13116         PR sanitizer/85213
13117         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13118         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13119         recursive calls.
13120         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13121         save_p here.
13123 2018-04-06  Richard Biener  <rguenther@suse.de>
13125         PR middle-end/85180
13126         * alias.c (find_base_term): New wrapper around find_base_term
13127         unwinding CSELIB_VAL_PTR changes.
13128         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13129         recursion.
13131 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13133         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13134         instructions.
13135         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13136         constant definitions.
13137         ("nop"): lr 0,0 -> nopr r0
13138         ("nop_lr0", "nop_lr1"): New insn definitions.
13140 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13142         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13143         NDS32_V3PUSH_AVAILABLE_P macro.
13145 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13146             Chung-Ju Wu  <jasonwucj@gmail.com>
13148         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13149         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13150         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13151         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13152         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13153         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13154         * config/nds32/constraints.md: New constraints and checking for hard
13155         float configuration.
13156         * config/nds32/iterators.md: New mode iterator and attribute for hard
13157         float configuration.
13158         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13159         patterns.
13160         * config/nds32/nds32-fpu.md: New file.
13161         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13162         deal with hard float code generation.
13163         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13164         ARCH_V3S.
13165         (abi_type, float_reg_number): New enum type.
13166         * config/nds32/nds32-predicates.c: New predicates for hard float.
13167         * config/nds32/nds32-protos.h: Declare functions for hard float.
13168         * config/nds32/nds32.c: Implementation for hard float configuration.
13169         * config/nds32/nds32.h: Definitions for hard float configuration.
13170         * config/nds32/nds32.md: Include hard float machine description and
13171         modify patterns for hard float configuration.
13172         * config/nds32/nds32.opt: New options for hard float configuration.
13173         * config/nds32/predicates.md: New predicates for hard float
13174         configuration.
13176 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13178         * common/config/nds32/nds32-common.c
13179         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13181 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13183         PR middle-end/85195
13184         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13185         CONSTRUCTOR_ELT (ctor, ...)->value.
13187 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13189         PR target/85193
13190         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13192 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13194         PR target/85204
13195         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13196         cond jump.
13198 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13199             Kito Cheng  <kito.cheng@gmail.com>
13201         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13202         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13203         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13204         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13206 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13207             Kito Cheng  <kito.cheng@gmail.com>
13209         * config/nds32/constraints.md (Ufe): New memory constraint.
13210         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13211         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13212         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13213         operands.
13214         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13215         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13217 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13219         * config/nds32/nds32.md: Use optimize_size in the condition for
13220         alu-shift instructions.
13222 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13224         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13226 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13228         * config/nds32/nds32.md (negsi2): Refine pattern.
13230 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13231             Chung-Ju Wu  <jasonwucj@gmail.com>
13233         * config/nds32/iterators.md (shift_rotate): New code iterator.
13234         (shift): New code attribute.
13235         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13236         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13237         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13238         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13239         bit-wise operations.
13240         (andsi3, *andsi3): Ditto.
13241         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13242         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13243         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13244         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13245         nds32_ior_operand, nds32_xor_operand): New predicates.
13247 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13249         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13250         (addsi3, subsi3): ... this.
13252 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13254         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13256 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13258         * config/nds32/nds32.md: Adjust indention.
13260 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13262         * config/nds32/nds32.md (feature): New attribute.
13264 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13266         * config/nds32/nds32.md (subtype): New attribute.
13268 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13270         PR target/85203
13271         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13272         expansion to perform a bitwise AND of the argument followed by a
13273         boolean negation of the result.
13275 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13277         PR rtl-optimization/84878
13278         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13279         the basic block.  Assert the use reference is not artificial and that
13280         it has an associated insn.
13282 2018-04-04  Michael Matz  <matz@suse.de>
13284         * builtins.c (compute_objsize): Pass correct operand
13285         to array_at_struct_end_p.
13287 2018-04-04  Richard Biener  <rguenther@suse.de>
13289         PR lto/85176
13290         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13291         from contexts for DINFO_LEVEL_TERSE and below.
13293 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13295         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13296         resiter_operand condition.
13297         * config/nds32/nds32.md (*move<mode>): Ditto.
13299 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13300             Monk Chiang  <sh.chiang04@gmail.com>
13302         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13304 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13306         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13308 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13309             Kito Cheng  <kito.cheng@gmail.com>
13311         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13312         nds32_cond_code_str, output_cond_branch,
13313         output_cond_branch_compare_zero, nds32_expand_cbranch,
13314         nds32_expand_cstore, nds32_expand_movcc,
13315         nds32_output_cbranchsi4_equality_zero,
13316         nds32_output_cbranchsi4_equality_reg,
13317         nds32_output_cbranchsi4_equality_reg_or_const_int,
13318         nds32_output_cbranchsi4_greater_less_zero: New functions.
13319         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13320         nds32_expand_cstore, nds32_expand_movcc,
13321         nds32_output_cbranchsi4_equality_zero,
13322         nds32_output_cbranchsi4_equality_reg,
13323         nds32_output_cbranchsi4_equality_reg_or_const_int,
13324         nds32_output_cbranchsi4_greater_less_zero): Declare.
13325         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13326         nds32_rimm11s_operand): New predicates.
13327         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13328         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13329         patterns.
13331 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13333         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13334         * config/nds32/nds32.md: Ditto.
13335         * config/nds32/pipelines.md: Ditto.
13337 2018-04-04  Richard Biener  <rguenther@suse.de>
13339         PR tree-optimization/85168
13340         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13341         propagating abnormals.
13343 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13345         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13347 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13348             Kito Cheng  <kito.cheng@gmail.com>
13350         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13351         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13352         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13353         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13354         * config/nds32/nds32.md (sibcall_internal): New.
13355         (sibcall_register): Remove.
13356         (sibcall_immediate): Remove.
13357         (sibcall_value_internal): New.
13358         (sibcall_value_register): Remove.
13359         (sibcall_value_immediate): Remove.
13360         * config/nds32/predicates.md (nds32_general_register_operand): New.
13361         (nds32_call_address_operand): New.
13363 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13365         PR rtl-optimization/85167
13366         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13367         bb_defs if *split_p, instead preinitialize it to NULL.
13369         PR tree-optimization/85156
13370         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13371         evaluating the argument multiple times.
13373 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13375         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13376         than vector.
13377         (_mm_cvtpd_ps): Likewise.
13378         (_mm_cvttpd_epi32): Likewise.
13379         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13380         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13381         vector, pixel, and bool following altivec.h include.
13383 2018-04-03  Martin Sebor  <msebor@redhat.com>
13385         * doc/extend.texi (Common Function Attributes): Clarify.
13386         (const attribute): Likewise.
13387         (pure attribute): Likewise.
13389 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13391         PR target/85169
13392         * config/i386/i386.c (ix86_expand_vector_set): Use
13393         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13395 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13397         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13398         instructions when changing rounding bits to preserve precision bits
13399         in the x87 control word.
13401 2018-04-03  Martin Liska  <mliska@suse.cz>
13403         PR tree-optimization/82491
13404         * rtl.h (strip_offset_and_add): Replace += suboffset with
13405         poly_uint64 () + suboffset.
13407 2018-03-29  Martin Liska  <mliska@suse.cz>
13408             Martin Jambor  <mjambor@suse.cz>
13410         PR ipa/84947
13411         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13412         param_type is not an integral or pointer type.
13414 2018-04-03  Richard Biener  <rguenther@suse.de>
13416         * sese.h (recompute_all_dominators): Remove.
13418 2018-04-02  Martin Sebor  <msebor@redhat.com>
13420         * doc/invoke.texi (-Wrestrict): Fix typos.
13422 2018-04-02  Jim Wilson  <jimw@sifive.com>
13424         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13425         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13426         (<optab>di3, <optab>si3_extend): Likewise.
13427         (<optab>si3_mask, <optab>si3_mask_1): New.
13428         (<optab>di3_mask, <optab>di3_mask_1): New.
13429         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13430         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13431         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13433 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13435         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13436         example.
13438 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13440         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13441         (nds32_canonicalize_comparison): New function.
13443 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13444             Kito Cheng  <kito.cheng@gmail.com>
13445             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13447         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13448         * config/nds32/constants.md (unspec_volatile_element): Add
13449         UNSPEC_VOLATILE_RELAX_GROUP.
13450         * config/nds32/nds32-relax-opt.c: New file.
13451         * config/nds32/nds32-predicates.c
13452         (nds32_symbol_load_store_p): New function.
13453         * config/nds32/nds32-protos.h
13454         (nds32_symbol_load_store_p): Declare function.
13455         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13456         * config/nds32/nds32.c
13457         (nds32_register_pass): New function to register pass.
13458         (nds32_register_passes): New function to register passes.
13459         * config/nds32/nds32.md (relax_group): New pattern.
13460         * config/nds32/nds32.opt (mrelax-hint): New option.
13461         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13463 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13465         * config/nds32/t-nds32: Modify files dependency.
13467 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13469         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13470         (PROFILE_HOOK): Define its implementation.
13472 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13474         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13475         type and 32-bit size.
13477 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13479         PR middle-end/85090
13480         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13481         (V_128_256): New mode iterator.
13482         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13483         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13484         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13485         of V.
13486         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13487         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13489 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13491         PR target/83315
13492         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13493         NaN inputs correctly.
13495 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13497         PR target/80546
13498         * config/rs6000/vsx.md (??r): New mode attribute.
13499         (*vsx_mov<mode>_64bit): Use it.
13500         (*vsx_mov<mode>_32bit): Likewise.
13502 2018-03-30  Martin Sebor  <msebor@redhat.com>
13504         PR tree-optimization/84818
13505         * builtins.c (check_access): Use warning_n.
13507 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13509         PR target/83822
13510         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13511         condition.
13512         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13513         condition.
13515 2018-03-30  Julia Koval  <julia.koval@intel.com>
13517         PR target/84413
13518         * x86-tune.def (movx, partial_reg_dependency): Enable for
13519         m_SKYLAKE_AVX512.
13521 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13523         PR inline-asm/84985
13524         * lra-constraints.c (process_alt_operands): Move setting
13525         this_alternative_matches below.
13527 2018-03-29  Martin Liska  <mliska@suse.cz>
13529         PR lto/84995.
13530         * doc/invoke.texi: Document how LTO works with debug info.
13531         Describe auto-load support of binutils.  Mention 'x86-64'
13532         as valid option value of -march option.
13534 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13536         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13538         PR c/85094
13539         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13540         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13541         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13542         checking.
13544 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13546         PR target/84912
13547         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13548         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13549         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13550         for RS6000_BTM_POWERPC64.
13551         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13552         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13553         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13554         definition.
13555         (DIVDE): Use it.
13556         (DIVDEU): Likewise.
13558 2018-03-28 Carl Love  <cel@us.ibm.com>
13560         Revert
13561         2017-09-27  Carl Love  <cel@us.ibm.com>
13563         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13564         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13565         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13566         fctiw instruction.
13568 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13570         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13571         instead of __vector bool.
13572         (_mm_max_pu8): Likewise.
13573         (_mm_min_pi16): Likewise.
13575 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13577         PR target/84912
13578         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13579         (DIVWEUO): Likewise.
13580         (DIVDEO): Likewise.
13581         (DIVDEUO): Likewise.
13582         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13583         DIVWEUO and DIVDEUO.
13584         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13585         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13586         (div_extend): Likewise.
13587         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13588         builtin function.
13589         (__builtin_divweuo): Likewise.
13590         (__builtin_divdeo): Likewise.
13591         (__builtin_divdeuo): Likewise.
13593 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13595         PR target/85095
13596         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13597         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13599         PR tree-optimization/82004
13600         * gimple-match-head.c (optimize_pow_to_exp): New function.
13601         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13602         Don't fold to exp if optimize_pow_to_exp is false.
13604 2018-03-28  Martin Liska  <mliska@suse.cz>
13606         PR other/84819
13607         * calls.c (initialize_argument_information): Fix trailing space.
13608         * common.opt: Fix typo and provide better explanation for
13609         -fsanitize-coverage option.
13610         * config/i386/i386.opt: Fix typo.
13612 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13613             Martin Liska  <mliska@suse.cz>
13615         PR sanitizer/85081
13616         * gimplify.c (asan_poison_variable): Don't do the check for
13617         gimplify_omp_ctxp here.
13618         (gimplify_decl_expr): Do it here.
13619         (gimplify_target_expr): Likewise.
13621 2018-03-28  Martin Liska  <mliska@suse.cz>
13623         PR target/84988
13624         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13625         chkp_type_bounds_count if MPX is not enabled.
13627 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13629         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13631 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13633         PR target/84914
13634         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13635         function to create the function decl for complex long double
13636         multiply and divide for -mabi=ieeelongdouble.
13637         (init_float128_ieee): Call it.
13639 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13641         PR target/85044
13642         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13643         -fcf-protection=branch -mibt.
13644         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13646 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13648         PR target/81863
13649         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13650         arm_word_relocations.
13652 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13654         PR target/85056
13655         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13656         extern array declarations.
13658 2018-03-27  Richard Biener  <rguenther@suse.de>
13660         PR middle-end/84067
13661         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13662         explicit single_use checks.
13664 2018-03-27  Richard Biener  <rguenther@suse.de>
13666         PR tree-optimization/85082
13667         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13668         Valueize the VUSE.
13670 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13672         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13673         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13674         Turn on fasynchronous-unwind-tables and funwind-tables.
13676 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13678         PR target/85073
13679         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13680         (*bmi_blsr_<mode>_ccz): Ditto.
13682 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13684         PR tree-optimization/85063
13685         * omp-general.c (offloading_function_p): New function.  Factor out
13686         of ...
13687         * omp-offload.c (pass_omp_target_link::gate): ... here.
13688         * omp-general.h (offloading_function_p): Declare.
13689         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13690         with attribute omp declare target for offloading functions.
13692 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13694         PR tree-optimization/84005
13695         * tree-data-ref.h (get_base_for_alignment): Declare.
13696         * tree-data-ref.c (get_base_for_alignment_1): New function.
13697         (get_base_for_alignment): Likewise.
13698         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13699         get_base_for_alignment to find a suitable base object, instead
13700         of always using drb->base_address.
13702 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13704         PR inline-asm/85022
13705         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13706         known size by default.
13708 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13710         PR inline-asm/85030
13711         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13712         and non BLKmode operands.
13714 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13716         PR target/85026
13717         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13718         Clean up attributes.
13720 2018-03-23  Richard Biener  <rguenther@suse.de>
13722         PR debug/85020
13723         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13724         we are going to emit early debug for LTO.
13726 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13728         PR inline-asm/85034
13729         * function.c (match_asm_constraints_1): Don't optimize if input
13730         doesn't satisfy general_operand predicate for output's mode.
13732         PR inline-asm/85022
13733         * alias.c (write_dependence_p): Don't require for x_canonicalized
13734         non-VOIDmode if x has VOIDmode.
13736         PR sanitizer/85029
13737         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13738         just don't try to optimize it rather than assert it never happens.
13740 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13742         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13743         macro expansions for definition of ST_INTERNAL_<mode> and
13744         LD_INTERNAL_<mode> builtins.
13745         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13746         Remove prototype.
13747         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13748         function.
13749         (altivec_expand_st_builtin): Likewise.
13750         (altivec_expand_builtin): Remove calls to deleted functions.
13751         (rs6000_address_for_altivec): Delete this function.
13752         * config/rs6000/vector.md: Remove expands for
13753         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13755 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13757         PR target/84826
13758         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13759         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13760         re-computing once computed.
13761         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13762         (arm_init_machine_status): Initialize
13763         machine->static_chain_stack_bytes.
13765 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13767         PR target/84760
13768         * doc/extend.texi: Add four new prototypes for vec_ld.
13769         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13770         definitions for more logical presentation.
13771         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13772         entries for V1TI variants of __builtin_altivec_ld builtin.
13773         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13774         handling of V1TI variant of LVX icode pattern.
13775         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13776         (rs6000_gimple_fold_builtin): Likewise.
13777         (altivec_init_builtins): Add code to define
13778         __builtin_altivec_lvx_v1ti function.
13780 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13782         PR inline-asm/84941
13783         * function.c (match_asm_constraints_1): Don't do the optimization
13784         if input isn't a REG, SUBREG, MEM or constant.
13786 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13788         PR tree-optimization/84956
13789         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13790         bb_has_abnormal_pred.
13792 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13794         PR sanitizer/85018
13795         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13796         DECL_INITIAL (decl) to decl at the end.
13797         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13798         adjust the comment.
13800 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13802         * doc/extend.texi (__builtin_tgmath): Document when complex
13803         integer types are treated as _Complex _Float64.
13805 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13807         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13809 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13811         PR tree-optimization/84960
13812         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13813         if it is ENTRY block, move them into single succ of ENTRY in that case.
13815 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13817         PR tree-optimization/84811
13818         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13819         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13820         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13821         (known_subrange_p): Update accordingly.  Cast each value involved
13822         in the size comparison, rather than casting the result of the
13823         subtraction.
13825 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13827         PR tree-optimization/84982
13828         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13829         by flipping the least significant bit rather than all bits from
13830         bitpos to bitpos + bitsize - 1.
13832 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13834         * doc/extend.texi (Deprecated Features): Remove mention of
13835         long-deleted deprecations.
13837 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13839         PR jit/84288
13840         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13841         * configure: Regenerate.
13843 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13845         PR tree-optimization/83126
13846         * tree-parloops.c (num_phis): New function.
13847         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13849 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13851         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13852         mention anon-struct/union members and trailing attributes.
13854 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13856         PR tree-optimization/84969
13857         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13858         builtin memset partitions if they set different rhs values.
13860 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13862         PR rtl-optimization/84989
13863         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13864         VEC_DUPLICATE with scalar result mode.
13866 2018-03-21  Martin Liska  <mliska@suse.cz>
13868         PR ipa/84963
13869         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13870         not intended return statement.
13872 2018-03-21  Martin Liska  <mliska@suse.cz>
13874         PR target/84988
13875         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13876         (chkp_find_bound_slots_1): Limit number of iterations.
13878 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
13880         PR target/84838
13881         * Minor grammar fixes for x86 options.
13883 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13885         PR debug/84875
13886         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13887         holding REG_CFA_RESTORE notes, instead turn them into a USE.
13889 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
13891         PR target/83789
13892         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13893         (altivec_lvx_<mode>_1op): Likewise.
13894         (altivec_stvx_<mode>_2op): Likewise.
13895         (altivec_stvx_<mode>_1op): Likewise.
13896         (altivec_lvx_<VM2:mode>): New define_expand.
13897         (altivec_stvx_<VM2:mode>): Likewise.
13898         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13899         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13900         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13901         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13902         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13903         (rs6000_gen_lvx): Likewise.
13904         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13905         (altivec_expand_stv_builtin): Likewise.
13906         (altivec_expand_builtin): Likewise.
13907         * config/rs6000/vector.md: Likewise.
13909 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13911         PR target/82518
13912         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13913         BYTES_BIG_ENDIAN.
13915 2018-03-20  Richard Biener  <rguenther@suse.de>
13917         PR target/84986
13918         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13919         sign-conversions as zero, fall back to standard scalar_stmt
13920         cost for the rest.
13922 2018-03-20  Martin Liska  <mliska@suse.cz>
13924         PR ipa/84825
13925         * predict.c (rebuild_frequencies): Handle case when we have
13926         PROFILE_ABSENT, but flag_guess_branch_prob is false.
13928 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13930         PR target/84990
13931         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13932         flag_section_anchors.
13933         * varasm.c (use_blocks_for_decl_p): Remove hack for
13934         dw2_force_const_mem.
13936         PR target/84845
13937         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13938         to ...
13939         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
13940         be created, use lowpart_subreg of operands[0] rather than operands[0]
13941         itself.
13942         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13943         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13944         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13945         and n constraint instead of aarch64_shift_imm_di and Usd.
13946         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13947         (*aarch64_<optab>_reg_minus<mode>3): ... this.
13949 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
13951         PR target/82989
13952         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13953         to favor GPR over NEON registers.
13954         (<shift>di3_neon): Likewise.
13956 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13958         PR target/84952
13959         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13960         (nvptx_process_pars): Emit bar.sync asap and alap.
13962 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13964         PR target/84954
13965         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13966         seen_label if seen_label is already set.
13968 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13970         PR target/84945
13971         * config/i386/i386.c (fold_builtin_cpu): For features above 31
13972         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13973         Use 1U instead of 1.  Formatting fixes.
13975         PR c/84953
13976         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13977         instead of TREE_TYPE (s1) for the return value.
13979 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
13981         PR tree-optimization/84946
13982         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13983         bitsize + bitsize in poly_uint64 rather than poly_int64.
13985         PR sanitizer/78651
13986         * dwarf2asm.c: Include fold-const.c.
13987         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13988         of decl rather than decl itself.
13990         PR rtl-optimization/84643
13991         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13993 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
13995         PR sanitizer/78651
13996         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13997         calling assemble_variable.
13999 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14001         PR target/81647
14002         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14003         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14005 2018-03-19  Jim Wilson  <jimw@sifive.com>
14007         PR bootstrap/84856
14008         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14009         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14010         (riscv_first_stack_step): Likewise.
14011         (riscv_option_override): Use STACK_BOUNDARY instead of
14012         MIN_STACK_BOUNDARY.
14013         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14014         MIN_STACK_BOUNDARY.
14015         (BIGGEST_ALIGNMENT): Set to 128.
14016         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14017         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14018         STACK_BOUNDARY.
14020 2018-03-19  Richard Biener  <rguenther@suse.de>
14022         PR tree-optimization/84933
14023         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14024         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14026 2018-03-19  Richard Biener  <rguenther@suse.de>
14028         PR tree-optimization/84859
14029         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14030         (cond_if_else_store_replacement): Perform sinking operation on
14031         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14032         Generalize what a BB with a single eligible store is.
14034 2018-03-19  Richard Biener  <rguenther@suse.de>
14036         PR tree-optimization/84929
14037         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14038         chrec_is_positive against non-chrec arg.
14040 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14042         PR target/84711
14043         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14045 2018-03-18  Martin Liska  <mliska@suse.cz>
14047         PR rtl-optimization/84635
14048         * regrename.c (build_def_use): Use matches_mode only when
14049         matches >= 0.
14051 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14053         PR tree-optimization/84913
14054         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14055         vectorize chains of COND_EXPRs.
14057 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14059         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14061 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14063         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14065 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14067         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14069 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14070             Kito Cheng  <kito.cheng@gmail.com>
14072         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14073         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14074         (nds32_adjust_reg_alloc_order): New function.
14075         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14077 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14079         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14080         nds32_print_operand, nds32_print_operand_address): Use
14081         HOST_WIDE_INT_PRINT_DEC instead.
14083 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14085         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14087 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14089         PR target/84902
14090         * config/i386/i386.c (initial_ix86_tune_features,
14091         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14092         unsigned long long.
14093         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14094         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14095         rather than 1u << ix86_tune.  Formatting fix.
14096         (ix86_option_override_internal): Change ix86_arch_mask from
14097         unsigned int to unsigned HOST_WIDE_INT, initialize to
14098         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14099         (ix86_function_specific_restore): Likewise.
14101 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14103         PR target/84899
14104         * postreload.c (reload_combine_recognize_pattern): Perform
14105         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14106         truncate_int_for_mode the result for the destination's mode.
14108         PR c/84909
14109         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14110         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14111         Likewise.
14112         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14113         Likewise.
14115 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14117         PR target/84876
14118         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14119         regno_allocno_class_array and sorted_pseudos.
14120         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14121         insns where regno is used.
14123 2018-03-16  Martin Liska  <mliska@suse.cz>
14125         PR ipa/84833
14126         * multiple_target.c (create_dispatcher_calls): Redirect
14127         reference in the symbol table.
14129 2018-03-16  Martin Liska  <mliska@suse.cz>
14131         PR ipa/84722
14132         * multiple_target.c (create_dispatcher_calls): Redirect also
14133         an alias.
14135 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14137         PR c++/79937
14138         PR c++/82410
14139         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14140         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14141         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14143 2018-03-16  Julia Koval  <julia.koval@intel.com>
14145         * doc/invoke.texi (Skylake Server): Add CLWB.
14146         Cannonlake): Remove CLWB.
14148 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14150         PR tree-optimization/84841
14151         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14152         1 << 3.
14153         (FLOAT_ONE_CONST_TYPE): Define.
14154         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14155         (sort_by_operand_rank): Put entries with higher constant_type last
14156         rather than first to match comments.
14158 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14160         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14161         split predicate.
14163 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14165         PR c++/79085
14166         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14167         check and use address of target always.
14169 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14171         PR target/84574
14172         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14173         (indirect_thunk_bnd_needed): Likewise.
14174         (indirect_thunks_used): Likewise.
14175         (indirect_thunks_bnd_used): Likewise.
14176         (indirect_return_needed): New.
14177         (indirect_return_bnd_needed): Likewise.
14178         (output_indirect_thunk_function): Add a bool argument for
14179         function return.
14180         (output_indirect_thunk_function): Don't generate alias for
14181         function return thunk.
14182         (ix86_code_end): Call output_indirect_thunk_function to generate
14183         function return thunks.
14184         (ix86_output_function_return): Set indirect_return_bnd_needed
14185         and indirect_return_needed instead of indirect_thunk_bnd_needed
14186         and indirect_thunk_needed.
14188 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14190         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14191         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14192         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14194 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14195             Paul Hua <paul.hua.gm@gmail.com>
14197         PR c/84852
14198         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14200 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14202         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14203         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14204         resp. SFmode cases.
14206 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14208         PR target/84711
14209         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14210         instead of GET_MODE_SIZE when comparing Units.
14212 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14214         PR target/68256
14215         * varasm.c (hash_section): Return an unchangeble hash value
14216         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14217         Return !aarch64_can_use_per_function_literal_pools_p ().
14219 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14221         PR target/84860
14222         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14223         rather than address of cmode as last argument to prepare_cmp_insn.
14225 2018-03-15  Julia Koval  <julia.koval@intel.com>
14227         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14228         F_AVX512VNNI, F_AVX512BITALG): New.
14230 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14232         PR target/83451
14233         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14234         insn for floating-point loads and stores.
14236 2018-03-14  Carl Love  <cel@us.ibm.com>
14238         * config/rs6000/rs6000-c.c: Add macro definitions for
14239         ALTIVEC_BUILTIN_VEC_PERMXOR.
14240         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14241         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14242         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14243         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14244         UNSPEC_VPERMXOR.
14245         * config/doc/extend.texi: Add prototypes for vec_permxor.
14247 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14249         PR c/84852
14250         * diagnostic-show-locus.c (class layout_point): Convert m_line
14251         from int to linenum_type.
14252         (line_span::comparator): Use linenum "compare" function when
14253         comparing line numbers.
14254         (test_line_span): New function.
14255         (layout_range::contains_point): Convert param "row" from int to
14256         linenum_type.
14257         (layout_range::intersects_line_p): Likewise.
14258         (layout::will_show_line_p): Likewise.
14259         (layout::print_source_line): Likewise.
14260         (layout::should_print_annotation_line_p): Likewise.
14261         (layout::print_annotation_line): Likewise.
14262         (layout::print_leading_fixits): Likewise.
14263         (layout::annotation_line_showed_range_p): Likewise.
14264         (struct line_corrections): Likewise for field m_row.
14265         (line_corrections::line_corrections): Likewise for param "row".
14266         (layout::print_trailing_fixits): Likewise.
14267         (layout::get_state_at_point): Likewise.
14268         (layout::get_x_bound_for_row): Likewise.
14269         (layout::print_line): Likewise.
14270         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14271         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14272         * input.c (selftest::test_linenum_comparisons): New function.
14273         (selftest::input_c_tests): Call it.
14274         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14275         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14276         * selftest.h (ASSERT_GT): New macro.
14277         (ASSERT_GT_AT): New macro.
14278         (ASSERT_LT): New macro.
14279         (ASSERT_LT_AT): New macro.
14281 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14283         PR rtl-optimization/84780
14284         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14286 2018-03-14  Martin Liska  <mliska@suse.cz>
14288         * tree.c (record_node_allocation_statistics): Use
14289         get_stats_node_kind.
14290         (get_stats_node_kind): New function extracted from
14291         record_node_allocation_statistics.
14292         (free_node): Use get_stats_node_kind.
14294 2018-03-14  Richard Biener  <rguenther@suse.de>
14296         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14297         that the value-set of ANTIC_IN doesn't grow.
14299         Revert
14300         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14301         member.
14302         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14303         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14305 2018-03-14  Julia Koval  <julia.koval@intel.com>
14307         * config.gcc (icelake-client, icelake-server): New.
14308         (icelake): Remove.
14309         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14310         (initial_ix86_arch_features): Ditto.
14311         (PTA_SKYLAKE): Add SGX.
14312         (PTA_ICELAKE): Remove.
14313         (PTA_ICELAKE_CLIENT): New.
14314         (PTA_ICELAKE_SERVER): New.
14315         (ix86_option_override_internal): Split up icelake on icelake client and
14316         icelake server.
14317         (get_builtin_code_for_version): Ditto.
14318         (fold_builtin_cpu): Ditto.
14319         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14320         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14321         * config/i386/i386.h (processor_type): Ditto.
14322         * doc/invoke.texi: Ditto.
14324 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14326         PR sanitizer/83392
14327         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14328         INTEGER_CST offset, add it together with bitpos / 8 and
14329         sign extend based on POINTER_SIZE.
14331         PR target/84844
14332         Revert
14333         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14335         PR target/78090
14336         * config/i386/constraints.md (Yc): New register constraint.
14337         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14338         Use Yc constraint for alternative 2 of operand 0.  Remove
14339         preferred_for_speed attribute.
14341 2018-03-14  Richard Biener  <rguenther@suse.de>
14343         PR tree-optimization/84830
14344         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14345         with the old one to avoid oscillations.
14347 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14349         PR target/83712
14350         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14351         pseudos.
14352         (assign_by_spills): Return a flag of reload assignment failure.
14353         Do not process the reload assignment failures.  Do not spill other
14354         reload pseudos if they has the same reg class.  Update n if
14355         necessary.
14356         (lra_assign): Add a return arg.  Set up from the result of
14357         assign_by_spills call.
14358         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14359         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14360         usage_insns if it is not NULL.
14361         (spill_hard_reg_in_range): New function.
14362         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14363         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14364         function prototypes.
14365         (lra_assign): Change prototype.
14366         * lra.c (lra): Add code to deal with fails by splitting hard reg
14367         live ranges.
14369 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14371         * config/riscv/riscv.opt (mrelax): New option.
14372         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14373         "norelax" when riscv_mrelax is disabled.
14374         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14376 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14378         PR target/84743
14379         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14380         reassociation for int modes.
14382 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14384         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14385         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14386         for big-endian.
14387         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14388         * config/aarch64/aarch64-sve.md
14389         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14390         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14391         (*extend<mode><Vwide>2): Rename to...
14392         (aarch64_sve_extend<mode><Vwide>2): ...this.
14393         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14394         renaming the old pattern to...
14395         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14396         unsigned packs.
14397         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14398         define_expand, renaming the old pattern to...
14399         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14400         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14401         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14402         account when deciding which SVE instruction the optab should use.
14403         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14405 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14407         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14408         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14409         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14410         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14411         (tlsdesc_small_<mode>): Turn a define_expand and use
14412         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14413         (tlsdesc_small_advsimd_<mode>): ...this.
14414         (tlsdesc_small_sve_<mode>): New pattern.
14416 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14418         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14419         (UNSPEC_UMUL_HIGHPART): New constants.
14420         (MUL_HIGHPART): New int iteraor.
14421         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14422         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14423         define_expand.
14424         (*<su>mul<mode>3_highpart): New define_insn.
14426 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14428         PR lto/84805
14429         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14430         incomplete types.
14432 2018-03-13  Martin Liska  <mliska@suse.cz>
14434         PR ipa/84658.
14435         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14436         vector.
14437         (sem_item_optimizer::~sem_item_optimizer): Release it.
14438         (sem_item_optimizer::merge_classes): Register variable aliases.
14439         (sem_item_optimizer::fixup_pt_set): New function.
14440         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14441         * ipa-icf.h: Declare new variables and functions.
14443 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14445         PR middle-end/84834
14446         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14447         integer_pow2p@2 and test integer_pow2p in condition.
14448         (A < 0 ? C : 0): Similarly for @1.
14450         PR middle-end/84831
14451         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14452         characters starting at p contain '\0' character, don't look beyond
14453         that.
14455         PR target/84827
14456         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14457         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14459         PR target/84828
14460         * reg-stack.c (change_stack): Change update_end var from int to
14461         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14462         also call set_block_for_insn on the newly added insns and rescan.
14464         PR target/84786
14465         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14466         on the last operand.
14468         PR c++/84704
14469         * tree.c (stabilize_reference_1): Return save_expr (e) for
14470         STATEMENT_LIST even if it doesn't have side-effects.
14472 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14474         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14476 2018-03-12  Renlin Li  <renlin.li@arm.com>
14478         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14479         aarch64_output_scalar_simd_mov_immediate.
14481 2018-03-12  Martin Sebor  <msebor@redhat.com>
14483         PR tree-optimization/83456
14484         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14485         for perfectly overlapping calls to memcpy.
14486         (gimple_fold_builtin_memory_chk): Same.
14487         (gimple_fold_builtin_strcpy): Handle no-warning.
14488         (gimple_fold_builtin_stxcpy_chk): Same.
14489         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14491 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14493         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14494         parameter.  Use it for SFmode.
14495         (rs6000_function_arg_advance_1): Adjust.
14496         (rs6000_function_arg): Adjust.
14497         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14499 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14501         PR rtl-optimization/84169
14502         PR rtl-optimization/84780
14503         * combine.c (can_combine_p): Check for a 2-insn combination whether
14504         the destination register is used between the two insns, too.
14506 2018-03-12  Richard Biener  <rguenther@suse.de>
14508         PR tree-optimization/84803
14509         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14510         for refs DR analysis didn't process.
14512 2018-03-12  Richard Biener  <rguenther@suse.de>
14514         PR tree-optimization/84777
14515         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14516         force-vectorize loops ignore whether we are optimizing for size.
14518 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14520         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14521         (TARGET_MD_ASM_ADJUST): Define.
14523 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14524             Kito Cheng  <kito.cheng@gmail.com>
14525             Chung-Ju Wu  <jasonwucj@gmail.com>
14527         * config/nds32/nds32.c (nds32_compute_stack_frame,
14528         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14529         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14530         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14531         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14532         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14533         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14534         * config/nds32/nds32.md (prologue, epilogue): Use macro
14535         NDS32_V3PUSH_AVAILABLE_P to do checking.
14537 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14539         PR debug/58150
14540         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14541         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14542         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14543         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14544         addition of most attributes on !orig_type_die or the attribute not
14545         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14547 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14548             Chung-Ju Wu  <jasonwucj@gmail.com>
14550         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14551         __NDS32_VH__ macro.
14552         * config/nds32/nds32.opt (mvh): New option.
14554 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14555             Chung-Ju Wu  <jasonwucj@gmail.com>
14557         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14558         function.
14559         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14560         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14561         definition.
14563 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14564             Chung-Ju Wu  <jasonwucj@gmail.com>
14566         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14567         function.
14568         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14569         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14571 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14572             Kito Cheng  <kito.cheng@gmail.com>
14573             Chung-Ju Wu  <jasonwucj@gmail.com>
14575         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14576         UNSPEC_FFMISM and UNSPEC_FLMISM.
14577         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14578         for ffb, ffmism and flmism.
14579         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14580         (unspec_ffmism): Ditto.
14581         (unspec_flmism): Ditto.
14582         (nds32_expand_builtin_impl): Check if string extension is available.
14583         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14584         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14586 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14588         Reverting patch:
14589         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14591         PR target/83712
14592         * lra-assigns.c (assign_by_spills): Return a flag of reload
14593         assignment failure.  Do not process the reload assignment
14594         failures.  Do not spill other reload pseudos if they has the same
14595         reg class.
14596         (lra_assign): Add a return arg.  Set up from the result of
14597         assign_by_spills call.
14598         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14599         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14600         usage_insns if it is not NULL.
14601         (spill_hard_reg_in_range): New function.
14602         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14603         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14604         function prototypes.
14605         (lra_assign): Change prototype.
14606         * lra.c (lra): Add code to deal with fails by splitting hard reg
14607         live ranges.
14609 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14611         PR target/84807
14612         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14614 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14616         PR debug/84620
14617         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14618         (dw_val_node): Add val_symbolic_view.
14619         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14620         (symview_upper_bound): New.
14621         (new_line_info_table): Initialize symviews_since_reset.
14622         (dwarf2out_source_line): Count symviews_since_reset and set
14623         symview_upper_bound.
14624         (dw_val_equal_p): Handle symview.
14625         (add_AT_symview): New.
14626         (print_dw_val): Handle symview.
14627         (attr_checksum, attr_checksum_ordered): Likewise.
14628         (same_dw_val_p, size_of_die): Likewise.
14629         (value_format, output_die): Likewise.
14630         (add_high_low_attributes): Use add_AT_symview for entry_view.
14631         (dwarf2out_finish): Reset symview_upper_bound, clear
14632         zero_view_p.
14634 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14636         PR target/83969
14637         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14638         Add strict argument and use it.
14639         (rs6000_split_multireg_move): Update for new strict argument.
14640         (mem_operand_gpr): Disallow all non-offsettable addresses.
14641         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14643 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14645         PR target/84772
14646         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14647         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14648         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14650         PR c++/84767
14651         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14652         decl, use remap_type if we want to use the type.
14654 2018-03-09  Martin Sebor  <msebor@redhat.com>
14656         PR tree-optimization/84526
14657         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14658         Remove dead code.
14659         (builtin_access::generic_overlap): Be prepared to handle non-array
14660         base objects.
14662 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14664         PR rtl-optimization/84682
14665         * lra-constraints.c (process_address_1): Check is_address flag
14666         for address constraints.
14667         (process_alt_operands): Likewise.
14668         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14669         preprocess_constraints.
14670         * recog.h (preprocess_constraints): Add oploc parameter.
14671         Adjust callers.
14672         * recog.c (preprocess_constraints): Test address_operand for
14673         CT_ADDRESS constraints.
14675 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14677         PR target/83712
14678         * lra-assigns.c (assign_by_spills): Return a flag of reload
14679         assignment failure.  Do not process the reload assignment
14680         failures.  Do not spill other reload pseudos if they has the same
14681         reg class.
14682         (lra_assign): Add a return arg.  Set up from the result of
14683         assign_by_spills call.
14684         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14685         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14686         usage_insns if it is not NULL.
14687         (spill_hard_reg_in_range): New function.
14688         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14689         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14690         function prototypes.
14691         (lra_assign): Change prototype.
14692         * lra.c (lra): Add code to deal with fails by splitting hard reg
14693         live ranges.
14695 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14697         PR target/83193
14698         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14699         Accept complain bool parameter.  Only emit errors if it is true.
14700         (arm_parse_cpu_option_name): Likewise.
14701         (arm_target_thumb_only): Adjust callers of the above.
14702         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14703         prototype to take a default true bool parameter.
14704         (arm_parse_arch_option_name): Likewise.
14706 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14707             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14709         PR jit/64089
14710         PR jit/84288
14711         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14712         * configure: Regenerate.
14713         * configure.ac ("linker --version-script option"): New.
14714         ("linker soname option"): New.
14716 2018-03-09  Richard Biener  <rguenther@suse.de>
14718         PR tree-optimization/84775
14719         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14720         immediate uses of predicate stmts and mark them modified.
14722         Revert
14723         PR tree-optimization/84178
14724         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14725         to caller.
14726         (version_loop_for_if_conversion): Delay update_ssa call.
14727         (tree_if_conversion): Delay update_ssa until after predicate
14728         insertion.
14730 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14732         PR target/84763
14733         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14734         when the function accesses prior frames.
14736 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14738         PR debug/84456
14739         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14740         gen_llsym, otherwise call maybe_gen_llsym.
14742         PR inline-asm/84742
14743         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14744         has ',' character inside of it.
14746 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14748         PR target/84748
14749         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14750         as clobbering CC_REGNUM.
14752 2018-03-08  Richard Biener  <rguenther@suse.de>
14754         PR middle-end/84552
14755         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14756         (follow_copies_to_constant): Do not follow SSA names registered
14757         for update.
14759 2018-03-08  Richard Biener  <rguenther@suse.de>
14761         PR tree-optimization/84178
14762         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14763         to caller.
14764         (version_loop_for_if_conversion): Delay update_ssa call.
14765         (tree_if_conversion): Delay update_ssa until after predicate
14766         insertion.
14768 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14770         PR tree-optimization/84178
14771         * tree-if-conv.c (release_bb_predicate): Remove the
14772         the assertion that the stmts have NULL use_ops.
14773         Discard the statements, asserting that they haven't
14774         yet been added to a BB.
14776 2018-03-08  Richard Biener  <rguenther@suse.de>
14778         PR tree-optimization/84746
14779         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14780         (phi_translate): Pass in destination ANTIC_OUT set.
14781         (phi_translate_1): Likewise.  For a simplified result lookup
14782         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14783         (phi_translate_set): Adjust.
14784         (do_pre_regular_insertion): Likewise.
14785         (do_pre_partial_partial_insertion): Likewise.
14787 2018-03-08  Martin Liska  <mliska@suse.cz>
14789         PR gcov-profile/84735
14790         * doc/gcov.texi: Document usage of profile files.
14791         * gcov-io.h: Document changes in the format.
14793 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14795         PR debug/84404
14796         PR debug/84408
14797         * dwarf2out.c (struct dw_line_info_table): Update comments for
14798         view == -1.
14799         (FORCE_RESET_NEXT_VIEW): New.
14800         (FORCE_RESETTING_VIEW_P): New.
14801         (RESETTING_VIEW_P): Check for -1 too.
14802         (ZERO_VIEW_P): Likewise.
14803         (new_line_info_table): Force-reset next view.
14804         (dwarf2out_begin_function): Likewise.
14805         (dwarf2out_source_line): Simplify zero_view_p initialization.
14806         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14807         view directly.  Omit view when omitting .loc at line 0.
14809 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14811         PR tree-optimization/84740
14812         * tree-switch-conversion.c (process_switch): Call build_constructors
14813         only if info.phi_count is non-zero.
14815         PR tree-optimization/84739
14816         * tree-tailcall.c (find_tail_calls): Check call arguments against
14817         DECL_ARGUMENTS (current_function_decl) rather than
14818         DECL_ARGUMENTS (func) when checking for tail recursion.
14820 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14822         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14823         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14824         Volker Reichelt's entry and add entries for people that perform
14825         GCC fuzzy testing and report numerous bugs.
14827 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14829         PR target/82411
14830         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14831         readonly data in sdata, if that is disabled.
14832         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14833         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14834         -mreadonly-in-sdata option.
14836 2018-03-07  Martin Sebor  <msebor@redhat.com>
14838         PR tree-optimization/84468
14839         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14840         basic block when looking for nul assignment.
14842 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14844         PR target/84277
14845         * except.h (output_function_exception_table): Adjust prototype.
14846         * except.c (output_function_exception_table): Remove FNNAME parameter
14847         and add SECTION parameter.  Ouput one part of the table at a time.
14848         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14849         the first part of the exception table and emit unwind directives.
14850         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14851         (i386_pe_seh_cold_init): Likewise.
14852         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14853         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14854         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14855         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14856         * config/i386/winnt.c: Include except.h.
14857         (struct seh_frame_state): Add reg_offset, after_prologue and
14858         in_cold_section fields.
14859         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14860         (i386_pe_seh_cold_init): New function.
14861         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14862         to seh->in_cold_section.
14863         (seh_emit_push): Record the offset of the push.
14864         (seh_emit_save): Record the offet of the save.
14865         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14866         Test seh->after_prologue to disregard the epilogue.
14867         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14868         (i386_pe_end_cold_function): New function.
14870 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14872         PR fortran/84565
14873         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14874         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14876         PR c++/84704
14877         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14878         on tmp_var.
14879         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14880         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14882         PR middle-end/84723
14883         * multiple_target.c: Include tree-inline.h and intl.h.
14884         (expand_target_clones): Diagnose and fail if node->definition and
14885         !tree_versionable_function_p (node->decl).
14887 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
14889         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14890         sprint_ul.
14891         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14892         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14893         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14895 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14897         PR target/84710
14898         * combine.c (try_combine): Use reg_or_subregno instead of handling
14899         just paradoxical SUBREGs and REGs.
14901 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
14903         * config/arc/arc.c (arc_finalize_pic): Remove function.
14904         (arc_must_save_register): We use single base PIC register, remove
14905         checks to save/restore the PIC register.
14906         (arc_expand_prologue): Likewise.
14907         * config/arc/arc-protos.h (arc_set_default_type_attributes):
14908         Remove.
14909         (arc_verify_short): Likewise.
14910         (arc_attr_type): Likewise.
14911         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14912         (walk_stores): Likewise.
14913         (arc_address_cost): Make it static.
14914         (arc_verify_short): Likewise.
14915         (branch_dest): Likewise.
14916         (arc_attr_type): Likewise.
14917         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14918         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14919         (arc_final_prescan_insn): Remove inserting the nops due to
14920         hardware hazards.  It is done in reorg step.
14921         (insn_length_variant_t): Remove.
14922         (insn_length_parameters_t): Likewise.
14923         (arc_insn_length_parameters): Likewise.
14924         (arc_get_insn_variants): Likewise.
14925         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14927 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14929         PR inline-asm/84683
14930         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14931         assertion failure.
14933         PR tree-optimization/84687
14934         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14935         on new_node->decl.
14936         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14938 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14940         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14941         Rename to ppc_speculation_barrier.
14942         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14943         __builtin_ppc_speculation_barrier.
14945 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14947         PR target/84700
14948         * combine.c (combine_simplify_rtx): Don't try to simplify if
14949         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14950         are equal to x.
14952 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
14954         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14955         to 32 bytes when compiling for POWER9.
14957 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14959         PR target/84564
14960         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14961         regparm >= 3 with no arg reg available also for calls with
14962         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
14964         PR target/84524
14965         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14966         orig,vex.
14967         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
14969 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
14971         PR target/84264
14972         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14974 2018-03-05  Richard Biener  <rguenther@suse.de>
14976         PR tree-optimization/84486
14977         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14978         When inserting a __builtin_assume_aligned call set the LHS
14979         SSA name alignment info accordingly.
14981 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
14983         PR tree-optimization/84114
14984         * config/aarch64/aarch64.c (aarch64_reassociation_width)
14985         Avoid reassociation of FLOAT_MODE addition.
14987 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
14989         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14990         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14991         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14992         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14993         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14994         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14995         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14996         and -mwbnoinvd.
14997         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14998         __builtin_ia32_wbinvd): New builtins.
14999         (SPECIAL_ARGS2): New.
15000         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15001         (SPECIAL_ARGS2): New.
15002         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15003         (ix86_valid_target_attribute_inner_p): Ditto.
15004         (ix86_init_mmx_sse_builtins): Add special_args2.
15005         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15006         TARGET_WBNOINVD_P): New.
15007         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15008         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15009         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15010         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15011         * config/i386/pconfigintrin.h: New file.
15012         * config/i386/wbnoinvdintrin.h: Ditto.
15013         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15014         wbnoinvdintrin.h.
15015         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15017 2018-03-05  Richard Biener  <rguenther@suse.de>
15019         PR tree-optimization/84670
15020         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15021         member.
15022         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15023         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15024         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15025         doesn't grow if all successors (recursively) were visited at least
15026         once.
15028 2018-03-05  Richard Biener  <rguenther@suse.de>
15030         PR tree-optimization/84650
15031         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15032         if executed in the loop pipeline.
15034 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15036         * doc/configfiles.texi (Configuration Files): Move info about
15037         conditionalizing $target-protos.h to...
15038         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15039         differs from $target-protos.h.
15041 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15042             Chung-Ju Wu  <jasonwucj@gmail.com>
15044         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15045         * config/nds32/nds32-multiple.md (setmemsi): Define.
15046         * config/nds32/nds32-memory-manipulation.c
15047         (nds32_gen_dup_4_byte_to_word_value): New.
15048         (emit_setmem_word_loop): New.
15049         (emit_setmem_byte_loop): New.
15050         (nds32_expand_setmem_loop): New.
15051         (nds32_expand_setmem_loop_v3m): New.
15052         (nds32_expand_setmem_unroll): New.
15053         (nds32_expand_setmem): New.
15055 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15056             Chung-Ju Wu  <jasonwucj@gmail.com>
15058         * config/nds32/nds32-memory-manipulation.c
15059         (nds32_emit_load_store): New.
15060         (nds32_emit_post_inc_load_store): New.
15061         (nds32_emit_mem_move): New.
15062         (nds32_emit_mem_move_block): New.
15063         (nds32_expand_movmemsi_loop_unknown_size): New.
15064         (nds32_expand_movmemsi_loop_known_size): New.
15065         (nds32_expand_movmemsi_loop): New.
15066         (nds32_expand_movmemsi_unroll): New.
15067         (nds32_expand_movmemqi): Rename ...
15068         (nds32_expand_movmemsi): ... to this.
15069         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15070         (movmemsi): ... to this.
15071         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15072         (nds32_expand_movmemsi): ... to this.
15074 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15075             Monk Chiang  <sh.chiang04@gmail.com>
15076             Chung-Ju Wu  <jasonwucj@gmail.com>
15078         * config/nds32/nds32-protos.h
15079         (nds32_expand_load_multiple): New arguments.
15080         (nds32_expand_store_multiple): Ditto.
15081         (nds32_valid_multiple_load_store): Rename ...
15082         (nds32_valid_multiple_load_store_p): ... to this.
15083         * config/nds32/nds32-memory-manipulation.c
15084         (nds32_expand_load_multiple): Refine implementation.
15085         (nds32_expand_store_multiple): Ditto.
15086         * config/nds32/nds32-multiple.md
15087         (load_multiple): Update nds32_expand_load_multiple interface.
15088         (store_multiple): Update nds32_expand_store_multiple interface.
15089         * config/nds32/nds32-predicates.c
15090         (nds32_valid_multiple_load_store): Rename ...
15091         (nds32_valid_multiple_load_store_p): ... to this and refine
15092         implementation.
15093         * config/nds32/predicates.md
15094         (nds32_load_multiple_and_update_address_operation): New predicate.
15095         (nds32_store_multiple_and_update_address_operation): New predicate.
15097 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15098             Chung-Ju Wu  <jasonwucj@gmail.com>
15100         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15101         (combo): New attribute.
15102         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15104 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15106         * config/nds32/nds32.opt: Change -mcmodel= default value.
15108 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15109             Monk Chiang  <sh.chiang04@gmail.com>
15110             Chung-Ju Wu  <jasonwucj@gmail.com>
15112         * config/nds32/constants.md (unspec_element): New enum.
15113         * config/nds32/constraints.md (Umw): New constraint.
15114         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15115         * config/nds32/nds32-intrinsic.md: Likewise.
15116         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15117         (nds32_valid_smw_lwm_base_p): New.
15118         (nds32_output_smw_single_word): New.
15119         (nds32_output_lmw_single_word): New.
15120         (nds32_expand_unaligned_load): New.
15121         (nds32_expand_unaligned_store): New.
15122         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15123         (nds32_output_smw_single_word): Declare.
15124         (nds32_output_lmw_single_word): Declare.
15125         (nds32_expand_unaligned_load): Declare.
15126         (nds32_expand_unaligned_store): Declare.
15127         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15128         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15129         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15130         NDS32_BUILTIN_UASTORE_DW.
15131         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15132         predicate.
15134 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15135             Kito Cheng  <kito.cheng@gmail.com>
15136             Chung-Ju Wu  <jasonwucj@gmail.com>
15138         * config/nds32/nds32-intrinsic.c
15139         (nds32_expand_builtin_null_ftype_reg): Delete.
15140         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15141         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15142         (nds32_read_argument): New.
15143         (nds32_legitimize_target): Ditto.
15144         (nds32_legitimize_argument): Ditto.
15145         (nds32_check_constant_argument): Ditto.
15146         (nds32_expand_unop_builtin): Ditto.
15147         (nds32_expand_unopimm_builtin): Ditto.
15148         (nds32_expand_binop_builtin): Ditto.
15149         (nds32_builtin_decl_impl): Ditto.
15150         (builtin_description): Ditto.
15151         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15152         (nds32_init_builtins_impl): Ditto.
15153         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15154         (nds32_builtin_decl): New.
15155         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15156         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15158 2018-03-02  Jeff Law  <law@redhat.com>
15160         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15161         (redundant_insn, fill_simple_delay_slots): Likewise.
15162         (fill_slots_from_thread): Likewise.
15163         * resource.c (mark_referenced_resources): Likewise.
15164         (mark_set_resources, find_dead_or_set_registers): Likewise.
15166 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15168         * substring-locations.h (format_warning_va): Formatting fix for
15169         ATTRIBUTE_GCC_DIAG.
15170         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15171         argument.
15172         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15173         * substring-locations.c: Include intl.h.
15174         (format_warning_va): Turned into small wrapper around
15175         format_warning_n_va, renamed to ...
15176         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15177         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15178         use ngettext.
15179         (format_warning_at_substring_n): New function.
15180         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15181         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15182         format_warning_at_substring with just a shorter name instead of
15183         const function pointer.
15184         (fmtwarn_n): New function.
15185         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15186         appropriate, get rid of all the fmtstr temporaries, move conditionals
15187         with G_() wrapped string literals directly into fmtwarn arguments,
15188         cast dir.len to (int), formatting fixes.
15190 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15192         * doc/invoke.texi: Remove "Cilk Plus" references.
15194 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15195             Richard Biener  <rguenther@suse.de>
15197         PR ipa/84628
15198         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15199         for error or warning attributes if CALL_FROM_THUNK_P is set.
15200         Formatting fixes.
15202 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15204         PR target/56540
15205         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15206         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15208         PR target/56540
15209         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15210         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15212         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15213         instead of -1U in last predictors element's probability member.
15215 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15217         PR ipa/83983
15218         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15219         arguments if they are comparable.
15221 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15223         PR tree-optimization/84634
15224         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15225         masks and masked_loop_p with a single loop_masks, making sure it's
15226         null for bb vectorization.
15228 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15230         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15231         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15232         loop->force_vectorize to check whether there is no alias.
15234 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15236         PR target/84614
15237         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15238         prototypes.
15239         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15240         comments.
15241         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15242         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15243         instead of a loop around prev_real_insn.
15244         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15245         prev_real_insn.
15247         PR inline-asm/84625
15248         * config/i386/i386.c (ix86_print_operand): Use conditional
15249         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15250         zero vector.
15252 2018-03-02  Richard Biener  <rguenther@suse.de>
15254         PR tree-optimization/84427
15255         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15256         (bitmap_set_subtract_values): Rewrite to handle multiple
15257         exprs per value.
15258         (clean): Likewise.
15259         (prune_clobbered_mems): Likewise.
15260         (phi_translate): Take edge instead of pred/phiblock.
15261         (phi_translate_1): Likewise.
15262         (phi_translate_set): Likewise.  Insert all translated
15263         exprs for a value into the set, keeping possibly multiple
15264         expressions per value.
15265         (compute_antic_aux): Adjust for phi_translate changes.
15266         When intersecting union the expressions and prune those
15267         not in the final value set, keeping possibly multiple
15268         expressions per value.  Do not use value-insertion
15269         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15270         all expressions.  Add verification that the value-sets
15271         only shrink during iteration.
15272         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15273         (do_pre_regular_insertion): Likewise.
15274         (do_pre_partial_partial_insertion): Likewise.
15276 2018-03-02  Richard Biener  <rguenther@suse.de>
15278         PR target/82005
15279         * config/darwin.c (saved_debug_info_level): New static global.
15280         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15281         (darwin_asm_lto_end): Restore debug info generation settings.
15283 2018-03-01  Martin Liska  <mliska@suse.cz>
15285         PR sanitizer/82484
15286         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15287         volatile arguments.
15289 2018-03-01  Richard Biener  <rguenther@suse.de>
15291         PR debug/84645
15292         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15293         type annotation with LTO when debug was disabled at compile-time.
15295 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15297         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15298         XINT with INTVAL.
15299         (mips_final_postscan_insn): Likewise.
15301 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15303         PR rtl-optimization/84528
15304         * alias.c (init_alias_target): Add commentary.
15305         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15306         a unique base value if the frame pointer is not eliminated
15307         to the stack pointer.
15309 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15311         PR rtl-optimization/83327
15312         * lra-int.h (hard_regs_spilled_into): Declare.
15313         * lra.c (hard_regs_spilled_into): Define.
15314         (init_reg_info): Init hard_regs_spilled_into.
15315         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15316         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15317         (process_bb_lives): Handle hard_regs_spilled_into.
15318         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15319         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15321 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15323         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15324         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15325         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15326         * config/rs6000/aix72.h: New file.
15328 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15330         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15331         instead of warning_at with conditional singular and plural messages
15332         where possible.
15334         PR target/52991
15335         * stor-layout.c (update_alignment_for_field): For
15336         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15337         && !DECL_PACKED (field), do the alignment update, just use
15338         only desired_align instead of MAX (type_align, desired_align)
15339         as the alignment.
15340         (place_field): Don't do known_align < desired_align handling
15341         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15342         is non-NULL, instead do it after rli->prev_field handling and
15343         only if not within a bitfield word.  For DECL_PACKED (field)
15344         use type_align of BITS_PER_UNIT.
15346 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15348         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15349         superfluous parentheses and trailing spaces.
15351 2018-02-28  Richard Biener  <rguenther@suse.de>
15353         PR tree-optimization/84584
15354         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15355         SCoPs with fake exit edge.
15357 2018-02-28  Martin Liska  <mliska@suse.cz>
15359         PR testsuite/84597
15360         * timevar.c (timer::print): Fix format to properly print 100%
15361         values.
15363 2018-02-28  Richard Biener  <rguenther@suse.de>
15365         PR middle-end/84607
15366         * genmatch.c (capture_info::walk_match): Do not mark
15367         captured expressions without operands as expr_p given
15368         they act more like predicates and should be subject to
15369         "lost tail" side-effect preserving.
15371 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15373         PR rtl-optimization/81611
15374         * auto-inc-dec.c (attempt_change): Move dead note from
15375         mem_insn if it's the next use of regno
15376         (find_address): Take address use of reg holding
15377         non-incremented value.  Add parm to limit search to the named
15378         reg only.
15379         (merge_in_block): Attempt to use a mem insn that is the next
15380         use of the original regno.
15382 2018-02-27  Martin Sebor  <msebor@redhat.com>
15384         PR c++/83871
15385         * doc/invoke.texi (-Wmissing-attributes): New option.
15386         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15388 2018-02-27  Martin Sebor  <msebor@redhat.com>
15390         PR translation/84207
15391         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15392         n argument to unsigned HOST_WIDE_INT.
15393         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15394         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15395         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15396         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15398 2018-02-27  Richard Biener  <rguenther@suse.de>
15400         PR tree-optimization/84512
15401         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15402         Do not use the estimate returned from record_stmt_cost for
15403         the scalar iteration cost but sum properly using add_stmt_cost.
15405 2018-02-27  Richard Biener  <rguenther@suse.de>
15407         PR tree-optimization/84466
15408         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15409         Adjust last change to less strictly validate use operands.
15411 2018-02-27  Martin Liska  <mliska@suse.cz>
15413         PR gcov-profile/84548
15414         * gcov.c (process_file): Allow partial overlap and consider it
15415         also as group functions.
15416         (output_lines): Properly calculate range of lines for a group.
15418 2018-02-27  Martin Liska  <mliska@suse.cz>
15420         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15421         'ggc' suffixes.  Change first column width.
15422         (timer::print): Fix formatting of the column.
15424 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15426         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15427         preserve inline entry blocks for the sake of debug inline
15428         entry point markers alone.
15429         (remove_unused_locals): Suggest in comments a better place to
15430         force the preservation of inline entry blocks that are
15431         otherwise unused, but do not preserve them.
15433 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15435         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15437 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15439         PR target/84039
15440         * config/i386/constraints.md (Bs): Replace
15441         ix86_indirect_branch_register with
15442         TARGET_INDIRECT_BRANCH_REGISTER.
15443         (Bw): Likewise.
15444         * config/i386/i386.md (indirect_jump): Likewise.
15445         (tablejump): Likewise.
15446         (*sibcall_memory): Likewise.
15447         (*sibcall_value_memory): Likewise.
15448         Peepholes of indirect call and jump via memory: Likewise.
15449         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15450         (*sibcall_value_GOT_32): Likewise.
15451         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15452         (GOT_memory_operand): Likewise.
15453         (call_insn_operand): Likewise.
15454         (sibcall_insn_operand): Likewise.
15455         (GOT32_symbol_operand): Likewise.
15456         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15458 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15460         PR rtl-optimization/83496
15461         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15462         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15463         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15464         redundant insn, if any.
15465         (relax_delay_slots): Likewise.
15466         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15468 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15470         PR tree-optimization/83965
15471         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15472         that grouped statements are part of a reduction chain.  Return
15473         true if the statement is not marked as a reduction itself but
15474         is part of a group.
15475         (vect_recog_dot_prod_pattern): Don't check whether the statement
15476         is part of a group here.
15477         (vect_recog_sad_pattern): Likewise.
15478         (vect_recog_widen_sum_pattern): Likewise.
15480 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15482         PR debug/84545
15483         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15485 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15487         PR target/84530
15488         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15489         the bool argument.
15490         (ix86_output_indirect_function_return): New prototype.
15491         (ix86_split_simple_return_pop_internal): Likewise.
15492         * config/i386/i386.c (indirect_return_via_cx): New.
15493         (indirect_return_via_cx_bnd): Likewise.
15494         (indirect_thunk_name): Handle return va CX_REG.
15495         (output_indirect_thunk_function): Create alias for
15496         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15497         (ix86_output_indirect_jmp): Remove the bool argument.
15498         (ix86_output_indirect_function_return): New function.
15499         (ix86_split_simple_return_pop_internal): Likewise.
15500         * config/i386/i386.md (*indirect_jump): Don't pass false
15501         to ix86_output_indirect_jmp.
15502         (*tablejump_1): Likewise.
15503         (simple_return_pop_internal): Change it to define_insn_and_split.
15504         Call ix86_split_simple_return_pop_internal to split it for
15505         -mfunction-return=.
15506         (simple_return_indirect_internal): Call
15507         ix86_output_indirect_function_return instead of
15508         ix86_output_indirect_jmp.
15510 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15512         PR bootstrap/84405
15513         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15514         memset and value initialization afterwards.
15516 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15518         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15520 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15522         PR target/84521
15523         * common/config/aarch64/aarch64-common.c
15524         (aarch_option_optimization_table[]): Switch
15525         off fomit-frame-pointer
15527 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15528             Chung-Ju Wu  <jasonwucj@gmail.com>
15530         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15531         volatile memory.
15532         (store_multiple): Ditto.
15534 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15536         * config.gcc: Add --with-cpu support for nds32 target.
15537         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15538         * config/nds32/nds32.opt: Add -mcpu= option.
15540 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15542         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15543         isel=yes): Warn for these deprecated options.
15545 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15547         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15548         ISA_2_5_MASKS_EMBEDDED.
15550 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15552         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15553         p->max as pointers rather than using iterative_hash_expr.
15555 2018-02-23  Carl Love  <cel@us.ibm.com>
15557         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15558         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15559         BU_P8V_OVERLOAD_2.
15560         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15561         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15562         P8V_BUILTIN_VEC_VUNSIGNED2.
15564 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15566         PR target/81572
15567         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15568         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15569         LRA_UNKNOWN_ALT.
15570         * lra-constraints.c (curr_insn_transform): Set up
15571         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15572         LRA_UNKNOWN_ALT.
15573         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15574         * lra-eliminations.c (spill_pseudos): Ditto.
15575         (process_insn_for_elimination): Ditto.
15576         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15577         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15578         LRA_NON_CLOBBERED_ALT.
15580 2018-02-22  Martin Sebor  <msebor@redhat.com>
15582         PR tree-optimization/84480
15583         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15584         to maybe_diag_stxncpy_trunc.  Call it.
15585         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15586         from gimple_fold_builtin_strcpy.  Print inlining stack.
15587         (handle_builtin_stxncpy): Print inlining stack.
15588         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15590 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15592         PR target/84176
15593         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15594         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15595         and -fcheck-pointer-bounds are used together.
15596         (indirect_thunk_prefix): New enum.
15597         (indirect_thunk_need_prefix): New function.
15598         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15599         "_nt" instead of "_bnd" for NOTRACK prefix.
15600         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15601         (output_indirect_thunk_function): Likewise.
15602         (): Likewise.
15603         (ix86_code_end): Update output_indirect_thunk_function calls.
15604         (ix86_output_indirect_branch_via_reg): Replace
15605         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15606         (ix86_output_indirect_branch_via_push): Likewise.
15607         (ix86_output_function_return): Likewise.
15608         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15609         incompatible with -fcf-protection=branch and
15610         -fcheck-pointer-bounds.
15612 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15614         PR target/83335
15615         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15616         Change gcc_assert call to output_operand_lossage.
15618 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15620         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15622 2018-02-22  DJ Delorie  <dj@redhat.com>
15623             Sebastian Perta  <sebastian.perta@renesas.com>
15624             Oleg Endo  <olegendo@gcc.gnu.org>
15626         * config/rx/rx.c (rx_rtx_costs): New function.
15627         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15629 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15631         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15633 2018-02-22  Martin Liska  <mliska@suse.cz>
15635         PR driver/83193
15636         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15637         Add "native" as a possible value.
15639 2018-02-22  Martin Liska  <mliska@suse.cz>
15641         PR driver/83193
15642         * config/i386/i386.c (ix86_option_override_internal):
15643         Add "native" as a possible value for -march and -mtune.
15645 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15647         PR target/84502
15648         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15649         to all type variants.
15651         PR tree-optimization/84503
15652         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15653         width as info->bitpos + info->bitsize - start.
15654         (merged_store_group::merge_overlapping): Simplify width computation.
15655         (check_no_overlap): New function.
15656         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15657         start + width and last_order of the group, fail if check_no_overlap
15658         fails.
15659         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15660         to group if check_no_overlap fails.
15662 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15664         * config/rs6000/altivec.md: Delete contraint arguments to
15665         define_expand, define_split, and define_peephole2, and in
15666         define_insn_and_split if always unused.
15667         * config/rs6000/darwin.md: Ditto.
15668         * config/rs6000/dfp.md: Ditto.
15669         * config/rs6000/rs6000.md: Ditto.
15670         * config/rs6000/sync.md: Ditto.
15671         * config/rs6000/vector.md: Ditto.
15672         * config/rs6000/vsx.md: Ditto.
15674 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15676         * config/rs6000/altivec.md: Write output control strings as braced
15677         blocks instead of double-quoted strings.
15678         * config/rs6000/darwin.md: Ditto.
15679         * config/rs6000/rs6000.md: Ditto.
15680         * config/rs6000/vector.md: Ditto.
15681         * config/rs6000/vsx.md: Ditto.
15683 2018-02-21  Jason Merrill  <jason@redhat.com>
15685         PR c++/84314 - ICE with templates and fastcall attribute.
15686         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15688 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15690         * ipa-cp.c (determine_versionability): Fix comment typos.
15692 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15694         PR c/84229
15695         * ipa-cp.c (determine_versionability): Do not version functions caling
15696         va_arg_pack.
15698 2018-02-21  Martin Liska  <mliska@suse.cz>
15700         PR driver/83193
15701         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15702         Add "native" as a possible value.
15703         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15704         the macro when native cpu detection is available.
15706 2018-02-21  Martin Liska  <mliska@suse.cz>
15708         PR driver/83193
15709         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15710         Add "native" as a possible value.
15711         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15712         when native cpu detection is available.
15714 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15715             Martin Sebor  <msebor@redhat.com>
15717         PR tree-optimization/84478
15718         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15719         false.
15720         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15721         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15722         support which is conservatively correct, for 2 only stay conservative
15723         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15724         argument to the 2 argument get_range_strlen, adjust 6 arg
15725         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15726         false.
15727         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15728         (gimple_fold_builtin_strlen): Pass true as last argument to
15729         get_range_strlen.
15731 2018-02-20  Martin Sebor  <msebor@redhat.com>
15733         PR middle-end/84095
15734         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15735         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15736         (builtin_memref::builtin_memref): Factor out parts into
15737         set_base_and_offset and call it.
15739 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15741         PR middle-end/84406
15742         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15743         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15744         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15745         search at the associated MODE_INT.
15747 2018-02-20  Jeff Law  <law@redhat.com>
15749         PR middle-end/82123
15750         PR tree-optimization/81592
15751         PR middle-end/79257
15752         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15753         for range data rather than using global data.
15754         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15755         range data rather than using global data.
15756         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15757         pass it to children as needed.
15758         (struct directive::fmtresult): Similarly.
15759         (struct directive::set_width): Similarly.
15760         (struct directive::set_precision): Similarly.
15761         (format_integer, format_directive, parse_directive): Similarly.
15762         (format_none): Accept unnamed vr_values parameter.
15763         (format_percent, format_floating, format_character): Similarly.
15764         (format_string, format_plain): Similarly.
15765         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15766         the EVRP range analyzer for range data rather than using global data.
15767         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15768         gimple-ssa-evrp-analyze.h
15769         (class sprintf_dom_walker): Add after_dom_children member function.
15770         Add evrp_range_analyzer member.
15771         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15772         range analyzer as needed.
15773         (sprintf_dom_walker::after_dom_children): New member function.
15774         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15775         if not optimizing.
15776         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15777         (evrp_range_analyzer::pop_to_marker): Likewise.
15779 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15781         PR tree-optimization/84419
15782         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15783         with the required type if its current type is compatible but
15784         different.
15786 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15788         PR middle-end/82004
15789         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15790         after vectorization.
15792 2018-02-20  Martin Liska  <mliska@suse.cz>
15794         PR driver/83193
15795         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15796         possible values if we don't have a hint.
15798 2018-02-20  Martin Liska  <mliska@suse.cz>
15800         PR c/84310
15801         PR target/79747
15802         * final.c (shorten_branches): Build align_tab array with one
15803         more element.
15804         * opts.c (finish_options): Add alignment option limit check.
15805         (MAX_CODE_ALIGN): Likewise.
15806         (MAX_CODE_ALIGN_VALUE): Likewise.
15807         * doc/invoke.texi: Document maximum allowed option value for
15808         all -falign-* options.
15810 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15812         PR target/84146
15813         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15814         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15815         * var-tracking.c (emit_note_insn_var_location): Remove all references
15816         to NOTE_INSN_CALL_ARG_LOCATION.
15817         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15818         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15819         Use copy_rtx_if_shared.
15820         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15821         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15822         (dwarf2out_var_location): Remove handling of
15823         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15824         on call_insn.
15825         * final.c (final_scan_insn): Remove all references to
15826         NOTE_INSN_CALL_ARG_LOCATION.
15827         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15828         before dumping final insns.
15829         * except.c (emit_note_eh_region_end): Remove all references to
15830         NOTE_INSN_CALL_ARG_LOCATION.
15831         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15832         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15833         * config/arc/arc.c (hwloop_optimize): Likewise.
15834         * config/arm/arm.c (create_fix_barrier): Likewise.
15835         * config/s390/s390.c (s390_chunkify_start): Likewise.
15836         * config/sh/sh.c (find_barrier): Likewise.
15837         * config/i386/i386.c (rest_of_insert_endbranch,
15838         ix86_seh_fixup_eh_fallthru): Likewise.
15839         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15840         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15841         * config/frv/frv.c (frv_function_prologue): Likewise.
15842         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15843         reg note.
15844         (note_outside_basic_block_p): Remove all references to
15845         NOTE_INSN_CALL_ARG_LOCATION.
15846         * gengtype.c (adjust_field_rtx_def): Likewise.
15847         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15848         Likewise.
15849         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15850         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15852         PR c++/84444
15853         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15854         is ADDR_EXPR.
15856         PR tree-optimization/84452
15857         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15858         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15859         is NULL.
15861 2018-02-19  Martin Liska  <mliska@suse.cz>
15863         PR sanitizer/82183
15864         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15866 2018-02-19  Martin Liska  <mliska@suse.cz>
15867             Richard Sandiford  <richard.sandiford@linaro.org>
15869         PR tree-optimization/82491
15870         * gimple-fold.c (get_base_constructor): Make earlier bail out
15871         to prevent ubsan.
15873 2018-02-19  Carl Love  <cel@us.ibm.com>
15875         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15876         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15877         BU_P8V_OVERLOAD_1.
15878         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15879         P8V_BUILTIN_VEC_NEG.
15881 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
15883         * config/rl78/rl78.md (movdf): New define expand.
15885 2018-02-19  Martin Liska  <mliska@suse.cz>
15887         PR other/80589
15888         * doc/invoke.texi: Fix typo.
15889         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15891 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
15893         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15894         handle rs6000_single_float and rs6000_double_float specially for
15895         e500 family CPUs.
15897 2018-02-16  Jeff Law  <law@redhat.com>
15899         * config/rx/rx.c (add_pop_cfi_notes): New function.;
15900         (pop_regs): Use it.
15902 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15904         PR ipa/84425
15905         * ipa-inline.c (inline_small_functions): Fix a typo.
15907 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15909         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15911 2018-02-16  Carl Love  <cel@us.ibm.com>
15913         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15914         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15915         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15916         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15917         expansion to P8V_BUILTIN_VEC_FLOAT2.
15919 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
15921         PR rtl-optimization/70023
15922         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15923         src_regno into account.
15925 2018-02-16  Carl Love  <cel@us.ibm.com>
15927         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15928         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15929         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15930         * config/rs6000/rs6000.c: Remove case statements for
15931         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15932         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15933         and P9V_BUILTIN_VEC_VINSERT4B.
15934         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15935         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15936         * config/rs6000/vsx.md:
15937         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15938         vec_insert4b.
15940 2018-02-16  Carl Love  <cel@us.ibm.com>
15942         * config/rs6000/altivec.h: Add builtin names vec_extract4b
15943         vec_insert4b.
15944         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15945         definitions.
15946         * config/rs6000/rs6000-c.c: Add the definitions for
15947         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15948         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15949         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15950         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
15951         definition for insert4b and define insn *insert3b_internal.
15952         * doc/extend.texi: Add documentation for vec_extract4b.
15954 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15956         * doc/extend.texi (Backwards Compatibility): Mention friend
15957         injection.  Note for-scope is deprecated.
15958         * doc/invoke.texi (-ffriend-injection): Deprecate.
15960 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
15962         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15963         that moved to I2, also allow destinations that are a paradoxical
15964         subreg (instead of a normal reg).
15966 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
15968         PR target/83831
15969         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15970         to QImode.
15972 2018-02-16  Richard Biener  <rguenther@suse.de>
15974         PR tree-optimization/84037
15975         PR tree-optimization/84016
15976         PR target/82862
15977         * config/i386/i386.c (ix86_builtin_vectorization_cost):
15978         Adjust vec_construct for the fact we need additional higher latency
15979         128bit inserts for AVX256 and AVX512 vector builds.
15980         (ix86_add_stmt_cost): Scale vector construction cost for
15981         elementwise loads.
15983 2018-02-16  Richard Biener  <rguenther@suse.de>
15985         PR tree-optimization/84417
15986         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15987         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15988         (non_rewritable_lvalue_p): Likewise, use poly-ints.
15990 2018-02-16  Martin Liska  <mliska@suse.cz>
15992         PR sanitizer/84307
15993         * internal-fn.def (ASAN_CHECK): Set proper flags.
15994         (ASAN_MARK): Likewise.
15996 2018-02-16  Julia Koval  <julia.koval@intel.com>
15998         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15999         from PTA_CANNONLAKE.
16001 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16003         PR target/84272
16004         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16005         Use ++iter rather than iter++ for std::list iterators.
16006         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16007         defer deleting them until all nodes in the forest are processed.  Do
16008         free even leaf nodes.  Change to_process into auto_vec.
16010         PR bootstrap/84405
16011         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16012         * vec.h (vec_default_construct): Use memset instead of placement new
16013         if BROKEN_VALUE_INITIALIZATION is defined.
16014         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16015         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16016         is defined.
16018         PR rtl-optimization/83723
16019         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16020         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16021         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16022         recursive calls.
16023         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16024         callers.
16025         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16027 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16029         PR rtl-optimization/81443
16030         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16031         from inner REGs to paradoxical SUBREGs.
16033 2018-02-16  Richard Biener  <rguenther@suse.de>
16035         PR tree-optimization/84399
16036         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16037         For operands we can analyze at their definition make sure we can
16038         analyze them at each use as well.
16040 2018-02-16  Richard Biener  <rguenther@suse.de>
16042         PR tree-optimization/84190
16043         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16044         volatile accesses if the decl isn't volatile.
16046 2018-02-15  Jason Merrill  <jason@redhat.com>
16048         PR c++/84314 - ICE with templates and fastcall attribute.
16049         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16050         TYPE_CANONICAL on an existing type.
16052 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16054         PR tree-optimization/84383
16055         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16056         dstoff nor call operand_equal_p if dstbase is NULL.
16058         PR tree-optimization/84334
16059         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16060         also a CONSTANT_CLASS_P, punt.
16062 2018-02-14  Jim Wilson  <jimw@sifive.com>
16064         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16065         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16066         to where locals are set.  Add TARGET_RVC support.
16067         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16069 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16071         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16073 2018-02-14  Martin Sebor  <msebor@redhat.com>
16075         PR tree-optimization/83698
16076         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16077         arrays constrain the offset range to their bounds.
16078         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16079         (builtin_access::overlap): Avoid setting the size of overlap if it's
16080         already been set.
16081         (maybe_diag_overlap): Also consider arrays when deciding what values
16082         of offsets to include in diagnostics.
16084 2018-02-14  Martin Sebor  <msebor@redhat.com>
16086         PR c/84108
16087         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16088         that correspond to the kind of a declaration.
16090 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16092         PR target/83984
16093         * config/pa/pa.md: Load address of PIC label using the linkage table
16094         if the label is nonlocal.
16096 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16098         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16099         warning message if user requests -maltivec=be.
16100         * doc/invoke.texi: Document deprecation of -maltivec=be.
16102 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16104         PR target/84220
16105         * config/rs6000/rs6000-c.c: Update definitions for
16106         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16107         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16109 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16111         PR target/84239
16112         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16113         add _get_ssp intrinsics. Remove argument from
16114         __builtin_ia32_rdssp[d|q].
16115         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16116         * config/i386/i386-builtin.def: Remove argument from
16117         __builtin_ia32_rdssp[d|q].
16118         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16119         ix86_expand_special_args_builtin for _rdssp[d|q].
16120         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16121         Clear register before usage.
16122         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16123         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16125 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16127         PR tree-optimization/84357
16128         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16129         operand 1 of an ARRAY_REF too.
16131 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16133         PR target/83831
16134         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16135         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16136         declarations.
16137         (set_of_reg): New struct.
16138         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16139         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16140         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16141         functions.
16142         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16143         Split into bitclr, bitset, bitinvert patterns if appropriate.
16144         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16145         use rx_fuse_in_memory_bitop.
16146         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16147         to named insn, correct maximum insn length.
16149 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16151         PR target/79242
16152         * machmode.def: Define a complex mode for PARTIAL_INT.
16153         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16154         MODE_PARTIAL_INT.
16155         * doc/rtl.texi: Document CSPImode.
16156         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16157         handling.
16158         (msp430_hard_regno_nregs_with_padding): Likewise.
16160 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16162         PR target/84279
16163         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16165 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16167         PR rtl-optimization/84169
16168         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16169         we generated a parallel as new i3 and we split that to new i2 and i3
16170         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16171         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16172         those to i2, not i1.  Partially rewrite this scan code.
16174 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16176         PR c/82210
16177         * stor-layout.c (place_field): For variable length fields, adjust
16178         offset_align afterwards not just based on the field's alignment,
16179         but also on the size.
16181         PR middle-end/84309
16182         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16183         of exps and logs in the use_exp2 case.
16185 2018-02-13  Jeff Law  <law@redhat.com>
16187         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16188         entry for "vector".
16190         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16191         ARGS as unused.
16193 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16195         PR debug/84342
16196         PR debug/84319
16197         * common.opt (gas-loc-support, gas-locview-support): New.
16198         (ginline-points, ginternal-reset-location-views): New.
16199         * doc/invoke.texi: Document them.  Use @itemx where intended.
16200         (gvariable-location-views): Adjust.
16201         * target.def (reset_location_view): New.
16202         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16203         (TARGET_RESET_LOCATION_VIEW): New.
16204         * doc/tm.texi: Rebuilt.
16205         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16206         (dwarf2out_default_as_locview_support): New.
16207         (output_asm_line_debug_info): Use option variables.
16208         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16209         (output_loc_list): Likewise.
16210         (add_high_low_attributes): Check option variables.
16211         Don't output entry view attribute in strict mode.
16212         (gen_inlined_subroutine_die): Check option variables.
16213         (dwarf2out_inline_entry): Likewise.
16214         (init_sections_and_labels): Likewise.
16215         (dwarf2out_early_finish): Likewise.
16216         (maybe_reset_location_view): New, from...
16217         (dwarf2out_var_location): ... here.  Call it.
16218         * debug.h (dwarf2out_default_as_loc_support): Declare.
16219         (dwarf2out_default_as_locview_support): Declare.
16220         * hooks.c (hook_int_rtx_insn_0): New.
16221         * hooks.h (hook_int_rtx_insn_0): Declare.
16222         * toplev.c (process_options): Take -gas-loc-support and
16223         -gas-locview-support from dwarf2out.  Enable
16224         -gvariable-location-views by default only with locview
16225         assembler support.  Enable -ginternal-reset-location-views by
16226         default only if the target defines the corresponding hook.
16227         Enable -ginline-points by default if location views are
16228         enabled; force it disabled if statement frontiers are
16229         disabled.
16230         * tree-inline.c (expand_call_inline): Check option variables.
16231         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16233 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16235         PR tree-optimization/84321
16236         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16237         handling.  Also check whether the anti-range contains any values
16238         that satisfy the mask; switch to a VR_RANGE if not.
16240 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16242         PR sanitizer/84340
16243         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16245 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16247         PR c++/83990
16248         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16249         of call statements, also set location of a load to a temporary.
16251 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16253         * config/rl78/rl78.c (add_vector_labels): New function.
16254         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16255         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16256         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16257         which checks that no arguments are passed.
16258         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16259         * doc/extend.texi: Documentation for the new attribute.
16261 2018-02-13  Andreas Schwab  <schwab@suse.de>
16263         * config/riscv/linux.h (CPP_SPEC): Define.
16265 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16267         PR target/84335
16268         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16269         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16270         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16271         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16272         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16273         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16274         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16275         temporarily for AES and PCLMUL builtins.
16277         PR tree-optimization/84339
16278         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16279         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16280         Formatting fixes.
16282         PR middle-end/84309
16283         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16284         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16285         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16286         inline function.
16287         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16288         inline function.
16289         * omp-simd-clone.h: New file.
16290         * omp-simd-clone.c: Include omp-simd-clone.h.
16291         (expand_simd_clones): No longer static.
16292         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16293         cgraph.h and omp-simd-clone.h.
16294         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16295         (vect_recog_widen_shift_pattern): Formatting fix.
16296         (vect_pattern_recog_1): Don't check optab for calls.
16298         PR target/84336
16299         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16300         operands[2] into a REG before using gen_lowpart on it.
16302 2018-02-12  Jeff Law  <law@redhat.com>
16304         PR target/83760
16305         * config/sh/sh.c (find_barrier): Consider a sibling call
16306         a barrier as well.
16308         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16309         successfully back substituting a reg.
16311 2018-02-12  Richard Biener  <rguenther@suse.de>
16313         PR tree-optimization/84037
16314         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16315         parameter, move visited init to caller.
16316         (vect_slp_analyze_operations): Separate cost from validity
16317         check, initialize visited once for all instances.
16318         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16319         for all instances.
16320         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16321         out an assert.
16322         (vect_model_promotion_demotion_cost): Likewise.
16323         (vectorizable_bswap): Guard cost modeling with !slp_node
16324         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16325         SLP stmts.
16326         (vectorizable_call): Likewise.
16327         (vectorizable_conversion): Likewise.
16328         (vectorizable_assignment): Likewise.
16329         (vectorizable_shift): Likewise.
16330         (vectorizable_operation): Likewise.
16331         (vectorizable_store): Likewise.
16332         (vectorizable_load): Likewise.
16333         (vectorizable_condition): Likewise.
16334         (vectorizable_comparison): Likewise.
16336 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16338         PR sanitizer/84307
16339         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16340         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16341         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16343 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16345         PR middle-end/83665
16346         * params.def (inline-min-speedup): Increase from 8 to 15.
16347         (max-inline-insns-auto): Decrease from 40 to 30.
16348         * ipa-split.c (consider_split): Add some buffer for function to
16349         be considered inlining candidate.
16350         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16351         default values.
16353 2018-02-12  Richard Biener  <rguenther@suse.de>
16355         PR tree-optimization/84037
16356         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16357         matched stmts if we cannot swap the non-matched ones.
16359 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16361         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16362         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16363         _mm_maskz_scalef_round_ss): New intrinsics.
16364         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16365         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16366         __builtin_ia32_scalefss_round): Remove.
16367         (__builtin_ia32_scalefsd_mask_round,
16368         __builtin_ia32_scalefss_mask_round): New intrinsics.
16369         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16370         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16371         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16372         "<round_constraint>")): Changed to ...
16373         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16374         "<round_scalar_constraint>")): ... this.
16375         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16376         %0, %1, %2<round_op3>}"): Changed to ...
16377         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16378         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16379         %2<round_scalar_mask_op3>}"): ... this.
16380         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16382 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16384         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16385         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16386         (_mm_maskz_sqrt_round_ss): New intrinsics.
16387         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16388         (__builtin_ia32_sqrtsd_mask_round)
16389         (__builtin_ia32_sqrtss_mask_round): New builtins.
16390         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16391         (__builtin_ia32_sqrtss_round): Remove.
16392         (__builtin_ia32_sqrtsd_mask_round)
16393         (__builtin_ia32_sqrtss_mask_round): New builtins.
16394         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16395         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16396         ((match_operand:VF_128 1 "vector_operand"
16397         "xBm,<round_constraint>")): Changed to ...
16398         ((match_operand:VF_128 1 "vector_operand"
16399         "xBm,<round_scalar_constraint>")): ... this.
16400         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16401         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16402         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16403         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16404         %<iptr>1<round_scalar_mask_op3>}): ... this.
16405         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16406         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16408 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16410         PR target/84266
16411         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16412         Cast vec_cmpeq result to correct type.
16413         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16414         Cast vec_cmpgt result to correct type.
16416 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16418         * final.c (final_scan_insn_1): Renamed from...
16419         (final_scan_insn): ... this.  New wrapper, to recover
16420         seen from the outermost call in recursive ones.
16421         * config/sparc/sparc.c (output_return): Drop seen from call.
16422         (output_sibcall): Likewise.
16423         * config/visium/visium.c (output_branch): Likewise.
16425 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16427         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16428         function label.
16430 2018-02-10  Alan Modra  <amodra@gmail.com>
16432         PR target/84300
16433         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16434         Specify LR as an input.
16436 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16438         PR sanitizer/83987
16439         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16440         remove_member_access_dummy_vars): New functions.
16441         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16442         lower_omp_1, execute_lower_omp): Use them.
16444         PR rtl-optimization/84308
16445         * shrink-wrap.c (spread_components): Release todo vector.
16447 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16449         PR rtl-optimization/57193
16450         * ira-color.c (struct allocno_color_data): Add member
16451         conflict_allocno_hard_prefs.
16452         (update_conflict_allocno_hard_prefs): New.
16453         (bucket_allocno_compare_func): Add a preference based on
16454         conflict_allocno_hard_prefs.
16455         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16456         (color_allocnos): Remove a dead code.  Initiate
16457         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16459 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16461         PR target/84226
16462         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16463         constraint from =wa to wa.  Avoid a subreg on the output operand,
16464         instead use a pseudo and subreg it in a move.
16465         (p9_xxbrd_<mode>): Changed to ...
16466         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16467         (p9_xxbrd_v2df): New expander.
16468         (p9_xxbrw_<mode>): Changed to ...
16469         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16470         (p9_xxbrw_v4sf): New expander.
16472 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16474         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16476 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16478         PR target/83926
16479         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16480         multiply in 32-bit mode.
16481         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16482         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16483         mode.
16485 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16487         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16488         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16489         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16490         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16492 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16494         PR lto/84213
16495         * dwarf2out.c (is_trivial_indirect_ref): New function.
16496         (dwarf2out_late_global_decl): Do not generate a location
16497         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16498         and that are not defined in the current unit.
16500 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16502         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16503         instead of a libcall for UNORDERED.
16505 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16507         PR target/82641
16508         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16509         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16511 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16513         PR target/PR84295
16514         * config/s390/s390.c (s390_set_current_function): Invoke
16515         s390_indirect_branch_settings also if fndecl didn't change.
16517 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16519         * config/rs6000/rs6000.md (blockage): Set length to zero.
16521 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16523         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16525 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16527         PR sanitizer/84285
16528         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16529         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16530         -static-lib*san.
16532         PR debug/84252
16533         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16534         PARALLEL incoming that failed vt_get_decl_and_offset check.
16536         PR middle-end/84237
16537         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16538         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16539         TREE_READONLY bit.
16540         (get_variable_section): For decls in named .bss* sections pass true as
16541         second argument to bss_initializer_p.
16543 2018-02-09  Marek Polacek  <polacek@redhat.com>
16544             Jakub Jelinek  <jakub@redhat.com>
16546         PR c++/83659
16547         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16548         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16549         Sync some changes from cxx_fold_indirect_ref.
16551 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16553         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16554         markers.
16555         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16556         (BLOCK_INLINE_ENTRY_LABEL): New.
16557         (dwarf2out_var_location): Disregard inline entry markers.
16558         (inline_entry_data): New struct.
16559         (inline_entry_data_hasher): New hashtable type.
16560         (inline_entry_data_hasher::hash): New.
16561         (inline_entry_data_hasher::equal): New.
16562         (inline_entry_data_table): New variable.
16563         (add_high_low_attributes): Add DW_AT_entry_pc and
16564         DW_AT_GNU_entry_view attributes if a pending entry is found
16565         in inline_entry_data_table.  Add old entry_pc attribute only
16566         if debug nonbinding markers are disabled.
16567         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16568         markers are enabled.
16569         (block_within_block_p, dwarf2out_inline_entry): New.
16570         (dwarf2out_finish): Check that no entries remained in
16571         inline_entry_data_table.
16572         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16573         (final_scan_insn, notice_source_line): Likewise.
16574         (rest_of_clean_state): Skip inline entry markers.
16575         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16576         markers.
16577         * gimple.c (gimple_build_debug_inline_entry): New.
16578         * gimple.h (enum gimple_debug_subcode): Add
16579         GIMPLE_DEBUG_INLINE_ENTRY.
16580         (gimple_build_debug_inline_entry): Declare.
16581         (gimple_debug_inline_entry_p): New.
16582         (gimple_debug_nonbind_marker_p): Adjust.
16583         * insn-notes.def (INLINE_ENTRY): New.
16584         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16585         inline entry marker notes.
16586         (print_insn): Likewise.
16587         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16588         (INSN_DEBUG_MARKER_KIND): Likewise.
16589         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16590         * tree-inline.c (expand_call_inline): Build and insert
16591         debug_inline_entry stmt.
16592         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16593         inline entry blocks early, if nonbind markers are enabled.
16594         (dump_scope_block): Dump fragment info.
16595         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16596         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16597         (gimple_build_debug_inline_entry): New.
16598         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16599         Enable/disable inline entry points too.
16600         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16601         (DEBUG_INSN): Describe inline entry markers.
16603         * common.opt (gvariable-location-views): New.
16604         (gvariable-location-views=incompat5): New.
16605         * config.in: Rebuilt.
16606         * configure: Rebuilt.
16607         * configure.ac: Test assembler for view support.
16608         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16609         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16610         * dwarf2out.c (var_loc_view): New typedef.
16611         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16612         (dwarf2out_locviews_in_attribute): New.
16613         (dwarf2out_locviews_in_loclist): New.
16614         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16615         (enum dw_line_info_opcode): Add LI_adv_address.
16616         (struct dw_line_info_table): Add view.
16617         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16618         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16619         (zero_view_p): New variable.
16620         (ZERO_VIEW_P): New macro.
16621         (output_asm_line_debug_info): New.
16622         (struct var_loc_node): Add view.
16623         (add_AT_view_list, AT_loc_list): New.
16624         (add_var_loc_to_decl): Add view param.  Test it against last.
16625         (new_loc_list): Add view params.  Record them.
16626         (AT_loc_list_ptr): Handle loc and view lists.
16627         (view_list_to_loc_list_val_node): New.
16628         (print_dw_val): Handle dw_val_class_view_list.
16629         (size_of_die): Likewise.
16630         (value_format): Likewise.
16631         (loc_list_has_views): New.
16632         (gen_llsym): Set vl_symbol too.
16633         (maybe_gen_llsym, skip_loc_list_entry): New.
16634         (dwarf2out_maybe_output_loclist_view_pair): New.
16635         (output_loc_list): Output view list or entries too.
16636         (output_view_list_offset): New.
16637         (output_die): Handle dw_val_class_view_list.
16638         (output_dwarf_version): New.
16639         (output_compilation_unit_header): Use it.
16640         (output_skeleton_debug_sections): Likewise.
16641         (output_rnglists, output_line_info): Likewise.
16642         (output_pubnames, output_aranges): Update version comments.
16643         (output_one_line_info_table): Output view numbers in asm comments.
16644         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16645         Call maybe_gen_llsym.
16646         (loc_list_from_tree_1): Adjust.
16647         (add_AT_location_description): Create view list attribute if
16648         needed, check it's absent otherwise.
16649         (convert_cfa_to_fb_loc_list): Adjust.
16650         (maybe_emit_file): Call output_asm_line_debug_info for test.
16651         (dwarf2out_var_location): Reset views as needed.  Precompute
16652         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16653         attribute.  Set view.
16654         (new_line_info_table): Reset next view.
16655         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16656         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16657         the assembler, or select appropriate line info opcodes.
16658         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16659         (optimize_string_length): Catch it.  Adjust.
16660         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16661         dw_val_class_view_list, and remove it if no longer needed.
16662         (hash_loc_list): Hash view numbers.
16663         (loc_list_hasher::equal): Compare them.
16664         (optimize_location_lists): Check whether a view list symbol is
16665         needed, and whether the locview attribute is present, and
16666         whether they match.  Remove the locview attribute if no longer
16667         needed.
16668         (index_location_lists): Call skip_loc_list_entry for test.
16669         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16670         Use output_dwarf_version.
16671         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16672         (struct dw_val_node): Add val_view_list.
16673         * final.c (SEEN_NEXT_VIEW): New.
16674         (set_next_view_needed): New.
16675         (clear_next_view_needed): New.
16676         (maybe_output_next_view): New.
16677         (final_start_function): Rename to...
16678         (final_start_function_1): ... this.  Take pointer to FIRST,
16679         add SEEN parameter.  Emit param bindings in the initial view.
16680         (final_start_function): Reintroduce SEEN-less interface.
16681         (final): Rename to...
16682         (final_1): ... this.  Take SEEN parameter.  Output final pending
16683         next view at the end.
16684         (final): Reintroduce seen-less interface.
16685         (final_scan_insn): Output pending next view before switching
16686         sections or ending a block.  Mark the next view as needed when
16687         outputting variable locations.  Notify debug backend of section
16688         changes, and of location view changes.
16689         (rest_of_handle_final): Adjust.
16690         * toplev.c (process_options): Autodetect value for debug variable
16691         location views option.  Warn on incompat5 without -gdwarf-5.
16692         * doc/invoke.texi (gvariable-location-views): New.
16693         (gvariable-location-views=incompat5): New.
16694         (gno-variable-location-views): New.
16696 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16698         PR tree-optimization/84136
16699         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16700         that the result of find_edge is non-NULL.
16702 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16704         PR target/83008
16705         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16706         storing integer register in SImode.  Fix cost of 256 and 512
16707         byte aligned SSE register store.
16709 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16711         * config/i386/i386.c (ix86_multiplication_cost): Fix
16712         multiplication cost for TARGET_AVX512DQ.
16714 2018-02-08  Marek Polacek  <polacek@redhat.com>
16716         PR tree-optimization/84238
16717         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16718         get_range_strlen.
16720 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16722         PR tree-optimization/84265
16723         * tree-vect-stmts.c (vectorizable_store): Don't treat
16724         VMAT_CONTIGUOUS accesses as grouped.
16725         (vectorizable_load): Likewise.
16727 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16729         PR tree-optimization/81635
16730         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16731         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16732         (test_round_for_mask): New functions.
16733         (wide_int_cc_tests): Call test_round_for_mask.
16734         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16735         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16736         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16737         range returned by get_range_info.
16739 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16741         PR ipa/81360
16742         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16743         * symtab.c: Include builtins.h
16744         (symtab_node::output_to_lto_symbol_table_p): Move here
16745         from lto-streamer-out.c:output_symbol_p.
16746         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16747         (output_symbol_p): Move all logic to symtab.c
16748         (produce_symtab): Update.
16750 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16752         * config/s390/s390-opts.h (enum indirect_branch): Define.
16753         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16754         (s390_indirect_branch_via_thunk)
16755         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16756         (enum s390_indirect_branch_type): Define.
16757         * config/s390/s390.c (struct s390_frame_layout, struct
16758         machine_function): Remove.
16759         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16760         (indirect_branch_table_label_no, indirect_branch_table_name):
16761         Define variables.
16762         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16763         (enum s390_indirect_branch_option): Define.
16764         (s390_return_addr_from_memory): New function.
16765         (s390_handle_string_attribute): New function.
16766         (s390_attribute_table): Add new attribute handler.
16767         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16768         (s390_indirect_branch_via_thunk): New function.
16769         (s390_indirect_branch_via_inline_thunk): New function.
16770         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16771         sibling call optimization for non z10 compiles.
16772         (s390_emit_call): Force indirect branch target to be a single
16773         register.  Add r1 clobber for non-z10 compiles.
16774         (s390_emit_epilogue): Emit return jump via return_use expander.
16775         (s390_reorg): Handle JUMP_INSNs as execute targets.
16776         (s390_option_override_internal): Perform validity checks for the
16777         new command line options.
16778         (s390_indirect_branch_attrvalue): New function.
16779         (s390_indirect_branch_settings): New function.
16780         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16781         (s390_output_indirect_thunk_function):  New function.
16782         (s390_code_end): Implement target hook.
16783         (s390_case_values_threshold): Implement target hook.
16784         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16785         macros.
16786         * config/s390/s390.h (struct s390_frame_layout)
16787         (struct machine_function): Move here from s390.c.
16788         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16789         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16790         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16791         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16792         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16793         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16794         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16795         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16796         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16797         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16798         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16799         (mnemonic attribute): Add values which aren't recognized
16800         automatically.
16801         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16802         pattern for branch conversion.  Fix mnemonic attribute.
16803         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16804         indirect branch via thunk if requested.
16805         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16806         ("*indirect_jump"): Disable for branch conversion using out of
16807         line thunks.
16808         ("indirect_jump_via_thunk<mode>_z10")
16809         ("indirect_jump_via_thunk<mode>")
16810         ("indirect_jump_via_inlinethunk<mode>_z10")
16811         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16812         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16813         ("casesi_jump_via_inlinethunk<mode>_z10")
16814         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16815         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16816         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16817         ("*indirect2_jump"): Disable for branch conversion.
16818         ("casesi_jump"): Turn into expander and expand patterns for branch
16819         conversion.
16820         ("return_use"): New expander.
16821         ("*return"): Emit return via thunk and rename it to ...
16822         ("*return<mode>"): ... this one.
16823         * config/s390/s390.opt: Add new options and and enum for the
16824         option values.
16826 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16828         * lra-constraints.c (match_reload): Unconditionally use
16829         gen_lowpart_SUBREG, rather than selecting between that
16830         and equivalent gen_rtx_SUBREG code.
16832 2018-02-08  Richard Biener  <rguenther@suse.de>
16834         PR tree-optimization/84233
16835         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16836         changed flag instead of boguously re-using phi_inserted.
16838 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16840         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16841         static local variables.
16843 2018-02-08  Richard Biener  <rguenther@suse.de>
16845         PR tree-optimization/84278
16846         * tree-vect-stmts.c (vectorizable_store): When looking for
16847         smaller vector types to perform grouped strided loads/stores
16848         make sure the mode is supported by the target.
16849         (vectorizable_load): Likewise.
16851 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16853         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16854         Increase LDP/STP opportunities by adding adjacent callee-saves.
16856 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16858         PR rtl-optimization/84068
16859         PR rtl-optimization/83459
16860         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16862 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16864         PR tree-optimization/84224
16865         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16866         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16867         non-zero arguments.
16869 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
16871         PR target/84113
16872         * config/rs6000/altivec.md (*restore_world): Remove LR use.
16873         * config/rs6000/predicates.md (restore_world_operation): Adjust op
16874         count, remove one USE.
16876 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16878         * doc/install.texi (Configuration): Document the
16879         --with-long-double-format={ibm,ieee} PowerPC configuration
16880         options.
16882         PR target/84154
16883         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16884         Convert from define_expand to be define_insn_and_split.  Rework
16885         float/double/_Float128 conversions to QI/HI/SImode to work with
16886         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
16887         conversions to QI/HImode types did a store and then a load to
16888         truncate the value.  For conversions to VSX registers, don't split
16889         the insn, instead emit the code directly.  Use the code iterator
16890         any_fix to combine signed and unsigned conversions.
16891         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16892         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16893         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16894         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16895         (fix_<mode>di2_hw): Likewise.
16896         (fixuns_<mode>di2_hw): Likewise.
16897         (fix_<mode>si2_hw): Likewise.
16898         (fixuns_<mode>si2_hw): Likewise.
16899         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16900         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16901         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16902         fix<uns>_trunc<SFDF:mode>si2_p8.
16903         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16904         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16905         (fix<uns>_<mode>_mem): Likewise.
16906         (fctiw<u>z_<mode>_mem): Likewise.
16907         (fix<uns>_<mode>_mem): Likewise.
16908         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16909         the register allocator from doing a direct move to the GPRs to do
16910         a store, and instead use the ISA 3.0 store byte/half-word from
16911         vector register instruction.  For IEEE 128-bit floating point,
16912         also optimize stores of 32-bit ints.
16913         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16915 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
16917         * genextract.c (push_pathstr_operand): New function to support
16918         [a-zA-Z].
16919         (walk_rtx): Call push_pathstr_operand.
16920         (print_path): Support [a-zA-Z].
16922 2018-02-07  Richard Biener  <rguenther@suse.de>
16924         PR tree-optimization/84037
16925         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16926         (cse_and_gimplify_to_preheader): Declare.
16927         (vect_get_place_in_interleaving_chain): Likewise.
16928         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16929         ivexpr_map.
16930         (_loop_vec_info::~_loop_vec_info): Delete it.
16931         (cse_and_gimplify_to_preheader): New function.
16932         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16933         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16934         (vectorizable_load): Likewise.  For grouped stores always base
16935         the IV on the first element.
16936         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16937         condition before gimplifying.
16939 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16941         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16942         *DIV_EXPR and *MOD_EXPR.
16944 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
16946         PR target/84248
16947         * config/i386/i386.c (ix86_option_override_internal): Mask out
16948         the CF_SET bit when checking -fcf-protection.
16950 2018-02-07  Tom de Vries  <tom@codesourcery.com>
16952         PR libgomp/84217
16953         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16954         enough.
16956 2018-02-07  Richard Biener  <rguenther@suse.de>
16958         PR tree-optimization/84204
16959         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16960         this place.
16962         PR tree-optimization/84205
16963         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16964         special-case isl_ast_op_zdiv_r.
16966         PR tree-optimization/84223
16967         * graphite-scop-detection.c (gather_bbs::before_dom_children):
16968         Only add conditions from within the region.
16969         (gather_bbs::after_dom_children): Adjust.
16971 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
16973         PR target/84209
16974         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16975         * config/avr/avr.md: Only post-reload split REG-REG moves if
16976         either register is GENERAL_REG_P.
16978 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16980         PR tree-optimization/84235
16981         * tree-ssa-scopedtables.c
16982         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16983         if the subtraction is performed in floating point type where NaNs are
16984         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16985         build 1.  Formatting fix.
16987 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
16989         PR target/84146
16990         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16991         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16992         and skip it regardless of bb boundaries.  Use CALL_P macro,
16993         don't test INSN_P (insn) together with CALL_P or JUMP_P check
16994         unnecessarily, formatting fix.
16996 2018-02-06  Michael Collison  <michael.collison@arm.com>
16998         * config/arm/thumb2.md:
16999         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17000         (*thumb_mov_notscc): Ditto.
17002 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17004         PR target/84154
17005         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17006         unsigned_fix, not "s".
17008 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17010         * configure.ac (gcc_fn_eh_frame_ro): New function.
17011         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17012         correct .eh_frame permissions.
17013         * configure: Regenerate.
17015 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17017         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17018         irrelevant options.
17020 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17022         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17023         Display warning message for -mno-speculate-indirect-jumps.
17025 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17027         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17028         Undocumented.
17029         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17031 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17033         PR tree-optimization/84225
17034         * tree-eh.c (find_trapping_overflow): Only call
17035         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17037 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17039         PR target/84145
17040         * config/i386/i386.c: Reimplement the check of possible options
17041         -mibt/-mshstk conbination. Change error messages.
17042         * doc/invoke.texi: Fix a typo: remove extra '='.
17044 2018-02-06  Marek Polacek  <polacek@redhat.com>
17046         PR tree-optimization/84228
17047         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17049 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17051         PR target/82641
17052         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17053         emitted arch directives.
17054         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17055         __ARM_FEATURE_COPROC before changing architectures.
17057 2018-02-06  Richard Biener  <rguenther@suse.de>
17059         * config/i386/i386.c (print_reg): Fix typo.
17060         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17062 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17064         * configure: Regenerate.
17066 2018-02-05  Martin Sebor  <msebor@redhat.com>
17068         PR tree-optimization/83369
17069         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17070         inlining context.
17072 2018-02-05  Martin Liska  <mliska@suse.cz>
17074         * doc/invoke.texi: Cherry-pick upstream r323995.
17076 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17078         * ira.c (ira_init_register_move_cost): Adjust comment.
17080 2018-02-05  Martin Liska  <mliska@suse.cz>
17082         PR gcov-profile/84137
17083         * doc/gcov.texi: Fix typo in documentation.
17085 2018-02-05  Martin Liska  <mliska@suse.cz>
17087         PR gcov-profile/83879
17088         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17089         using dlopen functionality.
17091 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17093         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17094         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17095         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17096         _mm_maskz_range_round_ss): New intrinsics.
17097         (__builtin_ia32_rangesd128_round)
17098         (__builtin_ia32_rangess128_round): Remove.
17099         (__builtin_ia32_rangesd128_mask_round,
17100         __builtin_ia32_rangess128_mask_round): New builtins.
17101         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17102         __builtin_ia32_rangess128_round): Remove.
17103         (__builtin_ia32_rangesd128_mask_round,
17104         __builtin_ia32_rangess128_mask_round): New builtins.
17105         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17106         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17107         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17108         "<round_saeonly_constraint>")): Changed to ...
17109         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17110         "<round_saeonly_scalar_constraint>")): ... this.
17111         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17112         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17113         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17114         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17115         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17117 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17119         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17120         options.
17121         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17122         Remove all values except native, 8540 and 8548.
17124 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17126         * config/i386/i386.c (ix86_output_function_return): Pass
17127         INVALID_REGNUM, instead of -1, as invalid register number to
17128         indirect_thunk_name and output_indirect_thunk.
17130 2018-02-02  Julia Koval  <julia.koval@intel.com>
17132         * config.gcc: Add -march=icelake.
17133         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17134         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17135         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17136         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17137         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17138         (processor_target_table): Add icelake.
17139         (ix86_option_override_internal): Handle new PTAs.
17140         (get_builtin_code_for_version): Handle icelake.
17141         (M_INTEL_COREI7_ICELAKE): New.
17142         (fold_builtin_cpu): Handle icelake.
17143         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17144         * doc/invoke.texi: Add -march=icelake.
17146 2018-02-02  Julia Koval  <julia.koval@intel.com>
17148         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17149         to wide_int_bitmask.
17150         * wide-int-bitmask.h: New.
17152 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17154         PR target/84066
17155         * config/i386/i386.md: Replace Pmode with word_mode in
17156         builtin_setjmp_setup and builtin_longjmp to support x32.
17158 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17160         PR target/56010
17161         PR target/83743
17162         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17163         #include "opts.h".
17164         (rs6000_supported_cpu_names): New static variable.
17165         (linux_cpu_translation_table): Likewise.
17166         (elf_platform) <cpu>: Define new static variable and use it.
17167         Translate kernel AT_PLATFORM name to canonical name if needed.
17168         Error if platform name is unknown.
17170 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17172         PR target/84089
17173         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17175 2018-02-01  Jeff Law  <law@redhat.com>
17177         PR target/84128
17178         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17179         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17180         the scratch if RELEASE_VIA_POP is false.
17181         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17182         If we have to save a temporary register, decrement SIZE appropriately.
17183         Pass new arguments to release_scratch_register_on_entry.
17184         (ix86_adjust_stack_and_probe): Likewise.
17185         (ix86_emit_probe_stack_range): Pass new arguments to
17186         release_scratch_register_on_entry.
17188 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17190         PR rtl-optimization/84157
17191         * combine.c (change_zero_ext): Use REG_P predicate in
17192         front of HARD_REGISTER_P predicate.
17194 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17196         * config/avr/avr.c (avr_option_override): Move disabling of
17197         -fdelete-null-pointer-checks to...
17198         * common/config/avr/avr-common.c (avr_option_optimization_table):
17199         ...here.
17201 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17203         PR tree-optimization/81635
17204         * tree-data-ref.c (split_constant_offset_1): For types that
17205         wrap on overflow, try to use range info to prove that wrapping
17206         cannot occur.
17208 2018-02-01  Renlin Li  <renlin.li@arm.com>
17210         PR target/83370
17211         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17212         TAILCALL_ADDR_REGS.
17213         (aarch64_register_move_cost): Likewise.
17214         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17215         TAILCALL_ADDR_REGS.
17216         (REG_CLASS_NAMES): Likewise.
17217         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17218         TAILCALL_ADDR_REGS. Remove IP registers.
17219         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17221 2018-02-01  Richard Biener  <rguenther@suse.de>
17223         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17224         for specifying RPO order and allow NULL for that.
17225         * domwalk.c (dom_walker::dom_walker): Likewise.
17226         (dom_walker::walk): Handle NULL RPO order.
17227         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17228         in RPO order.
17229         (rewrite_update_dom_walker): Likewise.
17230         (mark_def_dom_walker): Likewise.
17232 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17234         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17235         (aarch64_maybe_expand_sve_subreg_move): Declare.
17236         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17237         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17238         predicate.
17239         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17240         that are semantically a reverse operation.
17241         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17242         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17243         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17244         functions.
17245         (aarch64_can_change_mode_class): For big-endian, forbid changes
17246         between two SVE modes if they have different element sizes.
17248 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17250         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17251         the TImode handling for big-endian targets.
17253 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17255         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17256         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17257         not just bytes.
17258         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17259         Remove BSWAP handing for big-endian targets and use the form of
17260         LD1RQ appropariate for the mode.
17262 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17264         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17265         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17266         duplicated element.
17268 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17270         PR tearget/83845
17271         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17272         check for operands that need to go through aarch64_sve_reload_be.
17274 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17276         PR tree-optimization/81661
17277         PR tree-optimization/84117
17278         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17279         * tree-eh.c: Include gimplify.h.
17280         (find_trapping_overflow, replace_trapping_overflow,
17281         rewrite_to_non_trapping_overflow): New functions.
17282         * tree-vect-loop.c: Include tree-eh.h.
17283         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17284         * tree-data-ref.c: Include tree-eh.h.
17285         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17287 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17289         PR rtl-optimization/84123
17290         * combine.c (change_zero_ext): Check if hard register satisfies
17291         can_change_dest_mode before calling gen_lowpart_SUBREG.
17293 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17295         PR target/82444
17296         * ira.c (ira_init_register_move_cost): Remove assert.
17298 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17300         PR rtl-optimization/84071
17301         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17302         * doc/tm.texi: Regenerate.
17304 2018-01-31  Richard Biener  <rguenther@suse.de>
17306         PR tree-optimization/84132
17307         * tree-data-ref.c (analyze_miv_subscript): Properly
17308         check whether evolution_function_is_affine_multivariate_p
17309         before calling gcd_of_steps_may_divide_p.
17311 2018-01-31  Julia Koval  <julia.koval@intel.com>
17313         PR target/83618
17314         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17315         * config/i386/i386.md (rdpid_rex64) New.
17316         (rdpid): Make 32bit only.
17318 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17320         PR lto/84105
17321         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17322         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17324 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17326         Revert
17327         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17329         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17331 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17333         PR rtl-optimization/84071
17334         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17335         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17337 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17339         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17340         (arc_attribute_table): Add 'aux' attribute.
17341         (arc_in_small_data_p): Consider aux like variables.
17342         (arc_is_aux_reg_p): New function.
17343         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17344         (arc_get_aux_arg): New function.
17345         (prepare_move_operands): Handle aux-register access.
17346         (arc_handle_aux_attribute): New function.
17347         * doc/extend.texi (ARC Variable attributes): Add subsection.
17349 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17351         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17352         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17353         (arc_attribute_table): Add 'uncached' attribute.
17354         (arc_print_operand): Print '.di' flag for uncached memory
17355         accesses.
17356         (arc_in_small_data_p): Do not consider for small data the uncached
17357         types.
17358         (arc_is_uncached_mem_p): New function.
17359         * config/arc/predicates.md (compact_store_memory_operand): Check
17360         for uncached memory accesses.
17361         (nonvol_nonimm_operand): Likewise.
17362         * doc/extend.texi (ARC Type Attribute): New subsection.
17364 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17366         PR c/84100
17367         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17368         falign-loops=): Add Optimization flag.
17370 2018-01-30  Jeff Law  <law@redhat.com>
17372         PR target/84064
17373         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17374         INT_REGISTERS_SAVED.  Check it prior to calling
17375         get_scratch_register_on_entry.
17376         (ix86_adjust_stack_and_probe): Similarly.
17377         (ix86_emit_probe_stack_range): Similarly.
17378         (ix86_expand_prologue): Corresponding changes.
17380 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17382         PR target/40411
17383         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17384         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17386 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17388         PR target/84112
17389         * lra-constraints.c (curr_insn_transform): Process AND in the
17390         address.
17392 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17394         PR rtl-optimization/83986
17395         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17396         dependence against last_pending_memory_flush in addition to
17397         pending_jump_insns.
17399 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17401         PR tree-optimization/81611
17402         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17403         copies.
17405 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17407         PR target/83758
17408         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17409         a reg rtx.
17411 2018-01-30  Richard Biener  <rguenther@suse.de>
17412             Jakub Jelinek  <jakub@redhat.com>
17414         PR tree-optimization/84111
17415         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17416         inner loops added during recursion, as they don't have up-to-date
17417         SSA form.
17419 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17421         PR ipa/81360
17422         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17423         (can_inline_edge_by_limits_p): ... here.
17424         (can_early_inline_edge_p, check_callers,
17425         update_caller_keys, update_callee_keys, recursive_inlining,
17426         add_new_edges_to_heap, speculation_useful_p,
17427         inline_small_functions,
17428         inline_small_functions, flatten_function,
17429         inline_to_all_callers_1): Update.
17431 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17433         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17434         zeros correctly.
17436 2018-01-30  Richard Biener  <rguenther@suse.de>
17438         PR tree-optimization/83008
17439         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17440         invariant and constant vector uses in stmts when they need
17441         more than one stmt.
17443 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17445         PR bootstrap/84017
17446         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17447         * configure: Regenerate.
17449 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17451         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17452         pattern.
17453         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17454         Use gen_rtx_REG rather than gen_lowpart.
17456 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17458         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17459         rather than 0 when creating partial subregs.
17461 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17463         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17464         of usage.
17466 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17468         PR target/81550
17469         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17470         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17471         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17472         flags.  This restores the settings used before the 2017-07-24.
17473         Turning off pre increment/decrement/modify allows IVOPTS to
17474         optimize DF/SF loops where the index is an int.
17476 2018-01-29  Richard Biener  <rguenther@suse.de>
17477             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17479         PR bootstrap/80867
17480         * tree-vect-stmts.c (vectorizable_call): Don't call
17481         targetm.vectorize_builtin_md_vectorized_function if callee is
17482         NULL.
17484 2018-01-22  Carl Love  <cel@us.ibm.com>
17486         * doc/extend.tex: Fix typo in second arg in
17487         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17489 2018-01-29  Richard Biener  <rguenther@suse.de>
17491         PR tree-optimization/84086
17492         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17493         (flush_ssaname_freelist): When SSA names were released reset
17494         the SCEV hash table.
17496 2018-01-29  Richard Biener  <rguenther@suse.de>
17498         PR tree-optimization/84057
17499         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17500         removed paths when removing edges.
17502 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17504         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17505         -mfunction-return=@var{choice}.
17507 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17509         PR diagnostic/84034
17510         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17511         Handle CR like TAB.
17512         (layout::print_source_line): Likewise.
17513         (test_get_line_width_without_trailing_whitespace): Add test cases.
17515 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17517         PR middle-end/84040
17518         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17519         debug insns.
17521 2018-01-26  Jim Wilson  <jimw@sifive.com>
17523         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17525         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17526         specified.
17528 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17530         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17531         and CMP + SUB-immediate -> SUBS.
17533 2018-01-26  Martin Sebor  <msebor@redhat.com>
17535         PR tree-optimization/83896
17536         * tree-ssa-strlen.c (get_string_len): Rename...
17537         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17538         Avoid assuming length is constant.
17539         (handle_char_store): Use HOST_WIDE_INT for string length.
17541 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17543         PR target/81763
17544         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17545         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17547 2018-01-26  Richard Biener  <rguenther@suse.de>
17549         PR rtl-optimization/84003
17550         * dse.c (record_store): Only record redundant stores when
17551         the earlier store aliases at least all accesses the later one does.
17553 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17555         PR rtl-optimization/83985
17556         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17557         REG_CFA_RESTORE insns.
17558         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17559         REG_CFA_RESTORE insns here.
17561         PR c/83989
17562         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17563         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17565 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17567         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17568         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17569         (arc_init): Likewise.
17570         (arc_override_options): Likewise.
17571         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17572         value.
17573         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17574         support.
17575         * config/arc/arc.h (TARGET_DBNZ): Define.
17576         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17577         properly set the tune attribute.
17578         (dbnz): Use TARGET_DBNZ guard.
17579         * config/arc/arc.opt (mtune): Add core3 option.
17581 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17583         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17584         recognize new pic like addresses.
17585         (arc_delegitimize_address): Clean up.
17587 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17589         * config/arc/arc-arches.def: Option mrf16 valid for all
17590         architectures.
17591         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17592         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17593         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17594         * config/arc/arc-tables.opt: Regenerate.
17595         * config/arc/arc.c (arc_conditional_register_usage): Handle
17596         reduced register file case.
17597         (arc_file_start): Set must have build attributes.
17598         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17599         mrf16 option value.
17600         * config/arc/arc.opt (mrf16): Add new option.
17601         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17602         * config/arc/genmultilib.awk: Handle new mrf16 option.
17603         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17604         * config/arc/t-multilib: Regenerate.
17605         * doc/invoke.texi (ARC Options): Document mrf16 option.
17607 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17609         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17610         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17611         (arc_attribute_table): Add 'secure_call' attribute.
17612         (arc_print_operand): Print secure call operand.
17613         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17614         secure.
17615         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17616         (call_i): Add support for sjli instruction.
17617         (call_value_i): Likewise.
17618         * config/arc/constraints.md (Csc): New constraint.
17620 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17621             John Eric Martin  <John.Martin@emmicro-us.com>
17623         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17624         * config/arc/arc.c (_arc_jli_section): New struct.
17625         (arc_jli_section): New type.
17626         (rc_jli_sections): New static variable.
17627         (arc_handle_jli_attribute): New function.
17628         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17629         (arc_file_end): New function.
17630         (TARGET_ASM_FILE_END): Define.
17631         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17632         (arc_add_jli_section): New function.
17633         (jli_call_scan): Likewise.
17634         (arc_reorg): Call jli_call_scan.
17635         (arc_output_addsi): Remove 'S' from printing asm operand.
17636         (arc_is_jli_call_p): New function.
17637         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17638         operand.
17639         (movhi_insn): Likewise.
17640         (movsi_insn): Likewise.
17641         (movsi_set_cc_insn): Likewise.
17642         (loadqi_update): Likewise.
17643         (load_zeroextendqisi_update): Likewise.
17644         (load_signextendqisi_update): Likewise.
17645         (loadhi_update): Likewise.
17646         (load_zeroextendhisi_update): Likewise.
17647         (load_signextendhisi_update): Likewise.
17648         (loadsi_update): Likewise.
17649         (loadsf_update): Likewise.
17650         (movsicc_insn): Likewise.
17651         (bset_insn): Likewise.
17652         (bxor_insn): Likewise.
17653         (bclr_insn): Likewise.
17654         (bmsk_insn): Likewise.
17655         (bicsi3_insn): Likewise.
17656         (cmpsi_cc_c_insn): Likewise.
17657         (movsi_ne): Likewise.
17658         (movsi_cond_exec): Likewise.
17659         (clrsbsi2): Likewise.
17660         (norm_f): Likewise.
17661         (normw): Likewise.
17662         (swap): Likewise.
17663         (divaw): Likewise.
17664         (flag): Likewise.
17665         (sr): Likewise.
17666         (kflag): Likewise.
17667         (ffs): Likewise.
17668         (ffs_f): Likewise.
17669         (fls): Likewise.
17670         (call_i): Remove 'S' asm letter, add jli instruction.
17671         (call_value_i): Likewise.
17672         * config/arc/arc.op (mjli-always): New option.
17673         * config/arc/constraints.md (Cji): New constraint.
17674         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17675         operand.
17676         (subsf3_fpx): Likewise.
17677         (mulsf3_fpx): Likewise.
17678         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17679         asm operand.
17680         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17681         function attrbutes.
17682         * doc/invoke.texi (ARC): Document mjli-always option.
17684 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17686         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17687         avoid addition with 0 and use incw and decw where possible.
17689 2018-01-26  Richard Biener  <rguenther@suse.de>
17691         PR tree-optimization/81082
17692         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17693         association if it requires casting to unsigned.
17694         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17695         from fold_plusminus_mult_expr to catch important cases late when
17696         range info is available.
17698 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17700         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17701         * configure.ac (hidden_linkonce): New test.
17702         * configure: Regenerate.
17703         * config.in: Regenerate.
17705 2018-01-26  Julia Koval  <julia.koval@intel.com>
17707         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17708         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17709         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17710         _mm_mask_bitshuffle_epi64_mask): Fix type.
17711         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17712         USI_FTYPE_V4DI_V4DI_USI): Remove.
17713         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17714         __builtin_ia32_vpshufbitqmb256_mask,
17715         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17716         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17717         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17719 2018-01-26  Alan Modra  <amodra@gmail.com>
17721         PR target/84033
17722         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17723         UNSPEC_VBPERMQ.  Sort other unspecs.
17725 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17727         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17729 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17731         PR middle-end/83055
17732         * predict.c (drop_profile): Do not push/pop cfun; update also
17733         node->count.
17734         (handle_missing_profiles): Fix logic looking for zero profiles.
17736 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17738         PR middle-end/83977
17739         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17740         on functions with #pragma omp declare simd or functions with simd
17741         attribute.
17742         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17743         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17744         Remove trailing \n from warning_at calls.
17746 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17748         PR target/84028
17749         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17750         for neutered workers.
17752 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17754         PR target/68467
17755         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17756         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17758 2018-01-24  Jeff Law  <law@redhat.com>
17760         PR target/83994
17761         * i386.c (get_probe_interval): Move to earlier point.
17762         (ix86_compute_frame_layout): If -fstack-clash-protection and
17763         the frame is larger than the probe interval, then use pushes
17764         to save registers rather than reg->mem moves.
17765         (ix86_expand_prologue): Remove conditional for int_registers_saved
17766         assertion.
17768 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17770         PR target/84014
17771         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17772         min/max for never referenced object.
17774 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17776         PR middle-end/83977
17777         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17778         here.
17779         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17780         attributes from DECL_ATTRIBUTES (decl) without affecting
17781         DECL_ATTRIBUTES (current_function_decl).
17782         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17783         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17785 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17787         PR tree-optimization/83979
17788         * fold-const.c (fold_comparison): Use constant_boolean_node
17789         instead of boolean_{true,false}_node.
17791 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17793         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17794         with zero counts.
17796 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17798         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17799         Simplify the clause that sets the length attribute.
17800         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17801         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17802         clause that sets the length attribute.
17803         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17805 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17807         PR target/83589
17808         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17809         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17810         Add strict parameter.
17811         (prevent_branch_around_nothing): Insert dummy insn between branch to
17812         label and label with no ptx insn inbetween.
17813         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17815 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17817         PR target/81352
17818         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17819         for neutered threads in warp.
17820         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17822 2018-01-24  Richard Biener  <rguenther@suse.de>
17824         PR tree-optimization/83176
17825         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17826         operands.
17828 2018-01-24  Richard Biener  <rguenther@suse.de>
17830         PR tree-optimization/82819
17831         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17832         code generating pluses that are no-ops in the target precision.
17834 2018-01-24  Richard Biener  <rguenther@suse.de>
17836         PR middle-end/84000
17837         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17839 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17841         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17842         to merge probabilities.
17843         * predict.c (probably_never_executed): Also mark as cold functions
17844         with global 0 profile and guessed local profile.
17845         * profile-count.c (profile_probability::combine_with_count): New
17846         member function.
17847         * profile-count.h (profile_probability::operator*,
17848         profile_probability::operator*=, profile_probability::operator/,
17849         profile_probability::operator/=): Reduce precision to adjusted
17850         and set value to guessed on contradictory divisions.
17851         (profile_probability::combine_with_freq): Remove.
17852         (profile_probability::combine_wiht_count): Declare.
17853         (profile_count::force_nonzero):: Set to adjusted.
17854         (profile_count::probability_in):: Set quality to adjusted.
17855         * tree-ssa-tail-merge.c (replace_block_by): Use
17856         combine_with_count.
17858 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17859             Jim Wilson  <jimw@sifive.com>
17861         * config/riscv/riscv.c (riscv_stack_boundary): New.
17862         (riscv_option_override): Set riscv_stack_boundary.  Handle
17863         riscv_preferred_stack_boundary_arg.
17864         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17865         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17866         (STACK_BOUNDARY): Set to riscv_stack_boundary.
17867         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17868         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17869         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17871 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
17873         PR target/83905
17874         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17875         of struct ix86_frame.
17876         (ix86_expand_epilogue): Likewise.  Add a local variable for
17877         the reg_save_offset field in struct ix86_frame.
17879 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
17881         PR tree-optimization/82604
17882         * tree-loop-distribution.c (enum partition_kind): New enum item
17883         PKIND_PARTIAL_MEMSET.
17884         (partition_builtin_p): Support above new enum item.
17885         (generate_code_for_partition): Ditto.
17886         (compute_access_range): Differentiate cases that equality can be
17887         proven at all loops, the innermost loops or no loops.
17888         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17889         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
17890         (finalize_partitions, distribute_loop): Don't fuse partition of
17891         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17892         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17893         parloop is enabled.
17895 2018-01-23  Martin Liska  <mliska@suse.cz>
17897         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17898         order to ignore the predictor.
17899         (PRED_POLYMORPHIC_CALL): Likewise.
17900         (PRED_RECURSIVE_CALL): Likewise.
17902 2018-01-23  Martin Liska  <mliska@suse.cz>
17904         * tree-profile.c (tree_profiling): Print function header to
17905         aware reader which function we are working on.
17906         * value-prof.c (gimple_find_values_to_profile): Do not print
17907         not interesting value histograms.
17909 2018-01-23  Martin Liska  <mliska@suse.cz>
17911         * profile-count.h (enum profile_quality): Add
17912         profile_uninitialized as the first value. Do not number values
17913         as they are zero based.
17914         (profile_count::verify): Update sanity check.
17915         (profile_probability::verify): Likewise.
17917 2018-01-23  Nathan Sidwell  <nathan@acm.org>
17919         * doc/invoke.texi (ffor-scope): Deprecate.
17921 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17923         PR tree-optimization/83510
17924         * domwalk.c (set_all_edges_as_executable): New function.
17925         (dom_walker::dom_walker): Convert bool param
17926         "skip_unreachable_blocks" to enum reachability.  Move setup of
17927         edge flags to set_all_edges_as_executable and only do it when
17928         reachability is REACHABLE_BLOCKS.
17929         * domwalk.h (enum dom_walker::reachability): New enum.
17930         (dom_walker::dom_walker): Convert bool param
17931         "skip_unreachable_blocks" to enum reachability.
17932         (set_all_edges_as_executable): New decl.
17933         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
17934         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17935         "reachability".
17936         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17937         but converting true to REACHABLE_BLOCKS.
17938         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17939         * tree-vrp.c
17940         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17941         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17942         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17943         REACHABLE_BLOCKS.
17944         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17945         if check_all_array_refs will be called.
17947 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17949         * tree.c (selftest::test_location_wrappers): Add more test
17950         coverage.
17952 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17954         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17955         (selftest::test_bit_in_range): Likewise.
17957 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17959         PR testsuite/83888
17960         * doc/sourcebuild.texi (vect_float): Say that the selector
17961         only describes the situation when -funsafe-math-optimizations is on.
17962         (vect_float_strict): Document.
17964 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17966         PR tree-optimization/83965
17967         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17968         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17969         instead of checking only for a reduction.
17970         (vect_recog_widen_sum_pattern): Likewise.
17972 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17974         * predict.c (probably_never_executed): Only use precise profile info.
17975         (compute_function_frequency): Skip after inlining hack since we now
17976         have quality checking.
17978 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17980         * profile-count.h (profile_probability::very_unlikely,
17981         profile_probability::unlikely, profile_probability::even): Set
17982         precision to guessed.
17984 2018-01-23  Richard Biener  <rguenther@suse.de>
17986         PR tree-optimization/83963
17987         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17988         Properly terminate dominator walk when crossing the exit edge not
17989         when visiting its source block.
17991 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
17993         PR c++/83918
17994         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17995         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17997 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
17999         PR tree-optimization/83957
18000         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18001         semicolon after for body surrounded by braces.
18003         PR tree-optimization/83081
18004         * profile-count.h (profile_probability::split): New method.
18005         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18006         Use profile_probability::split.
18007         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18008         when splitting a single conditional jump into 2.
18010 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18012         PR tree-optimization/69452
18013         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18014         decl.
18016 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18018         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18019         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18020         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18022 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18024         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18025         declaration.
18026         * config/rl78/rl78.md (movdi): New define_expand.
18027         * config/rl78/rl78.c (rl78_split_movdi): New function.
18029 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18031         PR target/83862
18032         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18033         no longer used.
18034         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18035         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18036         128-bit to produce an UNSPEC move to get the double word with the
18037         signbit and then a shift directly to do signbit.
18038         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18039         implementation with a new version that just does either a direct
18040         move or a regular move.  Move memory interface to separate insns.
18041         Move insns so they are next to the expander.
18042         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18043         with signbit move.  Split big and little endian case.
18044         (signbit<mode>2_dm_mem_le): Likewise.
18045         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18046         (signbit<mode>2_dm2): Likewise.
18048 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18050         * config/rl78/rl78.md (anddi3): New define_expand.
18052 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18054         * config/rl78/rl78.md (umindi3): New define_expand.
18056 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18058         * config/rl78/rl78.md (smindi3): New define_expand.
18060 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18062         * config/rl78/rl78.md (smaxdi3): New define_expand.
18064 2018-01-22  Carl Love  <cel@us.ibm.com>
18066         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18067         LVX_V1TI): Add macro expansion.
18068         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18069         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18070         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18071         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18072         Change check to determine if the instruction is a byte reversing
18073         entry.  Fix typo in comment.
18074         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18075         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18076         Add def_builtin calls for new builtins.
18077         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18078         Add define_insn expansion.
18080 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18082         * config/rl78/rl78.md (umaxdi3): New define_expand.
18084 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18086         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18087         for non-QImode registers.
18089 2018-01-22  Richard Biener  <rguenther@suse.de>
18091         PR tree-optimization/83963
18092         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18093         including the loop exit block.
18094         (scop_detection::merge_sese): Likewise.
18095         (scop_detection::add_scop): Do it here instead.
18097 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18099         * doc/sourcebuild.texi (arm_softfloat): Document.
18101 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18103         PR gcc/77734
18104         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18105         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18106         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18108 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18109             David Edelsohn  <dje.gcc@gmail.com>
18111         PR target/83946
18112         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18113         Change "crset eq" to "crset 2".
18114         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18115         (*call_indirect_aix<mode>_nospec): Likewise.
18116         (*call_value_indirect_aix<mode>_nospec): Likewise.
18117         (*call_indirect_elfv2<mode>_nospec): Likewise.
18118         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18119         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18120         change assembly output from . to $.
18121         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18122         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18123         (*tablejump<mode>_internal1_nospec): Likewise.
18125 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18127         PR target/80870
18128         * config/sh/sh_optimize_sett_clrt.cc:
18129         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18131 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18133         PR tree-optimization/83940
18134         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18135         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18136         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18137         use it to pass back the definition type.
18138         (vect_check_store_rhs): Likewise rhs_dt_out.
18139         (vect_build_gather_load_calls): Add a mask_dt argument and use
18140         it instead of a call to vect_is_simple_use.
18141         (vectorizable_store): Update calls to vect_check_load_store_mask
18142         and vect_check_store_rhs.  Use the dt returned by the latter instead
18143         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18144         instead of calls to vect_is_simple_use.  Pass the scalar rather
18145         than the vector operand to vect_is_simple_use when handling
18146         second and subsequent copies of an rhs value.
18147         (vectorizable_load): Update calls to vect_check_load_store_mask
18148         and vect_build_gather_load_calls.  Use the cached mask_dt and
18149         gs_info.offset_dt instead of calls to vect_is_simple_use.
18151 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18153         PR middle-end/83945
18154         * tree-emutls.c: Include gimplify.h.
18155         (lower_emutls_2): New function.
18156         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18157         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18158         it before further processing.
18160         PR target/83930
18161         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18162         UINTVAL (trueop1) instead of INTVAL (op1).
18164 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18166         PR debug/81570
18167         PR debug/83728
18168         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18169         INCOMING_FRAME_SP_OFFSET if not defined.
18170         (scan_trace): Add ENTRY argument.  If true and
18171         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18172         emit a note to adjust the CFA offset.
18173         (create_cfi_notes): Adjust scan_trace callers.
18174         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18175         INCOMING_FRAME_SP_OFFSET in the CIE.
18176         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18177         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18178         Likewise.
18179         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18180         * doc/tm.texi: Regenerated.
18182 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18184         PR rtl-optimization/83147
18185         * lra-constraints.c (remove_inheritance_pseudos): Use
18186         lra_substitute_pseudo_within_insn.
18188 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18189             Cesar Philippidis  <cesar@codesourcery.com>
18191         PR target/83920
18192         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18194 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18196         PR target/83790
18197         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18198         spaces for function labels.
18200 2018-01-19  Martin Liska  <mliska@suse.cz>
18202         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18203         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18204         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18205         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18206         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18207         (PRED_CONST_RETURN): Change from 69 to 65.
18208         (PRED_NULL_RETURN): Change from 91 to 71.
18209         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18210         (PRED_LOOP_GUARD): Change from 66 to 73.
18212 2018-01-19  Martin Liska  <mliska@suse.cz>
18214         * predict.c (predict_insn_def): Add new assert.
18215         (struct branch_predictor): Change type to signed integer.
18216         (test_prediction_value_range): Amend test to cover
18217         PROB_UNINITIALIZED.
18218         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18219         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18220         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18221         (PRED_LOOP_IV_COMPARE): Likewise.
18222         * predict.h (PROB_UNINITIALIZED): Define new constant.
18224 2018-01-19  Martin Liska  <mliska@suse.cz>
18226         * predict.c (dump_prediction): Add new format for
18227         analyze_brprob.py script which is enabled with -details
18228         suboption.
18229         * profile-count.h (precise_p): New function.
18231 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18233         PR tree-optimization/83922
18234         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18235         there are no statements that need masking.
18236         (vect_active_double_reduction_p): New function.
18237         (vect_analyze_loop_operations): Use it when handling phis that
18238         are not in the loop header.
18240 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18242         PR tree-optimization/83914
18243         * tree-vect-loop.c (vectorizable_induction): Don't convert
18244         init_expr or apply the peeling adjustment for inductions
18245         that are nested within the vectorized loop.
18247 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18249         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18250         instead of NEG.
18252 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18254         PR sanitizer/81715
18255         PR testsuite/83882
18256         * function.h (gimplify_parameters): Add gimple_seq * argument.
18257         * function.c: Include gimple.h and options.h.
18258         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18259         for the added local temporaries if needed.
18260         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18261         if there are any parameter cleanups, wrap whole body into a
18262         try/finally with the cleanups.
18264 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18266         PR target/82964
18267         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18268         Use GET_MODE_CLASS for scalar floating point.
18270 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18272         PR ipa/82256
18273         patch by PaX Team
18274         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18275         Fix call of call_cgraph_insertion_hooks.
18277 2018-01-18  Martin Sebor  <msebor@redhat.com>
18279         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18281 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18283         PR ipa/83619
18284         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18285         frequencies.
18287 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18289         PR other/70268
18290         * common.opt: (-ffile-prefix-map): New option.
18291         * opts.c (common_handle_option): Defer it.
18292         * opts-global.c (handle_common_deferred_options): Handle it.
18293         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18294         * file-prefix-map.h: New file.
18295         (remap_debug_filename, add_debug_prefix_map): ...here.
18296         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18297         * final.c (debug_prefix_map, add_debug_prefix_map
18298         remap_debug_filename): Move to...
18299         * file-prefix-map.c: New file.
18300         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18301         generalize, get rid of alloca(), use strrchr() instead of strchr().
18302         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18303         Implement in terms of add_prefix_map().
18304         (remap_macro_filename, remap_debug_filename): Implement in term of
18305         remap_filename().
18306         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18307         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18308         * dbxout.c: Include file-prefix-map.h.
18309         * varasm.c: Likewise.
18310         * vmsdbgout.c: Likewise.
18311         * xcoffout.c: Likewise.
18312         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18313         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18314         * doc/invoke.texi (-ffile-prefix-map): Document.
18315         (-fdebug-prefix-map): Update description.
18317 2018-01-18  Martin Liska  <mliska@suse.cz>
18319         * config/i386/i386.c (indirect_thunk_name): Document that also
18320         lfence is emitted.
18321         (output_indirect_thunk): Document why both instructions
18322         (pause and lfence) are generated.
18324 2018-01-18  Richard Biener  <rguenther@suse.de>
18326         PR tree-optimization/83887
18327         * graphite-scop-detection.c
18328         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18329         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18330         (scop_detection::merge_sese): Re-implement with a flood-fill
18331         algorithm that properly finds a SESE region if it exists.
18333 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18335         PR c/61240
18336         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18337         pointer_diff optimizations use view_convert instead of convert.
18339 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18341         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18342         Generate different code for -mno-speculate-indirect-jumps.
18343         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18344         (*call_indirect_aix<mode>): Disable for
18345         -mno-speculate-indirect-jumps.
18346         (*call_indirect_aix<mode>_nospec): New define_insn.
18347         (*call_value_indirect_aix<mode>): Disable for
18348         -mno-speculate-indirect-jumps.
18349         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18350         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18351         -mno-speculate-indirect-jumps.
18352         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18354 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18356         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18357         long double type, set the flags for noting the default long double
18358         type, even if we don't pass or return a long double type.
18360 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18362         PR ipa/83051
18363         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18364         failure.
18366 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18368         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18369         support for merge[hl].
18370         (fold_mergehl_helper): New helper function.
18371         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18372         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18373         (altivec_vmrglw_direct): Add xxmrglw insn.
18375 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18377         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18378         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18380 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18382         PR lto/83121
18383         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18384         call the lto_location_cache before reading the
18385         DECL_SOURCE_LOCATION of the types.
18387 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18388             Richard Sandiford  <richard.sandiford@linaro.org>
18390         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18391         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18392         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18393         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18394         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18395         Add declaration.
18396         * config/aarch64/constraints.md (aarch64_movti_operand):
18397         Limit immediates.
18398         * config/aarch64/predicates.md (Uti): Add new constraint.
18400 2018-01-17 Carl Love  <cel@us.ibm.com>
18402         * config/rs6000/vsx.md (define_expand xl_len_r,
18403         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18404         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18405         lxvll.
18406         (define_expand, define_insn): Move the shift left from  the
18407         define_insn to the define_expand for lxvl and stxvl instructions.
18408         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18409         and XL_LEN_R definitions to PURE.
18411 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18413         * config/i386/i386.c (indirect_thunk_name): Declare regno
18414         as unsigned int.  Compare regno with INVALID_REGNUM.
18415         (output_indirect_thunk): Ditto.
18416         (output_indirect_thunk_function): Ditto.
18417         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18418         in the call to output_indirect_thunk_function.
18420 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18422         PR middle-end/83884
18423         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18424         rather than the size of inner_type to determine the stack slot size
18425         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18427 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18429         PR target/83546
18430         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18431         to PTA_SILVERMONT.
18433 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18435         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18436         endian Linux systems to optionally enable multilibs for selecting
18437         the long double type if the user configured an explicit type.
18438         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18439         have no long double multilibs if not defined.
18440         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18441         warn if the user used -mabi={ieee,ibm}longdouble and we built
18442         multilibs for long double.
18443         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18444         appropriate multilib option.
18445         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18446         multilib options.
18447         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18448         for building long double multilibs.
18449         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18451 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18453         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18454         copies.
18456         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18457         64 bits.
18458         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18459         128 bits.
18461         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18462         variables.
18464         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18465         return value.
18467 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18469         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18470         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18472 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18474         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18475         different rtl trees depending on TARGET_64BIT.
18476         (rs6000_gen_lvx): Likewise.
18478 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18480         * config/visium/visium.md (nop): Tweak comment.
18481         (hazard_nop): Likewise.
18483 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18485         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18486         -mspeculate-indirect-jumps.
18487         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18488         for -mno-speculate-indirect-jumps.
18489         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18490         (*call_value_indirect_elfv2<mode>): Disable for
18491         -mno-speculate-indirect-jumps.
18492         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18493         (indirect_jump): Emit different RTL for
18494         -mno-speculate-indirect-jumps.
18495         (*indirect_jump<mode>): Disable for
18496         -mno-speculate-indirect-jumps.
18497         (*indirect_jump<mode>_nospec): New define_insn.
18498         (tablejump): Emit different RTL for
18499         -mno-speculate-indirect-jumps.
18500         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18501         (tablejumpsi_nospec): New define_expand.
18502         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18503         (tablejumpdi_nospec): New define_expand.
18504         (*tablejump<mode>_internal1): Disable for
18505         -mno-speculate-indirect-jumps.
18506         (*tablejump<mode>_internal1_nospec): New define_insn.
18507         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18508         option.
18510 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18512         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18513         callers updated.
18515 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18516             Richard Biener  <rguenth@suse.de>
18518         PR libgomp/83590
18519         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18520         return early, inline manually is_gimple_sizepos.  Make sure if we
18521         call gimplify_expr we don't end up with a gimple constant.
18522         * tree.c (variably_modified_type_p): Don't return true for
18523         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18524         * gimplify.h (is_gimple_sizepos): Remove.
18526 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18528         PR tree-optimization/83857
18529         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18530         vectorizable_live_operation for pure SLP statements.
18531         (vectorizable_live_operation): Handle PHIs.
18533 2018-01-16  Richard Biener  <rguenther@suse.de>
18535         PR tree-optimization/83867
18536         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18537         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18539 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18541         PR c/83844
18542         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18543         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18544         If off is not INTEGER_CST, issue a may not be aligned warning
18545         rather than isn't aligned.  Use isn%'t rather than isn't.
18546         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18547         into MULT_EXPR.
18548         <case MULT_EXPR>: Improve the case when bottom and one of the
18549         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18550         operand, in that case check if the other operand is multiple of
18551         bottom divided by the INTEGER_CST operand.
18553 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18555         PR target/83858
18556         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18557         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18558         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18559         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18560         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18561         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18562         (pa_function_arg_size): New function.
18564 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18566         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18567         in a separate statement.
18569 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18571         PR tree-optimization/83847
18572         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18573         group gathers and scatters.
18575 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18577         PR rtl-optimization/86620
18578         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18580         PR rtl-optimization/83213
18581         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18582         to last if both are JUMP_INSNs.
18584         PR tree-optimization/83843
18585         * gimple-ssa-store-merging.c
18586         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18587         store_immediate_info for bswap/nop orig_stores.
18589 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18591         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18592         !TARGET_MUL.
18593         <UDIV>: Increase cost if !TARGET_DIV.
18595 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18597         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18598         (define_attr "cr_logical_3op"): New.
18599         (cceq_ior_compare): Adjust.
18600         (cceq_ior_compare_complement): Adjust.
18601         (*cceq_rev_compare): Adjust.
18602         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18603         (is_cracked_insn): Adjust.
18604         (insn_must_be_first_in_group): Adjust.
18605         * config/rs6000/40x.md: Adjust.
18606         * config/rs6000/440.md: Adjust.
18607         * config/rs6000/476.md: Adjust.
18608         * config/rs6000/601.md: Adjust.
18609         * config/rs6000/603.md: Adjust.
18610         * config/rs6000/6xx.md: Adjust.
18611         * config/rs6000/7450.md: Adjust.
18612         * config/rs6000/7xx.md: Adjust.
18613         * config/rs6000/8540.md: Adjust.
18614         * config/rs6000/cell.md: Adjust.
18615         * config/rs6000/e300c2c3.md: Adjust.
18616         * config/rs6000/e500mc.md: Adjust.
18617         * config/rs6000/e500mc64.md: Adjust.
18618         * config/rs6000/e5500.md: Adjust.
18619         * config/rs6000/e6500.md: Adjust.
18620         * config/rs6000/mpc.md: Adjust.
18621         * config/rs6000/power4.md: Adjust.
18622         * config/rs6000/power5.md: Adjust.
18623         * config/rs6000/power6.md: Adjust.
18624         * config/rs6000/power7.md: Adjust.
18625         * config/rs6000/power8.md: Adjust.
18626         * config/rs6000/power9.md: Adjust.
18627         * config/rs6000/rs64.md: Adjust.
18628         * config/rs6000/titan.md: Adjust.
18630 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18632         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18633         ix86_indirect_branch_register logic.
18635 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18637         * config/i386/constraints.md (Bs): Update
18638         ix86_indirect_branch_register check.  Don't check
18639         ix86_indirect_branch_register with GOT_memory_operand.
18640         (Bw): Likewise.
18641         * config/i386/predicates.md (GOT_memory_operand): Don't check
18642         ix86_indirect_branch_register here.
18643         (GOT32_symbol_operand): Likewise.
18645 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18647         * config/i386/predicates.md (constant_call_address_operand):
18648         Rewrite ix86_indirect_branch_register logic.
18649         (sibcall_insn_operand): Likewise.
18651 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18653         * config/i386/constraints.md (Bs): Replace
18654         ix86_indirect_branch_thunk_register with
18655         ix86_indirect_branch_register.
18656         (Bw): Likewise.
18657         * config/i386/i386.md (indirect_jump): Likewise.
18658         (tablejump): Likewise.
18659         (*sibcall_memory): Likewise.
18660         (*sibcall_value_memory): Likewise.
18661         Peepholes of indirect call and jump via memory: Likewise.
18662         * config/i386/i386.opt: Likewise.
18663         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18664         (GOT_memory_operand): Likewise.
18665         (call_insn_operand): Likewise.
18666         (sibcall_insn_operand): Likewise.
18667         (GOT32_symbol_operand): Likewise.
18669 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18671         PR middle-end/83837
18672         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18673         type rather than type addr's type points to.
18674         (expand_omp_atomic_mutex): Likewise.
18675         (expand_omp_atomic): Likewise.
18677 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18679         PR target/83839
18680         * config/i386/i386.c (output_indirect_thunk_function): Use
18681         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18682         for  __x86_return_thunk.
18684 2018-01-15  Richard Biener  <rguenther@suse.de>
18686         PR middle-end/83850
18687         * expmed.c (extract_bit_field_1): Fix typo.
18689 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18691         PR target/83687
18692         * config/arm/iterators.md (VF): New mode iterator.
18693         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18694         Remove integer-related logic from pattern.
18695         (neon_vabd<mode>_3): Likewise.
18697 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18699         PR middle-end/82694
18700         * common.opt (fstrict-overflow): No longer an alias.
18701         (fwrapv-pointer): New option.
18702         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18703         also for pointer types based on flag_wrapv_pointer.
18704         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18705         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18706         opts->x_flag_wrapv got set.
18707         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18708         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18709         POINTER_TYPE_OVERFLOW_UNDEFINED.
18710         * match.pd: Likewise in address comparison pattern.
18711         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18713 2018-01-15  Richard Biener  <rguenther@suse.de>
18715         PR lto/83804
18716         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18717         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18718         Reset type names to their identifier if their TYPE_DECL doesn't
18719         have linkage (and thus is used for ODR and devirt).
18720         (save_debug_info_for_decl): Remove.
18721         (save_debug_info_for_type): Likewise.
18722         (add_tree_to_fld_list): Adjust.
18723         * tree-pretty-print.c (dump_generic_node): Make dumping of
18724         type names more robust.
18726 2018-01-15  Richard Biener  <rguenther@suse.de>
18728         * BASE-VER: Bump to 8.0.1.
18730 2018-01-14  Martin Sebor  <msebor@redhat.com>
18732         PR other/83508
18733         * builtins.c (check_access): Avoid warning when the no-warning bit
18734         is set.
18736 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18738         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18739         * ira-color (allocno_hard_regs_compare): Likewise.
18741 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18743         PR target/83013
18744         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18745         Use .pushsection/.popsection.
18747 2018-01-14  Martin Sebor  <msebor@redhat.com>
18749         PR c++/81327
18750         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18752 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18754         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18755         entry from extra_headers.
18756         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18757         extra_headers, make the list bitwise identical to the i?86-*-* one.
18759 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18761         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18762         -mcmodel=large with -mindirect-branch=thunk,
18763         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18764         -mfunction-return=thunk-extern.
18765         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18766         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18767         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18769 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18771         * config/i386/i386.c (print_reg): Print the name of the full
18772         integer register without '%'.
18773         (ix86_print_operand): Handle 'V'.
18774         * doc/extend.texi: Document 'V' modifier.
18776 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18778         * config/i386/constraints.md (Bs): Disallow memory operand for
18779         -mindirect-branch-register.
18780         (Bw): Likewise.
18781         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18782         (GOT_memory_operand): Likewise.
18783         (call_insn_operand): Likewise.
18784         (sibcall_insn_operand): Likewise.
18785         (GOT32_symbol_operand): Likewise.
18786         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18787         for -mindirect-branch-register.
18788         (tablejump): Likewise.
18789         (*sibcall_memory): Likewise.
18790         (*sibcall_value_memory): Likewise.
18791         Disallow peepholes of indirect call and jump via memory for
18792         -mindirect-branch-register.
18793         (*call_pop): Replace m with Bw.
18794         (*call_value_pop): Likewise.
18795         (*sibcall_pop_memory): Replace m with Bs.
18796         * config/i386/i386.opt (mindirect-branch-register): New option.
18797         * doc/invoke.texi: Document -mindirect-branch-register option.
18799 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18801         * config/i386/i386-protos.h (ix86_output_function_return): New.
18802         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18803         set function_return_type.
18804         (indirect_thunk_name): Add ret_p to indicate thunk for function
18805         return.
18806         (output_indirect_thunk_function): Pass false to
18807         indirect_thunk_name.
18808         (ix86_output_indirect_branch_via_reg): Likewise.
18809         (ix86_output_indirect_branch_via_push): Likewise.
18810         (output_indirect_thunk_function): Create alias for function
18811         return thunk if regno < 0.
18812         (ix86_output_function_return): New function.
18813         (ix86_handle_fndecl_attribute): Handle function_return.
18814         (ix86_attribute_table): Add function_return.
18815         * config/i386/i386.h (machine_function): Add
18816         function_return_type.
18817         * config/i386/i386.md (simple_return_internal): Use
18818         ix86_output_function_return.
18819         (simple_return_internal_long): Likewise.
18820         * config/i386/i386.opt (mfunction-return=): New option.
18821         (indirect_branch): Mention -mfunction-return=.
18822         * doc/extend.texi: Document function_return function attribute.
18823         * doc/invoke.texi: Document -mfunction-return= option.
18825 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18827         * config/i386/i386-opts.h (indirect_branch): New.
18828         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18829         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18830         with local indirect jump when converting indirect call and jump.
18831         (ix86_set_indirect_branch_type): New.
18832         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18833         (indirectlabelno): New.
18834         (indirect_thunk_needed): Likewise.
18835         (indirect_thunk_bnd_needed): Likewise.
18836         (indirect_thunks_used): Likewise.
18837         (indirect_thunks_bnd_used): Likewise.
18838         (INDIRECT_LABEL): Likewise.
18839         (indirect_thunk_name): Likewise.
18840         (output_indirect_thunk): Likewise.
18841         (output_indirect_thunk_function): Likewise.
18842         (ix86_output_indirect_branch_via_reg): Likewise.
18843         (ix86_output_indirect_branch_via_push): Likewise.
18844         (ix86_output_indirect_branch): Likewise.
18845         (ix86_output_indirect_jmp): Likewise.
18846         (ix86_code_end): Call output_indirect_thunk_function if needed.
18847         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18848         needed.
18849         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18850         (ix86_attribute_table): Add indirect_branch.
18851         * config/i386/i386.h (machine_function): Add indirect_branch_type
18852         and has_local_indirect_jump.
18853         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18854         to true.
18855         (tablejump): Likewise.
18856         (*indirect_jump): Use ix86_output_indirect_jmp.
18857         (*tablejump_1): Likewise.
18858         (simple_return_indirect_internal): Likewise.
18859         * config/i386/i386.opt (mindirect-branch=): New option.
18860         (indirect_branch): New.
18861         (keep): Likewise.
18862         (thunk): Likewise.
18863         (thunk-inline): Likewise.
18864         (thunk-extern): Likewise.
18865         * doc/extend.texi: Document indirect_branch function attribute.
18866         * doc/invoke.texi: Document -mindirect-branch= option.
18868 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
18870         PR ipa/83051
18871         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18873 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
18875         * ipa-inline.c (want_inline_small_function_p): Return false if
18876         inlining has already failed with CIF_FINAL_ERROR.
18877         (update_caller_keys): Call want_inline_small_function_p before
18878         can_inline_edge_p.
18879         (update_callee_keys): Likewise.
18881 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18883         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18884         New function.
18885         (rs6000_quadword_masked_address_p): Likewise.
18886         (quad_aligned_load_p): Likewise.
18887         (quad_aligned_store_p): Likewise.
18888         (const_load_sequence_p): Add comment to describe the outer-most loop.
18889         (mimic_memory_attributes_and_flags): New function.
18890         (rs6000_gen_stvx): Likewise.
18891         (replace_swapped_aligned_store): Likewise.
18892         (rs6000_gen_lvx): Likewise.
18893         (replace_swapped_aligned_load): Likewise.
18894         (replace_swapped_load_constant): Capitalize argument name in
18895         comment describing this function.
18896         (rs6000_analyze_swaps): Add a third pass to search for vector loads
18897         and stores that access quad-word aligned addresses and replace
18898         with stvx or lvx instructions when appropriate.
18899         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18900         New function prototype.
18901         (rs6000_quadword_masked_address_p): Likewise.
18902         (rs6000_gen_lvx): Likewise.
18903         (rs6000_gen_stvx): Likewise.
18904         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18905         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18906         when memory address is aligned.
18907         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18908         this split to select lvx instruction when memory address is aligned.
18909         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18910         instruction when memory address is aligned.
18911         (*vsx_le_perm_load_v16qi): Likewise.
18912         (four unnamed splitters): Modify to select the stvx instruction
18913         when memory is aligned.
18915 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
18917         * predict.c (determine_unlikely_bbs): Handle correctly BBs
18918         which appears in the queue multiple times.
18920 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18921             Alan Hayward  <alan.hayward@arm.com>
18922             David Sherwood  <david.sherwood@arm.com>
18924         * tree-vectorizer.h (vec_lower_bound): New structure.
18925         (_loop_vec_info): Add check_nonzero and lower_bounds.
18926         (LOOP_VINFO_CHECK_NONZERO): New macro.
18927         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18928         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18929         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18930         fields.  Make seg_len the distance travelled, not including the
18931         access size.
18932         (dr_direction_indicator): Declare.
18933         (dr_zero_step_indicator): Likewise.
18934         (dr_known_forward_stride_p): Likewise.
18935         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18936         tree-ssanames.h.
18937         (runtime_alias_check_p): Allow runtime alias checks with
18938         variable strides.
18939         (operator ==): Compare access_size and align.
18940         (prune_runtime_alias_test_list): Rework for new distinction between
18941         the access_size and seg_len.
18942         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
18943         segment lengths.
18944         (get_segment_min_max): New function.
18945         (create_intersect_range_checks): Use it.
18946         (dr_step_indicator): New function.
18947         (dr_direction_indicator): Likewise.
18948         (dr_zero_step_indicator): Likewise.
18949         (dr_known_forward_stride_p): Likewise.
18950         * tree-loop-distribution.c (data_ref_segment_size): Return
18951         DR_STEP * (niters - 1).
18952         (compute_alias_check_pairs): Update call to the dr_with_seg_len
18953         constructor.
18954         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18955         (vect_preserves_scalar_order_p): New function, split out from...
18956         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
18957         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18958         (vect_vfa_access_size): New function.
18959         (vect_vfa_align): Likewise.
18960         (vect_compile_time_alias): Take access_size_a and access_b arguments.
18961         (dump_lower_bound): New function.
18962         (vect_check_lower_bound): Likewise.
18963         (vect_small_gap_p): Likewise.
18964         (vectorizable_with_step_bound_p): Likewise.
18965         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18966         depencies if the vectorization factor is 1.  Convert the checks
18967         for nonzero steps into checks on the bounds of DR_STEP.  Try using
18968         a bunds check for variable steps if the minimum required step is
18969         relatively small. Update calls to the dr_with_seg_len
18970         constructor and to vect_compile_time_alias.
18971         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18972         function.
18973         (vect_loop_versioning): Call it.
18974         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18975         when retrying.
18976         (vect_estimate_min_profitable_iters): Account for any bounds checks.
18978 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18979             Alan Hayward  <alan.hayward@arm.com>
18980             David Sherwood  <david.sherwood@arm.com>
18982         * doc/sourcebuild.texi (vect_scatter_store): Document.
18983         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18984         optabs.
18985         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18986         Document.
18987         * genopinit.c (main): Add supports_vec_scatter_store and
18988         supports_vec_scatter_store_cached to target_optabs.
18989         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18990         IFN_MASK_SCATTER_STORE.
18991         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18992         functions.
18993         * internal-fn.h (internal_store_fn_p): Declare.
18994         (internal_fn_stored_value_index): Likewise.
18995         * internal-fn.c (scatter_store_direct): New macro.
18996         (expand_scatter_store_optab_fn): New function.
18997         (direct_scatter_store_optab_supported_p): New macro.
18998         (internal_store_fn_p): New function.
18999         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19000         IFN_MASK_SCATTER_STORE.
19001         (internal_fn_mask_index): Likewise.
19002         (internal_fn_stored_value_index): New function.
19003         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19004         for scatter stores.
19005         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19006         * optabs-query.c (supports_vec_scatter_store_p): New function.
19007         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19008         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19009         true for scatter stores.
19010         (vect_gather_scatter_fn_p): Handle scatter stores too.
19011         (vect_check_gather_scatter): Consider using scatter stores if
19012         supports_vec_scatter_store_p.
19013         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19014         scatter stores too.
19015         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19016         internal_fn_stored_value_index.
19017         (check_load_store_masking): Handle scatter stores too.
19018         (vect_get_store_rhs): Make public.
19019         (vectorizable_call): Use internal_store_fn_p.
19020         (vectorizable_store): Handle scatter store internal functions.
19021         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19022         when deciding whether the end of the group has been reached.
19023         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19024         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19025         (mask_scatter_store<mode>): New insns.
19027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19028             Alan Hayward  <alan.hayward@arm.com>
19029             David Sherwood  <david.sherwood@arm.com>
19031         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19032         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19033         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19034         function.
19035         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19036         Use vect_truncate_gather_scatter_offset if we can't treat the
19037         operation as a normal gather load or scatter store.
19038         (get_group_load_store_type): Take the gather_scatter_info
19039         as argument.  Try using a gather load or scatter store for
19040         single-element groups.
19041         (get_load_store_type): Update calls to get_group_load_store_type
19042         and vect_use_strided_gather_scatters_p.
19044 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19045             Alan Hayward  <alan.hayward@arm.com>
19046             David Sherwood  <david.sherwood@arm.com>
19048         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19049         optional tree argument.
19050         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19051         null target hooks.
19052         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19053         but continue to use the current value as a fallback.
19054         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19055         to compare the updates.
19056         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19057         (get_load_store_type): Use it when handling a strided access.
19058         (vect_get_strided_load_store_ops): New function.
19059         (vect_get_data_ptr_increment): Likewise.
19060         (vectorizable_load): Handle strided gather loads.  Always pass
19061         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19063 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19064             Alan Hayward  <alan.hayward@arm.com>
19065             David Sherwood  <david.sherwood@arm.com>
19067         * doc/md.texi (gather_load@var{m}): Document.
19068         (mask_gather_load@var{m}): Likewise.
19069         * genopinit.c (main): Add supports_vec_gather_load and
19070         supports_vec_gather_load_cached to target_optabs.
19071         * optabs-tree.c (init_tree_optimization_optabs): Use
19072         ggc_cleared_alloc to allocate target_optabs.
19073         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19074         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19075         functions.
19076         * internal-fn.h (internal_load_fn_p): Declare.
19077         (internal_gather_scatter_fn_p): Likewise.
19078         (internal_fn_mask_index): Likewise.
19079         (internal_gather_scatter_fn_supported_p): Likewise.
19080         * internal-fn.c (gather_load_direct): New macro.
19081         (expand_gather_load_optab_fn): New function.
19082         (direct_gather_load_optab_supported_p): New macro.
19083         (direct_internal_fn_optab): New function.
19084         (internal_load_fn_p): Likewise.
19085         (internal_gather_scatter_fn_p): Likewise.
19086         (internal_fn_mask_index): Likewise.
19087         (internal_gather_scatter_fn_supported_p): Likewise.
19088         * optabs-query.c (supports_at_least_one_mode_p): New function.
19089         (supports_vec_gather_load_p): Likewise.
19090         * optabs-query.h (supports_vec_gather_load_p): Declare.
19091         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19092         and memory_type field.
19093         (NUM_PATTERNS): Bump to 15.
19094         * tree-vect-data-refs.c: Include internal-fn.h.
19095         (vect_gather_scatter_fn_p): New function.
19096         (vect_describe_gather_scatter_call): Likewise.
19097         (vect_check_gather_scatter): Try using internal functions for
19098         gather loads.  Recognize existing calls to a gather load function.
19099         (vect_analyze_data_refs): Consider using gather loads if
19100         supports_vec_gather_load_p.
19101         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19102         (vect_get_gather_scatter_offset_type): Likewise.
19103         (vect_convert_mask_for_vectype): Likewise.
19104         (vect_add_conversion_to_patterm): Likewise.
19105         (vect_try_gather_scatter_pattern): Likewise.
19106         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19107         (vect_vect_recog_func_ptrs): Add it.
19108         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19109         internal_fn_mask_index and internal_gather_scatter_fn_p.
19110         (check_load_store_masking): Take the gather_scatter_info as an
19111         argument and handle gather loads.
19112         (vect_get_gather_scatter_ops): New function.
19113         (vectorizable_call): Check internal_load_fn_p.
19114         (vectorizable_load): Likewise.  Handle gather load internal
19115         functions.
19116         (vectorizable_store): Update call to check_load_store_masking.
19117         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19118         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19119         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19120         (aarch64_gather_scale_operand_d): New predicates.
19121         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19122         (mask_gather_load<mode>): New insns.
19124 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19125             Alan Hayward  <alan.hayward@arm.com>
19126             David Sherwood  <david.sherwood@arm.com>
19128         * optabs.def (fold_left_plus_optab): New optab.
19129         * doc/md.texi (fold_left_plus_@var{m}): Document.
19130         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19131         * internal-fn.c (fold_left_direct): Define.
19132         (expand_fold_left_optab_fn): Likewise.
19133         (direct_fold_left_optab_supported_p): Likewise.
19134         * fold-const-call.c (fold_const_fold_left): New function.
19135         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19136         * tree-parloops.c (valid_reduction_p): New function.
19137         (gather_scalar_reductions): Use it.
19138         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19139         (vect_finish_replace_stmt): Declare.
19140         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19141         (needs_fold_left_reduction_p): New function, split out from...
19142         (vect_is_simple_reduction): ...here.  Accept reductions that
19143         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19144         (vect_force_simple_reduction): Also store the reduction type in
19145         the assignment's STMT_VINFO_REDUC_TYPE.
19146         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19147         (merge_with_identity): New function.
19148         (vect_expand_fold_left): Likewise.
19149         (vectorize_fold_left_reduction): Likewise.
19150         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19151         scalar phi in place for it.  Check for target support and reject
19152         cases that would reassociate the operation.  Defer the transform
19153         phase to vectorize_fold_left_reduction.
19154         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19155         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19156         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19158 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19160         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19161         call to ifc_temp_var.
19163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19164             Alan Hayward  <alan.hayward@arm.com>
19165             David Sherwood  <david.sherwood@arm.com>
19167         * target.def (legitimize_address_displacement): Take the original
19168         offset as a poly_int.
19169         * targhooks.h (default_legitimize_address_displacement): Update
19170         accordingly.
19171         * targhooks.c (default_legitimize_address_displacement): Likewise.
19172         * doc/tm.texi: Regenerate.
19173         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19174         as an argument, moving assert of ad->disp == ad->disp_term to...
19175         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19176         Try calling targetm.legitimize_address_displacement before expanding
19177         the address rather than afterwards, and adjust for the new interface.
19178         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19179         Match the new hook interface.  Handle SVE addresses.
19180         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19181         new hook interface.
19183 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19185         * Makefile.in (OBJS): Add early-remat.o.
19186         * target.def (select_early_remat_modes): New hook.
19187         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19188         * doc/tm.texi: Regenerate.
19189         * targhooks.h (default_select_early_remat_modes): Declare.
19190         * targhooks.c (default_select_early_remat_modes): New function.
19191         * timevar.def (TV_EARLY_REMAT): New timevar.
19192         * passes.def (pass_early_remat): New pass.
19193         * tree-pass.h (make_pass_early_remat): Declare.
19194         * early-remat.c: New file.
19195         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19196         function.
19197         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
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-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19204         vfm1 with a bound_epilog parameter.
19205         (vect_do_peeling): Update calls accordingly, and move the prologue
19206         call earlier in the function.  Treat the base bound_epilog as 0 for
19207         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19208         this base when peeling for gaps.
19209         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19210         with fully-masked loops.
19211         (vect_estimate_min_profitable_iters): Handle the single peeled
19212         iteration in that case.
19214 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19215             Alan Hayward  <alan.hayward@arm.com>
19216             David Sherwood  <david.sherwood@arm.com>
19218         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19219         single-element interleaving even if the size is not a power of 2.
19220         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19221         accesses for single-element interleaving if the group size is
19222         not a power of 2.
19224 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19225             Alan Hayward  <alan.hayward@arm.com>
19226             David Sherwood  <david.sherwood@arm.com>
19228         * doc/md.texi (fold_extract_last_@var{m}): Document.
19229         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19230         * optabs.def (fold_extract_last_optab): New optab.
19231         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19232         * internal-fn.c (fold_extract_direct): New macro.
19233         (expand_fold_extract_optab_fn): Likewise.
19234         (direct_fold_extract_optab_supported_p): Likewise.
19235         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19236         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19237         EXTRACT_LAST_REDUCTION.
19238         (get_initial_def_for_reduction): Do not create an initial vector
19239         for EXTRACT_LAST_REDUCTION reductions.
19240         (vectorizable_reduction): Leave the scalar phi in place for
19241         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19242         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19243         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19244         transform phase to vectorizable_condition.
19245         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19246         split out from...
19247         (vect_finish_stmt_generation): ...here.
19248         (vect_finish_replace_stmt): New function.
19249         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19250         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19251         pattern.
19252         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19254 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19255             Alan Hayward  <alan.hayward@arm.com>
19256             David Sherwood  <david.sherwood@arm.com>
19258         * doc/md.texi (extract_last_@var{m}): Document.
19259         * optabs.def (extract_last_optab): New optab.
19260         * internal-fn.def (EXTRACT_LAST): New internal function.
19261         * internal-fn.c (cond_unary_direct): New macro.
19262         (expand_cond_unary_optab_fn): Likewise.
19263         (direct_cond_unary_optab_supported_p): Likewise.
19264         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19265         loops using EXTRACT_LAST.
19266         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19267         (extract_last_<mode>): ...this optab.
19268         (vec_extract<mode><Vel>): Update accordingly.
19270 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19271             Alan Hayward  <alan.hayward@arm.com>
19272             David Sherwood  <david.sherwood@arm.com>
19274         * target.def (empty_mask_is_expensive): New hook.
19275         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19276         * doc/tm.texi: Regenerate.
19277         * targhooks.h (default_empty_mask_is_expensive): Declare.
19278         * targhooks.c (default_empty_mask_is_expensive): New function.
19279         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19280         if the target says that empty masks are expensive.
19281         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19282         New function.
19283         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19285 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19286             Alan Hayward  <alan.hayward@arm.com>
19287             David Sherwood  <david.sherwood@arm.com>
19289         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19290         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19291         (vect_use_loop_mask_for_alignment_p): New function.
19292         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19293         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19294         niters_skip argument.  Make sure that the first niters_skip elements
19295         of the first iteration are inactive.
19296         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19297         Update call to vect_set_loop_masks_directly.
19298         (get_misalign_in_elems): New function, split out from...
19299         (vect_gen_prolog_loop_niters): ...here.
19300         (vect_update_init_of_dr): Take a code argument that specifies whether
19301         the adjustment should be added or subtracted.
19302         (vect_update_init_of_drs): Likewise.
19303         (vect_prepare_for_masked_peels): New function.
19304         (vect_do_peeling): Skip prologue peeling if we're using a mask
19305         instead.  Update call to vect_update_inits_of_drs.
19306         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19307         mask_skip_niters.
19308         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19309         alignment.  Do not include the number of peeled iterations in
19310         the minimum threshold in that case.
19311         (vectorizable_induction): Adjust the start value down by
19312         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19313         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19314         Take the number of skipped iterations into account when calculating
19315         the loop bounds.
19316         * tree-vect-stmts.c (vect_gen_while_not): New function.
19318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19319             Alan Hayward  <alan.hayward@arm.com>
19320             David Sherwood  <david.sherwood@arm.com>
19322         * doc/sourcebuild.texi (vect_fully_masked): Document.
19323         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19324         default value to 0.
19325         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19326         split out from...
19327         (vect_analyze_loop_2): ...here. Don't check the vectorization
19328         factor against the number of loop iterations if the loop is
19329         fully-masked.
19331 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19332             Alan Hayward  <alan.hayward@arm.com>
19333             David Sherwood  <david.sherwood@arm.com>
19335         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19336         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19337         (dump_groups): Update accordingly.
19338         (iv_use::mem_type): New member variable.
19339         (address_p): New function.
19340         (record_use): Add a mem_type argument and initialize the new
19341         mem_type field.
19342         (record_group_use): Add a mem_type argument.  Use address_p.
19343         Remove obsolete null checks of base_object.  Update call to record_use.
19344         (find_interesting_uses_op): Update call to record_group_use.
19345         (find_interesting_uses_cond): Likewise.
19346         (find_interesting_uses_address): Likewise.
19347         (get_mem_type_for_internal_fn): New function.
19348         (find_address_like_use): Likewise.
19349         (find_interesting_uses_stmt): Try find_address_like_use before
19350         calling find_interesting_uses_op.
19351         (addr_offset_valid_p): Use the iv mem_type field as the type
19352         of the addressed memory.
19353         (add_autoinc_candidates): Likewise.
19354         (get_address_cost): Likewise.
19355         (split_small_address_groups_p): Use address_p.
19356         (split_address_groups): Likewise.
19357         (add_iv_candidate_for_use): Likewise.
19358         (autoinc_possible_for_pair): Likewise.
19359         (rewrite_groups): Likewise.
19360         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19361         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19362         (get_alias_ptr_type_for_ptr_address): New function.
19363         (rewrite_use_address): Rewrite address uses in calls that were
19364         identified by find_address_like_use.
19366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19367             Alan Hayward  <alan.hayward@arm.com>
19368             David Sherwood  <david.sherwood@arm.com>
19370         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19371         TARGET_MEM_REFs.
19372         * gimple-expr.h (is_gimple_addressable: Likewise.
19373         * gimple-expr.c (is_gimple_address): Likewise.
19374         * internal-fn.c (expand_call_mem_ref): New function.
19375         (expand_mask_load_optab_fn): Use it.
19376         (expand_mask_store_optab_fn): Likewise.
19378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19379             Alan Hayward  <alan.hayward@arm.com>
19380             David Sherwood  <david.sherwood@arm.com>
19382         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19383         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19384         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19385         (cond_umax@var{mode}): Document.
19386         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19387         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19388         (cond_umin_optab, cond_umax_optab): New optabs.
19389         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19390         (COND_IOR, COND_XOR): New internal functions.
19391         * internal-fn.h (get_conditional_internal_fn): Declare.
19392         * internal-fn.c (cond_binary_direct): New macro.
19393         (expand_cond_binary_optab_fn): Likewise.
19394         (direct_cond_binary_optab_supported_p): Likewise.
19395         (get_conditional_internal_fn): New function.
19396         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19397         Cope with reduction statements that are vectorized as calls rather
19398         than assignments.
19399         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19400         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19401         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19402         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19403         (UNSPEC_COND_EOR): New unspecs.
19404         (optab): Add mappings for them.
19405         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19406         (sve_int_op, sve_fp_op): New int attributes.
19408 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19409             Alan Hayward  <alan.hayward@arm.com>
19410             David Sherwood  <david.sherwood@arm.com>
19412         * optabs.def (while_ult_optab): New optab.
19413         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19414         * internal-fn.def (WHILE_ULT): New internal function.
19415         * internal-fn.h (direct_internal_fn_supported_p): New override
19416         that takes two types as argument.
19417         * internal-fn.c (while_direct): New macro.
19418         (expand_while_optab_fn): New function.
19419         (convert_optab_supported_p): Likewise.
19420         (direct_while_optab_supported_p): New macro.
19421         * wide-int.h (wi::udiv_ceil): New function.
19422         * tree-vectorizer.h (rgroup_masks): New structure.
19423         (vec_loop_masks): New typedef.
19424         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19425         and fully_masked_p.
19426         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19427         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19428         (vect_max_vf): New function.
19429         (slpeel_make_loop_iterate_ntimes): Delete.
19430         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19431         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19432         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19433         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19434         internal-fn.h, stor-layout.h and optabs-query.h.
19435         (vect_set_loop_mask): New function.
19436         (add_preheader_seq): Likewise.
19437         (add_header_seq): Likewise.
19438         (interleave_supported_p): Likewise.
19439         (vect_maybe_permute_loop_masks): Likewise.
19440         (vect_set_loop_masks_directly): Likewise.
19441         (vect_set_loop_condition_masked): Likewise.
19442         (vect_set_loop_condition_unmasked): New function, split out from
19443         slpeel_make_loop_iterate_ntimes.
19444         (slpeel_make_loop_iterate_ntimes): Rename to..
19445         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19446         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19447         (vect_do_peeling): Update call accordingly.
19448         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19449         loops.
19450         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19451         mask_compare_type, can_fully_mask_p and fully_masked_p.
19452         (release_vec_loop_masks): New function.
19453         (_loop_vec_info): Use it to free the loop masks.
19454         (can_produce_all_loop_masks_p): New function.
19455         (vect_get_max_nscalars_per_iter): Likewise.
19456         (vect_verify_full_masking): Likewise.
19457         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19458         retries, and free the mask rgroups before retrying.  Check loop-wide
19459         reasons for disallowing fully-masked loops.  Make the final decision
19460         about whether use a fully-masked loop or not.
19461         (vect_estimate_min_profitable_iters): Do not assume that peeling
19462         for the number of iterations will be needed for fully-masked loops.
19463         (vectorizable_reduction): Disable fully-masked loops.
19464         (vectorizable_live_operation): Likewise.
19465         (vect_halve_mask_nunits): New function.
19466         (vect_double_mask_nunits): Likewise.
19467         (vect_record_loop_mask): Likewise.
19468         (vect_get_loop_mask): Likewise.
19469         (vect_transform_loop): Handle the case in which the final loop
19470         iteration might handle a partial vector.  Call vect_set_loop_condition
19471         instead of slpeel_make_loop_iterate_ntimes.
19472         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19473         (check_load_store_masking): New function.
19474         (prepare_load_store_mask): Likewise.
19475         (vectorizable_store): Handle fully-masked loops.
19476         (vectorizable_load): Likewise.
19477         (supportable_widening_operation): Use vect_halve_mask_nunits for
19478         booleans.
19479         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19480         (vect_gen_while): New function.
19481         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19482         (aarch64_uqdec<mode>): New insn.
19484 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19485             Alan Hayward  <alan.hayward@arm.com>
19486             David Sherwood  <david.sherwood@arm.com>
19488         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19489         (reduc_xor_scal_optab): New optabs.
19490         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19491         (reduc_xor_scal_@var{m}): Document.
19492         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19493         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19494         internal functions.
19495         * fold-const-call.c (fold_const_call): Handle them.
19496         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19497         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19498         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19499         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19500         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19501         (UNSPEC_XORV): New unspecs.
19502         (optab): Add entries for them.
19503         (BITWISEV): New int iterator.
19504         (bit_reduc_op): New int attributes.
19506 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19507             Alan Hayward  <alan.hayward@arm.com>
19508             David Sherwood  <david.sherwood@arm.com>
19510         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19511         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19512         * optabs.def (vec_shl_insert_optab): New optab.
19513         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19514         (duplicate_and_interleave): Likewise.
19515         * tree-vect-loop.c: Include internal-fn.h.
19516         (neutral_op_for_slp_reduction): New function, split out from
19517         get_initial_defs_for_reduction.
19518         (get_initial_def_for_reduction): Handle option 2 for variable-length
19519         vectors by loading the neutral value into a vector and then shifting
19520         the initial value into element 0.
19521         (get_initial_defs_for_reduction): Replace the code argument with
19522         the neutral value calculated by neutral_op_for_slp_reduction.
19523         Use gimple_build_vector for constant-length vectors.
19524         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19525         but the first group_size elements have a neutral value.
19526         Use duplicate_and_interleave otherwise.
19527         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19528         Update call to get_initial_defs_for_reduction.  Handle SLP
19529         reductions for variable-length vectors by creating one vector
19530         result for each scalar result, with the elements associated
19531         with other scalar results stubbed out with the neutral value.
19532         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19533         Require IFN_VEC_SHL_INSERT for double reductions on
19534         variable-length vectors, or SLP reductions that have
19535         a neutral value.  Require can_duplicate_and_interleave_p
19536         support for variable-length unchained SLP reductions if there
19537         is no neutral value, such as for MIN/MAX reductions.  Also require
19538         the number of vector elements to be a multiple of the number of
19539         SLP statements when doing variable-length unchained SLP reductions.
19540         Update call to vect_create_epilog_for_reduction.
19541         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19542         and remove initial values.
19543         (duplicate_and_interleave): Make public.
19544         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19545         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19547 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19548             Alan Hayward  <alan.hayward@arm.com>
19549             David Sherwood  <david.sherwood@arm.com>
19551         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19552         (can_duplicate_and_interleave_p): New function.
19553         (vect_get_and_check_slp_defs): Take the vector of statements
19554         rather than just the current one.  Remove excess parentheses.
19555         Restriction rejectinon of vect_constant_def and vect_external_def
19556         for variable-length vectors to boolean types, or types for which
19557         can_duplicate_and_interleave_p is false.
19558         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19559         (duplicate_and_interleave): New function.
19560         (vect_get_constant_vectors): Use gimple_build_vector for
19561         constant-length vectors and suitable variable-length constant
19562         vectors.  Use duplicate_and_interleave for other variable-length
19563         vectors.  Don't defer the update when inserting new statements.
19565 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19566             Alan Hayward  <alan.hayward@arm.com>
19567             David Sherwood  <david.sherwood@arm.com>
19569         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19570         min_profitable_iters doesn't go negative.
19572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19573             Alan Hayward  <alan.hayward@arm.com>
19574             David Sherwood  <david.sherwood@arm.com>
19576         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19577         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19578         * optabs.def (vec_mask_load_lanes_optab): New optab.
19579         (vec_mask_store_lanes_optab): Likewise.
19580         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19581         (MASK_STORE_LANES): Likewise.
19582         * internal-fn.c (mask_load_lanes_direct): New macro.
19583         (mask_store_lanes_direct): Likewise.
19584         (expand_mask_load_optab_fn): Handle masked operations.
19585         (expand_mask_load_lanes_optab_fn): New macro.
19586         (expand_mask_store_optab_fn): Handle masked operations.
19587         (expand_mask_store_lanes_optab_fn): New macro.
19588         (direct_mask_load_lanes_optab_supported_p): Likewise.
19589         (direct_mask_store_lanes_optab_supported_p): Likewise.
19590         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19591         parameter.
19592         (vect_load_lanes_supported): Likewise.
19593         * tree-vect-data-refs.c (strip_conversion): New function.
19594         (can_group_stmts_p): Likewise.
19595         (vect_analyze_data_ref_accesses): Use it instead of checking
19596         for a pair of assignments.
19597         (vect_store_lanes_supported): Take a masked_p parameter.
19598         (vect_load_lanes_supported): Likewise.
19599         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19600         vect_store_lanes_supported and vect_load_lanes_supported.
19601         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19602         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19603         parameter.  Don't allow gaps for masked accesses.
19604         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19605         and vect_load_lanes_supported.
19606         (get_load_store_type): Take a masked_p parameter and update
19607         call to get_group_load_store_type.
19608         (vectorizable_store): Update call to get_load_store_type.
19609         Handle IFN_MASK_STORE_LANES.
19610         (vectorizable_load): Update call to get_load_store_type.
19611         Handle IFN_MASK_LOAD_LANES.
19613 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19614             Alan Hayward  <alan.hayward@arm.com>
19615             David Sherwood  <david.sherwood@arm.com>
19617         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19618         modes for SVE.
19619         * config/aarch64/aarch64-protos.h
19620         (aarch64_sve_struct_memory_operand_p): Declare.
19621         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19622         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19623         (VPRED, vpred): Handle SVE structure modes.
19624         * config/aarch64/constraints.md (Utx): New constraint.
19625         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19626         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19627         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19628         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19629         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19630         structure modes.  Split into pieces after RA.
19631         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19632         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19633         New patterns.
19634         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19635         SVE structure modes.
19636         (aarch64_classify_address): Likewise.
19637         (sizetochar): Move earlier in file.
19638         (aarch64_print_operand): Handle SVE register lists.
19639         (aarch64_array_mode): New function.
19640         (aarch64_sve_struct_memory_operand_p): Likewise.
19641         (TARGET_ARRAY_MODE): Redefine.
19643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19644             Alan Hayward  <alan.hayward@arm.com>
19645             David Sherwood  <david.sherwood@arm.com>
19647         * target.def (array_mode): New target hook.
19648         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19649         * doc/tm.texi: Regenerate.
19650         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19651         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19652         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19653         targetm.array_mode.
19654         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19655         type sizes.
19657 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19658             Alan Hayward  <alan.hayward@arm.com>
19659             David Sherwood  <david.sherwood@arm.com>
19661         * fold-const.c (fold_binary_loc): Check the argument types
19662         rather than the result type when testing for a vector operation.
19664 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19666         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19667         * doc/tm.texi: Regenerate.
19669 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19670             Alan Hayward  <alan.hayward@arm.com>
19671             David Sherwood  <david.sherwood@arm.com>
19673         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19674         (sve): Document new AArch64 extension.
19675         * doc/md.texi (w): Extend the description of the AArch64
19676         constraint to include SVE vectors.
19677         (Upl, Upa): Document new AArch64 predicate constraints.
19678         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19679         enum.
19680         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19681         (msve-vector-bits=): New option.
19682         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19683         SVE when these are disabled.
19684         (sve): New extension.
19685         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19686         modes.  Adjust their number of units based on aarch64_sve_vg.
19687         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19688         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19689         aarch64_addr_query_type.
19690         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19691         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19692         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19693         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19694         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19695         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19696         (aarch64_simd_imm_zero_p): Delete.
19697         (aarch64_check_zero_based_sve_index_immediate): Declare.
19698         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19699         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19700         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19701         (aarch64_sve_float_mul_immediate_p): Likewise.
19702         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19703         rather than an rtx.
19704         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19705         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19706         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19707         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19708         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19709         (aarch64_regmode_natural_size): Likewise.
19710         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19711         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19712         left one place.
19713         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19714         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19715         for VG and the SVE predicate registers.
19716         (V_ALIASES): Add a "z"-prefixed alias.
19717         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19718         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19719         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19720         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19721         (REG_CLASS_NAMES): Add entries for them.
19722         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19723         and the predicate registers.
19724         (aarch64_sve_vg): Declare.
19725         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19726         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19727         (REGMODE_NATURAL_SIZE): Define.
19728         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19729         SVE macros.
19730         * config/aarch64/aarch64.c: Include cfgrtl.h.
19731         (simd_immediate_info): Add a constructor for series vectors,
19732         and an associated step field.
19733         (aarch64_sve_vg): New variable.
19734         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19735         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19736         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19737         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19738         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19739         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19740         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19741         (aarch64_get_mask_mode): New functions.
19742         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19743         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19744         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19745         predicate modes and predicate registers.  Explicitly restrict
19746         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19747         to store a vector mode if it is recognized by
19748         aarch64_classify_vector_mode.
19749         (aarch64_regmode_natural_size): New function.
19750         (aarch64_hard_regno_caller_save_mode): Return the original mode
19751         for predicates.
19752         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19753         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19754         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19755         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19756         functions.
19757         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19758         does not overlap dest if the function is frame-related.  Handle
19759         SVE constants.
19760         (aarch64_split_add_offset): New function.
19761         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19762         them aarch64_add_offset.
19763         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19764         and update call to aarch64_sub_sp.
19765         (aarch64_add_cfa_expression): New function.
19766         (aarch64_expand_prologue): Pass extra temporary registers to the
19767         functions above.  Handle the case in which we need to emit new
19768         DW_CFA_expressions for registers that were originally saved
19769         relative to the stack pointer, but now have to be expressed
19770         relative to the frame pointer.
19771         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19772         functions above.
19773         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19774         IP0 and IP1 values for SVE frames.
19775         (aarch64_expand_vec_series): New function.
19776         (aarch64_expand_sve_widened_duplicate): Likewise.
19777         (aarch64_expand_sve_const_vector): Likewise.
19778         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19779         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19780         into the register, rather than emitting a SET directly.
19781         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19782         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19783         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19784         (offset_9bit_signed_scaled_p): New functions.
19785         (aarch64_replicate_bitmask_imm): New function.
19786         (aarch64_bitmask_imm): Use it.
19787         (aarch64_cannot_force_const_mem): Reject expressions involving
19788         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19789         (aarch64_classify_index): Handle SVE indices, by requiring
19790         a plain register index with a scale that matches the element size.
19791         (aarch64_classify_address): Handle SVE addresses.  Assert that
19792         the mode of the address is VOIDmode or an integer mode.
19793         Update call to aarch64_classify_symbol.
19794         (aarch64_classify_symbolic_expression): Update call to
19795         aarch64_classify_symbol.
19796         (aarch64_const_vec_all_in_range_p): New function.
19797         (aarch64_print_vector_float_operand): Likewise.
19798         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19799         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19800         and the FP immediates 1.0 and 0.5.
19801         (aarch64_print_address_internal): Handle SVE addresses.
19802         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19803         (aarch64_regno_regclass): Handle predicate registers.
19804         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19805         data modes.
19806         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19807         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19808         (aarch64_convert_sve_vector_bits): New function.
19809         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19810         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19811         rather than an rtx.
19812         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19813         Handle SVE vector and predicate modes.  Accept VL-based constants
19814         that need only one temporary register, and VL offsets that require
19815         no temporary registers.
19816         (aarch64_conditional_register_usage): Mark the predicate registers
19817         as fixed if SVE isn't available.
19818         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19819         Return true for SVE vector and predicate modes.
19820         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19821         rather than an unsigned int.  Handle SVE modes.
19822         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19823         SVE modes.
19824         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19825         if SVE is enabled.
19826         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19827         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19828         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19829         (aarch64_sve_float_mul_immediate_p): New functions.
19830         (aarch64_sve_valid_immediate): New function.
19831         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19832         Explicitly reject structure modes.  Check for INDEX constants.
19833         Handle PTRUE and PFALSE constants.
19834         (aarch64_check_zero_based_sve_index_immediate): New function.
19835         (aarch64_simd_imm_zero_p): Delete.
19836         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19837         vector modes.  Accept constants in the range of CNT[BHWD].
19838         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19839         ask for an Advanced SIMD mode.
19840         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19841         (aarch64_simd_vector_alignment): Handle SVE predicates.
19842         (aarch64_vectorize_preferred_vector_alignment): New function.
19843         (aarch64_simd_vector_alignment_reachable): Use it instead of
19844         the vector size.
19845         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19846         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19847         functions.
19848         (MAX_VECT_LEN): Delete.
19849         (expand_vec_perm_d): Add a vec_flags field.
19850         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19851         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19852         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19853         for SVE modes.
19854         (aarch64_evpc_rev): Rename to...
19855         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19856         (aarch64_evpc_rev_global): New function.
19857         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19858         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19859         MAX_VECT_LEN.
19860         (aarch64_evpc_sve_tbl): New function.
19861         (aarch64_expand_vec_perm_const_1): Update after rename of
19862         aarch64_evpc_rev.  Handle SVE permutes too, trying
19863         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19864         than aarch64_evpc_tbl.
19865         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19866         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19867         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19868         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19869         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19870         (aarch64_expand_sve_vcond): New functions.
19871         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19872         of aarch64_vector_mode_p.
19873         (aarch64_dwarf_poly_indeterminate_value): New function.
19874         (aarch64_compute_pressure_classes): Likewise.
19875         (aarch64_can_change_mode_class): Likewise.
19876         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19877         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19878         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19879         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19880         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19881         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19882         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19883         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19884         constraints.
19885         (Dn, Dl, Dr): Accept const as well as const_vector.
19886         (Dz): Likewise.  Compare against CONST0_RTX.
19887         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19888         of "vector" where appropriate.
19889         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19890         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19891         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19892         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19893         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19894         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19895         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19896         (v_int_equiv): Extend to SVE modes.
19897         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19898         mode attributes.
19899         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19900         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19901         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19902         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19903         (SVE_COND_FP_CMP): New int iterators.
19904         (perm_hilo): Handle the new unpack unspecs.
19905         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19906         attributes.
19907         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19908         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19909         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19910         (aarch64_equality_operator, aarch64_constant_vector_operand)
19911         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19912         (aarch64_sve_nonimmediate_operand): Likewise.
19913         (aarch64_sve_general_operand): Likewise.
19914         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19915         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19916         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19917         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19918         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19919         (aarch64_sve_float_arith_immediate): Likewise.
19920         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19921         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19922         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19923         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19924         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19925         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19926         (aarch64_sve_float_arith_operand): Likewise.
19927         (aarch64_sve_float_arith_with_sub_operand): Likewise.
19928         (aarch64_sve_float_mul_operand): Likewise.
19929         (aarch64_sve_vec_perm_operand): Likewise.
19930         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19931         (aarch64_mov_operand): Accept const_poly_int and const_vector.
19932         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19933         as well as const_vector.
19934         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19935         in file.  Use CONST0_RTX and CONSTM1_RTX.
19936         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
19937         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19938         Use aarch64_simd_imm_zero.
19939         * config/aarch64/aarch64-sve.md: New file.
19940         * config/aarch64/aarch64.md: Include it.
19941         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19942         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19943         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19944         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19945         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19946         (sve): New attribute.
19947         (enabled): Disable instructions with the sve attribute unless
19948         TARGET_SVE.
19949         (movqi, movhi): Pass CONST_POLY_INT operaneds through
19950         aarch64_expand_mov_immediate.
19951         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19952         CNT[BHSD] immediates.
19953         (movti): Split CONST_POLY_INT moves into two halves.
19954         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19955         Split additions that need a temporary here if the destination
19956         is the stack pointer.
19957         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19958         (*add<mode>3_poly_1): New instruction.
19959         (set_clobber_cc): New expander.
19961 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19963         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19964         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
19965         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19966         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19967         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
19968         Change innermode from fixed_mode_size to machine_mode.
19969         (simplify_subreg): Update call accordingly.  Handle a constant-sized
19970         subreg of a variable-length CONST_VECTOR.
19972 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19973             Alan Hayward  <alan.hayward@arm.com>
19974             David Sherwood  <david.sherwood@arm.com>
19976         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19977         (add_offset_to_base): New function, split out from...
19978         (create_mem_ref): ...here.  When handling a scale other than 1,
19979         check first whether the address is valid without the offset.
19980         Add it into the base if so, leaving the index and scale as-is.
19982 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19984         PR c++/83778
19985         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19986         fold_for_warn before checking if arg2 is INTEGER_CST.
19988 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
19990         * config/rs6000/predicates.md (load_multiple_operation): Delete.
19991         (store_multiple_operation): Delete.
19992         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19993         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19994         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19995         guarded by TARGET_STRING.
19996         (rs6000_output_load_multiple): Delete.
19997         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19998         OPTION_MASK_STRING / TARGET_STRING handling.
19999         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20000         (const rs6000_opt_masks) <"string">: Change mask to 0.
20001         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20002         (MASK_STRING): Delete.
20003         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20004         parts.  Simplify.
20005         (load_multiple): Delete.
20006         (*ldmsi8): Delete.
20007         (*ldmsi7): Delete.
20008         (*ldmsi6): Delete.
20009         (*ldmsi5): Delete.
20010         (*ldmsi4): Delete.
20011         (*ldmsi3): Delete.
20012         (store_multiple): Delete.
20013         (*stmsi8): Delete.
20014         (*stmsi7): Delete.
20015         (*stmsi6): Delete.
20016         (*stmsi5): Delete.
20017         (*stmsi4): Delete.
20018         (*stmsi3): Delete.
20019         (movmemsi_8reg): Delete.
20020         (corresponding unnamed define_insn): Delete.
20021         (movmemsi_6reg): Delete.
20022         (corresponding unnamed define_insn): Delete.
20023         (movmemsi_4reg): Delete.
20024         (corresponding unnamed define_insn): Delete.
20025         (movmemsi_2reg): Delete.
20026         (corresponding unnamed define_insn): Delete.
20027         (movmemsi_1reg): Delete.
20028         (corresponding unnamed define_insn): Delete.
20029         * config/rs6000/rs6000.opt (mno-string): New.
20030         (mstring): Replace by deprecation warning stub.
20031         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20033 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20035         * regrename.c (regrename_do_replace): If replacing the same
20036         reg multiple times, try to reuse last created gen_raw_REG.
20038         PR debug/81155
20039         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20040         main to workaround a bug in GDB.
20042 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20044         PR target/83737
20045         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20047 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20049         PR rtl-optimization/80481
20050         * ira-color.c (get_cap_member): New function.
20051         (allocnos_conflict_by_live_ranges_p): Use it.
20052         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20053         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20055 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20057         PR target/83628
20058         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20059         (*saddl_se_1): Ditto.
20060         (*ssubsi_1): Ditto.
20061         (*ssubl_se_1): Ditto.
20063 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20065         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20066         rather than wi::to_widest for DR_INITs.
20067         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20068         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20069         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20070         INTEGER_CSTs.
20071         (vect_analyze_group_access_1): Note that here.
20073 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20075         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20076         polynomial type sizes.
20078 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20080         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20081         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20082         (gimple_add_tmp_var): Likewise.
20084 2018-01-12  Martin Liska  <mliska@suse.cz>
20086         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20087         (gimple_alloc_sizes): Likewise.
20088         (dump_gimple_statistics): Use PRIu64 in printf format.
20089         * gimple.h: Change uint64_t to int.
20091 2018-01-12  Martin Liska  <mliska@suse.cz>
20093         * tree-core.h: Use uint64_t instead of int.
20094         * tree.c (tree_node_counts): Likewise.
20095         (tree_node_sizes): Likewise.
20096         (dump_tree_statistics): Use PRIu64 in printf format.
20098 2018-01-12  Martin Liska  <mliska@suse.cz>
20100         * Makefile.in: As qsort_chk is implemented in vec.c, add
20101         vec.o to linkage of gencfn-macros.
20102         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20103         passing the info to record_node_allocation_statistics.
20104         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20105         and pass the info.
20106         * ggc-common.c (struct ggc_usage): Add operator== and use
20107         it in operator< and compare function.
20108         * mem-stats.h (struct mem_usage): Likewise.
20109         * vec.c (struct vec_usage): Remove operator< and compare
20110         function. Can be simply inherited.
20112 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20114         PR target/81616
20115         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20116         * tree-ssa-math-opts.c: Include domwalk.h.
20117         (convert_mult_to_fma_1): New function.
20118         (fma_transformation_info): New type.
20119         (fma_deferring_state): Likewise.
20120         (cancel_fma_deferring): New function.
20121         (result_of_phi): Likewise.
20122         (last_fma_candidate_feeds_initial_phi): Likewise.
20123         (convert_mult_to_fma): Added deferring logic, split actual
20124         transformation to convert_mult_to_fma_1.
20125         (math_opts_dom_walker): New type.
20126         (math_opts_dom_walker::after_dom_children): New method, body moved
20127         here from pass_optimize_widening_mul::execute, added deferring logic
20128         bits.
20129         (pass_optimize_widening_mul::execute): Moved most of code to
20130         math_opts_dom_walker::after_dom_children.
20131         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20132         * config/i386/i386.c (ix86_option_override_internal): Added
20133         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20135 2018-01-12  Richard Biener  <rguenther@suse.de>
20137         PR debug/83157
20138         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20139         inline instance vars.
20141 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20143         PR target/81819
20144         * config/rx/rx.c (rx_is_restricted_memory_address):
20145         Handle SUBREG case.
20147 2018-01-12  Richard Biener  <rguenther@suse.de>
20149         PR tree-optimization/80846
20150         * target.def (split_reduction): New target hook.
20151         * targhooks.c (default_split_reduction): New function.
20152         * targhooks.h (default_split_reduction): Declare.
20153         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20154         target requests first reduce vectors by combining low and high
20155         parts.
20156         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20157         (get_vectype_for_scalar_type_and_size): Export.
20158         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20159         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20160         * doc/tm.texi: Regenerate.
20161         * config/i386/i386.c (ix86_split_reduction): Implement
20162         TARGET_VECTORIZE_SPLIT_REDUCTION.
20164 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20166         PR target/83368
20167         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20168         in PIC mode except for TARGET_VXWORKS_RTP.
20169         * config/sparc/sparc.c: Include cfgrtl.h.
20170         (TARGET_INIT_PIC_REG): Define.
20171         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20172         (sparc_pic_register_p): New predicate.
20173         (sparc_legitimate_address_p): Use it.
20174         (sparc_legitimize_pic_address): Likewise.
20175         (sparc_delegitimize_address): Likewise.
20176         (sparc_mode_dependent_address_p): Likewise.
20177         (gen_load_pcrel_sym): Remove 4th parameter.
20178         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20179         (sparc_expand_prologue): Do not call load_got_register here.
20180         (sparc_flat_expand_prologue): Likewise.
20181         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20182         (sparc_use_pseudo_pic_reg): New function.
20183         (sparc_init_pic_reg): Likewise.
20184         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20185         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20187 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20189         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20190         Add item for branch_cost.
20192 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20194         PR rtl-optimization/83565
20195         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20196         not extend the result to a larger mode for rotate operations.
20197         (num_sign_bit_copies1): Likewise.
20199 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20201         PR target/40411
20202         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20203         -symbolic.
20204         Use values-Xc.o for -pedantic.
20205         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20207 2018-01-12  Martin Liska  <mliska@suse.cz>
20209         PR ipa/83054
20210         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20211         New function.
20212         (possible_polymorphic_call_targets): Use it.
20213         (ipa_devirt): Likewise.
20215 2018-01-12  Martin Liska  <mliska@suse.cz>
20217         * profile-count.h (enum profile_quality): Use 0 as invalid
20218         enum value of profile_quality.
20220 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20222         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20223         -mext-string options.
20225 2018-01-12  Richard Biener  <rguenther@suse.de>
20227         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20228         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20229         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20230         Likewise.
20231         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20233 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20235         * configure.ac (--with-long-double-format): Add support for the
20236         configuration option to change the default long double format on
20237         PowerPC systems.
20238         * config.gcc (powerpc*-linux*-*): Likewise.
20239         * configure: Regenerate.
20240         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20241         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20242         used without modification.
20244 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20246         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20247         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20248         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20249         MISC_BUILTIN_SPEC_BARRIER.
20250         (rs6000_init_builtins): Likewise.
20251         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20252         enum value.
20253         (speculation_barrier): New define_insn.
20254         * doc/extend.texi: Document __builtin_speculation_barrier.
20256 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20258         PR target/83203
20259         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20260         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20261         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20262         iterators.
20263         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20264         integral modes instead of "ss" and "sd".
20265         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20266         vectors with 32-bit and 64-bit elements.
20267         (vecdupssescalarmodesuffix): New mode attribute.
20268         (vec_dup<mode>): Use it.
20270 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20272         PR target/83330
20273         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20274         frame if argument is passed on stack.
20276 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20278         PR target/82682
20279         * ree.c (combine_reaching_defs): Optimize also
20280         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20281         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20283 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20285         PR middle-end/83189
20286         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20288 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20290         PR middle-end/83718
20291         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20292         after they are computed.
20294 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20296         PR tree-optimization/83695
20297         * gimple-loop-linterchange.cc
20298         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20299         reset cached scev information after interchange.
20300         (pass_linterchange::execute): Remove call to scev_reset_htab.
20302 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20304         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20305         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20306         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20307         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20308         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20309         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20310         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20311         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20312         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20313         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20314         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20315         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20316         (V_lane_reg): Likewise.
20317         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20318         New define_expand.
20319         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20320         (vfmal_lane_low<mode>_intrinsic,
20321         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20322         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20323         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20324         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20325         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20326         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20328 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20330         * config/arm/arm-cpus.in (fp16fml): New feature.
20331         (ALL_SIMD): Add fp16fml.
20332         (armv8.2-a): Add fp16fml as an option.
20333         (armv8.3-a): Likewise.
20334         (armv8.4-a): Add fp16fml as part of fp16.
20335         * config/arm/arm.h (TARGET_FP16FML): Define.
20336         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20337         when appropriate.
20338         * config/arm/arm-modes.def (V2HF): Define.
20339         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20340         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20341         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20342         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20343         vfmsl_low, vfmsl_high): New set of builtins.
20344         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20345         (vfml_op): New code attribute.
20346         (VFMLHALVES): New int iterator.
20347         (VFML, VFMLSEL): New mode attributes.
20348         (V_reg): Define mapping for V2HF.
20349         (V_hi, V_lo): New mode attributes.
20350         (VF_constraint): Likewise.
20351         (vfml_half, vfml_half_selector): New int attributes.
20352         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20353         define_expand.
20354         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20355         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20356         New define_insn.
20357         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20358         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20359         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20360         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20361         documentation.
20362         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20363         Document new effective target and option set.
20365 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20367         * config/arm/arm-cpus.in (armv8_4): New feature.
20368         (ARMv8_4a): New fgroup.
20369         (armv8.4-a): New arch.
20370         * config/arm/arm-tables.opt: Regenerate.
20371         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20372         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20373         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20374         Add matching rules for -march=armv8.4-a and extensions.
20375         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20377 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20379         PR target/81821
20380         * config/rx/rx.md (BW): New mode attribute.
20381         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20383 2018-01-11  Richard Biener  <rguenther@suse.de>
20385         PR tree-optimization/83435
20386         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20387         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20388         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20390 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20391             Alan Hayward  <alan.hayward@arm.com>
20392             David Sherwood  <david.sherwood@arm.com>
20394         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20395         field.
20396         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20397         (aarch64_print_address_internal): Use it to check for a zero offset.
20399 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20400             Alan Hayward  <alan.hayward@arm.com>
20401             David Sherwood  <david.sherwood@arm.com>
20403         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20404         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20405         Return a poly_int64 rather than a HOST_WIDE_INT.
20406         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20407         rather than a HOST_WIDE_INT.
20408         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20409         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20410         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20411         final_offset from HOST_WIDE_INT to poly_int64.
20412         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20413         to_constant when getting the number of units in an Advanced SIMD
20414         mode.
20415         (aarch64_builtin_vectorized_function): Check for a constant number
20416         of units.
20417         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20418         GET_MODE_SIZE.
20419         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20420         attribute instead of GET_MODE_NUNITS.
20421         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20422         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20423         GET_MODE_SIZE for fixed-size registers.
20424         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20425         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20426         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20427         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20428         (aarch64_print_operand, aarch64_print_address_internal)
20429         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20430         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20431         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20432         Handle polynomial GET_MODE_SIZE.
20433         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20434         wider than SImode without modification.
20435         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20436         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20437         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20438         passing and returning SVE modes.
20439         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20440         rather than GEN_INT.
20441         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20442         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20443         (aarch64_allocate_and_probe_stack_space): Likewise.
20444         (aarch64_layout_frame): Cope with polynomial offsets.
20445         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20446         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20447         polynomial offsets.
20448         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20449         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20450         poly_int64 rather than a HOST_WIDE_INT.
20451         (aarch64_get_separate_components, aarch64_process_components)
20452         (aarch64_expand_prologue, aarch64_expand_epilogue)
20453         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20454         (aarch64_anchor_offset): New function, split out from...
20455         (aarch64_legitimize_address): ...here.
20456         (aarch64_builtin_vectorization_cost): Handle polynomial
20457         TYPE_VECTOR_SUBPARTS.
20458         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20459         GET_MODE_NUNITS.
20460         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20461         number of elements from the PARALLEL rather than the mode.
20462         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20463         rather than GET_MODE_BITSIZE.
20464         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20465         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20466         (aarch64_expand_vec_perm_const_1): Handle polynomial
20467         d->perm.length () and d->perm elements.
20468         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20469         Apply to_constant to d->perm elements.
20470         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20471         polynomial CONST_VECTOR_NUNITS.
20472         (aarch64_move_pointer): Take amount as a poly_int64 rather
20473         than an int.
20474         (aarch64_progress_pointer): Avoid temporary variable.
20475         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20476         the mode attribute instead of GET_MODE.
20478 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20479             Alan Hayward  <alan.hayward@arm.com>
20480             David Sherwood  <david.sherwood@arm.com>
20482         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20483         x exists before using it.
20484         (aarch64_add_constant_internal): Rename to...
20485         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20486         src and dest rtxes.  Handle the case in which they're different,
20487         including when the offset is zero.  Replace scratchreg with an rtx.
20488         Use 2 additions if there is no spare register into which we can
20489         move a 16-bit constant.
20490         (aarch64_add_constant): Delete.
20491         (aarch64_add_offset): Replace reg with separate src and dest
20492         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20493         Use aarch64_add_offset_1.
20494         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20495         an rtx rather than an int.  Take the delta as a poly_int64
20496         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20497         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20498         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20499         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20500         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20501         and aarch64_add_sp.
20502         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20503         aarch64_add_constant.
20505 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20507         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20508         Use scalar_float_mode.
20510 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20512         * config/aarch64/aarch64-simd.md
20513         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20514         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20515         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20516         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20517         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20518         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20519         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20520         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20521         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20522         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20524 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20526         PR target/83514
20527         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20528         targ_options->x_arm_arch_string is non NULL.
20530 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20532         * config/aarch64/aarch64.h
20533         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20535 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20537         PR target/82096
20538         * expmed.c (emit_store_flag_force): Swap if const op0
20539         and change VOIDmode to mode of op0.
20541 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20543         PR rtl-optimization/83761
20544         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20545         than bytes to mode_for_size.
20547 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20549         PR middle-end/83189
20550         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20551         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20552         profile.
20554 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20556         PR middle-end/83575
20557         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20558         when in layout mode.
20559         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20560         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20561         partition fixup.
20563 2018-01-10  Michael Collison  <michael.collison@arm.com>
20565         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20566         * config/aarch64/aarch64-option-extension.def: Add
20567         AARCH64_OPT_EXTENSION of 'fp16fml'.
20568         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20569         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20570         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20571         * config/aarch64/constraints.md (Ui7): New constraint.
20572         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20573         (VFMLA_SEL_W): Ditto.
20574         (f16quad): Ditto.
20575         (f16mac1): Ditto.
20576         (VFMLA16_LOW): New int iterator.
20577         (VFMLA16_HIGH): Ditto.
20578         (UNSPEC_FMLAL): New unspec.
20579         (UNSPEC_FMLSL): Ditto.
20580         (UNSPEC_FMLAL2): Ditto.
20581         (UNSPEC_FMLSL2): Ditto.
20582         (f16mac): New code attribute.
20583         * config/aarch64/aarch64-simd-builtins.def
20584         (aarch64_fmlal_lowv2sf): Ditto.
20585         (aarch64_fmlsl_lowv2sf): Ditto.
20586         (aarch64_fmlalq_lowv4sf): Ditto.
20587         (aarch64_fmlslq_lowv4sf): Ditto.
20588         (aarch64_fmlal_highv2sf): Ditto.
20589         (aarch64_fmlsl_highv2sf): Ditto.
20590         (aarch64_fmlalq_highv4sf): Ditto.
20591         (aarch64_fmlslq_highv4sf): Ditto.
20592         (aarch64_fmlal_lane_lowv2sf): Ditto.
20593         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20594         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20595         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20596         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20597         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20598         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20599         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20600         (aarch64_fmlal_lane_highv2sf): Ditto.
20601         (aarch64_fmlsl_lane_highv2sf): Ditto.
20602         (aarch64_fmlal_laneq_highv2sf): Ditto.
20603         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20604         (aarch64_fmlalq_lane_highv4sf): Ditto.
20605         (aarch64_fmlsl_lane_highv4sf): Ditto.
20606         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20607         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20608         * config/aarch64/aarch64-simd.md:
20609         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20610         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20611         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20612         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20613         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20614         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20615         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20616         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20617         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20618         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20619         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20620         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20621         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20622         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20623         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20624         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20625         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20626         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20627         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20628         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20629         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20630         (vfmlsl_low_u32): Ditto.
20631         (vfmlalq_low_u32): Ditto.
20632         (vfmlslq_low_u32): Ditto.
20633         (vfmlal_high_u32): Ditto.
20634         (vfmlsl_high_u32): Ditto.
20635         (vfmlalq_high_u32): Ditto.
20636         (vfmlslq_high_u32): Ditto.
20637         (vfmlal_lane_low_u32): Ditto.
20638         (vfmlsl_lane_low_u32): Ditto.
20639         (vfmlal_laneq_low_u32): Ditto.
20640         (vfmlsl_laneq_low_u32): Ditto.
20641         (vfmlalq_lane_low_u32): Ditto.
20642         (vfmlslq_lane_low_u32): Ditto.
20643         (vfmlalq_laneq_low_u32): Ditto.
20644         (vfmlslq_laneq_low_u32): Ditto.
20645         (vfmlal_lane_high_u32): Ditto.
20646         (vfmlsl_lane_high_u32): Ditto.
20647         (vfmlal_laneq_high_u32): Ditto.
20648         (vfmlsl_laneq_high_u32): Ditto.
20649         (vfmlalq_lane_high_u32): Ditto.
20650         (vfmlslq_lane_high_u32): Ditto.
20651         (vfmlalq_laneq_high_u32): Ditto.
20652         (vfmlslq_laneq_high_u32): Ditto.
20653         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20654         (AARCH64_FL_FOR_ARCH8_4): New.
20655         (AARCH64_ISA_F16FML): New ISA flag.
20656         (TARGET_F16FML): New feature flag for fp16fml.
20657         (doc/invoke.texi): Document new fp16fml option.
20659 2018-01-10  Michael Collison  <michael.collison@arm.com>
20661         * config/aarch64/aarch64-builtins.c:
20662         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20663         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20664         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20665         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20666         (AARCH64_ISA_SHA3): New ISA flag.
20667         (TARGET_SHA3): New feature flag for sha3.
20668         * config/aarch64/iterators.md (sha512_op): New int attribute.
20669         (CRYPTO_SHA512): New int iterator.
20670         (UNSPEC_SHA512H): New unspec.
20671         (UNSPEC_SHA512H2): Ditto.
20672         (UNSPEC_SHA512SU0): Ditto.
20673         (UNSPEC_SHA512SU1): Ditto.
20674         * config/aarch64/aarch64-simd-builtins.def
20675         (aarch64_crypto_sha512hqv2di): New builtin.
20676         (aarch64_crypto_sha512h2qv2di): Ditto.
20677         (aarch64_crypto_sha512su0qv2di): Ditto.
20678         (aarch64_crypto_sha512su1qv2di): Ditto.
20679         (aarch64_eor3qv8hi): Ditto.
20680         (aarch64_rax1qv2di): Ditto.
20681         (aarch64_xarqv2di): Ditto.
20682         (aarch64_bcaxqv8hi): Ditto.
20683         * config/aarch64/aarch64-simd.md:
20684         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20685         (aarch64_crypto_sha512su0qv2di): Ditto.
20686         (aarch64_crypto_sha512su1qv2di): Ditto.
20687         (aarch64_eor3qv8hi): Ditto.
20688         (aarch64_rax1qv2di): Ditto.
20689         (aarch64_xarqv2di): Ditto.
20690         (aarch64_bcaxqv8hi): Ditto.
20691         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20692         (vsha512h2q_u64): Ditto.
20693         (vsha512su0q_u64): Ditto.
20694         (vsha512su1q_u64): Ditto.
20695         (veor3q_u16): Ditto.
20696         (vrax1q_u64): Ditto.
20697         (vxarq_u64): Ditto.
20698         (vbcaxq_u16): Ditto.
20699         * config/arm/types.md (crypto_sha512): New type attribute.
20700         (crypto_sha3): Ditto.
20701         (doc/invoke.texi): Document new sha3 option.
20703 2018-01-10  Michael Collison  <michael.collison@arm.com>
20705         * config/aarch64/aarch64-builtins.c:
20706         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20707         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20708         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20709         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20710         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20711         (AARCH64_ISA_SM4): New ISA flag.
20712         (TARGET_SM4): New feature flag for sm4.
20713         * config/aarch64/aarch64-simd-builtins.def
20714         (aarch64_sm3ss1qv4si): Ditto.
20715         (aarch64_sm3tt1aq4si): Ditto.
20716         (aarch64_sm3tt1bq4si): Ditto.
20717         (aarch64_sm3tt2aq4si): Ditto.
20718         (aarch64_sm3tt2bq4si): Ditto.
20719         (aarch64_sm3partw1qv4si): Ditto.
20720         (aarch64_sm3partw2qv4si): Ditto.
20721         (aarch64_sm4eqv4si): Ditto.
20722         (aarch64_sm4ekeyqv4si): Ditto.
20723         * config/aarch64/aarch64-simd.md:
20724         (aarch64_sm3ss1qv4si): Ditto.
20725         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20726         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20727         (aarch64_sm4eqv4si): Ditto.
20728         (aarch64_sm4ekeyqv4si): Ditto.
20729         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20730         (sm3part_op): Ditto.
20731         (CRYPTO_SM3TT): Ditto.
20732         (CRYPTO_SM3PART): Ditto.
20733         (UNSPEC_SM3SS1): New unspec.
20734         (UNSPEC_SM3TT1A): Ditto.
20735         (UNSPEC_SM3TT1B): Ditto.
20736         (UNSPEC_SM3TT2A): Ditto.
20737         (UNSPEC_SM3TT2B): Ditto.
20738         (UNSPEC_SM3PARTW1): Ditto.
20739         (UNSPEC_SM3PARTW2): Ditto.
20740         (UNSPEC_SM4E): Ditto.
20741         (UNSPEC_SM4EKEY): Ditto.
20742         * config/aarch64/constraints.md (Ui2): New constraint.
20743         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20744         * config/arm/types.md (crypto_sm3): New type attribute.
20745         (crypto_sm4): Ditto.
20746         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20747         (vsm3tt1aq_u32): Ditto.
20748         (vsm3tt1bq_u32): Ditto.
20749         (vsm3tt2aq_u32): Ditto.
20750         (vsm3tt2bq_u32): Ditto.
20751         (vsm3partw1q_u32): Ditto.
20752         (vsm3partw2q_u32): Ditto.
20753         (vsm4eq_u32): Ditto.
20754         (vsm4ekeyq_u32): Ditto.
20755         (doc/invoke.texi): Document new sm4 option.
20757 2018-01-10  Michael Collison  <michael.collison@arm.com>
20759         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20760         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20761         (AARCH64_FL_FOR_ARCH8_4): New.
20762         (AARCH64_FL_V8_4): New flag.
20763         (doc/invoke.texi): Document new armv8.4-a option.
20765 2018-01-10  Michael Collison  <michael.collison@arm.com>
20767         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20768         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20769         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20770         * config/aarch64/aarch64-option-extension.def: Add
20771         AARCH64_OPT_EXTENSION of 'sha2'.
20772         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20773         (crypto): Disable sha2 and aes if crypto disabled.
20774         (crypto): Enable aes and sha2 if enabled.
20775         (simd): Disable sha2 and aes if simd disabled.
20776         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20777         New flags.
20778         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20779         (TARGET_SHA2): New feature flag for sha2.
20780         (TARGET_AES): New feature flag for aes.
20781         * config/aarch64/aarch64-simd.md:
20782         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20783         conditional on TARGET_AES.
20784         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20785         (aarch64_crypto_sha1hsi): Make pattern conditional
20786         on TARGET_SHA2.
20787         (aarch64_crypto_sha1hv4si): Ditto.
20788         (aarch64_be_crypto_sha1hv4si): Ditto.
20789         (aarch64_crypto_sha1su1v4si): Ditto.
20790         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20791         (aarch64_crypto_sha1su0v4si): Ditto.
20792         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20793         (aarch64_crypto_sha256su0v4si): Ditto.
20794         (aarch64_crypto_sha256su1v4si): Ditto.
20795         (doc/invoke.texi): Document new aes and sha2 options.
20797 2018-01-10  Martin Sebor  <msebor@redhat.com>
20799         PR tree-optimization/83781
20800         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20801         as string arrays.
20803 2018-01-11  Martin Sebor  <msebor@gmail.com>
20804             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20806         PR tree-optimization/83501
20807         PR tree-optimization/81703
20809         * tree-ssa-strlen.c (get_string_cst): Rename...
20810         (get_string_len): ...to this.  Handle global constants.
20811         (handle_char_store): Adjust.
20813 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20814             Jim Wilson  <jimw@sifive.com>
20816         * config/riscv/riscv-protos.h (riscv_output_return): New.
20817         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20818         (riscv_attribute_table, riscv_output_return),
20819         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20820         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20821         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20822         function.
20823         (riscv_expand_prologue): Add early return for naked function.
20824         (riscv_expand_epilogue): Likewise.
20825         (riscv_function_ok_for_sibcall): Return false for naked function.
20826         (riscv_set_current_function): New.
20827         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20828         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20829         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20830         * doc/extend.texi (RISC-V Function Attributes): New.
20832 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20834         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20835         check for 128-bit long double before checking TCmode.
20836         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20837         128-bit long doubles before checking TFmode or TCmode.
20838         (FLOAT128_IBM_P): Likewise.
20840 2018-01-10  Martin Sebor  <msebor@redhat.com>
20842         PR tree-optimization/83671
20843         * builtins.c (c_strlen): Unconditionally return zero for the empty
20844         string.
20845         Use -Warray-bounds for warnings.
20846         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20847         for non-constant array indices with COMPONENT_REF, arrays of
20848         arrays, and pointers to arrays.
20849         (gimple_fold_builtin_strlen): Determine and set length range for
20850         non-constant character arrays.
20852 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20854         PR middle-end/81897
20855         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20856         empty blocks.
20858 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20860         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20862 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20864         PR target/83399
20865         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20866         VECTOR_MEM_ALTIVEC_OR_VSX_P.
20867         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20868         indexed_or_indirect_operand predicate.
20869         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20870         (*vsx_le_perm_load_v8hi): Likewise.
20871         (*vsx_le_perm_load_v16qi): Likewise.
20872         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20873         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20874         (*vsx_le_perm_store_v8hi): Likewise.
20875         (*vsx_le_perm_store_v16qi): Likewise.
20876         (eight unnamed splitters): Likewise.
20878 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20880         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20881         * config/rs6000/emmintrin.h: Likewise.
20882         * config/rs6000/mmintrin.h: Likewise.
20883         * config/rs6000/xmmintrin.h: Likewise.
20885 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
20887         PR c++/43486
20888         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20889         "public_flag".
20890         * tree.c (tree_nop_conversion): Return true for location wrapper
20891         nodes.
20892         (maybe_wrap_with_location): New function.
20893         (selftest::check_strip_nops): New function.
20894         (selftest::test_location_wrappers): New function.
20895         (selftest::tree_c_tests): Call it.
20896         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20897         (maybe_wrap_with_location): New decl.
20898         (EXPR_LOCATION_WRAPPER_P): New macro.
20899         (location_wrapper_p): New inline function.
20900         (tree_strip_any_location_wrapper): New inline function.
20902 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
20904         PR target/83735
20905         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20906         stack_realign_offset for the largest alignment of stack slot
20907         actually used.
20908         (ix86_find_max_used_stack_alignment): New function.
20909         (ix86_finalize_stack_frame_flags): Use it.  Set
20910         max_used_stack_alignment if we don't realign stack.
20911         * config/i386/i386.h (machine_function): Add
20912         max_used_stack_alignment.
20914 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
20916         * config/arm/arm.opt (-mbranch-cost): New option.
20917         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20918         account.
20920 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
20922         PR target/83629
20923         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20924         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20926 2018-01-10  Richard Biener  <rguenther@suse.de>
20928         PR debug/83765
20929         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20930         early out so it also covers the case where we have a non-NULL
20931         origin.
20933 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20935         PR tree-optimization/83753
20936         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20937         for non-strided grouped accesses if the number of elements is 1.
20939 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20941         PR target/81616
20942         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20943         * i386.h (TARGET_USE_GATHER): Define.
20944         * x86-tune.def (X86_TUNE_USE_GATHER): New.
20946 2018-01-10  Martin Liska  <mliska@suse.cz>
20948         PR bootstrap/82831
20949         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20950         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20951         partitioning.
20952         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20953         CLEANUP_NO_PARTITIONING is not set.
20955 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20957         * doc/rtl.texi: Remove documentation of (const ...) wrappers
20958         for vectors, as a partial revert of r254296.
20959         * rtl.h (const_vec_p): Delete.
20960         (const_vec_duplicate_p): Don't test for vector CONSTs.
20961         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20962         * expmed.c (make_tree): Likewise.
20964         Revert:
20965         * common.md (E, F): Use CONSTANT_P instead of checking for
20966         CONST_VECTOR.
20967         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20968         checking for CONST_VECTOR.
20970 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20972         PR middle-end/83575
20973         * predict.c (force_edge_cold): Handle in more sane way edges
20974         with no prediction.
20976 2018-01-09  Carl Love  <cel@us.ibm.com>
20978         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20979         V4SI, V4SF types.
20980         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20981         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20982         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20983         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
20984         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20985         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
20986         * config/rs6000/rs6000-protos.h: Add extern defition for
20987         rs6000_generate_float2_double_code.
20988         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20989         function.
20990         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20991         (float2_v2df): Add define_expand.
20993 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
20995         PR target/83628
20996         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20997         op_mode in the force_to_mode call.
20999 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21001         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21002         instead of checking each element individually.
21003         (aarch64_evpc_uzp): Likewise.
21004         (aarch64_evpc_zip): Likewise.
21005         (aarch64_evpc_ext): Likewise.
21006         (aarch64_evpc_rev): Likewise.
21007         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21008         instead of checking each element individually.  Return true without
21009         generating rtl if
21010         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21011         whether all selected elements come from the same input, instead of
21012         checking each element individually.  Remove calls to gen_rtx_REG,
21013         start_sequence and end_sequence and instead assert that no rtl is
21014         generated.
21016 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21018         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21019         order of HIGH and CONST checks.
21021 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21023         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21024         if the destination isn't an SSA_NAME.
21026 2018-01-09  Richard Biener  <rguenther@suse.de>
21028         PR tree-optimization/83668
21029         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21030         move prologue...
21031         (canonicalize_loop_form): ... here, renamed from ...
21032         (canonicalize_loop_closed_ssa_form): ... this and amended to
21033         swap successor edges for loop exit blocks to make us use
21034         the RPO order we need for initial schedule generation.
21036 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21038         PR tree-optimization/64811
21039         * match.pd: When optimizing comparisons with Inf, avoid
21040         introducing or losing exceptions from comparisons with NaN.
21042 2018-01-09  Martin Liska  <mliska@suse.cz>
21044         PR sanitizer/82517
21045         * asan.c (shadow_mem_size): Add gcc_assert.
21047 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21049         Don't save registers in main().
21051         PR target/83738
21052         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21053         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21054         * config/avr/avr.c (avr_set_current_function): Don't error if
21055         naked, OS_task or OS_main are specified at the same time.
21056         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21057         OS_main.
21058         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21059         attribute.
21060         * common/config/avr/avr-common.c (avr_option_optimization_table):
21061         Switch on -mmain-is-OS_task for optimizing compilations.
21063 2018-01-09  Richard Biener  <rguenther@suse.de>
21065         PR tree-optimization/83572
21066         * graphite.c: Include cfganal.h.
21067         (graphite_transform_loops): Connect infinite loops to exit
21068         and remove fake edges at the end.
21070 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21072         * ipa-inline.c (edge_badness): Revert accidental checkin.
21074 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21076         PR ipa/80763
21077         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21078         symbols; not inline clones.
21080 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21082         PR target/83507
21083         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21084         hard registers.  Formatting fixes.
21086         PR preprocessor/83722
21087         * gcc.c (try_generate_repro): Pass
21088         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21089         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21090         do_report_bug.
21092 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21093             Kito Cheng  <kito.cheng@gmail.com>
21095         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21096         (riscv_leaf_function_p): Delete.
21097         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21099 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21101         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21102         function.
21103         (do_ifelse): New function.
21104         (do_isel): New function.
21105         (do_sub3): New function.
21106         (do_add3): New function.
21107         (do_load_mask_compare): New function.
21108         (do_overlap_load_compare): New function.
21109         (expand_compare_loop): New function.
21110         (expand_block_compare): Call expand_compare_loop() when appropriate.
21111         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21112         option description.
21113         (-mblock-compare-inline-loop-limit): New option.
21115 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21117         PR target/83677
21118         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21119         Reverse order of second and third operands in first alternative.
21120         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21121         of first and second elements in UNSPEC_VPERMR vector.
21122         (altivec_expand_vec_perm_le): Likewise.
21124 2018-01-08  Jeff Law  <law@redhat.com>
21126         PR rtl-optimizatin/81308
21127         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21128         (process_switch): If group_case_labels makes a change, then set
21129         cfg_altered.
21130         (pass_convert_switch::execute): If a switch is converted, then
21131         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21133         PR rtl-optimization/81308
21134         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21135         splitting insns.
21137 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21139         PR target/83663 - Revert r255946
21140         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21141         generation for cases where splatting a value is not useful.
21142         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21143         across a vec_duplicate and a paradoxical subreg forming a vector
21144         mode to a vec_concat.
21146 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21148         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21149         -march=armv8.3-a variants.
21150         * config/arm/t-multilib: Likewise.
21151         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21153 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21155         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21156         to generate rtl.
21157         (cceq_ior_compare_complement): Give it a name so I can use it, and
21158         change boolean_or_operator predicate to boolean_operator so it can
21159         be used to generate a crand.
21160         (eqne): New code iterator.
21161         (bd/bd_neg): New code_attrs.
21162         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21163         a single define_insn.
21164         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21165         decrement (bdnzt/bdnzf/bdzt/bdzf).
21166         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21167         with the new names of the branch decrement patterns, and added the
21168         names of the branch decrement conditional patterns.
21170 2018-01-08  Richard Biener  <rguenther@suse.de>
21172         PR tree-optimization/83563
21173         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21174         cache.
21176 2018-01-08  Richard Biener  <rguenther@suse.de>
21178         PR middle-end/83713
21179         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21181 2018-01-08  Richard Biener  <rguenther@suse.de>
21183         PR tree-optimization/83685
21184         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21185         references to abnormals.
21187 2018-01-08  Richard Biener  <rguenther@suse.de>
21189         PR lto/83719
21190         * dwarf2out.c (output_indirect_strings): Handle empty
21191         skeleton_debug_str_hash.
21192         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21194 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21196         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21197         (emit_store_direct): Likewise.
21198         (arc_trampoline_adjust_address): Likewise.
21199         (arc_asm_trampoline_template): New function.
21200         (arc_initialize_trampoline): Use asm_trampoline_template.
21201         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21202         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21203         * config/arc/arc.md (flush_icache): Delete pattern.
21205 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21207         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21208         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21209         munaligned-access.
21211 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21213         PR target/83681
21214         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21215         by not USED_FOR_TARGET.
21216         (make_pass_resolve_sw_modes): Likewise.
21218 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21220         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21221         USED_FOR_TARGET.
21223 2018-01-08  Richard Biener  <rguenther@suse.de>
21225         PR middle-end/83580
21226         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21228 2018-01-08  Richard Biener  <rguenther@suse.de>
21230         PR middle-end/83517
21231         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21233 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21235         PR middle-end/81897
21236         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21237         basic blocks with a small number of successors.
21238         (convert_control_dep_chain_into_preds): Improve handling of
21239         forwarder blocks.
21240         (dump_predicates): Split apart into...
21241         (dump_pred_chain): ...here...
21242         (dump_pred_info): ...and here.
21243         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21244         (can_chain_union_be_invalidated_p): Improve check for invalidation
21245         of paths.
21246         (uninit_uses_cannot_happen): Avoid unnecessary if
21247         convert_control_dep_chain_into_preds yielded nothing.
21249 2018-01-06  Martin Sebor  <msebor@redhat.com>
21251         PR tree-optimization/83640
21252         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21253         subtracting negative offset from size.
21254         (builtin_access::overlap): Adjust offset bounds of the access to fall
21255         within the size of the object if possible.
21257 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21259         PR rtl-optimization/83699
21260         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21261         extract_bit_field_as_subreg to cases in which the extracted
21262         value is also a vector.
21264         * lra-constraints.c (process_alt_operands): Test for the equivalence
21265         substitutions when detecting a possible reload cycle.
21267 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21269         PR debug/83480
21270         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21271         by default if flag_selective_schedling{,2}.  Formatting fixes.
21273         PR rtl-optimization/83682
21274         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21275         if it has non-VECTOR_MODE element mode.
21276         (vec_duplicate_p): Likewise.
21278         PR middle-end/83694
21279         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21280         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21282 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21284         PR target/83604
21285         * config/i386/i386-builtin.def
21286         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21287         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21288         Require also OPTION_MASK_ISA_AVX512F in addition to
21289         OPTION_MASK_ISA_GFNI.
21290         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21291         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21292         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21293         to OPTION_MASK_ISA_GFNI.
21294         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21295         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21296         OPTION_MASK_ISA_AVX512BW.
21297         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21298         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21299         addition to OPTION_MASK_ISA_GFNI.
21300         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21301         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21302         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21303         to OPTION_MASK_ISA_GFNI.
21304         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21305         a requirement for all ISAs rather than any of them with a few
21306         exceptions.
21307         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21308         processing.
21309         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21310         bitmasks to be enabled with 3 exceptions, instead of requiring any
21311         enabled ISA with lots of exceptions.
21312         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21313         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21314         Change avx512bw in isa attribute to avx512f.
21315         * config/i386/sgxintrin.h: Add license boilerplate.
21316         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21317         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21318         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21319         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21320         defined.
21321         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21322         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21323         temporarily sse2 rather than sse if not enabled already.
21325         PR target/83604
21326         * config/i386/sse.md (VI248_VLBW): Rename to ...
21327         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21328         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21329         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21330         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21331         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21332         mode iterator instead of VI248_VLBW.
21334 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21336         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21337         (record_modified): Skip clobbers; add debug output.
21338         (param_change_prob): Use sreal frequencies.
21340 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21342         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21343         punt for user-aligned variables.
21345 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21347         * tree-chrec.c (chrec_contains_symbols): Return true for
21348         POLY_INT_CST.
21350 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21352         PR target/82439
21353         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21354         of (x|y) == x for BICS pattern.
21356 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21358         PR tree-optimization/83605
21359         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21360         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21361         can throw.
21363 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21365         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21366         * config/epiphany/rtems.h: New file.
21368 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21369             Uros Bizjak  <ubizjak@gmail.com>
21371         PR target/83554
21372         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21373         QIreg_operand instead of register_operand predicate.
21374         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21375         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21376         comments instead of -fmitigate[-_]rop.
21378 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21380         PR bootstrap/81926
21381         * cgraphunit.c (symbol_table::compile): Switch to text_section
21382         before calling assembly_start debug hook.
21383         * run-rtl-passes.c (run_rtl_passes): Likewise.
21384         Include output.h.
21386 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21388         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21389         range_int_cst_p rather than !symbolic_range_p before calling
21390         extract_range_from_multiplicative_op_1.
21392 2018-01-04  Jeff Law  <law@redhat.com>
21394         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21395         redundant test in assertion.
21397 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21399         * doc/rtl.texi: Document machine_mode wrapper classes.
21401 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21403         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21404         using tree_to_uhwi.
21406 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21408         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21409         the VEC_PERM_EXPR fold to fail.
21411 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21413         PR debug/83585
21414         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21415         to switched_sections.
21417 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21419         PR target/83680
21420         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21421         test for d.testing.
21423 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21425         PR target/83387
21426         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21427         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21429 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21431         PR debug/83666
21432         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21433         is BLKmode and bitpos not zero or mode change is needed.
21435 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21437         PR target/83675
21438         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21439         TARGET_VIS2.
21441 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21443         PR target/83628
21444         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21445         instead of MULT rtx.  Update all corresponding splitters.
21446         (*saddl_se): Ditto.
21447         (*ssub<modesuffix>): Ditto.
21448         (*ssubl_se): Ditto.
21449         (*cmp_sadd_di): Update split patterns.
21450         (*cmp_sadd_si): Ditto.
21451         (*cmp_sadd_sidi): Ditto.
21452         (*cmp_ssub_di): Ditto.
21453         (*cmp_ssub_si): Ditto.
21454         (*cmp_ssub_sidi): Ditto.
21455         * config/alpha/predicates.md (const23_operand): New predicate.
21456         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21457         Look for ASHIFT, not MULT inner operand.
21458         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21460 2018-01-04  Martin Liska  <mliska@suse.cz>
21462         PR gcov-profile/83669
21463         * gcov.c (output_intermediate_file): Add version to intermediate
21464         gcov file.
21465         * doc/gcov.texi: Document new field 'version' in intermediate
21466         file format. Fix location of '-k' option of gcov command.
21468 2018-01-04  Martin Liska  <mliska@suse.cz>
21470         PR ipa/82352
21471         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21473 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21475         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21477 2018-01-03  Martin Sebor  <msebor@redhat.com>
21479         PR tree-optimization/83655
21480         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21481         checking calls with invalid arguments.
21483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21485         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21486         (vectorizable_mask_load_store): Delete.
21487         (vectorizable_call): Return false for masked loads and stores.
21488         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21489         instead of gimple_assign_rhs1.
21490         (vectorizable_load): Handle IFN_MASK_LOAD.
21491         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21495         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21496         split out from..,
21497         (vectorizable_mask_load_store): ...here.
21498         (vectorizable_load): ...and here.
21500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21502         * tree-vect-stmts.c (vect_build_all_ones_mask)
21503         (vect_build_zero_merge_argument): New functions, split out from...
21504         (vectorizable_load): ...here.
21506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21508         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21509         split out from...
21510         (vectorizable_mask_load_store): ...here.
21511         (vectorizable_store): ...and here.
21513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21515         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21516         split out from...
21517         (vectorizable_mask_load_store): ...here.
21519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21521         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21522         (vect_model_store_cost): Take a vec_load_store_type instead of a
21523         vect_def_type.
21524         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21525         (vect_model_store_cost): Take a vec_load_store_type instead of a
21526         vect_def_type.
21527         (vectorizable_mask_load_store): Update accordingly.
21528         (vectorizable_store): Likewise.
21529         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21531 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21533         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21534         IFN_MASK_LOAD calls here rather than...
21535         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21538             Alan Hayward  <alan.hayward@arm.com>
21539             David Sherwood  <david.sherwood@arm.com>
21541         * expmed.c (extract_bit_field_1): For vector extracts,
21542         fall back to extract_bit_field_as_subreg if vec_extract
21543         isn't available.
21545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21546             Alan Hayward  <alan.hayward@arm.com>
21547             David Sherwood  <david.sherwood@arm.com>
21549         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21550         they are variable or constant sized.
21551         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21552         slots for constant-sized data.
21554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21555             Alan Hayward  <alan.hayward@arm.com>
21556             David Sherwood  <david.sherwood@arm.com>
21558         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21559         handling COND_EXPRs with boolean comparisons, try to find a better
21560         basis for the mask type than the boolean itself.
21562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21564         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21565         is calculated and how it can be overridden.
21566         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21567         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21568         if defined.
21569         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21570         if nonzero.
21572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21573             Alan Hayward  <alan.hayward@arm.com>
21574             David Sherwood  <david.sherwood@arm.com>
21576         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21577         Remove the mode argument.
21578         (aarch64_simd_valid_immediate): Remove the mode and inverse
21579         arguments.
21580         * config/aarch64/iterators.md (bitsize): New iterator.
21581         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21582         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21583         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21584         aarch64_simd_valid_immediate.
21585         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21586         (aarch64_reg_or_bic_imm): Likewise.
21587         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21588         with an insn_type enum and msl with a modifier_type enum.
21589         Replace element_width with a scalar_mode.  Change the shift
21590         to unsigned int.  Add constructors for scalar_float_mode and
21591         scalar_int_mode elements.
21592         (aarch64_vect_float_const_representable_p): Delete.
21593         (aarch64_can_const_movi_rtx_p)
21594         (aarch64_simd_scalar_immediate_valid_for_move)
21595         (aarch64_simd_make_constant): Update call to
21596         aarch64_simd_valid_immediate.
21597         (aarch64_advsimd_valid_immediate_hs): New function.
21598         (aarch64_advsimd_valid_immediate): Likewise.
21599         (aarch64_simd_valid_immediate): Remove mode and inverse
21600         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21601         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21602         and aarch64_float_const_representable_p on the result.
21603         (aarch64_output_simd_mov_immediate): Remove mode argument.
21604         Update call to aarch64_simd_valid_immediate and use of
21605         simd_immediate_info.
21606         (aarch64_output_scalar_simd_mov_immediate): Update call
21607         accordingly.
21609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21610             Alan Hayward  <alan.hayward@arm.com>
21611             David Sherwood  <david.sherwood@arm.com>
21613         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21614         (mode_nunits): Likewise CONST_MODE_NUNITS.
21615         * machmode.def (ADJUST_NUNITS): Document.
21616         * genmodes.c (mode_data::need_nunits_adj): New field.
21617         (blank_mode): Update accordingly.
21618         (adj_nunits): New variable.
21619         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21620         parameter.
21621         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21622         listed in adj_nunits.
21623         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21624         listed in adj_nunits.  Don't emit case statements for such modes.
21625         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21626         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21627         nothing if adj_nunits is nonnull.
21628         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21629         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21630         (emit_mode_fbit): Update use of print_maybe_const_decl.
21631         (emit_move_size): Likewise.  Treat the array as non-const
21632         if adj_nunits.
21633         (emit_mode_adjustments): Handle adj_nunits.
21635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21637         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21638         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21639         (VECTOR_MODES): Use it.
21640         (make_vector_modes): Take the prefix as an argument.
21642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21643             Alan Hayward  <alan.hayward@arm.com>
21644             David Sherwood  <david.sherwood@arm.com>
21646         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21647         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21648         for MODE_VECTOR_BOOL.
21649         * machmode.def (VECTOR_BOOL_MODE): Document.
21650         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21651         (make_vector_bool_mode): New function.
21652         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21653         MODE_VECTOR_BOOL.
21654         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21655         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21656         Likewise.
21657         * stor-layout.c (int_mode_for_mode): Likewise.
21658         * tree.c (build_vector_type_for_mode): Likewise.
21659         * varasm.c (output_constant_pool_2): Likewise.
21660         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21661         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21662         for MODE_VECTOR_BOOL.
21663         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21664         of mode class checks.
21665         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21666         instead of a list of mode class checks.
21667         (expand_vector_scalar_condition): Likewise.
21668         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21671             Alan Hayward  <alan.hayward@arm.com>
21672             David Sherwood  <david.sherwood@arm.com>
21674         * machmode.h (mode_size): Change from unsigned short to
21675         poly_uint16_pod.
21676         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21677         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21678         or if measurement_type is not polynomial.
21679         (fixed_size_mode::includes_p): Check for constant-sized modes.
21680         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21681         return a poly_uint16 rather than an unsigned short.
21682         (emit_mode_size): Change the type of mode_size from unsigned short
21683         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21684         (emit_mode_adjustments): Cope with polynomial vector sizes.
21685         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21686         for GET_MODE_SIZE.
21687         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21688         for GET_MODE_SIZE.
21689         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21690         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21691         * caller-save.c (setup_save_areas): Likewise.
21692         (replace_reg_with_saved_mem): Likewise.
21693         * calls.c (emit_library_call_value_1): Likewise.
21694         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21695         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21696         (gen_lowpart_for_combine): Likewise.
21697         * convert.c (convert_to_integer_1): Likewise.
21698         * cse.c (equiv_constant, cse_insn): Likewise.
21699         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21700         (cselib_subst_to_values): Likewise.
21701         * dce.c (word_dce_process_block): Likewise.
21702         * df-problems.c (df_word_lr_mark_ref): Likewise.
21703         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21704         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21705         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21706         (rtl_for_decl_location): Likewise.
21707         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21708         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21709         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21710         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21711         (expand_expr_real_1): Likewise.
21712         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21713         (pad_below): Likewise.
21714         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21715         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21716         * ira.c (get_subreg_tracking_sizes): Likewise.
21717         * ira-build.c (ira_create_allocno_objects): Likewise.
21718         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21719         (ira_sort_regnos_for_alter_reg): Likewise.
21720         * ira-costs.c (record_operand_costs): Likewise.
21721         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21722         (resolve_simple_move): Likewise.
21723         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21724         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21725         (lra_constraints): Likewise.
21726         (CONST_POOL_OK_P): Reject variable-sized modes.
21727         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21728         (add_pseudo_to_slot, lra_spill): Likewise.
21729         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21730         * optabs-query.c (get_best_extraction_insn): Likewise.
21731         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21732         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21733         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21734         * recog.c (offsettable_address_addr_space_p): Likewise.
21735         * regcprop.c (maybe_mode_change): Likewise.
21736         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21737         * regrename.c (build_def_use): Likewise.
21738         * regstat.c (dump_reg_info): Likewise.
21739         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21740         (find_reloads, find_reloads_subreg_address): Likewise.
21741         * reload1.c (eliminate_regs_1): Likewise.
21742         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21743         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21744         (simplify_binary_operation_1, simplify_subreg): Likewise.
21745         * targhooks.c (default_function_arg_padding): Likewise.
21746         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21747         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21748         (verify_gimple_assign_ternary): Likewise.
21749         * tree-inline.c (estimate_move_cost): Likewise.
21750         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21751         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21752         (get_address_cost_ainc): Likewise.
21753         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21754         (vect_supportable_dr_alignment): Likewise.
21755         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21756         (vectorizable_reduction): Likewise.
21757         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21758         (vectorizable_operation, vectorizable_load): Likewise.
21759         * tree.c (build_same_sized_truth_vector_type): Likewise.
21760         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21761         * var-tracking.c (emit_note_insn_var_location): Likewise.
21762         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21763         (ADDR_VEC_ALIGN): Likewise.
21765 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21766             Alan Hayward  <alan.hayward@arm.com>
21767             David Sherwood  <david.sherwood@arm.com>
21769         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21770         unsigned short.
21771         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21772         or if measurement_type is polynomial.
21773         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21774         * combine.c (make_extraction): Likewise.
21775         * dse.c (find_shift_sequence): Likewise.
21776         * dwarf2out.c (mem_loc_descriptor): Likewise.
21777         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21778         (extract_bit_field, extract_low_bits): Likewise.
21779         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21780         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21781         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21782         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21783         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21784         * reload.c (find_reloads): Likewise.
21785         * reload1.c (alter_reg): Likewise.
21786         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21787         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21788         * tree-if-conv.c (predicate_mem_writes): Likewise.
21789         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21790         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21791         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21792         * valtrack.c (dead_debug_insert_temp): Likewise.
21793         * varasm.c (mergeable_constant_section): Likewise.
21794         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21797             Alan Hayward  <alan.hayward@arm.com>
21798             David Sherwood  <david.sherwood@arm.com>
21800         * expr.c (expand_assignment): Cope with polynomial mode sizes
21801         when assigning to a CONCAT.
21803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21804             Alan Hayward  <alan.hayward@arm.com>
21805             David Sherwood  <david.sherwood@arm.com>
21807         * machmode.h (mode_precision): Change from unsigned short to
21808         poly_uint16_pod.
21809         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21810         short.
21811         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21812         or if measurement_type is not polynomial.
21813         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21814         in which the mode is already known to be a scalar_int_mode.
21815         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21816         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21817         initializer.
21818         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21819         for GET_MODE_PRECISION.
21820         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21821         for GET_MODE_PRECISION.
21822         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21823         as polynomial.
21824         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21825         (expand_field_assignment, make_extraction): Likewise.
21826         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21827         (get_last_value): Likewise.
21828         * convert.c (convert_to_integer_1): Likewise.
21829         * cse.c (cse_insn): Likewise.
21830         * expr.c (expand_expr_real_1): Likewise.
21831         * lra-constraints.c (simplify_operand_subreg): Likewise.
21832         * optabs-query.c (can_atomic_load_p): Likewise.
21833         * optabs.c (expand_atomic_load): Likewise.
21834         (expand_atomic_store): Likewise.
21835         * ree.c (combine_reaching_defs): Likewise.
21836         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21837         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21838         * tree.h (type_has_mode_precision_p): Likewise.
21839         * ubsan.c (instrument_si_overflow): Likewise.
21841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21842             Alan Hayward  <alan.hayward@arm.com>
21843             David Sherwood  <david.sherwood@arm.com>
21845         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21846         polynomial numbers of units.
21847         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21848         (valid_vector_subparts_p): New function.
21849         (build_vector_type): Remove temporary shim and take the number
21850         of units as a poly_uint64 rather than an int.
21851         (build_opaque_vector_type): Take the number of units as a
21852         poly_uint64 rather than an int.
21853         * tree.c (build_vector_from_ctor): Handle polynomial
21854         TYPE_VECTOR_SUBPARTS.
21855         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21856         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21857         (build_vector_from_val): If the number of units is variable,
21858         use build_vec_duplicate_cst for constant operands and
21859         VEC_DUPLICATE_EXPR otherwise.
21860         (make_vector_type): Remove temporary is_constant ().
21861         (build_vector_type, build_opaque_vector_type): Take the number of
21862         units as a poly_uint64 rather than an int.
21863         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21864         VECTOR_CST_NELTS.
21865         * cfgexpand.c (expand_debug_expr): Likewise.
21866         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21867         (store_constructor, expand_expr_real_1): Likewise.
21868         (const_scalar_mask_from_tree): Likewise.
21869         * fold-const-call.c (fold_const_reduction): Likewise.
21870         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21871         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21872         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21873         (fold_relational_const): Likewise.
21874         (native_interpret_vector): Likewise.  Change the size from an
21875         int to an unsigned int.
21876         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21877         TYPE_VECTOR_SUBPARTS.
21878         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21879         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21880         duplicating a non-constant operand into a variable-length vector.
21881         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21882         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21883         * ipa-icf.c (sem_variable::equals): Likewise.
21884         * match.pd: Likewise.
21885         * omp-simd-clone.c (simd_clone_subparts): Likewise.
21886         * print-tree.c (print_node): Likewise.
21887         * stor-layout.c (layout_type): Likewise.
21888         * targhooks.c (default_builtin_vectorization_cost): Likewise.
21889         * tree-cfg.c (verify_gimple_comparison): Likewise.
21890         (verify_gimple_assign_binary): Likewise.
21891         (verify_gimple_assign_ternary): Likewise.
21892         (verify_gimple_assign_single): Likewise.
21893         * tree-pretty-print.c (dump_generic_node): Likewise.
21894         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21895         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21896         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21897         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21898         (vect_shift_permute_load_chain): Likewise.
21899         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21900         (expand_vector_condition, optimize_vector_constructor): Likewise.
21901         (lower_vec_perm, get_compute_type): Likewise.
21902         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21903         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21904         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21905         (vect_recog_mask_conversion_pattern): Likewise.
21906         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21907         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21908         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21909         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21910         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21911         (vectorizable_shift, vectorizable_operation, vectorizable_store)
21912         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21913         (supportable_widening_operation): Likewise.
21914         (supportable_narrowing_operation): Likewise.
21915         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21916         Likewise.
21917         * varasm.c (output_constant): Likewise.
21919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21920             Alan Hayward  <alan.hayward@arm.com>
21921             David Sherwood  <david.sherwood@arm.com>
21923         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21924         so that both the length == 3 and length != 3 cases set up their
21925         own permute vectors.  Add comments explaining why we know the
21926         number of elements is constant.
21927         (vect_permute_load_chain): Likewise.
21929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21930             Alan Hayward  <alan.hayward@arm.com>
21931             David Sherwood  <david.sherwood@arm.com>
21933         * machmode.h (mode_nunits): Change from unsigned char to
21934         poly_uint16_pod.
21935         (ONLY_FIXED_SIZE_MODES): New macro.
21936         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21937         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21938         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21939         New typedefs.
21940         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21941         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21942         or if measurement_type is not polynomial.
21943         * genmodes.c (ZERO_COEFFS): New macro.
21944         (emit_mode_nunits_inline): Make mode_nunits_inline return a
21945         poly_uint16.
21946         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21947         Use ZERO_COEFFS when emitting initializers.
21948         * data-streamer.h (bp_pack_poly_value): New function.
21949         (bp_unpack_poly_value): Likewise.
21950         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21951         for GET_MODE_NUNITS.
21952         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21953         for GET_MODE_NUNITS.
21954         * tree.c (make_vector_type): Remove temporary shim and make
21955         the real function take the number of units as a poly_uint64
21956         rather than an int.
21957         (build_vector_type_for_mode): Handle polynomial nunits.
21958         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21959         * emit-rtl.c (const_vec_series_p_1): Likewise.
21960         (gen_rtx_CONST_VECTOR): Likewise.
21961         * fold-const.c (test_vec_duplicate_folding): Likewise.
21962         * genrecog.c (validate_pattern): Likewise.
21963         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21964         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21965         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21966         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21967         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21968         * rtlanal.c (subreg_get_info): Likewise.
21969         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21970         (vect_grouped_load_supported): Likewise.
21971         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21972         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21973         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21974         (simplify_const_unary_operation, simplify_binary_operation_1)
21975         (simplify_const_binary_operation, simplify_ternary_operation)
21976         (test_vector_ops_duplicate, test_vector_ops): Likewise.
21977         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21978         instead of CONST_VECTOR_NUNITS.
21979         * varasm.c (output_constant_pool_2): Likewise.
21980         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21981         explicit-encoded elements in the XVEC for variable-length vectors.
21983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21985         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21988             Alan Hayward  <alan.hayward@arm.com>
21989             David Sherwood  <david.sherwood@arm.com>
21991         * coretypes.h (fixed_size_mode): Declare.
21992         (fixed_size_mode_pod): New typedef.
21993         * builtins.h (target_builtins::x_apply_args_mode)
21994         (target_builtins::x_apply_result_mode): Change type to
21995         fixed_size_mode_pod.
21996         * builtins.c (apply_args_size, apply_result_size, result_vector)
21997         (expand_builtin_apply_args_1, expand_builtin_apply)
21998         (expand_builtin_return): Update accordingly.
22000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22002         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22003         * cselib.c (cselib_hash_rtx): Likewise.
22004         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22005         CONST_VECTOR encoding.
22007 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22008             Jeff Law  <law@redhat.com>
22010         PR target/83641
22011         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22012         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22013         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22014         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22016         PR target/83641
22017         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22018         explicitly probe *sp in a noreturn function if there were any callee
22019         register saves or frame pointer is needed.
22021 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22023         PR debug/83621
22024         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22025         BLKmode for ternary, binary or unary expressions.
22027         PR debug/83645
22028         * var-tracking.c (delete_vta_debug_insn): New inline function.
22029         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22030         insns from get_insns () to NULL instead of each bb separately.
22031         Use delete_vta_debug_insn.  No longer static.
22032         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22033         delete_vta_debug_insns callers.
22034         * rtl.h (delete_vta_debug_insns): Declare.
22035         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22036         instead of variable_tracking_main.
22038 2018-01-03  Martin Sebor  <msebor@redhat.com>
22040         PR tree-optimization/83603
22041         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22042         arguments past the endof the argument list in functions declared
22043         without a prototype.
22044         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22045         Avoid checking when arguments are null.
22047 2018-01-03  Martin Sebor  <msebor@redhat.com>
22049         PR c/83559
22050         * doc/extend.texi (attribute const): Fix a typo.
22051         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22052         issuing -Wsuggest-attribute for void functions.
22054 2018-01-03  Martin Sebor  <msebor@redhat.com>
22056         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22057         offset_int::from instead of wide_int::to_shwi.
22058         (maybe_diag_overlap): Remove assertion.
22059         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22060         * gimple-ssa-sprintf.c (format_directive): Same.
22061         (parse_directive): Same.
22062         (sprintf_dom_walker::compute_format_length): Same.
22063         (try_substitute_return_value): Same.
22065 2018-01-03  Jeff Law  <law@redhat.com>
22067         PR middle-end/83654
22068         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22069         non-constant residual for zero at runtime and avoid probing in
22070         that case.  Reorganize code for trailing problem to mirror handling
22071         of the residual.
22073 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22075         PR tree-optimization/83501
22076         * tree-ssa-strlen.c (get_string_cst): New.
22077         (handle_char_store): Call get_string_cst.
22079 2018-01-03  Martin Liska  <mliska@suse.cz>
22081         PR tree-optimization/83593
22082         * tree-ssa-strlen.c: Include tree-cfg.h.
22083         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22084         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22085         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22086         to false.
22087         (strlen_dom_walker::before_dom_children): Call
22088         gimple_purge_dead_eh_edges. Dump tranformation with details
22089         dump flags.
22090         (strlen_dom_walker::before_dom_children): Update call by adding
22091         new argument cleanup_eh.
22092         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22094 2018-01-03  Martin Liska  <mliska@suse.cz>
22096         PR ipa/83549
22097         * cif-code.def (VARIADIC_THUNK): New enum value.
22098         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22099         thunks.
22101 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22103         * sse.md (mov<mode>_internal): Tighten condition for when to use
22104         vmovdqu<ssescalarsize> for TI and OI modes.
22106 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22108         Update copyright years.
22110 2018-01-03  Martin Liska  <mliska@suse.cz>
22112         PR ipa/83594
22113         * ipa-visibility.c (function_and_variable_visibility): Skip
22114         functions with noipa attribure.
22116 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22118         * gcc.c (process_command): Update copyright notice dates.
22119         * gcov-dump.c (print_version): Ditto.
22120         * gcov.c (print_version): Ditto.
22121         * gcov-tool.c (print_version): Ditto.
22122         * gengtype.c (create_file): Ditto.
22123         * doc/cpp.texi: Bump @copying's copyright year.
22124         * doc/cppinternals.texi: Ditto.
22125         * doc/gcc.texi: Ditto.
22126         * doc/gccint.texi: Ditto.
22127         * doc/gcov.texi: Ditto.
22128         * doc/install.texi: Ditto.
22129         * doc/invoke.texi: Ditto.
22131 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22133         * vector-builder.h (vector_builder::m_full_nelts): Change from
22134         unsigned int to poly_uint64.
22135         (vector_builder::full_nelts): Update prototype accordingly.
22136         (vector_builder::new_vector): Likewise.
22137         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22138         (vector_builder::operator ==): Likewise.
22139         (vector_builder::finalize): Likewise.
22140         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22141         Take the number of elements as a poly_uint64 rather than an
22142         unsigned int.
22143         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22144         from unsigned int to poly_uint64.
22145         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22146         (vec_perm_indices::new_vector): Likewise.
22147         (vec_perm_indices::length): Likewise.
22148         (vec_perm_indices::nelts_per_input): Likewise.
22149         (vec_perm_indices::input_nelts): Likewise.
22150         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22151         number of elements per input as a poly_uint64 rather than an
22152         unsigned int.  Use the original encoding for variable-length
22153         vectors, rather than clamping each individual element.
22154         For the second and subsequent elements in each pattern,
22155         clamp the step and base before clamping their sum.
22156         (vec_perm_indices::series_p): Handle polynomial element counts.
22157         (vec_perm_indices::all_in_range_p): Likewise.
22158         (vec_perm_indices_to_tree): Likewise.
22159         (vec_perm_indices_to_rtx): Likewise.
22160         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22161         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22162         (tree_vector_builder::new_binary_operation): Handle polynomial
22163         element counts.  Return false if we need to know the number
22164         of elements at compile time.
22165         * fold-const.c (fold_vec_perm): Punt if the number of elements
22166         isn't known at compile time.
22168 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22170         * vec-perm-indices.h (vec_perm_builder): Change element type
22171         from HOST_WIDE_INT to poly_int64.
22172         (vec_perm_indices::element_type): Update accordingly.
22173         (vec_perm_indices::clamp): Handle polynomial element_types.
22174         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22175         (vec_perm_indices::all_in_range_p): Likewise.
22176         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22177         than shwi trees.
22178         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22179         polynomial vec_perm_indices element types.
22180         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22181         * fold-const.c (fold_vec_perm): Likewise.
22182         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22183         * tree-vect-generic.c (lower_vec_perm): Likewise.
22184         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22185         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22186         element type to HOST_WIDE_INT.
22188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22189             Alan Hayward  <alan.hayward@arm.com>
22190             David Sherwood  <david.sherwood@arm.com>
22192         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22193         rather than an int.  Use plus_constant.
22194         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22195         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22198             Alan Hayward  <alan.hayward@arm.com>
22199             David Sherwood  <david.sherwood@arm.com>
22201         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22202         a HOST_WIDE_INT to a poly_int64.
22204 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22205             Alan Hayward  <alan.hayward@arm.com>
22206             David Sherwood  <david.sherwood@arm.com>
22208         * calls.c (load_register_parameters): Cope with polynomial
22209         mode sizes.  Require a constant size for BLKmode parameters
22210         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22211         forces a parameter to be padded at the lsb end in order to
22212         fill a complete number of words, require the parameter size
22213         to be ordered wrt UNITS_PER_WORD.
22215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22216             Alan Hayward  <alan.hayward@arm.com>
22217             David Sherwood  <david.sherwood@arm.com>
22219         * reload1.c (spill_stack_slot_width): Change element type
22220         from unsigned int to poly_uint64_pod.
22221         (alter_reg): Treat mode sizes as polynomial.
22223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22224             Alan Hayward  <alan.hayward@arm.com>
22225             David Sherwood  <david.sherwood@arm.com>
22227         * reload.c (complex_word_subreg_p): New function.
22228         (reload_inner_reg_of_subreg, push_reload): Use it.
22230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22231             Alan Hayward  <alan.hayward@arm.com>
22232             David Sherwood  <david.sherwood@arm.com>
22234         * lra-constraints.c (process_alt_operands): Reject matched
22235         operands whose sizes aren't ordered.
22236         (match_reload): Refer to this check here.
22238 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22239             Alan Hayward  <alan.hayward@arm.com>
22240             David Sherwood  <david.sherwood@arm.com>
22242         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22243         that the mode size is in the set {1, 2, 4, 8, 16}.
22245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22246             Alan Hayward  <alan.hayward@arm.com>
22247             David Sherwood  <david.sherwood@arm.com>
22249         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22250         Use plus_constant instead of gen_rtx_PLUS.
22252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22253             Alan Hayward  <alan.hayward@arm.com>
22254             David Sherwood  <david.sherwood@arm.com>
22256         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22257         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22258         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22259         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22260         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22261         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22262         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22263         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22264         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22265         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22266         a poly_int64.
22267         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22268         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22269         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22270         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22271         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22272         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22273         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22274         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22275         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22276         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22277         function.
22278         * expr.c (emit_move_resolve_push): Treat the input and result
22279         of PUSH_ROUNDING as a poly_int64.
22280         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22281         (emit_push_insn): Likewise.
22282         * lra-eliminations.c (mark_not_eliminable): Likewise.
22283         * recog.c (push_operand): Likewise.
22284         * reload1.c (elimination_effects): Likewise.
22285         * rtlanal.c (nonzero_bits1): Likewise.
22286         * calls.c (store_one_arg): Likewise.  Require the padding to be
22287         known at compile time.
22289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22290             Alan Hayward  <alan.hayward@arm.com>
22291             David Sherwood  <david.sherwood@arm.com>
22293         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22294         Use plus_constant instead of gen_rtx_PLUS.
22296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22297             Alan Hayward  <alan.hayward@arm.com>
22298             David Sherwood  <david.sherwood@arm.com>
22300         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22301         rather than an int.
22303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22304             Alan Hayward  <alan.hayward@arm.com>
22305             David Sherwood  <david.sherwood@arm.com>
22307         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22308         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22309         via stack temporaries.  Treat the mode size as polynomial too.
22311 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22312             Alan Hayward  <alan.hayward@arm.com>
22313             David Sherwood  <david.sherwood@arm.com>
22315         * expr.c (expand_expr_real_2): When handling conversions involving
22316         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22317         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22318         as a poly_uint64 too.
22320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22321             Alan Hayward  <alan.hayward@arm.com>
22322             David Sherwood  <david.sherwood@arm.com>
22324         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22327             Alan Hayward  <alan.hayward@arm.com>
22328             David Sherwood  <david.sherwood@arm.com>
22330         * combine.c (can_change_dest_mode): Handle polynomial
22331         REGMODE_NATURAL_SIZE.
22332         * expmed.c (store_bit_field_1): Likewise.
22333         * expr.c (store_constructor): Likewise.
22334         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22335         and polynomial REGMODE_NATURAL_SIZE.
22336         (gen_lowpart_common): Likewise.
22337         * reginfo.c (record_subregs_of_mode): Likewise.
22338         * rtlanal.c (read_modify_subreg_p): Likewise.
22340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22341             Alan Hayward  <alan.hayward@arm.com>
22342             David Sherwood  <david.sherwood@arm.com>
22344         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22345         numbers of elements.
22347 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22348             Alan Hayward  <alan.hayward@arm.com>
22349             David Sherwood  <david.sherwood@arm.com>
22351         * match.pd: Cope with polynomial numbers of vector elements.
22353 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22354             Alan Hayward  <alan.hayward@arm.com>
22355             David Sherwood  <david.sherwood@arm.com>
22357         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22358         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
22365         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22366         (ipa_simd_modify_function_body): Likewise.
22368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22369             Alan Hayward  <alan.hayward@arm.com>
22370             David Sherwood  <david.sherwood@arm.com>
22372         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22373         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22374         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22375         (expand_vector_condition, vector_element): Likewise.
22376         (subparts_gt): New function.
22377         (get_compute_type): Use subparts_gt.
22378         (count_type_subparts): Delete.
22379         (expand_vector_operations_1): Use subparts_gt instead of
22380         count_type_subparts.
22382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22383             Alan Hayward  <alan.hayward@arm.com>
22384             David Sherwood  <david.sherwood@arm.com>
22386         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22387         (vect_compile_time_alias): ...this new function.  Do the calculation
22388         on poly_ints rather than trees.
22389         (vect_prune_runtime_alias_test_list): Update call accordingly.
22391 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22392             Alan Hayward  <alan.hayward@arm.com>
22393             David Sherwood  <david.sherwood@arm.com>
22395         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22396         numbers of units.
22397         (vect_schedule_slp_instance): Likewise.
22399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22400             Alan Hayward  <alan.hayward@arm.com>
22401             David Sherwood  <david.sherwood@arm.com>
22403         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22404         constant and extern definitions for variable-length vectors.
22405         (vect_get_constant_vectors): Note that the number of units
22406         is known to be constant.
22408 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22409             Alan Hayward  <alan.hayward@arm.com>
22410             David Sherwood  <david.sherwood@arm.com>
22412         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22413         of units as polynomial.  Choose between WIDE and NARROW based
22414         on multiple_p.
22416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22417             Alan Hayward  <alan.hayward@arm.com>
22418             David Sherwood  <david.sherwood@arm.com>
22420         * tree-vect-stmts.c (simd_clone_subparts): New function.
22421         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22424             Alan Hayward  <alan.hayward@arm.com>
22425             David Sherwood  <david.sherwood@arm.com>
22427         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22428         vectors as polynomial.  Use build_index_vector for
22429         IFN_GOMP_SIMD_LANE.
22431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22432             Alan Hayward  <alan.hayward@arm.com>
22433             David Sherwood  <david.sherwood@arm.com>
22435         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22436         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22437         for variable-length vectors.
22438         (vectorizable_mask_load_store): Treat the number of units as
22439         polynomial, asserting that it is constant if the condition has
22440         already been enforced.
22441         (vectorizable_store, vectorizable_load): Likewise.
22443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22444             Alan Hayward  <alan.hayward@arm.com>
22445             David Sherwood  <david.sherwood@arm.com>
22447         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22448         of units as polynomial.  Punt if we can't tell at compile time
22449         which vector contains the final result.
22451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22452             Alan Hayward  <alan.hayward@arm.com>
22453             David Sherwood  <david.sherwood@arm.com>
22455         * tree-vect-loop.c (vectorizable_induction): Treat the number
22456         of units as polynomial.  Punt on SLP inductions.  Use an integer
22457         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22458         cast of such a series for variable-length floating-point
22459         reductions.
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         * tree.h (build_index_vector): Declare.
22466         * tree.c (build_index_vector): New function.
22467         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22468         of units as polynomial, forcibly converting it to a constant if
22469         vectorizable_reduction has already enforced the condition.
22470         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22471         to create a {1,2,3,...} vector.
22472         (vectorizable_reduction): Treat the number of units as polynomial.
22473         Choose vectype_in based on the largest scalar element size rather
22474         than the smallest number of units.  Enforce the restrictions
22475         relied on above.
22477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22478             Alan Hayward  <alan.hayward@arm.com>
22479             David Sherwood  <david.sherwood@arm.com>
22481         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22482         number of units as polynomial.
22484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22485             Alan Hayward  <alan.hayward@arm.com>
22486             David Sherwood  <david.sherwood@arm.com>
22488         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22489         * target.def (autovectorize_vector_sizes): Return the vector sizes
22490         by pointer, using vector_sizes rather than a bitmask.
22491         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22492         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22493         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22494         Likewise.
22495         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22496         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22497         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22498         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22499         * omp-general.c (omp_max_vf): Likewise.
22500         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22501         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22502         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22503         * tree-vect-slp.c (vect_slp_bb): Likewise.
22504         * doc/tm.texi: Regenerate.
22505         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22506         to a poly_uint64.
22507         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22508         the vector size as a poly_uint64 rather than an unsigned int.
22509         (current_vector_size): Change from an unsigned int to a poly_uint64.
22510         (get_vectype_for_scalar_type): Update accordingly.
22511         * tree.h (build_truth_vector_type): Take the size and number of
22512         units as a poly_uint64 rather than an unsigned int.
22513         (build_vector_type): Add a temporary overload that takes
22514         the number of units as a poly_uint64 rather than an unsigned int.
22515         * tree.c (make_vector_type): Likewise.
22516         (build_truth_vector_type): Take the number of units as a poly_uint64
22517         rather than an unsigned int.
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         * target.def (get_mask_mode): Take the number of units and length
22524         as poly_uint64s rather than unsigned ints.
22525         * targhooks.h (default_get_mask_mode): Update accordingly.
22526         * targhooks.c (default_get_mask_mode): Likewise.
22527         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22528         * doc/tm.texi: Regenerate.
22530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22531             Alan Hayward  <alan.hayward@arm.com>
22532             David Sherwood  <david.sherwood@arm.com>
22534         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22535         * omp-general.c (omp_max_vf): Likewise.
22536         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22537         (expand_omp_simd): Handle polynomial safelen.
22538         * omp-low.c (omplow_simd_context): Add a default constructor.
22539         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22540         (lower_rec_simd_input_clauses): Update accordingly.
22541         (lower_rec_input_clauses): Likewise.
22543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22544             Alan Hayward  <alan.hayward@arm.com>
22545             David Sherwood  <david.sherwood@arm.com>
22547         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22548         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22549         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22550         (vect_analyze_slp_cost): Likewise.
22551         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22552         (vect_model_load_cost): Likewise.
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-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22559         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22560         from an unsigned int * to a poly_uint64_pod *.
22561         (calculate_unrolling_factor): New function.
22562         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22565             Alan Hayward  <alan.hayward@arm.com>
22566             David Sherwood  <david.sherwood@arm.com>
22568         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22569         from an unsigned int to a poly_uint64.
22570         (_loop_vec_info::slp_unrolling_factor): Likewise.
22571         (_loop_vec_info::vectorization_factor): Change from an int
22572         to a poly_uint64.
22573         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22574         (vect_get_num_vectors): New function.
22575         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22576         (vect_get_num_copies): Use vect_get_num_vectors.
22577         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22578         to an unsigned int *.
22579         (vect_analyze_data_refs): Change min_vf from an int * to a
22580         poly_uint64 *.
22581         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22582         than an unsigned HOST_WIDE_INT.
22583         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22584         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22585         to an unsigned int *.
22586         (vect_analyze_data_ref_dependences): Likewise.
22587         (vect_compute_data_ref_alignment): Handle polynomial vf.
22588         (vect_enhance_data_refs_alignment): Likewise.
22589         (vect_prune_runtime_alias_test_list): Likewise.
22590         (vect_shift_permute_load_chain): Likewise.
22591         (vect_supportable_dr_alignment): Likewise.
22592         (dependence_distance_ge_vf): Take the vectorization factor as a
22593         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22594         (vect_analyze_data_refs): Change min_vf from an int * to a
22595         poly_uint64 *.
22596         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22597         vfm1 as a poly_uint64 rather than an int.  Make the same change
22598         for the returned bound_scalar.
22599         (vect_gen_vector_loop_niters): Handle polynomial vf.
22600         (vect_do_peeling): Likewise.  Update call to
22601         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22602         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22603         be constant.
22604         * tree-vect-loop.c (vect_determine_vectorization_factor)
22605         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22606         (vect_get_known_peeling_cost): Likewise.
22607         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22608         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22609         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22610         updating the upper bounds of the loop.
22611         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22612         rather than an int.
22613         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22614         polynomial unroll factors.
22615         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22616         (vect_make_slp_decision): Likewise.
22617         (vect_supported_load_permutation_p): Likewise, and polynomial
22618         vf too.
22619         (vect_analyze_slp_cost): Handle polynomial vf.
22620         (vect_slp_analyze_node_operations): Likewise.
22621         (vect_slp_analyze_bb_1): Likewise.
22622         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22623         than an unsigned HOST_WIDE_INT.
22624         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22625         (vectorizable_load): Handle polynomial vf.
22626         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22627         a poly_uint64.
22628         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22630 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22631             Alan Hayward  <alan.hayward@arm.com>
22632             David Sherwood  <david.sherwood@arm.com>
22634         * match.pd: Handle bit operations involving three constants
22635         and try to fold one pair.
22637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22639         * tree-vect-loop-manip.c: Include gimple-fold.h.
22640         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22641         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22642         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22643         Add a path that uses a step of VF instead of 1, but disable it
22644         for now.
22645         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22646         and niters_no_overflow parameters.  Update calls to
22647         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22648         Create a new SSA name if the latter choses to use a ste other
22649         than zero, and return it via niters_vector_mult_vf_var.
22650         * tree-vect-loop.c (vect_transform_loop): Update calls to
22651         vect_do_peeling, vect_gen_vector_loop_niters and
22652         slpeel_make_loop_iterate_ntimes.
22653         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22654         (vect_gen_vector_loop_niters): Update declarations after above changes.
22656 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22658         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22659         128-bit round to integer instructions.
22660         (ceil<mode>2): Likewise.
22661         (btrunc<mode>2): Likewise.
22662         (round<mode>2): Likewise.
22664 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22666         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22667         unaligned VSX load/store on P8/P9.
22668         (expand_block_clear): Allow the use of unaligned VSX
22669         load/store on P8/P9.
22671 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22673         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22674         New function.
22675         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22676         swap associated with both a load and a store.
22678 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22680         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22681         * config/riscv/riscv.md (clear_cache): Use it.
22683 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22685         * web.c: Remove out-of-date comment.
22687 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22689         * expr.c (fixup_args_size_notes): Check that any existing
22690         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22691         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22692         (emit_single_push_insn): ...here.
22694 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22696         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22697         (const_vector_encoded_nelts): New function.
22698         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22699         (const_vector_int_elt, const_vector_elt): Declare.
22700         * emit-rtl.c (const_vector_int_elt_1): New function.
22701         (const_vector_elt): Likewise.
22702         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22703         of CONST_VECTOR_ELT.
22705 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22707         * expr.c: Include rtx-vector-builder.h.
22708         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22709         directly on the tree encoding.
22710         (const_vector_from_tree): Likewise.
22711         * optabs.c: Include rtx-vector-builder.h.
22712         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22713         sequence of "u" values.
22714         * vec-perm-indices.c: Include rtx-vector-builder.h.
22715         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22716         directly on the vec_perm_indices encoding.
22718 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22720         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22721         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22722         * rtx-vector-builder.h: New file.
22723         * rtx-vector-builder.c: Likewise.
22724         * rtl.h (rtx_def::u2): Add a const_vector field.
22725         (CONST_VECTOR_NPATTERNS): New macro.
22726         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22727         (CONST_VECTOR_DUPLICATE_P): Likewise.
22728         (CONST_VECTOR_STEPPED_P): Likewise.
22729         (CONST_VECTOR_ENCODED_ELT): Likewise.
22730         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22731         (unwrap_const_vec_duplicate): Likewise.
22732         (const_vec_series_p): Check for a non-duplicated vector encoding.
22733         Say that the function only returns true for integer vectors.
22734         * emit-rtl.c: Include rtx-vector-builder.h.
22735         (gen_const_vec_duplicate_1): Delete.
22736         (gen_const_vector): Call gen_const_vec_duplicate instead of
22737         gen_const_vec_duplicate_1.
22738         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22739         (gen_const_vec_duplicate): Use rtx_vector_builder.
22740         (gen_const_vec_series): Likewise.
22741         (gen_rtx_CONST_VECTOR): Likewise.
22742         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22743         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22744         Build a new vector rather than modifying a CONST_VECTOR in-place.
22745         (handle_special_swappables): Update call accordingly.
22746         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22747         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22748         Build a new vector rather than modifying a CONST_VECTOR in-place.
22749         (handle_special_swappables): Update call accordingly.
22751 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22753         * simplify-rtx.c (simplify_const_binary_operation): Use
22754         CONST_VECTOR_ELT instead of XVECEXP.
22756 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22758         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22759         the selector elements to be different from the data elements
22760         if the selector is a VECTOR_CST.
22761         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22762         ssizetype for the selector.
22764 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22766         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22767         before testing each element individually.
22768         * tree-vect-generic.c (lower_vec_perm): Likewise.
22770 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22772         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22773         * selftest-run-tests.c (selftest::run_tests): Call it.
22774         * vector-builder.h (vector_builder::operator ==): New function.
22775         (vector_builder::operator !=): Likewise.
22776         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22777         (vec_perm_indices::all_from_input_p): New function.
22778         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22779         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22780         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22781         instead of reading the VECTOR_CST directly.  Detect whether both
22782         vector inputs are the same before constructing the vec_perm_indices,
22783         and update the number of inputs argument accordingly.  Use the
22784         utility functions added above.  Only construct sel2 if we need to.
22786 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22788         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22789         the broadcast of the low byte.
22790         (expand_mult_highpart): Use an explicit encoding for the permutes.
22791         * optabs-query.c (can_mult_highpart_p): Likewise.
22792         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22793         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22794         (vectorizable_bswap): Likewise.
22795         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22796         explicit encoding for the power-of-2 permutes.
22797         (vect_permute_store_chain): Likewise.
22798         (vect_grouped_load_supported): Likewise.
22799         (vect_permute_load_chain): Likewise.
22801 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22803         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22804         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22805         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22806         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22807         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22808         (vect_gen_perm_mask_any): Likewise.
22810 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22812         * int-vector-builder.h: New file.
22813         * vec-perm-indices.h: Include int-vector-builder.h.
22814         (vec_perm_indices): Redefine as an int_vector_builder.
22815         (auto_vec_perm_indices): Delete.
22816         (vec_perm_builder): Redefine as a stand-alone class.
22817         (vec_perm_indices::vec_perm_indices): New function.
22818         (vec_perm_indices::clamp): Likewise.
22819         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22820         (vec_perm_indices::new_vector): New function.
22821         (vec_perm_indices::new_expanded_vector): Update for new
22822         vec_perm_indices class.
22823         (vec_perm_indices::rotate_inputs): New function.
22824         (vec_perm_indices::all_in_range_p): Operate directly on the
22825         encoded form, without computing elided elements.
22826         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22827         encoding.  Update for new vec_perm_indices class.
22828         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22829         the given vec_perm_builder.
22830         (expand_vec_perm_var): Update vec_perm_builder constructor.
22831         (expand_mult_highpart): Use vec_perm_builder instead of
22832         auto_vec_perm_indices.
22833         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22834         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22835         or double series encoding as appropriate.
22836         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22837         vec_perm_indices instead of auto_vec_perm_indices.
22838         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22839         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22840         (vect_permute_store_chain): Likewise.
22841         (vect_grouped_load_supported): Likewise.
22842         (vect_permute_load_chain): Likewise.
22843         (vect_shift_permute_load_chain): Likewise.
22844         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22845         (vect_transform_slp_perm_load): Likewise.
22846         (vect_schedule_slp_instance): Likewise.
22847         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22848         (vectorizable_mask_load_store): Likewise.
22849         (vectorizable_bswap): Likewise.
22850         (vectorizable_store): Likewise.
22851         (vectorizable_load): Likewise.
22852         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22853         vec_perm_indices instead of auto_vec_perm_indices.  Use
22854         tree_to_vec_perm_builder to read the vector from a tree.
22855         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22856         vec_perm_builder instead of a vec_perm_indices.
22857         (have_whole_vector_shift): Use vec_perm_builder and
22858         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22859         truncation to calc_vec_perm_mask_for_shift.
22860         (vect_create_epilog_for_reduction): Likewise.
22861         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22862         from auto_vec_perm_indices to vec_perm_indices.
22863         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22864         instead of changing individual elements.
22865         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22866         the vector in d.perm.
22867         * config/arm/arm.c (expand_vec_perm_d::perm): Change
22868         from auto_vec_perm_indices to vec_perm_indices.
22869         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22870         instead of changing individual elements.
22871         (arm_vectorize_vec_perm_const): Use new_vector to install
22872         the vector in d.perm.
22873         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22874         Update vec_perm_builder constructor.
22875         (rs6000_expand_interleave): Likewise.
22876         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22877         (rs6000_expand_interleave): Likewise.
22879 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22881         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22882         to qimode could truncate the indices.
22883         * optabs.c (expand_vec_perm_var): Likewise.
22885 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22887         * Makefile.in (OBJS): Add vec-perm-indices.o.
22888         * vec-perm-indices.h: New file.
22889         * vec-perm-indices.c: Likewise.
22890         * target.h (vec_perm_indices): Replace with a forward class
22891         declaration.
22892         (auto_vec_perm_indices): Move to vec-perm-indices.h.
22893         * optabs.h: Include vec-perm-indices.h.
22894         (expand_vec_perm): Delete.
22895         (selector_fits_mode_p, expand_vec_perm_var): Declare.
22896         (expand_vec_perm_const): Declare.
22897         * target.def (vec_perm_const_ok): Replace with...
22898         (vec_perm_const): ...this new hook.
22899         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22900         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22901         * doc/tm.texi: Regenerate.
22902         * optabs.def (vec_perm_const): Delete.
22903         * doc/md.texi (vec_perm_const): Likewise.
22904         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22905         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22906         expand_vec_perm for constant permutation vectors.  Assert that
22907         the mode of variable permutation vectors is the integer equivalent
22908         of the mode that is being permuted.
22909         * optabs-query.h (selector_fits_mode_p): Declare.
22910         * optabs-query.c: Include vec-perm-indices.h.
22911         (selector_fits_mode_p): New function.
22912         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22913         is defined, instead of checking whether the vec_perm_const_optab
22914         exists.  Use targetm.vectorize.vec_perm_const instead of
22915         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
22916         fit in the vector mode before using a variable permute.
22917         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22918         vec_perm_indices instead of an rtx.
22919         (expand_vec_perm): Replace with...
22920         (expand_vec_perm_const): ...this new function.  Take the selector
22921         as a vec_perm_indices rather than an rtx.  Also take the mode of
22922         the selector.  Update call to shift_amt_for_vec_perm_mask.
22923         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22924         Use vec_perm_indices::new_expanded_vector to expand the original
22925         selector into bytes.  Check whether the indices fit in the vector
22926         mode before using a variable permute.
22927         (expand_vec_perm_var): Make global.
22928         (expand_mult_highpart): Use expand_vec_perm_const.
22929         * fold-const.c: Includes vec-perm-indices.h.
22930         * tree-ssa-forwprop.c: Likewise.
22931         * tree-vect-data-refs.c: Likewise.
22932         * tree-vect-generic.c: Likewise.
22933         * tree-vect-loop.c: Likewise.
22934         * tree-vect-slp.c: Likewise.
22935         * tree-vect-stmts.c: Likewise.
22936         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22937         Delete.
22938         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22939         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22940         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22941         (aarch64_vectorize_vec_perm_const): ...this new function.
22942         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22943         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22944         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22945         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22946         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22947         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22948         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22949         into...
22950         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
22951         check for NEON modes.
22952         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22953         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22954         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22955         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22956         into...
22957         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
22958         the old VEC_PERM_CONST conditions.
22959         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22960         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22961         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22962         (ia64_vectorize_vec_perm_const_ok): Merge into...
22963         (ia64_vectorize_vec_perm_const): ...this new function.
22964         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22965         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22966         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22967         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22968         * config/mips/mips.c (mips_expand_vec_perm_const)
22969         (mips_vectorize_vec_perm_const_ok): Merge into...
22970         (mips_vectorize_vec_perm_const): ...this new function.
22971         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22972         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22973         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22974         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22975         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22976         (rs6000_expand_vec_perm_const): Delete.
22977         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22978         Delete.
22979         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22980         (altivec_expand_vec_perm_const_le): Take each operand individually.
22981         Operate on constant selectors rather than rtxes.
22982         (altivec_expand_vec_perm_const): Likewise.  Update call to
22983         altivec_expand_vec_perm_const_le.
22984         (rs6000_expand_vec_perm_const): Delete.
22985         (rs6000_vectorize_vec_perm_const_ok): Delete.
22986         (rs6000_vectorize_vec_perm_const): New function.
22987         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22988         an element count and rtx array.
22989         (rs6000_expand_extract_even): Update call accordingly.
22990         (rs6000_expand_interleave): Likewise.
22991         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22992         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22993         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22994         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22995         (rs6000_expand_vec_perm_const): Delete.
22996         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22997         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22998         (altivec_expand_vec_perm_const_le): Take each operand individually.
22999         Operate on constant selectors rather than rtxes.
23000         (altivec_expand_vec_perm_const): Likewise.  Update call to
23001         altivec_expand_vec_perm_const_le.
23002         (rs6000_expand_vec_perm_const): Delete.
23003         (rs6000_vectorize_vec_perm_const_ok): Delete.
23004         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23005         reference to the SPE evmerge intructions.
23006         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23007         an element count and rtx array.
23008         (rs6000_expand_extract_even): Update call accordingly.
23009         (rs6000_expand_interleave): Likewise.
23010         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23011         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23012         new function.
23013         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23015 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23017         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23018         vector mode and that that mode matches the mode of the data
23019         being permuted.
23020         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23021         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23022         directly using expand_vec_perm_1 when forcing selectors into
23023         registers.
23024         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23026 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23028         * optabs-query.h (can_vec_perm_p): Delete.
23029         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23030         * optabs-query.c (can_vec_perm_p): Split into...
23031         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23032         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23033         particular selector is valid.
23034         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23035         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23036         (vect_grouped_load_supported): Likewise.
23037         (vect_shift_permute_load_chain): Likewise.
23038         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23039         (vect_transform_slp_perm_load): Likewise.
23040         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23041         (vectorizable_bswap): Likewise.
23042         (vect_gen_perm_mask_checked): Likewise.
23043         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23044         implementations of variable permutation vectors into account
23045         when deciding which selector to use.
23046         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23047         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23048         with a false third argument.
23049         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23050         to test whether the constant selector is valid and can_vec_perm_var_p
23051         to test whether a variable selector is valid.
23053 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23055         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23056         * optabs-query.c (can_vec_perm_p): Likewise.
23057         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23058         instead of vec_perm_indices.
23059         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23060         (vect_gen_perm_mask_checked): Likewise,
23061         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23062         (vect_gen_perm_mask_checked): Likewise,
23064 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23066         * optabs-query.h (qimode_for_vec_perm): Declare.
23067         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23068         (qimode_for_vec_perm): ...this new function.
23069         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23071 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23073         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23074         does not have a conditional at the top.
23076 2018-01-02  Richard Biener  <rguenther@suse.de>
23078         * ipa-inline.c (big_speedup_p): Fix expression.
23080 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23082         PR target/81616
23083         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23084         for generic 4->6.
23086 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23088         PR target/81616
23089         Generic tuning.
23090         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23091         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23092         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23093         cond_taken_branch_cost 3->4.
23095 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23097         PR tree-optimization/83581
23098         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23099         TODO_cleanup_cfg if any changes have been made.
23101         PR middle-end/83608
23102         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23103         convert_modes if target mode has the right side, but different mode
23104         class.
23106         PR middle-end/83609
23107         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23108         last argument when extracting from CONCAT.  If either from_real or
23109         from_imag is NULL, use expansion through memory.  If result is not
23110         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23111         the parts directly to inner mode, if even that fails, use expansion
23112         through memory.
23114         PR middle-end/83623
23115         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23116         check for bswap in mode rather than HImode and use that in expand_unop
23117         too.
23119 Copyright (C) 2018 Free Software Foundation, Inc.
23121 Copying and distribution of this file, with or without modification,
23122 are permitted in any medium without royalty provided the copyright
23123 notice and this notice are preserved.