[gcc]
[official-gcc.git] / gcc / ChangeLog
blob00b03c9d1d4ce7ad976a205c13a0d1a3e8f2f951
1 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4         vec_xst variants to the list.
5         (rs6000_gimple_fold_builtin): Add support for folding unaligned
6         vector loads and stores.
8 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
10         * config.gcc (rs6000-ibm-aix4.x): Delete.
11         (rs6000-ibm-aix5.1): Delete.
12         (rs6000-ibm-aix5.2): Delete.
13         (rs6000-ibm-aix5.3): Delete.
14         * config/rs6000/aix43.h: Delete.
15         * config/rs6000/aix51.h: Delete.
16         * config/rs6000/aix52.h: Delete.
17         * config/rs6000/t-aix43: Delete.
19 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
21         * config/s390/s390.c (s390_decompose_constant_pool_ref):
22         New function.
23         (s390_decompose_address): Factor out constant pool ref
24         decomposition.
26 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
28         * config/nds32/nds32-predicates.c
29         (nds32_can_use_bclr_p): Change return type as bool.
30         (nds32_can_use_bset_p): Ditto.
31         (nds32_can_use_btgl_p): Ditto.
32         (nds32_can_use_bitci_p): Ditto.
33         * config/nds32/nds32-protos.h
34         (nds32_can_use_bclr_p): Change declaration.
35         (nds32_can_use_bset_p): Ditto.
36         (nds32_can_use_btgl_p): Ditto.
37         (nds32_can_use_bitci_p): Ditto.
39 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
41         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
42         Support -msched-prolog-epilog option.
43         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
45 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
47         * common/config/nds32/nds32-common.c
48         (nds32_option_optimization_table): Enalbe -malways-align.
50 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
52         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
53         extra_headers.
54         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
55         OPT_misr_secure_ case.
56         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
57         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
58         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
59         secure attribute.
60         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
61         (nds32_isr_info): New field security_level.
62         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
63         * config/nds32/nds32.md (return_internal): Consider critical attribute.
64         * config/nds32/nds32.opt (misr-secure): New option.
65         * config/nds32/nds32_init.inc: New file.
66         * config/nds32/nds32_isr.h: New file.
68 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
70         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
71         Update comment for atomic instructions.
72         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
73         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
74         Remove.
75         (atomic_loaddi): Revise fence expansion to only emit fence prior to
76         load for __ATOMIC_SEQ_CST model.
77         (atomic_loaddi_1): Remove float register target.
78         (atomic_storedi): Handle CONST_INT values.
79         (atomic_storedi_1): Remove float register source.  Add special case
80         for zero value.
81         (memory_barrier): New expander and insn.
83 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
85         PR tree-optimization/86835
86         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
87         new_stmt after def_gsi, make sure to insert new_square_stmt after
88         that stmt, not 2 stmts before it.
90 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
92         PR target/82418
93         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
94         instead of SWI48.
96 2018-08-10  Martin Liska  <mliska@suse.cz>
98         PR target/83610
99         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
100         function type.
101         * builtins.c (expand_builtin_expect_with_probability):
102         New function.
103         (expand_builtin_expect_with_probability): New function.
104         (build_builtin_expect_predicate): Add new argumnet probability
105         for BUILT_IN_EXPECT_WITH_PROBABILITY.
106         (fold_builtin_expect):
107         (fold_builtin_2):
108         (fold_builtin_3):
109         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
110         * builtins.h (fold_builtin_expect): Set new argument.
111         * doc/extend.texi: Document __builtin_expect_with_probability.
112         * doc/invoke.texi: Likewise.
113         * gimple-fold.c (gimple_fold_call): Pass new argument.
114         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
115         also BUILT_IN_EXPECT_WITH_PROBABILITY.
116         * predict.c (get_predictor_value): New function.
117         (expr_expected_value): Add new argument probability. Assume
118         that predictor and probability are always non-null.
119         (expr_expected_value_1): Likewise.  For __builtin_expect and
120         __builtin_expect_with_probability set probability.  Handle
121         combination in binary expressions.
122         (tree_predict_by_opcode): Simplify code by simply calling
123         get_predictor_value.
124         (pass_strip_predict_hints::execute): Add handling of
125         BUILT_IN_EXPECT_WITH_PROBABILITY.
126         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
127         new predictor.
128         * tree.h (DECL_BUILT_IN_P): New function.
130 2018-08-10  Martin Liska  <mliska@suse.cz>
132         PR tree-optimization/85799
133         * passes.def: Add argument for pass_strip_predict_hints.
134         * predict.c (class pass_strip_predict_hints): Add new argument
135         early_p.
136         (strip_predictor_early): New function.
137         (pass_strip_predict_hints::execute): Call the function to
138         strip predictors.
139         (strip_predict_hints): New function.
140         * predict.def: Fix comment.
142 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
144         * Makefile.in: Clarify which tm.texi to copy over to assert the
145         right to grant a GFDL license for all.
147 2018-08-09  Jeff Law  <law@redhat.com>
149         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
150         unused variable.
152 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
154         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
155         prototype.
157 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
159         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
160         reductions for variable-length vectors.
162 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
164         PR other/84889
165         * common.opt (fdiagnostics-show-line-numbers): New option.
166         * diagnostic-show-locus.c (class layout): Add fields
167         "m_show_line_numbers_p" and "m_linenum_width";
168         (num_digits): New function.
169         (test_num_digits): New function.
170         (layout::layout): Initialize new fields.  Update m_x_offset
171         logic to handle any left margin.
172         (layout::print_source_line): Print line number when requested.
173         (layout::start_annotation_line): New member function.
174         (layout::print_annotation_line): Call it.
175         (layout::print_leading_fixits): Likewise.
176         (layout::print_trailing_fixits): Likewise.  Update calls to
177         move_to_column for new parameter.
178         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
179         it to potentially call start_annotation_line.
180         (layout::show_ruler): Call start_annotation_line.
181         (selftest::test_line_numbers_multiline_range): New selftest.
182         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
183         and selftest::test_line_numbers_multiline_range.
184         * diagnostic.c (diagnostic_initialize): Initialize
185         show_line_numbers_p.
186         * diagnostic.h (struct diagnostic_context): Add field
187         "show_line_numbers_p".
188         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
189         -fno-diagnostics-show-line-numbers.
190         * dwarf2out.c (gen_producer_string): Add
191         OPT_fdiagnostics_show_line_numbers to the ignored options.
192         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
193         one setting" options.
194         (append_compiler_options): Likewise to the dropped options.
195         (append_diag_options): Likewise to the passed-on options.
196         * opts.c (common_handle_option): Handle the new option.
197         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
199 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
201         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
202         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
203         third argument of type "const signed char" to descriptions of
204         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
205         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
206         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
207         __builtin_bcdsub_ov functions.
209 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
211         PR tree-optimization/86858
212         * tree-vect-loop.c (vect_is_simple_reduction): Restore
213         flow_bb_inside_loop_p calls.
215 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
217         PR tree-optimization/86871
218         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
219         instead of gimple_assign_lhs.
221 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
223         PR target/86887
224         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
225         register constraint to operand 0.
226         (add<mode>3_carryinC): Likewise.
227         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
229 2018-08-09  Martin Liska  <mliska@suse.cz>
231         PR c/86895
232         * common.opt: Remove extra line.
234 2018-08-09  Martin Liska  <mliska@suse.cz>
236         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
237         at the end of a line, make first letter capital and end up
238         a sentence with a dot.
239         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
240         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
241         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
242         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
243         (PARAM_MAX_ISL_OPERATIONS): Likewise.
244         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
245         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
246         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
247         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
248         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
249         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
250         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
251         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
252         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
253         (PARAM_TREE_REASSOC_WIDTH): Likewise.
254         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
255         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
256         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
258 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
260         PR target/84332
261         * config/s390/s390.c (s390_option_override_internal): Reduce the
262         stack-clash-protection-probe-interval param if it would be too big
263         for z900.
265 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
267         PR target/46179
268         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
269         * config/m68k/m68k.c (handle_move_double): Don't call
270         m68k_final_prescan_insn.
271         (m68k_adjust_decorated_operand): Renamed from
272         m68k_final_prescan_insn, remove first and third operand and
273         simplify.
274         (print_operand): Call it.
275         (print_operand_address): Call it.
277 2018-08-08  Nathan Sidwell  <nathan@acm.org>
279         * diagnostic.c (diagnostic_report_current_module): Use
280         linemap_included_from & linemap_included_from_linemap.
282 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
284         * config/aarch64/aarch64-cores.def: Add phecda core.
285         * config/aarch64/aarch64-tune.md: Regenerate.
286         * doc/invoke.texi: Add phecda core.
288 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
290         PR target/85295
291         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
292         definitions.
293         * config/s390/s390.md ("movti"): Add more alternatives for
294         constant to GPR copies.
296 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
298         * config/s390/s390.c: Fix whitespace damage throughout the file.
299         * config/s390/s390.h: Likewise.
300         * config/s390/tpf.h: Likewise.
302 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
304         * config/s390/s390.c (s390_loadrelative_operand_p):
305         Remove TARGET_CPU_ZARCH usages.
306         (s390_rtx_costs): Likewise.
307         (s390_legitimate_constant_p): Likewise.
308         (s390_cannot_force_const_mem): Likewise.
309         (legitimate_reload_constant_p): Likewise.
310         (s390_preferred_reload_class): Likewise.
311         (legitimize_pic_address): Likewise.
312         (legitimize_tls_address): Likewise.
313         (s390_split_branches): Removed.
314         (s390_add_execute): Removed.
315         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
316         (s390_mainpool_start): Likewise.
317         (s390_mainpool_finish): Likewise.
318         (s390_mainpool_cancel): Removed.
319         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
320         (s390_chunkify_cancel): Likewise.
321         (s390_return_addr_rtx): Likewise.
322         (s390_register_info): Remove split_branches_pending_p uages.
323         (s390_optimize_register_info): Likewise.
324         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
325         split_branches_pending_p usages.
326         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
327         (s390_load_got): Likewise.
328         (s390_expand_split_stack_prologue): Likewise.
329         (output_asm_nops): Likewise.
330         (s390_function_profiler): Likewise.
331         (s390_emit_call): Likewise.
332         (s390_conditional_register_usage): Likewise.
333         (s390_optimize_prologue): Likewise.
334         (s390_reorg): Remove TARGET_CPU_ZARCH and
335         split_branches_pending_p usages.
336         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
337         usages.
338         (s390_output_indirect_thunk_function): Likewise.
339         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
340         (TARGET_CPU_ZARCH_P): Removed.
341         (struct machine_function): Remove split_branches_pending_p.
342         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
344 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
346         * common/config/s390/s390-common.c (processor_flags_table):
347         Remove flags.
348         * config.gcc: Remove with_arch/with_tune support.
349         * config/s390/2064.md: Remove cpu attribute comparisons.
350         * config/s390/driver-native.c (s390_host_detect_local_cpu):
351         Remove MTN.
352         * config/s390/linux.h (ASM_SPEC):
353         Remove -march support.
354         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
355         Use a table to get an arch level.
356         * config/s390/s390-opts.h (enum processor_type):
357         Remove enum values.
358         * config/s390/s390.c
359         (processor_table): Remove entries, add arch_level values.
360         (s390_issue_rate): Remove cases.
361         (s390_option_override): Adjust
362         s390_option_override_internal() call.
363         (s390_option_override_internal): Remove deprecation warning.
364         (s390_valid_target_attribute_tree): Adjust
365         s390_option_override_internal() call.
366         * config/s390/s390.h (struct s390_processor):
367         Share with s390-c.c, add arch_level field.
368         * config/s390/s390.md:
369         Remove occurrences in cpu attribute.
370         * config/s390/s390.opt: Remove -march/-mtune support.
371         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
372         * doc/invoke.texi: Remove deprecation warning.
374 2018-08-08  Luis Machado  <luis.machado@linaro.org>
376         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
377         global.
378         (qdf24xx_tunings): Set vector cost structure to
379         qdf24xx_vector_cost.
381         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
382         <register_sextend>: Set to 3.
384 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
386         PR target/86838
387         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
388         * config/aarch64/aarch64-simd.md
389         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
390         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
391         (aarch64_frecpx<mode>): ...this new pattern.
392         * config/aarch64/aarch64-simd-builtins.def: Remove comment
393         about aarch64_frecp<FRECP:frecp_suffix><mode>.
395 2018-08-07  Martin Liska  <mliska@suse.cz>
397         PR middle-end/83023
398         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
399         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
400         * predict.def (PRED_MALLOC_NONNULL): New predictor.
401         * doc/extend.texi: Document that malloc attribute adds
402         hit to compiler.
404 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
406         PR target/86785
407         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
408         Define to speculation_safe_value_not_needed.
410 2018-08-06  Jeff Law  <law@redhat.com>
412         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
413         the vr_values instance to cprop_into_stmt.
414         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
415         (cprop_operand): Also query EVRP to determine if OP is a constant.
416         
417 2018-08-06  Nathan Sidwell  <nathan@acm.org>
419         * diagnostic.c (diagnostic_report_current_module): Reroll
420         included-at loop.  Translate text.
422 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
424         * function-tests.c (selftest::test_expansion_to_rtl): Call
425         free_after_compilation.
427 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
429         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
431 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
433         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
434         loops with memory block operations from getting unrolled.
436 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
438         PR target/86807
439         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
440         Define to speculation_safe_value_not_needed.
442 2018-08-06  Jeff Law  <law@redhat.com>
444         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
445         assert.
447 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
449         PR target/86662
450         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
451         with all enabled __intN types.
453         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
455 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
457         * alias.c (record_set): Check for clobber high.
458         * cfgexpand.c (expand_gimple_stmt): Likewise.
459         * combine-stack-adj.c (single_set_for_csa): Likewise.
460         * combine.c (find_single_use_1): Likewise.
461         (set_nonzero_bits_and_sign_copies): Likewise.
462         (get_combine_src_dest): Likewise.
463         (is_parallel_of_n_reg_sets): Likewise.
464         (try_combine): Likewise.
465         (record_dead_and_set_regs_1): Likewise.
466         (reg_dead_at_p_1): Likewise.
467         (reg_dead_at_p): Likewise.
468         * dce.c (deletable_insn_p): Likewise.
469         (mark_nonreg_stores_1): Likewise.
470         (mark_nonreg_stores_2): Likewise.
471         * df-scan.c (df_find_hard_reg_defs): Likewise.
472         (df_uses_record): Likewise.
473         (df_get_call_refs): Likewise.
474         * dwarf2out.c (mem_loc_descriptor): Likewise.
475         * haifa-sched.c (haifa_classify_rtx): Likewise.
476         * ira-build.c (create_insn_allocnos): Likewise.
477         * ira-costs.c (scan_one_insn): Likewise.
478         * ira.c (equiv_init_movable_p): Likewise.
479         (rtx_moveable_p): Likewise.
480         (interesting_dest_for_shprep): Likewise.
481         * jump.c (mark_jump_label_1): Likewise.
482         * postreload-gcse.c (record_opr_changes): Likewise.
483         * postreload.c (reload_cse_simplify): Likewise.
484         (struct reg_use): Add source expr.
485         (reload_combine): Check for clobber high.
486         (reload_combine_note_use): Likewise.
487         (reload_cse_move2add): Likewise.
488         (move2add_note_store): Likewise.
489         * print-rtl.c (print_pattern): Likewise.
490         * recog.c (decode_asm_operands): Likewise.
491         (store_data_bypass_p): Likewise.
492         (if_test_bypass_p): Likewise.
493         * regcprop.c (kill_clobbered_value): Likewise.
494         (kill_set_value): Likewise.
495         * reginfo.c (reg_scan_mark_refs): Likewise.
496         * reload1.c (maybe_fix_stack_asms): Likewise.
497         (eliminate_regs_1): Likewise.
498         (elimination_effects): Likewise.
499         (mark_not_eliminable): Likewise.
500         (scan_paradoxical_subregs): Likewise.
501         (forget_old_reloads_1): Likewise.
502         * reorg.c (find_end_label): Likewise.
503         (try_merge_delay_insns): Likewise.
504         (redundant_insn): Likewise.
505         (own_thread_p): Likewise.
506         (fill_simple_delay_slots): Likewise.
507         (fill_slots_from_thread): Likewise.
508         (dbr_schedule): Likewise.
509         * resource.c (update_live_status): Likewise.
510         (mark_referenced_resources): Likewise.
511         (mark_set_resources): Likewise.
512         * rtl.c (copy_rtx): Likewise.
513         * rtlanal.c (reg_referenced_p): Likewise.
514         (single_set_2): Likewise.
515         (noop_move_p): Likewise.
516         (note_stores): Likewise.
517         * sched-deps.c (sched_analyze_reg): Likewise.
518         (sched_analyze_insn): Likewise.
520 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
522         * cse.c (invalidate_reg): New function extracted from...
523         (invalidate): ...here.
524         (canonicalize_insn): Check for clobber high.
525         (invalidate_from_clobbers): invalidate clobber highs.
526         (invalidate_from_sets_and_clobbers): Likewise.
527         (count_reg_usage): Check for clobber high.
528         (insn_live_p): Likewise.
529         * cselib.c (cselib_expand_value_rtx_1):Likewise.
530         (cselib_invalidate_regno): Check for clobber in setter.
531         (cselib_invalidate_rtx): Pass through setter.
532         (cselib_invalidate_rtx_note_stores):
533         (cselib_process_insn): Check for clobber high.
534         * cselib.h (cselib_invalidate_rtx): Add operand.
536 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
538         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
539         (mark_not_eliminable): Likewise.
540         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
541         * lra-lives.c (process_bb_lives): Check for clobber high.
542         * lra.c (new_insn_reg): Remember clobber highs.
543         (collect_non_operand_hard_regs): Check for clobber high.
544         (lra_set_insn_recog_data): Likewise.
545         (add_regs_to_insn_regno_info): Likewise.
546         (lra_update_insn_regno_info): Likewise.
548 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
550         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
551         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
553 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
555         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
556         (copy_insn_1): Likewise.
557         (gen_hard_reg_clobber_high): New gen function.
558         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
559         * genemit.c (gen_exp): Likewise.
560         (gen_emit_seq): Pass through info.
561         (gen_insn): Check for CLOBBER_HIGH.
562         (gen_expand): Pass through info.
563         (gen_split): Likewise.
564         (output_add_clobbers): Likewise.
565         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
566         (remove_clobbers): Likewise.
567         * rtl.h (gen_hard_reg_clobber_high): New declaration.
569 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
571         * doc/rtl.texi (clobber_high): Add.
572         (parallel): Add in clobber high
573         * rtl.c (rtl_check_failed_code3): Add function.
574         * rtl.def (CLOBBER_HIGH): Add expression.
575         * rtl.h (RTL_CHECKC3): Add macro.
576         (rtl_check_failed_code3): Add declaration.
577         (XC3EXP): Add macro.
579 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
581         PR target/86386
582         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
583         cfun->machine->max_used_stack_alignment if needed.
585 2018-08-04  Martin Sebor  <msebor@redhat.com>
587         PR tree-optimization/86571
588         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
589         NaN output to 4.
591 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
593         PR target/86799
594         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
595         Define.
597 2018-08-03  Jeff Law  <law@redhat.com>
599         PR target/86795
600         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
601         Define to speculation_safe_value_not_needed.
603 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
605         * doc/gcov.texi (-x): Remove duplicate "to".
606         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
607         (-Wif-not-aligned): Remove duplicate "is".
608         (-flto): Remove duplicate "the".
609         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
610         duplicate "v5.00.b".
611         (MSP430 Options): Remove duplicate "and" from the description
612         of "-mgprel-sec=regexp".
613         (x86 Options): Remove duplicate copies of "vmldLog102" and
614         vmlsLog104 from description of "-mveclibabi=type".
616 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
618         * internal-fn.h (first_commutative_argument): Declare.
619         * internal-fn.c (first_commutative_argument): New function.
620         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
621         restrictions for pattern statements.  Use first_commutative_argument
622         to look for commutative operands in calls to internal functions.
624 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
626         * Makefile.in (wide-int-range.o): New.
627         * tree-vrp.c: Move all the wide_int_* functions to...
628         * wide-int-range.cc: ...here.
629         * tree-vrp.h: Move all the wide_int_* prototypes to...
630         * wide-int-range.h: ...here.
632 2018-08-03  Tom de Vries  <tdevries@suse.de>
634         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
635         UI_NONE.
636         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
637         * except.c (output_function_exception_table): Do early exit if
638         targetm_common.except_unwind_info (&global_options) == UI_NONE.
640 2018-08-03  Martin Liska  <mliska@suse.cz>
642         * predict.c (dump_prediction): Change to 2 digits
643         in fraction part.
645 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
647         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
648         neon_dup_q to...
649         (falkor_am_1_gtov_gtov): ... a new insn reservation.
651 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
653         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
654         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
655         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
656         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
657         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
659 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
661         * diagnostic-show-locus.c (diagnostic_show_locus): Use
662         pp_take_prefix when saving the existing prefix.
663         * diagnostic.c (diagnostic_append_note): Likewise.
664         * langhooks.c (lhd_print_error_function): Likewise.
665         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
666         param's type.  Free the existing prefix.
667         (pp_take_prefix): New function.
668         (pretty_printer::pretty_printer): Drop the prefix parameter.
669         Rename the length parameter to match the comment.
670         (pretty_printer::~pretty_printer): Free the prefix.
671         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
672         parameter.
673         (struct pretty_printer): Drop the "const" from "prefix" field's
674         type and clarify memory management.
675         (pp_set_prefix): Drop the "const" from the 2nd param.
676         (pp_take_prefix): New decl.
678 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
680         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
681         for word_mode_ok here instead of passing as argument.
682         (expand_block_compare): Change select_block_compare_mode() call.
683         (expand_strncmp_gpr_sequence): New function.
684         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
686 2018-08-02  Jeff Law  <law@redhat.com>
688         PR target/86790
689         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
690         Define to speculation_safe_value_not_needed.
692         PR target/86784
693         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
694         Define to speculation_safe_value_not_needed.
696 2018-08-02  Tom de Vries  <tdevries@suse.de>
698         PR target/86660
699         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
700         function.  Return UI_TARGET unconditionally.
701         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
702         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
704 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
706         * genemit.c (print_overload_test): Fix typo.
708 2018-08-02  Richard Biener  <rguenther@suse.de>
710         PR tree-optimization/86816
711         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
712         which checks for value availability before querying it.
713         (gvn_uses_equal): Use it.
714         (same_succ_hash): Likewise.
715         (gimple_equal_p): Likewise.
717 2018-08-02  Nick Clifton  <nickc@redhat.com>
719         PR target/86813
720         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
721         Define to speculation_safe_value_not_needed.
723         PR target/86810
724         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
725         Define to speculation_safe_value_not_needed.
727         PR target/86810
728         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
729         Define to speculation_safe_value_not_needed.
731         PR target/86803
732         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
733         Define to speculation_safe_value_not_needed.
735         PR target/86797
736         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
737         Define to speculation_safe_value_not_needed.
739         PR target/86791
740         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
741         Define to speculation_safe_value_not_needed.
743         PR target/86789
744         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
745         Define to speculation_safe_value_not_needed.
747         PR target/86787
748         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
749         Define to speculation_safe_value_not_needed.
751         PR target/86782
752         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
753         speculation_safe_value_not_needed.
755         PR target/86781
756         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
757         to speculation_safe_value_not_needed.
759 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
761         * doc/md.texi: Expand the documentation of instruction names
762         to mention port-local uses.  Document '@' in pattern names.
763         * read-md.h (overloaded_instance, overloaded_name): New structs.
764         (mapping): Declare.
765         (md_reader::handle_overloaded_name): New member function.
766         (md_reader::get_overloads): Likewise.
767         (md_reader::m_first_overload): New member variable.
768         (md_reader::m_next_overload_ptr): Likewise.
769         (md_reader::m_overloads_htab): Likewise.
770         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
771         m_next_overload_ptr and m_overloads_htab.
772         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
773         (get_mode_token, get_code_token, get_int_token): New functions.
774         (map_attr_string): Add an optional argument that passes back
775         the associated iterator.
776         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
777         (md_reader::handle_overloaded_name, add_overload_instance): New
778         functions.
779         (apply_iterators): Handle '@' names.  Report an error if '@'
780         is used without iterators.
781         (initialize_iterators): Initialize the new iterator_group fields.
782         * genopinit.c (handle_overloaded_code_for)
783         (handle_overloaded_gen): New functions.
784         (main): Use them to print declarations of maybe_code_for_* and
785         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
786         * genemit.c (print_overload_arguments, print_overload_test)
787         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
788         (main): Use it to print definitions of maybe_code_for_* and
789         maybe_gen_* functions.
790         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
791         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
792         instead of explicit mode checks.
793         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
794         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
795         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
796         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
797         (aarch64_expand_compare_and_swap): Likewise
798         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
799         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
800         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
801         (aarch64_constant_pool_reload_icode): Delete.
802         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
803         instead of aarch64_constant_pool_reload_icode.  Use
804         code_for_aarch64_reload_mov instead of explicit mode checks.
805         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
806         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
807         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
808         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
809         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
810         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
811         (aarch64_atomic_load_op_code): Delete.
812         (aarch64_emit_atomic_load_op): Likewise.
813         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
814         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
815         instead of aarch64_emit_atomic_load_op.
816         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
817         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
818         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
819         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
820         character before the pattern name.
821         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
822         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
823         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
824         (aarch64_frecps<mode>): Likewise.
825         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
826         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
827         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
828         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
829         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
831 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
833         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
834         Allow HFmode constants if TARGET_FP_F16INST.
836 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
838         PR target/86014
839         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
840         No longer check last store for clobber of address register.
842 2018-08-02  Martin Liska  <mliska@suse.cz>
844         PR gcov-profile/86817
845         * gcov.c (process_all_functions): New function.
846         (main): Call it.
847         (process_file): Move functions processing to
848         process_all_functions.
850 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
852         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
853         "const" to the "gimple *" and "rtx_insn *" parameters.
854         * dumpfile.h (dump_user_location_t::dump_user_location_t):
855         Likewise.
856         (dump_location_t::dump_location_t): Likewise.
858 2018-08-01  Martin Sebor  <msebor@redhat.com>
860         PR tree-optimization/86650
861         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
862         rather than a "gcall *".  Directly pass the data of interest
863         to percent_K_format, rather than building a temporary CALL_EXPR
864         to hold it.
865         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
866         (gimple_fold_builtin_strncat): Adjust.
867         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
868         gcall* argument with gimple*.
869         * gimple-ssa-warn-restrict.c (check_call): Same.
870         (wrestrict_dom_walker::before_dom_children): Same.
871         (builtin_access::builtin_access): Same.
872         (check_bounds_or_overlap): Same
873         (maybe_diag_overlap): Same.
874         (maybe_diag_offset_bounds): Same.
875         * tree-diagnostic.c (default_tree_printer): Move usage of
876         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
877         to this callsite.
878         * tree-pretty-print.c (percent_K_format): Add argument.
879         * tree-pretty-print.h: Add argument.
880         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
881         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
882         (maybe_diag_stxncpy_trunc): Same.
883         (handle_builtin_stxncpy): Same.
884         (handle_builtin_strcat): Same.
886 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
888         * match.pd: Optimise pointer range checks.
890 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
892         PR tree-optimization/86758
893         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
894         to remove pattern statements.
896 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
898         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
899         result of dfs_enumerate_from when constructing stmt_vec_infos,
900         instead of additionally calling get_loop_body.
902 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
904         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
905         parameter.
906         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
907         When creating an iv, assert that the step is not known to be zero.
908         (vect_setup_realignment): Update call accordingly.
909         * tree-vect-stmts.c (vectorizable_store): Likewise.
910         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
912 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
914         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
915         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
916         (vectorizable_reduction): Likewise.
917         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
918         (vect_detect_hybrid_slp_stmts): Likewise.
919         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
921 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
923         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
924         (wide_int_set_zero_nonzero_bits): ...this.
925         (zero_nonzero_bits_from_vr): Rename to...
926         (vrp_set_zero_nonzero_bits): ...this.
927         (extract_range_from_multiplicative_op_1): Abstract wide int
928         code...
929         (wide_int_range_multiplicative_op): ...here.
930         (extract_range_from_binary_expr_1): Extract wide int binary
931         operations into their own functions.
932         (wide_int_range_lshift): New.
933         (wide_int_range_can_optimize_bit_op): New.
934         (wide_int_range_shift_undefined_p): New.
935         (wide_int_range_bit_xor): New.
936         (wide_int_range_bit_ior): New.
937         (wide_int_range_bit_and): New.
938         (wide_int_range_trunc_mod): New.
939         (extract_range_into_wide_ints): New.
940         (vrp_shift_undefined_p): New.
941         (extract_range_from_multiplicative_op): New.
942         (vrp_can_optimize_bit_op): New.
943         * tree-vrp.h (value_range::dump): New.
944         (wide_int_range_multiplicative_op): New.
945         (wide_int_range_lshift):New.
946         (wide_int_range_shift_undefined_p): New.
947         (wide_int_range_bit_xor): New.
948         (wide_int_range_bit_ior): New.
949         (wide_int_range_bit_and): New.
950         (wide_int_range_trunc_mod): New.
951         (zero_nonzero_bits_from_bounds): Rename to...
952         (wide_int_set_zero_nonzero_bits): ...this.
953         (zero_nonzero_bits_from_vr): Rename to...
954         (vrp_set_zero_nonzero_bits): ...this.
955         (range_easy_mask_min_max): Rename to...
956         (wide_int_range_can_optimize_bit_op): this.
957         * vr-values.c (simplify_bit_ops_using_ranges): Rename
958         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
960 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
962         * tree-vectorizer.h (vect_orig_stmt): New function.
963         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
964         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
965         (vect_create_epilog_for_reduction): Likewise.
966         (vectorizable_live_operation): Likewise.
967         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
968         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
969         * tree-vect-stmts.c (vectorizable_call): Likewise.
970         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
972 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
974         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
975         argument.
976         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
977         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
978         (vect_transform_loop): Likewise.
979         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
981 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
983         * tree-vectorizer.h (vect_schedule_slp): Return void.
984         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
985         (vect_schedule_slp): Likewise.
987 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
989         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
990         argument.
991         (vect_transform_loop): Update calls accordingly.  Schedule SLP
992         instances before the main loop, if any exist.
994 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
996         PR tree-optimization/86749
997         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
998         If the lhs is used in a COND_EXPR, check that it is being used
999         as the "then" or "else" value.
1001 2018-08-01  Tom de Vries  <tdevries@suse.de>
1003         PR target/86800
1004         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1005         speculation_safe_value_not_needed.
1007 2018-08-01  Richard Biener  <rguenther@suse.de>
1009         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1010         as base and offset.
1012 2018-08-01  Martin Liska  <mliska@suse.cz>
1014         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1015         format how successful transformation is dumped.
1016         (gimple_mod_pow2_value_transform): Likewise.
1017         (gimple_mod_subtract_transform): Likewise.
1018         (gimple_stringops_transform): Likewise.
1020 2018-08-01  Martin Liska  <mliska@suse.cz>
1022         PR value-prof/35543
1023         * value-prof.c (interesting_stringop_to_profile_p):
1024         Simplify the code and add BUILT_IN_MEMMOVE.
1025         (gimple_stringops_transform): Likewise.
1027 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1029         * config/aarch64/aarch64-simd.md
1030         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1031         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1032         use GPI iterator instead of SI mode.
1034 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1036         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1037         rs6000_speculation_barrier.
1038         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1039         new barrier pattern name.
1041 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1043         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1044         (speculation_barrier): New insn.
1046 2018-08-01  Richard Biener  <rguenther@suse.de>
1048         PR bootstrap/86724
1049         * graphite.h: Include isl/id.h and isl/space.h to allow build
1050         with ISL 0.20.
1052 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
1054         PR target/86651
1055         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1056         mode for COFF targets.
1057         * defaults.h (TARGET_COFF): Define.
1058         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1059         TARGET_COFF): Define.
1060         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1061         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1062         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1064 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1066         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1067         * gimple-streamer-out.c (output_bb): Save it.
1068         * lto-streamer-in.c (input_struct_function_base): Restore
1069         instance discriminator if available.  Create map on demand.
1070         * lto-streamer-out.c (output_struct_function_base): Save it if
1071         available.
1072         * final.c (decl_to_instance_map): Document LTO strategy.
1074 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1075             Olivier Hainque  <hainque@adacore.com>
1077         * debug.h (decl_to_instance_map_t): New type.
1078         (decl_to_instance_map): Declare.
1079         (maybe_create_decl_to_instance_map): New inline function.
1080         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1081         to track basic block discriminators.
1082         (final_start_function_1): Initialize them.
1083         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1084         bb_discriminator.
1085         (decl_to_instance_map): New variable.
1086         (map_decl_to_instance, maybe_set_discriminator): New functions.
1087         (notice_source_line): Set discriminator.
1089 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1091         * targhooks.c (default_have_speculation_safe_value): Add
1092         ATTRIBUTE_UNUSED.
1094 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1096         * dump-context.h: Include "pretty-print.h".
1097         (dump_context::refresh_dumps_are_enabled): New decl.
1098         (dump_context::emit_item): New decl.
1099         (class dump_context): Add fields "m_test_pp" and
1100         "m_test_pp_flags".
1101         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1102         (temp_dump_context::get_dumped_text): New decl.
1103         (class temp_dump_context): Add field "m_pp".
1104         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1105         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1106         m_test_pp.
1107         (set_dump_file): Update for above change.
1108         (set_alt_dump_file): Likewise.
1109         (dump_loc): New overload, taking a pretty_printer *.
1110         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1111         to any test pretty-printer.
1112         (make_item_for_dump_gimple_stmt): New function, adapted from
1113         optinfo::add_gimple_stmt.
1114         (dump_context::dump_gimple_stmt): Call it, and use the result,
1115         eliminating the direct usage of dump_file and alt_dump_file in
1116         favor of indirectly using them via emit_item.
1117         (make_item_for_dump_gimple_expr): New function, adapted from
1118         optinfo::add_gimple_expr.
1119         (dump_context::dump_gimple_expr): Call it, and use the result,
1120         eliminating the direct usage of dump_file and alt_dump_file in
1121         favor of indirectly using them via emit_item.
1122         (make_item_for_dump_generic_expr): New function, adapted from
1123         optinfo::add_tree.
1124         (dump_context::dump_generic_expr): Call it, and use the result,
1125         eliminating the direct usage of dump_file and alt_dump_file in
1126         favor of indirectly using them via emit_item.
1127         (make_item_for_dump_printf_va): New function, adapted from
1128         optinfo::add_printf_va.
1129         (make_item_for_dump_printf): New function.
1130         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1131         and use the result, eliminating the direct usage of dump_file and
1132         alt_dump_file in favor of indirectly using them via emit_item.
1133         (make_item_for_dump_dec): New function.
1134         (dump_context::dump_dec): Call it, and use the result,
1135         eliminating the direct usage of dump_file and alt_dump_file in
1136         favor of indirectly using them via emit_item.
1137         (make_item_for_dump_symtab_node): New function, adapted from
1138         optinfo::add_symtab_node.
1139         (dump_context::dump_symtab_node): Call it, and use the result,
1140         eliminating the direct usage of dump_file and alt_dump_file in
1141         favor of indirectly using them via emit_item.
1142         (dump_context::begin_scope): Reimplement, avoiding direct usage
1143         of dump_file and alt_dump_file in favor of indirectly using them
1144         via emit_item.
1145         (dump_context::emit_item): New member function.
1146         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1147         Set up test pretty-printer on the underlying context.  Call
1148         refresh_dumps_are_enabled.
1149         (temp_dump_context::~temp_dump_context): Call
1150         refresh_dumps_are_enabled.
1151         (temp_dump_context::get_dumped_text): New member function.
1152         (selftest::verify_dumped_text): New function.
1153         (ASSERT_DUMPED_TEXT_EQ): New macro.
1154         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1155         and then without optinfo enabled.  Add uses of
1156         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1157         * dumpfile.h: Update comment for the dump_* API.
1158         * optinfo-emit-json.cc
1159         (selftest::test_building_json_from_dump_calls): Update for new
1160         param for temp_dump_context ctor.
1161         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1162         and "m_owned" field.
1163         (optinfo_item::~optinfo_item): Likewise.
1164         (optinfo::add_item): New member function.
1165         (optinfo::emit): Update comment.
1166         (optinfo::add_string): Delete.
1167         (optinfo::add_printf): Delete.
1168         (optinfo::add_printf_va): Delete.
1169         (optinfo::add_gimple_stmt): Delete.
1170         (optinfo::add_gimple_expr): Delete.
1171         (optinfo::add_tree): Delete.
1172         (optinfo::add_symtab_node): Delete.
1173         (optinfo::add_dec): Delete.
1174         * optinfo.h (class dump_context): New forward decl.
1175         (optinfo::add_item): New decl.
1176         (optinfo::add_string): Delete.
1177         (optinfo::add_printf): Delete.
1178         (optinfo::add_printf_va): Delete.
1179         (optinfo::add_gimple_stmt): Delete.
1180         (optinfo::add_gimple_expr): Delete.
1181         (optinfo::add_tree): Delete.
1182         (optinfo::add_symtab_node): Delete.
1183         (optinfo::add_dec): Delete.
1184         (optinfo::add_poly_int): Delete.
1185         (optinfo_item::optinfo_item): Remove "owned" param.
1186         (class optinfo_item): Remove field "m_owned".
1188 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1190         PR middle-end/86705
1191         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1192         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1193         requested variable alignment.
1194         (expand_one_ssa_partition): Likewise.
1195         (expand_one_var): Likewise.
1197 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1199         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1200         to speculation_safe_value_not_needed.
1202 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1204         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1205         * targhooks.c (speculation_safe_value_not_needed): New function.
1206         * target.def (have_speculation_safe_value): Update documentation.
1207         * doc/tm.texi: Regenerated.
1209 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1211         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1212         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1213         expand.
1214         (despeculate_copy<ALLI:mode>_insn): New insn.
1215         (despeculate_copyti_insn): New insn.
1216         (despeculate_simple<ALLI:mode>): New insn
1217         (despeculate_simpleti): New insn.
1218         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1219         function.
1220         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1221         aarch64_speculation_safe_value.
1222         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1224 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1226         * config/aarch64/aarch64-speculation.cc: New file.
1227         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1228         before pass_reorder_blocks.
1229         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1230         prototype.
1231         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1232         X14 and X15 when tracking speculation.
1233         * config/aarch64/aarch64.md (register name constants): Add
1234         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1235         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1236         (speculation_barrier): New insn attribute.
1237         (cmp<mode>): Allow SP in comparisons.
1238         (speculation_tracker): New insn.
1239         (speculation_barrier): Add speculation_barrier attribute.
1240         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1241         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1242         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1244 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1246         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1247         aarch64_track_speculation is true.
1248         (tb<optab><mode>1): Likewise.
1249         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1250         generate CB[N]Z when tracking speculation.
1251         (aarch64_split_compare_and_swap): Likewise.
1252         (aarch64_split_atomic_op): Likewise.
1254 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1256         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1258 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1260         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1261         (speculation_barrier): New insn.
1263 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1265         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1266         * config/arm/arm.md (speculation_barrier): New expand.
1267         (speculation_barrier_insn): New pattern.
1269 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1271         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1272         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1273         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1274         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1275         list.
1276         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1277         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1278         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1279         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1280         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1281         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1282         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1283         * builtins.c (expand_speculation_safe_value): New function.
1284         (expand_builtin): Call it.
1285         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1286         * doc/extend.texi: Document __builtin_speculation_safe_value.
1287         * doc/md.texi: Document "speculation_barrier" pattern.
1288         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1289         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1290         * doc/tm.texi: Regenerated.
1291         * target.def (have_speculation_safe_value, speculation_safe_value): New
1292         hooks.
1293         * targhooks.c (default_have_speculation_safe_value): New function.
1294         (default_speculation_safe_value): New function.
1295         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1296         (default_speculation_safe_value): Add prototype.
1298 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1300         * dump-context.h (dump_context::dump_loc): New decl.
1301         * dumpfile.c (dump_context::dump_loc): New member function.
1302         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1303         and dump_gimple_stmt.
1304         (dump_context::dump_gimple_expr_loc): Likewise, using
1305         dump_gimple_expr.
1306         (dump_context::dump_generic_expr_loc): Likewise, using
1307         dump_generic_expr.
1308         (dump_context::dump_printf_loc_va): Likewise, using
1309         dump_printf_va.
1310         (dump_context::begin_scope): Explicitly using the global function
1311         "dump_loc", rather than the member function.
1313 2018-07-31  Martin Sebor  <msebor@redhat.com>
1315         PR tree-optimization/86741
1316         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1318 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1320         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1321         depend on whether prefetch instructions will be emitted or not.
1322         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1323         will be emitted or not.
1324         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1325         (TARGET_SETMEM_PFD): New macros.
1327 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1329         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1330         (NULL_STMT_VEC_INFO): Delete.
1331         (stmt_vec_info::operator*): Likewise.
1332         (stmt_vec_info::operator gimple *): Likewise.
1333         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1334         of NULL_STMT_VEC_INFO.
1335         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1336         (vect_reassociating_reduction_p): Likewise.
1337         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1338         (vectorizable_store): Likewise.
1339         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1340         (vec_info::free_stmt_vec_infos): Likewise.
1342 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1344         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1345         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1347 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1349         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1350         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1351         (vec_info::free_stmt_vec_info): New private member functions.
1352         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1353         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1354         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1355         set_stmt_vec_info_vec and free_stmt_vec_infos.
1356         * tree-vect-loop.c (_loop_vec_info): Remove call to
1357         set_stmt_vec_info_vec.
1358         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1359         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1360         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1361         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1362         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1363         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1364         with the clearing in the xcalloc.
1365         (stmt_vec_info_vec): Delete.
1366         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1367         (vectorize_loops): Likewise.
1368         (vec_info::~vec_info): Remove argument from call to
1369         free_stmt_vec_infos.
1370         (vec_info::add_stmt): Remove vinfo argument from call to
1371         new_stmt_vec_info.
1373 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1375         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1376         rather than a gimple stmt.
1377         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1378         information for pattern statements when passed the original
1379         statement; instead wait to be passed the pattern statement itself.
1380         Don't call set_vinfo_for_stmt here.
1381         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1382         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1383         stmt_vec_infos here.
1384         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1385         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1386         stmt_vec_infos entry.
1388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1390         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1391         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1392         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1393         * tree-vect-stmts.c (vectorizable_call): Likewise.
1394         (vectorizable_simd_clone_call): Likewise.
1396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1398         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1399         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1400         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1401         * tree-vect-loop.c (vect_transform_loop): Likewise.
1402         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1403         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1405 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1407         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1408         (vect_dr_stmt): Delete.
1409         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1410         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1411         of DR_VECT_AUX.
1412         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1413         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1414         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1415         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1416         (vect_analyze_data_refs): Likewise.
1417         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1418         argument.
1419         (vect_find_same_alignment_drs): Likewise.
1420         (vect_slp_analyze_node_dependences): Update calls accordingly.
1421         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1422         instead of DR_VECT_AUX.
1423         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1424         of a vector data references.  Use vec_info::lookup_dr instead of
1425         DR_VECT_AUX.
1426         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1427         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1428         instead of DR_VECT_AUX.
1430 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1432         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1433         dr_vec_info.
1434         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1435         accordingly.
1436         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1437         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1438         (vect_gen_prolog_loop_niters): Likewise.
1440 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1442         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1443         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1444         (vect_known_alignment_in_bytes, vect_dr_behavior)
1445         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1446         instead of data_references.  Update calls to other routines for
1447         which the same change has been made.
1448         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1449         dr_vec_infos instead of stmt_vec_infos.
1450         (vect_analyze_data_ref_dependence): Update call accordingly.
1451         (vect_slp_analyze_data_ref_dependence)
1452         (vect_record_base_alignments): Use DR_VECT_AUX.
1453         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1454         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1455         (vector_alignment_reachable_p, vect_get_data_access_cost)
1456         (vect_peeling_supportable, vect_analyze_group_access_1)
1457         (vect_analyze_group_access, vect_analyze_data_ref_access)
1458         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1459         (vect_compile_time_alias, vect_small_gap_p)
1460         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1461         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1462         instead of data_references.  Update calls to other routines for
1463         which the same change has been made.
1464         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1465         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1466         (vect_slp_analyze_and_verify_node_alignment)
1467         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1468         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1469         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1470         above changes.
1471         (_vect_peel_info::dr): Replace with...
1472         (_vect_peel_info::dr_info): ...this new field.
1473         (vect_peeling_hash_get_most_frequent)
1474         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1475         (vect_peeling_hash_get_lowest_cost):
1476         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1477         routines for which the same change has been made.
1478         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1479         data_reference.
1480         * tree-vect-loop-manip.c (get_misalign_in_elems)
1481         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1482         above changes.
1483         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1484         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1485         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1486         (get_group_load_store_type, get_negative_load_store_type)
1487         (vect_get_data_ptr_increment, vectorizable_store)
1488         (vectorizable_load): Likewise.
1489         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1490         Update calls to other routines for which the same change has been made.
1492 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1494         * tree-vectorizer.h (vec_info::move_dr): New member function.
1495         (dataref_aux): Rename to...
1496         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1497         (_stmt_vec_info::dr_aux): Update accordingly.
1498         (_stmt_vec_info::data_ref_info): Delete.
1499         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1500         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1501         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1502         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1503         of data_ref.
1504         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1505         (STMT_VINFO_DR_INFO): New macro.
1506         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1507         (set_dr_misalignment): Update after rename of dataref_aux.
1508         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1509         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1510         initialization of STMT_VINFO_DATA_REF.
1511         * tree-vectorizer.c (vec_info::move_dr): New function.
1512         * tree-vect-patterns.c (vect_recog_bool_pattern)
1513         (vect_recog_mask_conversion_pattern)
1514         (vect_recog_gather_scatter_pattern): Use it.
1515         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1516         the "dr" and "stmt" fields of dr_vec_info instead of
1517         STMT_VINFO_DATA_REF.
1519 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1521         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1522         (is_pattern_stmt_p): Use it.
1523         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1524         on pattern statements.
1526 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1528         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1529         original stmt as a stmt_vec_info rather than a gimple stmt.
1530         (vect_pattern_recog_1): Take the statement directly as a
1531         stmt_vec_info, rather than via a gimple_stmt_iterator.
1532         Update call to vect_mark_pattern_stmts.
1533         (vect_pattern_recog): Update calls accordingly.
1535 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1537         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1538         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1539         a vect_def_type for the first argument.
1540         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1541         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1542         operand if it isn't defined by a vectorized statement.
1543         (vect_build_gather_load_calls): Remove the mask_dt argument and
1544         update calls to vect_get_vec_def_for_stmt_copy.
1545         (vectorizable_bswap): Likewise the dt argument.
1546         (vectorizable_call): Update calls to vectorizable_bswap and
1547         vect_get_vec_def_for_stmt_copy.
1548         (vectorizable_simd_clone_call, vectorizable_assignment)
1549         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1550         (vectorizable_comparison): Update calls to
1551         vect_get_vec_def_for_stmt_copy.
1552         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1553         vect_is_simple_use.
1554         (vect_get_loop_based_defs): Remove dt argument and update call
1555         to vect_get_vec_def_for_stmt_copy.
1556         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1557         and vect_get_vec_def_for_stmt_copy.
1558         (vectorizable_load): Update calls to vect_build_gather_load_calls
1559         and vect_get_vec_def_for_stmt_copy.
1560         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1561         (vectorizable_reduction, vectorizable_live_operation): Update calls
1562         to vect_get_vec_def_for_stmt_copy.
1564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1566         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1567         and gimple stmt arguments with a stmt_vec_info.
1568         (vect_record_base_alignments): Update calls accordingly.
1569         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1570         and gimple stmt arguments with a stmt_vec_info.
1571         (vect_build_slp_tree_1): Remove vinfo argument and update call
1572         to vect_record_max_nunits.
1573         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1574         and vect_record_max_nunits.
1576 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1578         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1579         file and take a stmt_vec_info instead of a gimple stmt.
1580         (supportable_widening_operation, vect_finish_replace_stmt)
1581         (vect_finish_stmt_generation, vect_get_store_rhs)
1582         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1583         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1584         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1585         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1586         (vect_create_data_ref_ptr, bump_vector_ptr)
1587         (vect_permute_store_chain, vect_setup_realignment)
1588         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1589         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1590         (vectorizable_reduction, vectorizable_induction)
1591         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1592         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1593         than gimple stmts as arguments.
1594         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1595         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1596         (can_group_stmts_p, vect_check_gather_scatter)
1597         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1598         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1599         (vect_permute_load_chain, vect_shift_permute_load_chain)
1600         (vect_transform_grouped_load)
1601         (vect_record_grouped_load_vectors): Likewise.
1602         * tree-vect-loop.c (vect_fixup_reduc_chain)
1603         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1604         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1605         (vectorizable_reduction, vectorizable_induction)
1606         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1607         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1608         (vect_get_load_store_mask): Likewise.
1609         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1610         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1611         * tree-vect-stmts.c (vect_mark_relevant)
1612         (is_simple_and_all_uses_invariant)
1613         (exist_non_indexing_operands_for_use_p, process_use)
1614         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1615         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1616         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1617         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1618         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1619         (get_negative_load_store_type, get_load_store_type)
1620         (vect_check_load_store_mask, vect_check_store_rhs)
1621         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1622         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1623         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1624         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1625         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1626         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1627         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1628         (supportable_widening_operation): Likewise.
1630 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1632         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1633         a stmt_vec_info instead of a gcall.
1634         (vect_check_gather_scatter): Update call accordingly.
1635         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1636         of a gphi.
1637         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1638         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1639         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1640         instead of a gimple stmt.
1641         (vect_transform_loop): Update calls accordingly.
1642         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1643         stmt_vec_infos instead of gimple stmts.
1644         (vect_analyze_slp_instance): Update use accordingly.
1645         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1646         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1647         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1648         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1649         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1650         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1651         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1652         down to subroutines.
1654 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1656         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1657         of the worklist from a vector of gimple stmts to a vector of
1658         stmt_vec_infos.
1659         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1660         (vect_mark_stmts_to_be_vectorized): Likewise
1662 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1664         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1665         statement before passing it to vect_analyze_stmt.
1666         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1667         the chain of phi vector definitions.  Track the exit phi via its
1668         stmt_vec_info.
1669         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1670         STMT_VINFO_REDUC_DEF.
1671         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1672         stmt_vec_infos to handle the statement chains.
1673         (vect_get_slp_defs): Record the first statement in the node
1674         using a stmt_vec_info.
1675         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1676         statements here and pass their stmt_vec_info down to subroutines.
1677         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1678         down to vect_finish_stmt_generation.
1679         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1680         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1681         stmt_vec_infos to subroutines.
1682         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1683         chains.
1685 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1687         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1688         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1689         (vect_permute_store_chain, vect_setup_realignment)
1690         (vect_permute_load_chain, vect_shift_permute_load_chain)
1691         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1692         stmts internally, and when passing values to other vectorizer routines.
1693         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1694         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1695         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1696         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1697         (vectorizable_reduction, vectorizable_induction)
1698         (vectorizable_live_operation, vect_transform_loop_stmt)
1699         (vect_transform_loop): Likewise.
1700         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1701         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1702         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1703         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1704         (vect_slp_analyze_node_operations_1): Likewise.
1705         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1706         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1707         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1708         (vect_finish_stmt_generation_1, get_group_load_store_type)
1709         (get_load_store_type, vect_build_gather_load_calls)
1710         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1711         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1712         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1713         (vectorizable_store, vectorizable_load, vectorizable_condition)
1714         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1715         (supportable_widening_operation): Likewise.
1716         (vect_get_vector_types_for_stmt): Likewise.
1717         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1719 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1721         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1722         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1723         (vect_permute_store_chain, vect_permute_load_chain)
1724         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1725         repeated stmt_vec_info lookups.
1726         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1727         (vect_update_ivs_after_vectorizer): Likewise.
1728         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1729         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1730         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1731         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1732         (vect_bb_slp_scalar_cost): Likewise.
1733         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1735 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1737         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1738         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1739         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1740         to get gassigns and gcalls, rather than operating on generc gimple
1741         stmts.
1742         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1743         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1744         (vectorizable_load, vect_analyze_stmt): Likewise.
1745         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1747 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1749         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1750         return stmt_vec_infos rather than gimple stmts.  Do not accept
1751         null arguments.
1752         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1753         of a gimple stmt.
1754         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1755         Update use of get_later_stmt.
1756         (vect_get_constant_vectors): Update call accordingly.
1757         (vect_schedule_slp_instance): Likewise
1758         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1759         (vect_slp_analyze_instance_dependence): Likewise.
1760         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1762 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1764         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1765         (stmt_info_for_cost::stmt_info): ...this new field.
1766         (add_stmt_costs): Update accordingly.
1767         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1768         (vect_get_known_peeling_cost): Likewise.
1769         (vect_estimate_min_profitable_iters): Likewise.
1770         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1772 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1774         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1775         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1776         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1777         accordingly.
1778         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1780 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1782         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1783         a gimple stmt to a stmt_vec_info.
1784         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1786 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1788         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1789         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1790         (_loop_vec_info::reduction_chains): Likewise.
1791         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1792         accordingly.
1793         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1795 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1797         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1798         a gimple stmt to a stmt_vec_info.
1799         (_stmt_vec_info::next_element): Likewise.
1800         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1801         (vect_slp_analyze_and_verify_node_alignment)
1802         (vect_analyze_group_access_1, vect_analyze_group_access)
1803         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1804         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1805         (vect_supportable_dr_alignment): Update accordingly.
1806         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1807         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1808         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1809         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1810         * tree-vect-slp.c (vect_build_slp_tree_1)
1811         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1812         (vect_split_slp_store_group, vect_analyze_slp_instance)
1813         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1814         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1815         (get_group_load_store_type, get_load_store_type)
1816         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1817         (vect_transform_stmt, vect_remove_stores): Likewise.
1819 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1821         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1822         than a gimple stmt.
1823         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1824         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1825         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1826         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1827         (vector_alignment_reachable_p, vect_get_data_access_cost)
1828         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1829         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1830         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1831         (vect_analyze_group_access_1, vect_analyze_group_access)
1832         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1833         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1834         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1835         result of vect_dr_stmt and use the stmt_vec_info instead of
1836         the associated gimple stmt.
1837         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1838         (vect_gen_prolog_loop_niters): Likewise.
1839         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1841 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1843         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1844         to a vec<stmt_vec_info>.
1845         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1846         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1847         vec<stmt_vec_info>.
1848         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1849         to a vec<stmt_vec_info>.
1850         (bst_traits::value_type, bst_traits::value_type): Likewise.
1851         (bst_traits::hash): Update accordingly.
1852         (vect_get_and_check_slp_defs): Change the stmts parameter from
1853         a vec<gimple *> to a vec<stmt_vec_info>.
1854         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1855         (vect_build_slp_tree): Likewise.
1856         (vect_build_slp_tree_2): Likewise.  Update uses of
1857         SLP_TREE_SCALAR_STMTS.
1858         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1859         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1860         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1861         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1862         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1863         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1864         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1865         (vect_get_constant_vectors, vect_get_slp_defs)
1866         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1867         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1868         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1869         instead of gimple stmts.
1870         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1871         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1872         (vect_slp_analyze_instance_dependence): Update uses of
1873         SLP_TREE_SCALAR_STMTS.
1874         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1875         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1876         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1877         (get_initial_defs_for_reduction): Likewise.
1878         (vect_create_epilog_for_reduction): Likewise.
1879         (vectorize_fold_left_reduction): Likewise.
1880         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1881         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1882         (can_vectorize_live_stmts): Likewise.
1884 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1886         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1887         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1888         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1889         than gimple stmts.
1890         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1891         of a gimple stmt.
1892         (gather_scalar_reductions): Update after above interface changes.
1893         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1894         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1895         than gimple stmts.
1896         (vect_force_simple_reduction): Likewise.
1897         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1898         LOOP_VINFO_REDUCTIONS.
1899         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1903         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1904         a gimple stmt to a stmt_vec_info.
1905         * tree-vect-loop.c (vect_active_double_reduction_p)
1906         (vect_force_simple_reduction, vectorizable_reduction): Update
1907         accordingly.
1909 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1911         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1912         vec<gimple *> to a vec<stmt_vec_info>.
1913         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1914         the reduction_phis argument from a vec<gimple *> to a
1915         vec<stmt_vec_info>.
1916         (vectorizable_reduction): Likewise the phis local variable that
1917         is passed to vect_create_epilog_for_reduction.  Update for new type
1918         of SLP_TREE_VEC_STMTS.
1919         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1920         (vectorizable_live_operation): Likewise.
1921         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1922         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1924 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1926         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1927         a gimple stmt to a stmt_vec_info.
1928         (vectorizable_condition, vectorizable_live_operation)
1929         (vectorizable_reduction, vectorizable_induction): Pass back the
1930         vectorized statement as a stmt_vec_info.
1931         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1932         use of STMT_VINFO_VEC_STMT.
1933         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1934         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1935         as stmt_vec_infos rather than gimple stmts.
1936         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1937         to a stmt_vec_info.
1938         (vectorizable_live_operation): Likewise.
1939         (vectorizable_reduction, vectorizable_induction): Likewise,
1940         updating use of STMT_VINFO_VEC_STMT.
1941         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1942         of STMT_VINFO_VEC_STMT.
1943         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1944         (vectorizable_simd_clone_call, vectorizable_conversion)
1945         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1946         (vectorizable_store, vectorizable_load, vectorizable_condition)
1947         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1948         from a gimple stmt to a stmt_vec_info.
1949         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
1950         pointer to a stmt_vec_info to the vectorizable_* routines.
1952 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1954         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1955         a gimple stmt to a stmt_vec_info.
1956         (is_pattern_stmt_p): Update accordingly.
1957         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1958         (vect_record_grouped_load_vectors): Likewise.
1959         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1960         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1961         (vect_model_reduction_cost): Likewise.
1962         (vect_create_epilog_for_reduction): Likewise.
1963         (vectorizable_reduction, vectorizable_induction): Likewise.
1964         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1965         Return the stmt_vec_info for the pattern statement.
1966         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1967         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1968         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1969         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1970         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1971         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1972         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1973         (free_stmt_vec_info, vect_is_simple_use): Likewise.
1975 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1977         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1978         (vect_finish_stmt_generation): Likewise.
1979         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1980         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1981         (vect_build_gather_load_calls): Use the return value of the above
1982         functions instead of a separate call to vinfo_for_stmt.  Use narrow
1983         scopes for the input gimple stmt and wider scopes for the associated
1984         stmt_vec_info.  Use vec_info::lookup_def when setting these
1985         stmt_vec_infos from an SSA_NAME definition.
1986         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1987         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1988         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1989         (vectorizable_store, vectorizable_load, vectorizable_condition)
1990         (vectorizable_comparison): Likewise.
1991         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1992         (vectorizable_reduction): Likewise.
1994 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1996         * tree-vectorizer.h (vect_is_simple_use): Add an optional
1997         stmt_vec_info * parameter before the optional gimple **.
1998         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1999         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2000         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2001         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2002         (vectorizable_live_operation): Likewise.
2003         * tree-vect-patterns.c (type_conversion_p): Likewise.
2004         (vect_look_through_possible_promotion): Likewise.
2005         (vect_recog_rotate_pattern): Likewise.
2006         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2008 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2010         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2011         a typedef to a wrapper class.
2012         (NULL_STMT_VEC_INFO): New macro.
2013         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2014         (stmt_vec_info::operator*): New function.
2015         (stmt_vec_info::operator gimple *): Likewise.
2016         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2017         (add_stmt_costs): Likewise.
2018         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2019         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2020         (vect_get_known_peeling_cost): Likewise.
2021         (vect_estimate_min_profitable_iters): Likewise.
2022         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2023         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2024         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2025         (vectorizable_store, free_stmt_vec_infos): Likewise.
2026         (new_stmt_vec_info): Change return type of xcalloc to
2027         _stmt_vec_info *.
2029 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2031         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2032         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2033         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2034         a single_imm_use-based sequence.
2035         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2037 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2039         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2040         * tree-vectorizer.c (vec_info::lookup_def): New function.
2041         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2042         (vect_widened_op_tree): Likewise.
2043         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2044         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2045         (vectorizable_reduction): Likewise.
2046         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2047         of a gimple *.
2048         (vect_is_slp_reduction): Update calls accordingly.  Use
2049         vec_info::lookup_def.
2050         (vect_is_simple_reduction): Likewise
2051         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2053 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2055         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2056         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2057         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2058         of vinfo_for_stmt.
2059         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2060         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2061         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2062         (vect_is_slp_reduction, vectorizable_induction)
2063         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2064         * tree-vect-patterns.c (vect_init_pattern_stmt):
2065         (vect_determine_min_output_precision_1, vect_determine_precisions)
2066         (vect_pattern_recog): Likewise.
2067         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2068         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2069         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2070         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2071         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2072         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2073         info field from a loop to a loop_vec_info.
2075 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2077         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2078         (vec_info::add_stmt): Declare.
2079         * tree-vectorizer.c (vec_info::add_stmt): New function.
2080         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2081         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2082         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2083         (vectorizable_induction): Likewise.
2084         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2085         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2086         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2087         (vectorizable_load): Likewise.
2088         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2089         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2090         (vect_recog_gather_scatter_pattern): Likewise.
2091         (append_pattern_def_seq): Likewise.  Remove a check that is
2092         performed by add_stmt itself.
2094 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2096         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2097         which make_ssa_name was called with new_stmt before new_stmt
2098         had been created.
2100 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2102         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2103         split out from...
2104         (vect_is_slp_reduction): ...here...
2105         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2106         that are already known to be false.
2108 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2110         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2111         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2112         STMT_VINFO_NUM_SLP_USES when it's true.
2113         (vect_free_slp_instance): Add a final_p parameter and pass it to
2114         vect_free_slp_tree.
2115         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2116         (vect_analyze_slp_instance): Likewise.
2117         (vect_slp_analyze_operations): Likewise.
2118         (vect_slp_analyze_bb_1): Likewise.
2119         * tree-vectorizer.c (vec_info): Likewise.
2120         * tree-vect-loop.c (vect_transform_loop): Likewise.
2122 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2124         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2125         function is not called for second and subsequent members of
2126         a reduction group.
2128 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2130         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2131         cases for nested loops from here to ...
2132         (vect_create_epilog_for_reduction): ...here.  Only call
2133         vect_is_simple_use for inner-loop reductions.
2135 2018-07-31  Martin Liska  <mliska@suse.cz>
2137         PR gcov-profile/85338
2138         PR gcov-profile/85350
2139         PR gcov-profile/85372
2140         * profile.c (struct location_triplet): New.
2141         (struct location_triplet_hash): Likewise.
2142         (output_location): Do not output a BB that
2143         is already recorded for a line.
2144         (branch_prob): Use streamed_locations.
2146 2018-07-31  Martin Liska  <mliska@suse.cz>
2148         PR gcov-profile/85370
2149         * coverage.c (coverage_begin_function): Do not mark target
2150         clones as artificial functions.
2152 2018-07-31  Martin Liska  <mliska@suse.cz>
2154         PR gcov-profile/83813
2155         PR gcov-profile/84758
2156         PR gcov-profile/85217
2157         PR gcov-profile/85332
2158         * profile.c (branch_prob): Do not record GOTO expressions
2159         for GIMPLE statements which locations are already streamed.
2161 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2163         * gcc.c (handle_spec_function): Accept a soft_matched_part
2164         argument, as do_spec_1.  Pass it down to ...
2165         (eval_spec_function): Accept a soft_matched_part argument,
2166         and pass it down to ...
2167         (do_spec_2): Accept a soft_matched_part argument, and pass
2168         it down to do_spec_1.
2169         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2170         (handle_braces): Update call to handle_spec_function.
2171         (driver::set_up_specs): Update calls to do_spec_2.
2172         (compare_debug_dump_opt_spec_function): Likewise.
2173         (compare_debug_self_opt_spec_function): Likewise.
2175 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2177         * common.opt (nolibc): New option.
2178         * doc/invoke.texi (Link Options): Document it.
2179         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2180         * config/alpha/linux.h: Likewise.
2181         * config/arc/elf.h: Likewise.
2182         * config/arm/uclinux-elf.h: Likewise.
2183         * config/arm/unknown-elf.h: Likewise.
2184         * config/avr/avrlibc.h: Likewise.
2185         * config/bfin/bfin.h: Likewise.
2186         * config/bfin/linux.h: Likewise.
2187         * config/bfin/uclinux.h: Likewise.
2188         * config/darwin.h: Likewise.
2189         * config/darwin10.h: Likewise.
2190         * config/darwin12.h: Likewise.
2191         * config/gnu-user.h: Likewise.
2192         * config/lm32/uclinux-elf.h: Likewise.
2193         * config/pa/pa-hpux11.h: Likewise.
2194         * config/pa/pa64-hpux.h: Likewise.
2195         * config/sparc/sparc.h: Likewise.
2197 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2199         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2200         undefined variables.
2202 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2204         PR target/86640
2205         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2206         instead of GEN_INT.
2208 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2210         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2211         terminated string literal.
2213 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2215         PR rtl-optimization/85160
2216         * combine.c (is_just_move): New function.
2217         (try_combine): Allow combining two instructions into two if neither of
2218         the original instructions was a move.
2220 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2222         PR target/86673
2223         * doc/extend.texi (Global Register Variables): Discourage use of type
2224         qualifiers.
2225         (Local Register Variables): Likewise.
2227 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2229         PR tree-optimization/86506
2230         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2232 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2234         PR target/86547
2235         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2236         hard_regno, make sure no insn between `from` and `to` clobbers it.
2238 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2239             Tom de Vries  <tdevries@suse.de>
2241         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2242         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2243         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2244         PTX_DEFAULT_RUNTIME_DIM.
2245         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2247 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2249         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2250         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2251         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2253 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2255         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2256         used.
2257         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2258         predicate to reflect toc fusion has been deleted.
2259         (toc_fusion_mem_raw): Delete, no longer used.
2260         (toc_fusion_mem_wrapped): Likewise.
2261         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2262         fusion mask bit.
2263         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2264         Delete, no longer used.
2265         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2266         meant to be used for toc fusion.
2267         (rs6000_debug_print_mode): Delete toc fusion debugging.
2268         (rs6000_debug_reg_global): Likewise.
2269         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2270         fusion and secondary reload support that were never used.
2271         (rs6000_option_override_internal): Delete TOC fusion, that was only
2272         partially defined, and it did not work unless you also used the
2273         -mcmodel= switch.
2274         (rs6000_legitimate_address_p): Delete TOC fusion support.
2275         (rs6000_opt_masks): Likewise.
2276         (fusion_wrap_memory_address): Delete function, no longer used.
2277         (fusion_split_address); Delete TOC fusion support.
2278         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2279         longer used with toc fusion being deleted.
2280         (TARGET_TOC_FUSION_FP): Likewise.
2281         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2282         UNSPEC.
2283         (toc fusion spliter): Delete TOC fusion support.
2284         (toc_fusionload_<mode>): Likewise.
2285         (toc_fusionload_di): Likewise.
2286         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2287         longer needs to be named.  Rename predicate to delete TOC fusion.
2288         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2289         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2290         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2291         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2292         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2294 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2296         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2297         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2298         __int128 in built-in function prototypes.
2299         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2300         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2302 2018-07-27  Martin Sebor  <msebor@redhat.com>
2304         PR tree-optimization/86696
2305         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2306         types, including enums.
2307         (handle_char_store): Be prepared for the above function to fail.
2309 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2311         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2312         when optimization level is lower than 2 or optimize for size.
2314 2018-07-26  Martin Sebor  <msebor@redhat.com>
2316         PR tree-optimization/86043
2317         PR tree-optimization/86042
2318         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2319         (get_string_cst_length): Rename...
2320         (get_min_string_length): ...to this.  Add argument.
2321         (handle_char_store): Extend to handle multi-character stores by
2322         MEM_REF.
2323         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2324         * tree.h (initializer_zerop): Add argument.
2326 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2328         PR middle-end/86660
2329         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2330         declare target to variables if they have always,{to,from,tofrom} map
2331         kinds.
2333 2018-07-26  Martin Liska  <mliska@suse.cz>
2335         PR lto/86548
2336         * lto-wrapper.c: Add linker_output as prefix
2337         for ltrans_output_file.
2339 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2341         PR rtl-optimization/85805
2342         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2343         value for hard registers if that was written in the same mode.
2345 2018-07-26  Martin Liska  <mliska@suse.cz>
2347         PR gcov-profile/86536
2348         * gcov.c (format_gcov): Use printf format %.*f directly
2349         and do not handle special values.
2351 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2353         * common/config/arc/arc-common.c (arc_option_optimization_table):
2354         Update default optimizations for size.
2356 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2358         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2359         * config/arc/constraints.md (CfZ): New constraint.
2360         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2361         (subsf3_fpu): Likewise.
2362         (cmpsf_fpu): Likewise.
2363         (cmpsf_fpu_uneq): Likewise.
2365 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2367         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2368         accesses as well.
2369         (arc_is_uncached_mem_p): uncached applies to both the variable and
2370         the pointer.
2372 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2374         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2375         register names.
2377 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2379         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2380         field "m_scopes" from vec to auto_vec.
2382 2018-07-25  Martin Liska  <mliska@suse.cz>
2384         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2385         return type.
2387 2018-07-25  Richard Biener  <rguenther@suse.de>
2389         PR debug/86654
2390         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2391         special wrt context_die late.
2392         (gen_subprogram_die): Re-use DIEs in local scope.
2394 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2396         PR tree-optimization/86644
2397         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2399 2018-07-25  Martin Liska  <mliska@suse.cz>
2401         PR middle-end/86645
2402         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2403         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2405 2018-07-25  Martin Liska  <mliska@suse.cz>
2407         PR sanitizer/79635
2408         * params.def: Explain ASan abbreviation and provide
2409         a documentation link.
2411 2018-07-24  Martin Sebor  <msebor@redhat.com>
2413         PR tree-optimization/86622
2414         PR tree-optimization/86532
2415         * builtins.h (string_length): Declare.
2416         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
2417         (check_access): Be prepared for non-constant length ranges.
2418         (string_length): Make extern.
2419         * expr.c (string_constant): Only handle the minor non-constant
2420         array index.  Use string_constant to compute the length of
2421         a generic string constant.
2423 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2425         PR tree-optimization/86618
2426         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2427         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2429 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2431         PR tree-optimization/86636
2432         * json.cc (json::object::set): Fix comment.  Add assertions.
2433         (json::array::append): Move here from json.h.  Add comment and an
2434         assertion.
2435         (json::string::string): Likewise.
2436         * json.h (json::array::append): Move to json.cc.
2437         (json::string::string): Likewise.
2438         * optinfo-emit-json.cc
2439         (optrecord_json_writer::impl_location_to_json): Assert that we
2440         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2441         wrapper around it.  Expand the location once, rather than three
2442         times.
2443         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2444         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2445         wrappers.
2446         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2447         places.  Fix some overlong lines.
2449 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2451         * config/aarch64/aarch64-simd.md
2452         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2453         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2454         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2455         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2456         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2457         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2458         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2459         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2460         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2462 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2464         PR middle-end/86627
2465         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2466         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2467         and abs_d == d, do the power of two handling if profitable.
2469 2018-07-24  Richard Biener  <rguenther@suse.de>
2471         * match.pd: Add BIT_FIELD_REF canonicalizations.
2473 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2475         PR c/86617
2476         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2478 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2480         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2481         terminated STRING_CST object.
2483 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2485         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2487 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2489         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2490         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2491         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2492         the elements into a register.
2493         (rs6000_split_v4si_init_di_reg): Delete.
2494         (rs6000_split_v4si_init): Delete.
2495         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2496         (vsx_init_v4si): Rewrite as a define_expand.
2498 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2500         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2501         zero_extend argument from memory): New.
2503 2018-07-22  Martin Sebor  <msebor@redhat.com>
2505         PR bootstrap/86621
2506         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2507         diagnosing calls with unknown arguments unless -Walloca-larger-than
2508         is restricted to less than PTRDIFF_MAX bytes.
2510 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2512         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2514 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2516         * pretty-print.c (text_info::set_location): Remove redundant
2517         "line_table" parameter from call to rich_location::set_range.
2519 2018-07-20  Martin Sebor  <msebor@redhat.com>
2521         PR middle-end/82063
2522         * builtins.c (expand_builtin_alloca): Adjust.
2523         * calls.c (alloc_max_size): Simplify.
2524         * cgraphunit.c (cgraph_node::expand): Adjust.
2525         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2526         variables.
2527         (frame_larger_than_size): Same.
2528         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2529         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2530         Initialize.
2531         * doc/invoke.texi (GCC Command Options): Document option arguments.
2532         Explain byte-size arguments and suffixes.
2533         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2534         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2535         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2536         * doc/options.texi (UInteger): Expand.
2537         (Host_Wide_Int, ByteSize): Document new properties.
2538         * final.c (final_start_function_1): Include sizes in an error message.
2539         * function.c (frame_offset_overflow): Same.
2540         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2541         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2542         Diagnose unbounded alloca calls only for limits of less than
2543         PTRDIFF_MAX.
2544         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2545         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2546         for alloca(0).
2547         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2548         only for limits of less than PTRDIFF_MAX.
2549         * langhooks-def.h (lhd_handle_option): Change function argument
2550         to HOST_WIDE_INT.
2551         * langhooks.c (lhd_handle_option): Same.
2552         * langhooks.h (handle_option): Same.
2553         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2554         ByteSize flags.
2555         (var_type, var_type_struct): Same.
2556         (var_set): Handle ByteSize flag.
2557         * optc-gen.awk: Add comments to output to ease debugging.  Make
2558         use of HOST_WIDE_INT where appropriate.
2559         * opts-gen-save.awk:  Use %lx to format unsigned long.
2560         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2561         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2562         arguments.  Parse bytes-size suffixes.
2563         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2564         (enum_value_to_arg): Same.
2565         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2566         (handle_option): Adjust.
2567         (generate_option): Change function argument to HOST_WIDE_INT.
2568         (cmdline_handle_error): Adjust.
2569         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2570         (set_option): Change function argument to HOST_WIDE_INT.
2571         (option_enabled): Handle cl_host_wide_int.
2572         (get_option_state): Handle CLVC_SIZE.
2573         (control_warning_option): Same.
2574         * opts.c (common_handle_option): Change function argument to
2575         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2576         OPT_Wvla_larger_than_.
2577         * opts.h (enum cl_var_type): Add an enumerator.
2578         * stor-layout.c (layout_decl): Print a more meaningful warning.
2579         * toplev.c (output_stack_usage): Adjust.
2581 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2583         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2584         call to inline_expand_builtin_string_cmp.
2585         (expand_builtin_strcmp): Likewise.
2586         (expand_builtin_strncmp): Likewise.
2587         (inline_string_cmp): Delete the last parameter, change char_type_node
2588         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2589         two operands.
2590         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2591         the inlining expansion on target where the type of the call has same or 
2592         narrower precision than unsigned char.
2594 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2596         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2597         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2598         * common.opt (fsave-optimization-record): New option.
2599         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2600         * doc/invoke.texi (-fsave-optimization-record): New option.
2601         * dumpfile.c: Include "optinfo-emit-json.h".
2602         (struct kv_pair): Move to coretypes.h.
2603         (optgroup_options): Make non-static.
2604         (dump_context::end_scope): Call
2605         optimization_records_maybe_pop_dump_scope.
2606         * dumpfile.h (optgroup_options): New decl.
2607         * json.cc: New file.
2608         * json.h: New file.
2609         * optinfo-emit-json.cc: New file.
2610         * optinfo-emit-json.h: New file.
2611         * optinfo.cc: Include "optinfo-emit-json.h".
2612         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2613         (optinfo_enabled_p): Check optimization_records_enabled_p.
2614         (optinfo_wants_inlining_info_p): Likewise.
2615         * optinfo.h: Update comment.
2616         * profile-count.c (profile_quality_as_string): New function.
2617         * profile-count.h (profile_quality_as_string): New decl.
2618         (profile_count::quality): New accessor.
2619         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2620         and optinfo_emit_json_cc_tests.
2621         * selftest.h (selftest::json_cc_tests): New decl.
2622         (selftest::optinfo_emit_json_cc_tests): New decl.
2623         * toplev.c: Include "optinfo-emit-json.h".
2624         (compile_file): Call optimization_records_finish.
2625         (do_compile): Call optimization_records_start.
2626         * tree-ssa-live.c: Include optinfo.h.
2627         (remove_unused_scope_block_p): Retain inlining information if
2628         optinfo_wants_inlining_info_p returns true.
2630 2018-07-20  Richard Biener  <rguenther@suse.de>
2632         PR debug/86585
2633         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2634         to cover -flto-partition=none.
2636 2018-07-20  Martin Liska  <mliska@suse.cz>
2638         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2639         (get_decl_source_range): Remove unused function.
2641 2018-07-20  Richard Biener  <rguenther@suse.de>
2643         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2644         (struct vn_phi_s): Likewise.
2645         (struct vn_reference_s): Likewise.
2646         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2647         for searching the slot of an entry known to be in the hash itself.
2648         (vn_phi_hasher::equal): Likewise.
2649         (vn_reference_hasher::equal): Likewise.
2650         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2651         globals.
2652         (optimistic_info, current_info): Remove, keeping only valid_info.
2653         (vn_reference_lookup_1): Remove fallback lookup.
2654         (vn_reference_lookup_2): Likewise.
2655         (vn_nary_op_lookup_1): Likewise.
2656         (vn_phi_lookup): Likewise.
2657         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2658         hash element.
2659         (vn_reference_insert): Adjust, chain the inserted hash element
2660         at last_inserted_ref.
2661         (vn_reference_insert_pieces): Likewise.
2662         (visit_reference_op_call): Likewise.
2663         (vn_nary_op_insert_into): Chain the inserted hash element at
2664         last_inserted_nary.
2665         (vn_nary_op_insert_pieces): Adjust.
2666         (vn_nary_op_insert): Likewise.
2667         (vn_nary_op_insert_stmt): Likewise.
2668         (vn_phi_insert): Adjust, chain the inserted hash element at
2669         last_inserted_phi.
2670         (process_scc): Remove clearing and copying the optimistic
2671         table.  Instead remove elements inserted during an optimistic
2672         iteration from the single table we maintain.
2673         (init_scc_vn): Adjust.
2674         (free_scc_vn): Likewise.
2675         (sccvn_dom_walker::record_cond): Likewise.
2676         (sccvn_dom_walker::after_dom_children): Likewise.
2678 2018-07-19  Martin Sebor  <msebor@redhat.com>
2680         PR tree-optimization/84047
2681         PR tree-optimization/83776
2682         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2683         (check_array_bounds): Call it.
2685 2018-07-19  Martin Sebor  <msebor@redhat.com>
2687         * align.h (align_flags): Use member initialization.
2689 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2691         * Makefile.in (OBJS): Add optinfo.o.
2692         * coretypes.h (class symtab_node): New forward decl.
2693         (struct cgraph_node): New forward decl.
2694         (class varpool_node): New forward decl.
2695         * dump-context.h: New file.
2696         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2697         "tree-pass.h".
2698         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2699         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2700         (set_alt_dump_file): Likewise.
2701         (dump_context::~dump_context): New dtor.
2702         (dump_gimple_stmt): Move implementation to...
2703         (dump_context::dump_gimple_stmt): ...this new member function.
2704         Add the stmt to any pending optinfo, creating one if need be.
2705         (dump_gimple_stmt_loc): Move implementation to...
2706         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2707         Start a new optinfo and add the stmt to it.
2708         (dump_gimple_expr): Move implementation to...
2709         (dump_context::dump_gimple_expr): ...this new member function.
2710         Add the stmt to any pending optinfo, creating one if need be.
2711         (dump_gimple_expr_loc): Move implementation to...
2712         (dump_context::dump_gimple_expr_loc): ...this new member function.
2713         Start a new optinfo and add the stmt to it.
2714         (dump_generic_expr): Move implementation to...
2715         (dump_context::dump_generic_expr): ...this new member function.
2716         Add the tree to any pending optinfo, creating one if need be.
2717         (dump_generic_expr_loc): Move implementation to...
2718         (dump_context::dump_generic_expr_loc): ...this new member
2719         function.  Add the tree to any pending optinfo, creating one if
2720         need be.
2721         (dump_printf): Move implementation to...
2722         (dump_context::dump_printf_va): ...this new member function.  Add
2723         the text to any pending optinfo, creating one if need be.
2724         (dump_printf_loc): Move implementation to...
2725         (dump_context::dump_printf_loc_va): ...this new member function.
2726         Start a new optinfo and add the stmt to it.
2727         (dump_dec): Move implementation to...
2728         (dump_context::dump_dec): ...this new member function.  Add the
2729         value to any pending optinfo, creating one if need be.
2730         (dump_context::dump_symtab_node): New member function.
2731         (dump_context::get_scope_depth): New member function.
2732         (dump_context::begin_scope): New member function.
2733         (dump_context::end_scope): New member function.
2734         (dump_context::ensure_pending_optinfo): New member function.
2735         (dump_context::begin_next_optinfo): New member function.
2736         (dump_context::end_any_optinfo): New member function.
2737         (dump_context::s_current): New global.
2738         (dump_context::s_default): New global.
2739         (dump_scope_depth): Delete global.
2740         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2741         (dump_symtab_node): New function.
2742         (get_dump_scope_depth): Reimplement in terms of dump_context.
2743         (dump_begin_scope): Likewise.
2744         (dump_end_scope): Likewise.
2745         (selftest::temp_dump_context::temp_dump_context): New ctor.
2746         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2747         (selftest::verify_item): New function.
2748         (ASSERT_IS_TEXT): New macro.
2749         (ASSERT_IS_TREE): New macro.
2750         (ASSERT_IS_GIMPLE): New macro.
2751         (selftest::test_capture_of_dump_calls): New test.
2752         (selftest::dumpfile_c_tests): Call it.
2753         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2754         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2755         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2756         descriptive comment.
2757         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2758         (dump_node, dump_bb): Move these unrelated decls.
2759         (class dump_manager): Add leading comment.
2760         * optinfo.cc: New file.
2761         * optinfo.h: New file.
2763 2018-07-19  Michael Collison  <michael.collison@arm.com>
2764             Richard Henderson <rth@redhat.com>
2766         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2767         (subti): Handle op1 zero.
2768         (subvti4, usub4ti4): New.
2769         (*sub<GPI>3_compare1_imm): New.
2770         (sub<GPI>3_carryinCV): New.
2771         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2772         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2774 2018-07-19  Michael Collison  <michael.collison@arm.com>
2775             Richard Henderson <rth@redhat.com>
2777         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2778         (addti3): Create simpler code if low part is already known to be 0.
2779         (addvti4, uaddvti4): New.
2780         (*add<GPI>3_compareC_cconly_imm): New.
2781         (*add<GPI>3_compareC_cconly): New.
2782         (*add<GPI>3_compareC_imm): New.
2783         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2784         handle constants within this pattern..
2785         (*add<GPI>3_compareV_cconly_imm): New.
2786         (*add<GPI>3_compareV_cconly): New.
2787         (*add<GPI>3_compareV_imm): New.
2788         (add<GPI>3_compareV): New.
2789         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2790         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2791         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2792         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2793         with 'comparison' operator.
2794         (*add<GPI>3_compareV_cconly_imm): Ditto.
2795         (*add<GPI>3_compareV_cconly): Ditto.
2796         (*add<GPI>3_compareV_imm): Ditto.
2797         (add<GPI>3_compareV): Ditto.
2798         (add<mode>3_carryinC): Ditto.
2799         (*add<mode>3_carryinC_zero): Ditto.
2800         (*add<mode>3_carryinC): Ditto.
2801         (add<mode>3_carryinV): Ditto.
2802         (*add<mode>3_carryinV_zero): Ditto.
2803         (*add<mode>3_carryinV): Ditto.
2805 2018-07-19  Michael Collison  <michael.collison@arm.com>
2806             Richard Henderson <rth@redhat.com>
2808         * config/aarch64/aarch64-modes.def (CC_V): New.
2809         * config/aarch64/aarch64-protos.h
2810         (aarch64_addti_scratch_regs): Declare
2811         (aarch64_subvti_scratch_regs): Declare.
2812         (aarch64_expand_subvti): Declare.
2813         (aarch64_gen_unlikely_cbranch): Declare
2814         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2815         for signed overflow using CC_Vmode.
2816         (aarch64_get_condition_code_1): Handle CC_Vmode.
2817         (aarch64_gen_unlikely_cbranch): New function.
2818         (aarch64_addti_scratch_regs): New function.
2819         (aarch64_subvti_scratch_regs): New function.
2820         (aarch64_expand_subvti): New function.
2822 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2824         * config/aarch64/aarch64-option-extensions.def: New entry for profile
2825         extension.
2826         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2827         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2828         extension.
2830 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2832         PR target/83009
2833         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2834         address check not strict.
2836 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2838         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2839         Umq with Umn.
2840         (store_pair_lanes<mode>): Likewise.
2841         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2842         enum value 'ADDR_QUERY_LDP_STP_N'.
2843         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2844         (aarch64_print_address_internal): Add declaration.
2845         (aarch64_print_ldpstp_address): Remove.
2846         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2847         (aarch64_print_operand): Change printing of 'y'.
2848         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2849         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2850         'true' rather than '1'.
2851         * config/aarch64/constraints.md (Uml): Likewise.
2852         (Uml): Rename to Umn.
2853         (Umq): Remove.
2855 2018-07-19  Richard Biener  <rguenther@suse.de>
2857         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2858         a trailing array.
2859         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2860         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2861         (vn_reference_hasher): Likewise.
2862         (struct vn_tables_s): Remove obstack and alloc-pool members.
2863         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2864         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2865         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2866         (vn_reference_insert_pieces): Likewise.
2867         (alloc_vn_nary_op_noinit): Adjust.
2868         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2869         (vn_phi_eq): Adjust.
2870         (shared_lookup_phiargs): Remove.
2871         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2872         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2873         (visit_reference_op_call): Likewise.
2874         (copy_nary, copy_phi, copy_reference): Remove.
2875         (process_scc): Rewind the obstack when iterating.  Do not
2876         copy the elements to valid_info but just move them from one
2877         hashtable to the other.
2878         (allocate_vn_table): Adjust.
2879         (free_vn_table): Likewise.
2880         (init_scc_vn): Likewise.
2881         (free_scc_vn): Likewise.
2883 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2885         PR target/86560
2886         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2887         indirect_return as function type attribute.
2888         (ix86_attribute_table): Change indirect_return to function
2889         type attribute.
2890         * doc/extend.texi: Update indirect_return attribute.
2892 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
2894         * wide-int.h (widest2_int): New.
2895         * gimple-fold.c (arith_overflowed_p): Use it.
2896         * tree.h (widest2_int_cst): New.
2897         * tree-vrp.c (wide_int_binop_overflow): Rename from
2898         vrp_int_const_binop.
2899         Rewrite to work on trees.
2900         (extract_range_from_multiplicative_op_1): Abstract code to...
2901         (wide_int_range_min_max): ...here.
2902         (wide_int_range_cross_product): ...and here.
2903         (extract_range_from_binary_expr_1): Abstract overflow code to...
2904         (wide_int_range_mult_wrapping): ...here.
2905         * tree-vrp.h (wide_int_range_cross_product): New.
2906         (wide_int_range_mult_wrapping): New.
2908 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
2909             Julia Koval  <julia.koval@intel.com>
2911         * config/i386/x86-tune-costs.h (skylake_memcpy,
2912         skylake_memset): Replace rep_prefix with unrolling for size 512.
2914 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
2916         PR middle-end/86544
2917         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2918         in last stmt.
2920 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2922         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2923         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2924         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2925         previously known as "PowerPC AltiVec Built-in Functions".  Move
2926         some material to new subsubsections "PowerPC AltiVec Built-in
2927         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2928         ISA 2.07".
2929         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2930         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2931         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2932         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2934 2018-07-18  Richard Biener  <rguenther@suse.de>
2936         PR tree-optimization/86557
2937         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2938         EXACT_DIV_EXPR.
2940 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
2942         * config/s390/s390.c (s390_function_profiler): Generate CFI.
2944 2018-07-17  Jeff Law  <law@redhat.com>
2946         * config/arm/arm.c (get_label_padding): Update for recent
2947         changes to label_to_alignment.
2949         PR tree-optimization/86010
2950         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2952         * config/mips/mips.c (vr4130_align_insns): Update for recent
2953         changes to label_to_alignment.
2955         * config/frv/frv.c (frv_label_align): Update for recent changes
2956         to label_to_alignment.
2958         * config/nios2/nios2.c (nios2_label_align): Update for recent
2959         changes which dropped ALIGN_LABELS_LOG.
2961 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
2963         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2964         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2966 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
2968         * config/arc/arc.c (arc_label_align): Use align_labels instead of
2969         deprecated align_labels_log.
2971 2018-07-17  Richard Biener  <rguenther@suse.de>
2973         PR lto/86456
2974         * dwarf2out.c (init_sections_and_labels): Always generate
2975         a debug_line_str_section for early LTO debug.
2976         (dwarf2out_finish): Reset debug_line_str_hash output early.
2977         Bump counter for extra dwarf5 .debug_loc labels to not conflict
2978         with fat LTO part.
2979         (dwarf2out_early_finish): Output debug_line_str.
2981 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2983         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2984         index register on z196 or later.
2986 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2988         * config/s390/s390.c (s390_default_align): Set default function
2989         alignment to 16.
2990         (s390_override_options_after_change): Call s390_default align.
2991         (s390_option_override_internal): Call s390_default_align.
2992         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2994 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2996         PR middle-end/86542
2997         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2998         to _looptemp_ clauses, other than the first two.
3000 2018-07-17  Martin Liska  <mliska@suse.cz>
3002         * opts.c: Do not enable OPT_falign_* for -Os.
3004 2018-07-17  Martin Liska  <mliska@suse.cz>
3006         * align.h (MAX_CODE_ALIGN): New.
3007         (MAX_CODE_ALIGN_VALUE): New.
3008         * common/config/i386/i386-common.c (ix86_handle_option):
3009         (MAX_CODE_ALIGN): Moved to align.h.
3010         * final.c (MAX_CODE_ALIGN): Likewise.
3011         * opts.c (parse_and_check_align_values):
3012         (MAX_CODE_ALIGN): Likewise.
3013         (MAX_CODE_ALIGN_VALUE): Likewise.
3015 2018-07-17  Martin Liska  <mliska@suse.cz>
3017         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3018         in order to fulfil coding style.
3019         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3020         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3021         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3022         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3023         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3024         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3025         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3026         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3027         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3029 2018-07-17  Martin Liska  <mliska@suse.cz>
3031         * align.h: New file.
3032         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
3033         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3034         align_flags of label_to_alignment.
3035         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
3036         class.
3037         * config/m68k/m68k.c: Do not use removed align_labels_value and
3038         align_loops_value.
3039         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3040         (LOOP_ALIGN): Likewise.
3041         (LABEL_ALIGN): Likewise.
3042         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3043         Remove not used macro.
3044         (rs6000_loop_align): Change return type to align_flags.
3045         (rs6000_loop_align_max_skip): Remove.
3046         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3047         Change return type to align_flags.
3048         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3049         Remove not used macro.
3050         (rs6000_loop_align):  Change return type to align_flags.
3051         (rs6000_loop_align_max_skip): Remove.
3052         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3053         * config/rx/rx-protos.h (rx_align_for_label): Make it
3054         static function.
3055         * config/rx/rx.c (rx_align_for_label): Change return type
3056         to align_flags.
3057         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3058         macro definitions.
3059         into align_flags class.
3060         (LABEL_ALIGN): Likewise.
3061         (LOOP_ALIGN): Likewise.
3062         * config/s390/s390.c (s390_label_align): Use align_flags
3063         class member.
3064         (s390_asm_output_function_label): Likewise.
3065         * config/sh/sh.c (sh_override_options_after_change):
3066         Use align_flags class directly without macros.
3067         (find_barrier): Likewise.
3068         (barrier_align): Likewise.
3069         (sh_loop_align): Likewise.
3070         * config/spu/spu.c (spu_option_override):
3071         Use align_flags_tuple::get_value instead of removed macros.
3072         (spu_sched_init): Likewise.
3073         * config/spu/spu.h (GTY): Likewise.
3074         * config/visium/visium.c (visium_option_override):
3075         Set "8" as default secondary alignment.
3076         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3077         in order to guarantee secondary alignment of 8.
3078         * coretypes.h: Include align.h header file.
3079         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3080         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3081         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3082         * doc/tm.texi.in: Likewise.
3083         * final.c (struct label_alignment): Remove not used structure.
3084         (LABEL_ALIGN): Change type to align_flags.
3085         (LOOP_ALIGN): Likewise.
3086         (JUMP_ALIGN): Likewise.
3087         (default_loop_align_max_skip): Remove.
3088         (default_label_align_max_skip): Likewise.
3089         (default_jump_align_max_skip): Likewise.
3090         (default_label_align_after_barrier_max_skip):
3091         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3092         (LABEL_TO_MAX_SKIP): Remove.
3093         (label_to_alignment): Return align_flags type instead of integer.
3094         (label_to_max_skip): Remove.
3095         (align_fuzz): Use align_flags type.
3096         (compute_alignments): Use align_flags type and use align_flags::max
3097         to combine multiple alignments.
3098         (grow_label_align): Grow vec instead of C array.
3099         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3100         (shorten_branches):  Use align_flags type and use align_flags::max
3101         to combine multiple alignments.
3102         (final_scan_insn_1): Remove usage of secondary alignment that comes
3103         from label alignment, but instead use proper secondary alignment
3104         which is computed in grow_label_align.
3105         * flags.h (struct align_flags_tuple): Move to align.h.
3106         (struct align_flags): Likewise.
3107         (state_align_loops): Rename to align_loops.
3108         (state_align_jumps): Rename to align_jumps.
3109         (state_align_labels): Rename to align_labels.
3110         (state_align_functions): Rename to align_functions.
3111         (align_loops_log): Remove.
3112         (align_jumps_log): Remove.
3113         (align_labels_log): Remove.
3114         (align_functions_log): Remove.
3115         (align_loops_max_skip): Remove.
3116         (align_jumps_max_skip): Remove.
3117         (align_labels_max_skip): Remove.
3118         (align_functions_max_skip): Remove.
3119         (align_loops_value): Remove.
3120         (align_jumps_value): Remove.
3121         (align_labels_value): Remove.
3122         (align_functions_value): Remove.
3123         * output.h (label_to_alignment): Change return type to align_flags.
3124         (label_to_max_skip): Remove.
3125         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3126         jump_align_max_skip macros.
3127         * targhooks.h (default_loop_align_max_skip): Remove.
3128         (default_label_align_max_skip): Likewise.
3129         (default_jump_align_max_skip): Likewise.
3130         (default_label_align_after_barrier_max_skip): Remove.
3131         * toplev.c (read_log_maxskip): Use ::normalize function.
3132         (parse_N_M): Remove not used argument and also call ::normalize.
3133         (parse_alignment_opts): Do not pass unused arguments.
3134         * varasm.c (assemble_start_function): Use directly align_functions
3135         instead of removed macros.
3136         * system.h: Do not poison removed macros.
3138 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3140         PR middle-end/86539
3141         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3142         and cond temporaries don't have reference type if iterator has
3143         pointer type.  For init use &for_pre_body instead of pre_p if
3144         for_pre_body is non-empty.
3146 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3148         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3149         double-double modes to SFmode directly directly.
3150         (trunc<mode>sf2_fprs): Delete.
3152 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3154         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3155         for conversions between IFmode and the decimal floating point modes.
3156         (init_float128_ieee): Use the correct names for conversions between
3157         KFmode and the decimal floating point modes.
3159 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3161         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3162         for the conversions between TDmode and IFmode.
3163         (init_float128_ieee): Use more correct names for the conversions
3164         between TDmode and KFmode.
3166 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3168         PR tree-optimization/86526
3169         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3170         (inline_expand_builtin_string_cmp): Likewise.
3171         (inline_string_cmp): Likewise.  Use c_readstr instead of
3172         builtin_memcpy_read_str.  Add unit_mode temporary.
3174 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3176         PR middle-end/86528
3177         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3178         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3180 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3182         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3183         Alphabetize prototypes of built-in functions, separating out
3184         built-in functions that are listed in this section but should be
3185         described elsewhere.
3187 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3189         PR target/86511
3190         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3191         conditional move when trapping comparison was split to a
3192         non-trapping one (and vice versa).
3194 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3196         * config/s390/s390.c (s390_function_profiler): Generate nops
3197         instead of profiler call sequences.
3198         * config/s390/s390.opt: Add the new option.
3200 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3202         * config/s390/s390.c (s390_function_profiler): Generate
3203         __mcount_loc section.
3204         * config/s390/s390.opt: Add the new option.
3206 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3208         * common.opt: Add the new warning.
3209         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3210         %r0,__fentry__" when -mfentry is specified.
3211         (s390_option_override_internal): Disallow -mfentry for 31-bit
3212         CPUs.
3213         * config/s390/s390.opt: Add the new option.
3215 2018-07-16  Richard Biener  <rguenther@suse.de>
3217         PR lto/86523
3218         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3219         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3221 2018-07-16  Martin Liska  <mliska@suse.cz>
3223         PR ipa/86529
3224         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3225         to ::get_create.
3227 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3229         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3231 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3233         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3234         for ARCHS4x.
3235         * config/arc/arc-cpus.def (hs4x): New cpu.
3236         (hs4xd): Likewise.
3237         * config/arc/arc-tables.opt: Regenerate.
3238         * config/arc/arc.c (arc_sched_issue_rate): New function.
3239         (TARGET_SCHED_ISSUE_RATE): Define.
3240         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3241         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3242         fpu_cvt.
3243         (attr tune): Add ARCHS4x tune values.
3244         (attr tune_dspmpy): Define.
3245         (*tst): Correct instruction type.
3246         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3247         * config/arc/arcHS4x.md: New file.
3248         * config/arc/fpu.md: Update instruction type attributes.
3249         * config/arc/t-multilib: Regenerate.
3251 2018-07-16  Tom de Vries  <tdevries@suse.de>
3253         PR debug/86455
3254         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3256 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3258         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3259         early clobber.
3261 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3263         PR tree-optimization/86514
3264         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3265         conversion to a boolean type from a type with greater precision.
3267 2018-07-16  Tom de Vries  <tdevries@suse.de>
3269         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3270         dump_flags request TDF_SLIM.
3272 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3274         * fold-const.c (int_const_binop_1): Abstract...
3275         (wide_int_binop): ...wide int code here.
3276         (poly_int_binop): ...poly int code here.
3277         Abstract the rest of int_const_binop_1 into int_const_binop.
3278         * fold-const.h (wide_int_binop): New.
3279         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3280         Remove useless PLUS/MINUS_EXPR case.
3281         (zero_nonzero_bits_from_vr): Move wide int code...
3282         (zero_nonzero_bits_from_bounds): ...here.
3283         (extract_range_from_binary_expr_1): Move mask optimization code...
3284         (range_easy_mask_min_max): ...here.
3285         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3286         (range_easy_mask_min_max): New.
3288 2018-07-15  Jeff Law  <law@redhat.com>
3290         PR target/85993
3291         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3292         block.
3294 2018-07-14  Jim Wilson  <jimw@sifive.com>
3296         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3298 2018-07-14  Paul Koning  <ni1d@arrl.net>
3300         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3302 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3304         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3305         copying section.
3307 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3308             Steve Munroe  <munroesj52@gmail.com>
3310         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3311         (_mm_andnot_si128): Likewise.
3312         (_mm_or_si128): Likewise.
3313         (_mm_xor_si128): Likewise.
3315 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3317         PR middle-end/78809
3318         * builtins.c (expand_builtin_memcmp): Inline the calls first
3319         when result_eq is false.
3320         (expand_builtin_strcmp): Inline the calls first.
3321         (expand_builtin_strncmp): Likewise.
3322         (inline_string_cmp): New routine. Expand a string compare
3323         call by using a sequence of char comparison.
3324         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3325         a call to str(n)cmp/memcmp.
3326         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3327         New option.
3328         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3330 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3332         * config/arm/driver-arm.c: Include arm-native.h.
3333         (host_detect_local_cpu): Use auto-generated data tables.
3334         (vendors, arm_cpu_table): Delete.  Move part information to ...
3335         * config/arm/arm-cpus.in: ... here.
3336         * config/arm/parsecpu.awk (gen_native): New function.
3337         (vendor, part): New CPU fields.
3338         (END): Add support for building the native CPU detection tables.
3339         * config/arm/t-arm (arm-native.h): Add build rule.
3340         (driver-arm.o): Add dependency on arm-native.h.
3342 2018-07-13  Richard Biener  <rguenther@suse.de>
3344         PR middle-end/85974
3345         * match.pd (addr1 - addr2): Allow either of the operand to
3346         have a conversion.
3348 2018-07-13  Tom de Vries  <tdevries@suse.de>
3350         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3351         in remap_ssa_name.
3353 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3355         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3356         arrays instead of numbered variables.
3358 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3360         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3361         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3363 2018-07-13  Richard Biener  <rguenther@suse.de>
3365         PR debug/86452
3366         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3367         instead of get_context_die.
3369 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3370             Richard Biener  <rguenther@suse.de>
3372         PR middle-end/86489
3373         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3374         that the loop latch destination where phi is defined.
3376 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3378         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3379         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3380         (riscv_set_current_function): Extract getting interrupt type to new
3381         function.
3382         (riscv_get_interrupt_type): New function.
3383         (riscv_merge_decl_attributes): New function, checking interrupt type is
3384         same.
3385         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3387 2018-07-12  Paul Koning  <ni1d@arrl.net>
3389         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3390         directive.
3392 2018-07-12  Paul Koning  <ni1d@arrl.net>
3394         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3395         zero reference, add doloop_end instead.
3396         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3397         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3398         detail for doloop_end.
3400 2018-07-12  Martin Sebor  <msebor@redhat.com>
3402         PR c/86453
3403         * attribs.c (decl_attributes): Reject conflicting attributes before
3404         calling attribute handlers.
3406 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3408         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3409          parameter.
3410         (gcc::dump_manager::get_dump_file_name): likewise.
3411         (dump_begin): Likewise.
3412         * dumpfile.h (dump_begin): Update prototype.
3413         (gcc::dump_manager::get_dump_file_name,
3414         gcc::dump_manager::get_dump_file_name): Update prototype.
3416 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3418         * internal-fn.h (vectorizable_internal_fn_p): New function.
3419         * tree-vect-slp.c (compatible_calls_p): Likewise.
3420         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3421         to internal functions.
3422         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3424 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3426         * fold-const.h (inverse_conditions_p): Declare.
3427         * fold-const.c (inverse_conditions_p): New function.
3428         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3429         that test the inverse condition of a conditional internal function.
3430         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3431         * internal-fn.c (internal_fn_mask_index): Handle conditional
3432         internal functions.
3433         (vectorized_internal_fn_supported_p): New function.
3434         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3435         (any_pred_load_store): Replace with...
3436         (need_to_predicate): ...this new variable.
3437         (redundant_ssa_names): New variable.
3438         (ifcvt_can_use_mask_load_store): Move initial checks to...
3439         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3440         for which a conditional internal function exists.
3441         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3442         instead of ifcvt_can_use_mask_load_store.  Update after variable
3443         name change.
3444         (predicate_load_or_store): New function, split out from
3445         predicate_mem_writes.
3446         (check_redundant_cond_expr): New function.
3447         (value_available_p): Likewise.
3448         (predicate_rhs_code): Likewise.
3449         (predicate_mem_writes): Rename to...
3450         (predicate_statements): ...this.  Use predicate_load_or_store
3451         and predicate_rhs_code.
3452         (combine_blocks, tree_if_conversion): Update after above name changes.
3453         (ifcvt_local_dce): Handle redundant_ssa_names.
3454         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3455         general conditional functions.
3456         * tree-vect-stmts.c (vectorizable_call): Likewise.
3458 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3459             Alan Hayward  <alan.hayward@arm.com>
3460             David Sherwood  <david.sherwood@arm.com>
3462         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3463         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3464         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3465         plus and minus and convert them into IFN_COND_FMA-based sequences.
3466         (convert_mult_to_fma): Handle conditional plus and minus.
3468 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3470         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3471         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3472         (cond_fnms_optab): New optabs.
3473         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3474         internal functions.
3475         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3476         * internal-fn.h (get_conditional_internal_fn): Declare.
3477         (get_unconditional_internal_fn): Likewise.
3478         * internal-fn.c (cond_ternary_direct): New macro.
3479         (expand_cond_ternary_optab_fn): Likewise.
3480         (direct_cond_ternary_optab_supported_p): Likewise.
3481         (FOR_EACH_COND_FN_PAIR): Likewise.
3482         (get_conditional_internal_fn): New function.
3483         (get_unconditional_internal_fn): Likewise.
3484         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3485         (gimple_match_op::gimple_match_op): Add a new overload for 5
3486         operands.
3487         (gimple_match_op::set_op): Likewise.
3488         (gimple_resimplify5): Declare.
3489         * genmatch.c (decision_tree::gen): Generate simplifications for
3490         5 operands.
3491         * gimple-match-head.c (gimple_simplify): Define an overload for
3492         5 operands.  Handle calls with 5 arguments in the top-level overload.
3493         (convert_conditional_op): Handle conversions from unconditional
3494         internal functions to conditional ones.
3495         (gimple_resimplify5): New function.
3496         (build_call_internal): Pass a fifth operand.
3497         (maybe_push_res_to_seq): Likewise.
3498         (try_conditional_simplification): Try converting conditional
3499         internal functions to unconditional internal functions.
3500         Handle 3-operand unconditional forms.
3501         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3502         Define ternary equivalents of the current rules for binary conditional
3503         internal functions.
3504         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3505         ternary operations.
3506         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3507         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3508         (optab): Handle them.
3509         (SVE_COND_FP_TERNARY): New int iterator.
3510         (sve_fmla_op, sve_fmad_op): New int attributes.
3511         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3512         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3513         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3515 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3517         * target.def (preferred_else_value): New target hook.
3518         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3519         * doc/tm.texi: Regenerate.
3520         * targhooks.h (default_preferred_else_value): Declare.
3521         * targhooks.c (default_preferred_else_value): New function.
3522         * internal-fn.h (conditional_internal_fn_code): Declare.
3523         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3524         (get_conditional_internal_fn): Use it.
3525         (conditional_internal_fn_code): New function.
3526         * gimple-match.h (gimple_match_cond): New struct.
3527         (gimple_match_op): Add a cond member function.
3528         (gimple_match_op::gimple_match_op): Update all forms to take a
3529         gimple_match_cond.
3530         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3531         for the suboperation, but don't specify a particular else_value.
3532         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3533         (visit_nary_op, visit_reference_op_load): Pass
3534         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3535         * gimple-match-head.c: Include tree-eh.h
3536         (convert_conditional_op): New function.
3537         (maybe_resimplify_conditional_op): Likewise.
3538         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3539         (gimple_resimplify2): Likewise.
3540         (gimple_resimplify3): Likewise.
3541         (gimple_resimplify4): Likewise.
3542         (maybe_push_res_to_seq): Return null for conditional operations.
3543         (try_conditional_simplification): New function.
3544         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3545         constructor.
3546         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3547         IFN_COND_* call.
3548         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3549         function.
3550         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3552 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3554         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3555         DECL_FCONTEXT
3556         (hash_tree): Do not hash DECL_FCONTEXT
3557         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3558         Do not stream DECL_FCONTEXT.
3559         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3560         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3562 2018-07-12  Richard Biener  <rguenther@suse.de>
3564         PR debug/86462
3565         * dwarf2out.c (gen_block_die): Only output blocks when they have
3566         at least one !DECL_IGNORED_P variable.
3568 2018-07-12  Richard Biener  <rguenther@suse.de>
3570         PR target/84829
3571         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3572         Remove -mieee-fp handling.
3574 2018-07-12  Richard Biener  <rguenther@suse.de>
3576         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3577         left-over from last patch.
3579 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3581         PR tree-optimization/86492
3582         * gimple-ssa-store-merging.c
3583         (imm_store_chain_info::coalesce_immediate_stores): Call
3584         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3586 2018-07-12  Richard Biener  <rguenther@suse.de>
3588         PR middle-end/86479
3589         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3590         move possibly trapping operations into the conditional.
3592 2018-07-12  Richard Biener  <rguenther@suse.de>
3594         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3595         (vn_lookup_simplify_result): Remove recursion limit applied
3596         here.
3597         (vn_nary_build_or_lookup_1): Adjust.
3598         (try_to_simplify): Likewise.
3599         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3600         here.
3601         (gimple_resimplify2): Likewise.
3602         (gimple_resimplify3): Likewise.
3603         (gimple_resimplify4): Likewise.
3605 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3607         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3608         Use __mmask64 type instead of __mmask8 for __M argument.
3609         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3610         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3611         __U argument.
3612         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3613         __mmask16 for __M argument.
3614         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3615         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3616         to __mmask16 instead of __mmask8.
3617         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3618         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3619         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3620         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3621         instead of __mmask16 for __U argument.
3622         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3623         __mmask16 instead of __mmask8 for __U argument.
3624         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3625         __U argument.
3626         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3627         __mmask16.
3628         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3629         argument.
3630         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3631         __U argument.
3632         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3633         __mmask16.
3634         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3635         of __mmask16.
3636         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3637         __U argument.
3638         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3639         __U argument.
3640         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3641         __U argument.
3642         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3643         __U argument.
3644         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3645         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3646         return type as well as __M argument type and all casts from __mmask8
3647         to __mmask32.
3648         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3649         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3650         return type as well as __M argument type and all casts from __mmask8
3651         to __mmask16.
3652         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3653         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3654         return type as well as __M argument type and all casts from __mmask8
3655         to __mmask32.
3656         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3657         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3658         return type as well as __M argument type and all casts from __mmask8
3659         to __mmask16.
3660         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3661         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3662         __mmask16.
3664 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3666         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3667         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3668         for __U argument.
3670 2018-07-11  Paul Koning  <ni1d@arrl.net>
3672         * doc/md.texi (define_subst): Document how multiple occurrences of
3673         the same argument in the replacement pattern are handled.
3675 2018-07-11  Paul Koning  <ni1d@arrl.net>
3677         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3678         alphabetical order.
3679         (Common Type Attributes): Add "mode" attribute.
3681 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3683         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3684         stream DECL_ORIGINAL_TYPE.
3685         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3686         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3687         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3688         Do not walk original type.
3689         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3690         external decls.
3691         (write_ts_decl_non_common_tree_pointers): Do not stream
3692         DECL_ORIGINAL_TYPE
3693         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3694         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3696 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3698         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3699         thread twice from the same starting edge.
3701 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3703         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3704         * gimple.c (gimple_call_nonnull_result_p): ...here...
3705         (gimple_call_nonnull_arg): ...and here.
3706         * gimple.h (gimple_call_nonnull_result_p): New.
3707         (gimple_call_nonnull_arg): New.
3709 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3711         * config/arm/arm-cpus.in: Move information from fpu field of each
3712         cpu definition to the isa field.
3713         * config/arm/parsecpu.awk (fpu): Delete match rule.
3714         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3716 2018-07-11  Richard Biener  <rguenther@suse.de>
3718         PR debug/86457
3719         * dwarf2out.c (init_sections_and_labels): Use
3720         output_asm_line_debug_info consistently.
3721         (dwarf2out_early_finish): Likewise.
3722         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3723         type units.
3725 2018-07-11  Richard Biener  <rguenther@suse.de>
3727         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3728         Rework father_bb setting in a way to avoid propagating constants
3729         multiple times on a loop body.
3731 2018-07-10  Mark Wielaard  <mark@klomp.org>
3733         PR debug/86459
3734         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3736 2018-07-10  Richard Biener  <rguenther@suse.de>
3738         * hash-map.h (hash_map::iterator::operator*): Return
3739         references to key and value.
3741 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3743         PR c++/86443
3744         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3745         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3746         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3747         (gimplify_omp_for): For composite loops, move outer
3748         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3749         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3750         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3751         TREE_LIST for both the original class iterator and the "last" helper
3752         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3753         loop, remember has_decl_expr from outer composite loops for the
3754         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3756 2018-07-09  Martin Sebor  <msebor@redhat.com>
3758         PR middle-end/77357
3759         PR middle-end/86428
3760         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3761         accessing implicitly initialized array elements.
3762         * expr.c (string_constant): Handle string initializers of
3763         character arrays within aggregates.
3764         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3765         Store element offset.  As a special case, handle zero size.
3766         (fold_nonarray_ctor_reference): Same.
3767         (fold_ctor_reference): Add argument.  Store subobject offset.
3768         * gimple-fold.h (fold_ctor_reference): Add argument.
3770 2018-07-09  Paul Koning  <ni1d@arrl.net>
3772         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3773         (pdp11_insn_cost): New function.
3774         (pdp11_md_asm_adjust): New function.
3775         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3776         (pdp11_rtx_costs): Update to match machine better.
3777         (output_addr_const_pdp11): Correct format mismatch warnings.
3778         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3779         * config/pdp11/pdp11.md: General change to add base_cost and/or
3780         length attributes for use by new pdp11_insn_cost function.
3781         (MIN_BRANCH): Correct definition.
3782         (MIN_SOB): Ditto.
3783         (doloop_end): Use standard pattern name for looping pattern.
3784         (doloop_end_nocc): New.
3785         (movsf): Add another constraint alternative.
3786         (zero_extendqihi2): Add constraint alternatives for not in place
3787         extend.
3788         (zero_extendhisi2): Remove.
3789         (shift patterns): Add CC handling variants.
3790         (bswaphi2): New.
3791         (bswapsi2): New.
3792         (rothi3): New.
3793         (define_peephole2): New peephole to recognize mov that sets CC for
3794         subsequent test.
3796 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3798         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3799         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3800         wi::add.
3802 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
3804         PR c/86420
3805         * real.c (real_nextafter): Return true if result is denormal.
3807 2018-07-09  Martin Liska  <mliska@suse.cz>
3809         * common.opt: Add back wrongly removed attribute.
3811 2018-07-09  Richard Biener  <rguenther@suse.de>
3813         PR debug/86413
3814         * dwarf2out.c (gen_block_die): For an early generated DIE
3815         always output high/low PC attributes.
3817 2018-07-09  Tom de Vries  <tdevries@suse.de>
3819         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3820         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3821         onto VAR_DECL with abstract origin.
3823 2018-07-07  Jim Wilson  <jimw@sifive.com>
3825         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3827 2018-07-07  Tom de Vries  <tdevries@suse.de>
3829         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3831 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
3833         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3834         overflow_type.
3835         (combine_bound): Use wide-int overflow calculation instead of
3836         rolling our own.
3837         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3838         overflow_type.
3839         * fold-const.c (int_const_binop_2): Same.
3840         (extract_muldiv_1): Same.
3841         (fold_div_compare): Same.
3842         (fold_abs_const): Same.
3843         * match.pd: Same.
3844         * poly-int.h (add): Same.
3845         (sub): Same.
3846         (neg): Same.
3847         (mul): Same.
3848         * predict.c (predict_iv_comparison): Same.
3849         * profile-count.c (slow_safe_scale_64bit): Same.
3850         * simplify-rtx.c (simplify_const_binary_operation): Same.
3851         * tree-chrec.c (tree_fold_binomial): Same.
3852         * tree-data-ref.c (split_constant_offset_1): Same.
3853         * tree-if-conv.c (idx_within_array_bound): Same.
3854         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3855         * tree-ssa-phiopt.c (minmax_replacement): Same.
3856         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3857         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3858         * vr-values.c (vr_values::adjust_range_with_scev): Same.
3859         * wide-int.cc (wi::add_large): Same.
3860         (wi::mul_internal): Same.
3861         (wi::sub_large): Same.
3862         (wi::divmod_internal): Same.
3863         * wide-int.h: Change overflow type to overflow_type for neg, add,
3864         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3865         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3866         mul_internal, divmod_internal.
3867         (overflow_type): New enum.
3868         (accumulate_overflow): New.
3870 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3872         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3873         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3875 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3877         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3878         argument is checked for zero before entering loop, avoid checking again.
3880 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3882         * gimplify.h (generic_expr_could_trap_p): Set as global function.
3883         * gimplify.h (generic_expr_could_trap_p): Likwise.
3884         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3886 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
3888         PR tree-optimization/86401
3889         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3890         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3891         (fold_bit_and_mask): ... here.  New helper function for match.pd.
3892         * fold-const.h (fold_bit_and_mask): Declare.
3893         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3895 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3897         PR target/86324
3898         * target.def (translate_mode_attribute): New hook.
3899         * targhooks.h (default_translate_mode_attribute): Declare.
3900         * targhooks.c (default_translate_mode_attribute): New function.
3901         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3902         * doc/tm.texi: Regenerate.
3903         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3904         (rs6000_translate_mode_attribute): New function.
3906 2018-07-06  Paul Koning  <ni1d@arrl.net>
3908         * doc/md.texi (define_split): Document DONE and FAIL.
3909         (define_peephole2): Ditto.
3911 2018-07-05  Jeff Law  <law@redhat.com>
3913         PR tree-optimization/86010
3914         * tree-ssa-dse.c (compute_trims): More aggressively trim at
3915         both the head and tail of mem* and str* calls.
3917 2018-07-05  Jim Wilson  <jimw@sifive.com>
3919         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3921 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
3923         * config/aarch64/aarch64-simd.md: correct flags text for
3924         MIN_EXPR replacement.
3926 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
3928         * configure: Regenerated.
3930 2018-07-05  Carl Love  <cel@us.ibm.com>
3932         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3933         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3934         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3935         VSX_BUILTIN_DOUBLEL_V4SF.
3937 2018-07-05  Martin Sebor  <msebor@redhat.com>
3939         PR c++/86400
3940         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3941         than its domain to compute its the upper bound of a char array.
3943 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3945         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3946         * doc/cpp.texi: Update comment.
3947         * doc/tm.texi: Rebuilt.
3948         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3949         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3950         * doc/extend.texi (Backwards Compatibility): Clarify it is system
3951         headers affected by extern "C".
3952         * system.h: Poison NO_IMPLICIT_EXTERN_C.
3953         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3954         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3955         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3956         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3957         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3958         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3959         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3960         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3961         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3962         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3963         config/sparc/sp64-elf.h, config/spu/spu.h,
3964         config/stormy16/stormy16.h, config/v850/v850.h,
3965         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3966         define NO_IMPLICIT_EXTERN_C.
3967         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3969 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3971         PR target/84711
3972         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3973         instead of GET_MODE_SIZE when comparing Units.
3975 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3977         PR target/84711
3978         * rtlanal.c (set_noop_p): Constrain on mode change,
3979         include hard-reg-set.h
3981 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3983         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3985 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
3987         Revert
3988         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3990         PR sanitizer/84250
3991         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3992         libasan.
3993         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3995 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3997         PR sanitizer/84250
3998         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3999         libasan.
4000         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4002 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4004         PR middle-end/86380
4005         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4007 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4009         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4010         neg_*_op* variables.
4012 2018-07-04  Martin Liska  <mliska@suse.cz>
4014         * tree-switch-conversion.c: Define
4015         max_ratio_for_speed and max_ratio_for_size constants.
4017 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4018             Martin Liska  <mliska@suse.cz>
4020         PR middle-end/66240
4021         PR target/45996
4022         PR c/84100
4023         * common.opt: Rename align options with 'str_' prefix.
4024         * common/config/i386/i386-common.c (set_malign_value): New
4025         function.
4026         (ix86_handle_option): Use it to set -falign-* options/
4027         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4028         type from int to string.
4029         * config/aarch64/aarch64.c: Update default values from int
4030         to string.
4031         * config/alpha/alpha.c (alpha_override_options_after_change):
4032         Likewise.
4033         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4034         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4035         max skip conditionally.
4036         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4037         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4038         max skip conditionally.
4039         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4040         max skip conditionally.
4041         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4042         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4043         max skip conditionally.
4044         * config/i386/i386.c (struct ptt): Change type from int to
4045         string.
4046         (ix86_default_align): Set default values.
4047         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4048         max skip conditionally.
4049         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4050         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4051         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4052         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4053         max skip conditionally.
4054         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4055         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4056         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4057         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4058         max skip conditionally.
4059         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4060         * config/ia64/ia64.c (ia64_option_override): Set default values
4061         for alignment options.
4062         * config/m68k/m68k.c: Handle new str_align_* options.
4063         * config/mips/mips.c (mips_set_compression_mode): Change
4064         type of constants.
4065         (mips_option_override): Set default values for options.
4066         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4067         Likewise.
4068         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4069         Likewise.
4070         * config/rx/rx.c (rx_option_override): Likewise.
4071         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4072         (LABEL_ALIGN): Use align_labels_log.
4073         (LOOP_ALIGN): Use align_loops_align.
4074         * config/s390/s390.c (s390_asm_output_function_label): Use new
4075         macros.
4076         * config/sh/sh.c (sh_override_options_after_change):
4077         Change type of constants.
4078         * config/spu/spu.c (spu_sched_init): Likewise.
4079         * config/sparc/sparc.c (sparc_option_override): Set default
4080         values for options.
4081         * config/visium/visium.c (visium_option_override): Likewise.
4082         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4083         emit p2align format with last argument if it's not needed.
4084         * doc/invoke.texi: Document extended format of -falign-*.
4085         * final.c: Use align_labels alignment.
4086         * flags.h (struct target_flag_state): Change type to use
4087         align_flags.
4088         (struct align_flags_tuple): New.
4089         (struct align_flags): Likewise.
4090         (align_loops_log): Redefine macro to use new types.
4091         (align_loops_max_skip): Redefine macro to use new types.
4092         (align_jumps_log): Redefine macro to use new types.
4093         (align_jumps_max_skip): Redefine macro to use new types.
4094         (align_labels_log): Redefine macro to use new types.
4095         (align_labels_max_skip): Redefine macro to use new types.
4096         (align_functions_log): Redefine macro to use new types.
4097         (align_loops): Redefine macro to use new types.
4098         (align_jumps): Redefine macro to use new types.
4099         (align_labels): Redefine macro to use new types.
4100         (align_functions): Redefine macro to use new types.
4101         (align_functions_max_skip): Redefine macro to use new types.
4102         (align_loops_value): New macro.
4103         (align_jumps_value): New macro.
4104         (align_labels_value): New macro.
4105         (align_functions_value): New macro.
4106         * function.c (invoke_set_current_function_hook): Propagate
4107         alignment values from flags to global variables default in
4108         topleev.h.
4109         * ipa-icf.c (sem_function::equals_wpa): Use
4110         cl_optimization_option_eq instead of memcmp.
4111         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4112         of string types.
4113         (cl_optimization_stream_in): Likewise.
4114         * optc-save-gen.awk: Support strings in cl_optimization.
4115         * opth-gen.awk: Likewise.
4116         * opts.c (finish_options): Remove error checking of invalid
4117         value ranges.
4118         (MAX_CODE_ALIGN): Remove.
4119         (MAX_CODE_ALIGN_VALUE): Likewise.
4120         (parse_and_check_align_values): New function.
4121         (check_alignment_argument): Likewise.
4122         (common_handle_option): Use check_alignment_argument.
4123         * opts.h (parse_and_check_align_values): Declare.
4124         * toplev.c (init_alignments): Remove.
4125         (read_log_maxskip): New.
4126         (parse_N_M): Likewise.
4127         (parse_alignment_opts): Likewise.
4128         (backend_init_target): Remove usage of init_alignments.
4129         * toplev.h (parse_alignment_opts): Declare.
4130         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4131         argument.
4132         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4133         * tree.c (cl_option_hasher::equal): New.
4134         * varasm.c: Use new global macros.
4136 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4138         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4139         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4140         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4141         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4142         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4143         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4144         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4145         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4146         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4147         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4148         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4149         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4150         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4152 2018-07-04  Martin Liska  <mliska@suse.cz>
4153             Jonathan Wakely  <jwakely@redhat.com>
4155         * coverage.c: Use correct type.
4156         * doc/invoke.texi: Language correction.
4158 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4160         PR target/85620
4161         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4162         ENDBRANCH for non-tail call which may return via indirect branch.
4163         * doc/extend.texi: Document indirect_return attribute.
4165 2018-07-03  Martin Sebor  <msebor@redhat.com>
4167         PR tree-optimization/86274
4168         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4169         precondition.
4170         (format_floating): Correct handling of infinities and NaNs.
4172 2018-07-03  Martin Sebor  <msebor@redhat.com>
4174         * print-tree.c (print_real_cst): New function.
4175         (print_node_brief): Call it.
4176         (print_node): Ditto.
4178 2018-07-03  Jeff Law  <law@redhat.com>
4180         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4181         into a single pattern.
4183         * config/h8300/h8300.md (ors code_iterator): New.
4184         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4185         a single pattern and single splitter.
4186         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4187         (iorqi3_1, xorqi3_1): Likewise.
4188         (iorqi3, xorqi3 expanders): Similarly.
4190         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4191         (movmd_internal) into a single pattern using the P mode iterator.
4192         (movmd splitters): Similarly.
4193         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4194         (movsd splitters): Similarly.
4196         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4197         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4198         right table based on the size of the operand.
4199         * config/h8300/h8300.md (length_table): Corresponding changes. All
4200         references to "addb", "addw" and "addl" changed to "add".
4201         (btst patterns): Merge two variants into a single pattern.
4202         (tstqi, tsthi): Likewise.
4203         (addhi3_incdec, addsi3_incdec): Likewise.
4204         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4205         (mulhi3, mulsi3): Likewise.
4206         (udivhi3, udivsi3): Likewise.
4207         (divhi3, divsi3): Likewise.
4208         (andorqi3, andorhi3, andorsi3): Likewise.
4210 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4212         PR target/85694
4213         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4214         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4216 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4218         PR tree-optimization/85694
4219         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4220         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4221         UNSPEC_URHADD.
4222         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4223         (<u>avg<mode>3_ceil): New patterns.
4225 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4227         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4228         scan-tree-dump directive.
4229         * gcc.dg/vect/slp-perm-2.c: Likewise.
4230         * gcc.dg/vect/slp-perm-3.c: Likewise.
4231         * gcc.dg/vect/slp-perm-5.c: Likewise.
4232         * gcc.dg/vect/slp-perm-6.c: Likewise.
4233         * gcc.dg/vect/slp-perm-7.c: Likewise.
4234         * gcc.dg/vect/slp-perm-8.c: Likewise.
4236 2018-07-03  Marek Polacek  <polacek@redhat.com>
4238         PR middle-end/86202
4239         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4241 2018-07-03  Richard Biener  <rguenther@suse.de>
4243         PR ipa/86389
4244         * tree-ssa-structalias.c (find_func_clobbers): Properly
4245         handle indirect calls.
4247 2018-07-03  Jeff Law  <law@redhat.com>
4249         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4250         (shifts): New code iterator.
4251         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4252         expander.  Fix HImode handling on H8/SX.
4253         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4254         (subqi3, subhi3, subsi3 expanders): Likewise.
4255         (andqi3, andhi3, andsi3 expanders): Likewise.
4256         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4257         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4258         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4259         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4260         (zero_extendqihi2, zero_extendqisi2): Likewise.
4261         (extendqihi2, extendqisi2): Likewise.
4262         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4263         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4264         (rotlqi3_1, rotlhi3_1): Likewise.
4265         (logicalhi3_sn, logicalsi3_sn): Likewise.
4266         (logicalhi3, logicalsi3): Likewise.
4268 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4270         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4271         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4272         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4273         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4274         type to append_pattern_def_seq instead of creating a stmt_vec_info
4275         directly.
4276         (build_mask_conversion): Likewise.  Remove vinfo argument.
4277         (vect_add_conversion_to_patterm): Likewise, renaming to...
4278         (vect_add_conversion_to_pattern): ...this.
4279         (vect_recog_mask_conversion_pattern): Update call to
4280         build_mask_conversion.  Pass the vector type to
4281         append_pattern_def_seq here too.
4282         (vect_recog_gather_scatter_pattern): Update call to
4283         vect_add_conversion_to_pattern.
4285 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4287         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4288         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4289         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4290         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4291         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4292         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4293         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4294         append_pattern_def_seq instead of new_pattern_def_seq.
4295         (vect_recog_divmod_pattern): Do both of the above.
4296         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4297         is null.
4299 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4301         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4302         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4303         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4304         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4305         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4306         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4307         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4308         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4309         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4310         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4311         parameter with a single stmt_vec_info.
4312         (vect_recog_func_ptr): Likewise.
4313         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4314         (vect_try_gather_scatter_pattern): ...this.
4315         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4316         the stmt_vec_info of the statement to be matched.  Don't clear
4317         STMT_VINFO_RELATED_STMT.
4318         (vect_pattern_recog): Update call accordingly.
4320 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4322         PR tree-optimization/85694
4323         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4324         (uavgM3_ceil): Document new optabs.
4325         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4326         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4327         functions.
4328         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4329         (savg_ceil_optab): New optabs.
4330         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4331         (vect_vect_recog_func_ptrs): Add it.
4332         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4333         constant directly from the associated lhs.
4335 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4337         * tree-vect-patterns.c (vect_split_statement): New function.
4338         (vect_convert_input): Use it to try to split an existing cast.
4340 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4342         * poly-int.h (print_hex): New function.
4343         * dumpfile.h (dump_dec, dump_hex): Declare.
4344         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4345         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4346         min_input_precision, operation_precision and operation_sign.
4347         * tree-vect-patterns.c (vect_get_range_info): New function.
4348         (vect_same_loop_or_bb_p, vect_single_imm_use)
4349         (vect_operation_fits_smaller_type): Delete.
4350         (vect_look_through_possible_promotion): Add an optional
4351         single_use_p parameter.
4352         (vect_recog_over_widening_pattern): Rewrite to use new
4353         stmt_vec_info infomration.  Handle one operation at a time.
4354         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4355         (vect_truncatable_operation_p, vect_set_operation_type)
4356         (vect_set_min_input_precision): New functions.
4357         (vect_determine_min_output_precision_1): Likewise.
4358         (vect_determine_min_output_precision): Likewise.
4359         (vect_determine_precisions_from_range): Likewise.
4360         (vect_determine_precisions_from_users): Likewise.
4361         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4362         (vect_vect_recog_func_ptrs): Put over_widening first.
4363         Add cast_forwprop.
4364         (vect_pattern_recog): Call vect_determine_precisions.
4366 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4368         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4369         statements that have been replaced by further pattern statements.
4370         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4372 2018-07-03  Richard Biener  <rguenther@suse.de>
4374         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4375         always set *dt.  Dump vectype in vectype overload.
4376         * dumpfile.h (dump_gimple_expr): New function.
4377         (dump_gimple_expr_loc): Likewise.
4378         * dumpfile.c (dump_gimple_expr): New function.
4379         (dump_gimple_expr_loc): Likewise.
4381 2018-07-02  Jeff Law  <law@redhat.com>
4383         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4384         the H8/300, H8/300H and H8/S variants into a single pattern.
4385         (movhi_h8300, movqi_h8300hs): Similarly.
4386         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4387         (QHI mode iterator): New.
4389         * config/h8300/h8300.md: Remove trailing whitespace.
4391 2018-07-02  Jim Wilson  <jimw@sifive.com>
4393         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4394         instead of emit_insn for interrupt returns.
4395         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4396         (riscv_sret, riscv_uret): Likewise.
4398 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4400         * pretty-print.c (selftest::test_pp_format): Move save and restore
4401         of quotes to class auto_fix_quotes, and add an instance.
4402         * selftest.c: Include "intl.h".
4403         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4404         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4405         * selftest.h (selftest::auto_fix_quotes): New class.
4407 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4409         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4410         (aarch64_sve_prepare_conditional_op): Remove.
4411         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4412         Allow aarch64_simd_reg_or_zero as select operand; remove
4413         the aarch64_sve_prepare_conditional_op call.
4414         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4415         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4416         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4417         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4418         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4419         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4420         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4421         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4422         and a splitters to match all of the *_any patterns.
4423         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4425         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4426         (SVE_COND_FP_BINARY_REV): Remove.
4427         (sve_int_op_rev, sve_fp_op_rev): New.
4428         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4429         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4430         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4431         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4432         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4433         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4434         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4435         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4436         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4438         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4439         Remove match_dup 1 from the inner unspec.
4440         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4442         * config/aarch64/aarch64.md (movprfx): New attr.
4443         (length): Default movprfx to 8.
4444         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4445         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4446         (*<su>mul<SVE_I>3_highpart): Likewise.
4447         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4448         (*v<ASHIFT><SVE_I>3): Likewise.
4449         (*<su><MAXMIN><SVE_I>3): Likewise.
4450         (*<su><MAXMIN><SVE_F>3): Likewise.
4451         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4452         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4453         (*div<SVE_F>4): Likewise.
4455 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4457         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4458         in dump string.
4460 2018-07-02  Richard Biener  <rguenther@suse.de>
4462         PR tree-optimization/86363
4463         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4464         memset argument refers to a non-variable address.
4466 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4468         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4469         {PLUS,MINUS}_EXPR code to...
4470         (adjust_symbolic_bound): ...here,
4471         (combine_bound): ...here,
4472         (set_value_range_with_overflow): ...and here.
4474 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4476         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4477         code...
4478         (extract_range_from_abs_expr): ...here.
4480 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4482         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4483         -fno-omit-frame-pointer when not optimizing.
4485 2018-07-02  Martin Liska  <mliska@suse.cz>
4487         PR ipa/86279
4488         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4489         (propagate_nothrow): Likewise.
4491 2018-07-02  Martin Liska  <mliska@suse.cz>
4493         PR ipa/86323
4494         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4496 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4498         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4499         function in r262149, changing "loc" param from source_location to
4500         const dump_location_t &.
4501         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4502         declaration, as above.
4504 2018-07-01  Paul Koning  <ni1d@arrl.net>
4506         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4507         -munit-asm, -mgnu-asm, -mdec-asm.
4508         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4509         (pdp11_output_labelref): New.
4510         (pdp11_output_def): New.
4511         (pdp11_output_addr_vec_elt): New.
4512         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4513         %# and %@ format codes.
4514         (pdp11_option_override): New.
4515         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4516         (pdp11_output_ident): New.
4517         (pdp11_asm_named_section): New.
4518         (pdp11_asm_init_sections): New.
4519         (pdp11_file_start): New.
4520         (pdp11_file_end): New.
4521         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4522         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4523         %o, like %c but octal.
4524         (pdp11_option_override): New.
4525         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4526         -mdec-asm.
4527         (DATA_SECTION_ASM_OP): Ditto.
4528         (READONLY_DATA_SECTION_ASM_OP): New.
4529         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4530         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4531         (ASM_OUTPUT_LABELREF): Ditto.
4532         (ASM_OUTPUT_DEF): Ditto.
4533         (ASM_OUTPUT_EXTERNAL): New.
4534         (ASM_OUTPUT_SOURCE_FILENAME): New.
4535         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4536         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4537         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4538         %# and %@ format codes.
4539         * config/pdp11/pdp11.opt (mgnu-asm): New.
4540         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4541         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4542         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4544 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4546         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4547         dereferencing path[] beyond its length.
4548         (debug_path): New.
4549         (debug_all_paths): New.
4550         (rewire_first_differing_edge): New.
4551         (adjust_paths_after_duplication): New.
4552         (duplicate_thread_path): Call adjust_paths_after_duplication.
4553         Add new argument.
4554         (thread_through_all_blocks): Add new argument to
4555         duplicate_thread_path.
4557 2018-06-30  Jim Wilson  <jimw@sifive.com>
4559         * config/riscv/predicates.md (p2m1_shift_operand): New.
4560         (high_mask_shift_operand): New.
4561         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4562         pattern using p2m1_shift_operand.
4563         (lshsi3_zero_extend_3+2): New combiner pattern using
4564         high_mask_shift_operand.
4566 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4568         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4569         split out from...
4570         (vect_recog_rotate_pattern): ...here.
4571         (vect_convert_input): Try to insert casts of invariants in the
4572         preheader.
4573         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4574         preheader to be empty.
4576 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4578         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4579         vector type.  If given, install it in the new statement's
4580         STMT_VINFO_VECTYPE.
4581         (vect_element_precision): New function.
4582         (vect_unpromoted_value): New struct.
4583         (vect_unpromoted_value::vect_unpromoted_value): New function.
4584         (vect_unpromoted_value::set_op): Likewise.
4585         (vect_look_through_possible_promotion): Likewise.
4586         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4587         (vect_widened_op_tree, vect_convert_input): Likewise.
4588         (vect_convert_inputs, vect_convert_output): Likewise.
4589         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4590         to handle the optional cast of the multiplication result and
4591         vect_widened_op_tree to detect the widened multiplication itself.
4592         Do not require the input and output of promotion casts to have
4593         the same sign, but base the signedness of the operation on the
4594         input rather than the result.  If the pattern includes two
4595         promotions, check that those promotions have the same sign.
4596         Do not restrict the MULT_EXPR handling to a double-width result;
4597         handle quadruple-width results and wider.  Use vect_convert_inputs
4598         to convert the inputs to the common type.
4599         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4600         to handle the optional cast of the ABS result.  Also allow a sign
4601         change or a sign extension between the ABS and MINUS.
4602         Use vect_widened_op_tree to detect the widened subtraction and use
4603         vect_convert_inputs to convert the inputs to the common type.
4604         (vect_handle_widen_op_by_const): Delete.
4605         (vect_recog_widen_op_pattern): New function.
4606         (vect_recog_widen_mult_pattern): Use it.
4607         (vect_recog_widen_shift_pattern): Likewise.
4608         (vect_recog_widen_sum_pattern): Use
4609         vect_look_through_possible_promotion to handle the promoted
4610         PLUS_EXPR operand.
4612 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4614         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4615         the containing gimple_seq *.
4616         * gimple-iterator.h (gsi_for_stmt): Declare it.
4617         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4618         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4619         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4620         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4621         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4622         checks.
4623         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4624         split out from...
4625         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4626         statement being replaced is part of an existing pattern
4627         definition sequence, inserting the new pattern statements before
4628         the original one.
4629         (vect_pattern_recog_1): Don't return a bool.  If the statement
4630         is already part of a pattern, instead apply pattern matching
4631         to the pattern definition statements.  Don't clear the
4632         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4633         (vect_pattern_recog): Don't break after the first match;
4634         continue processing the pattern definition statements instead.
4635         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4637 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4639         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4640         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4641         (vect_recog_widen_sum_pattern): Use it.
4643 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4645         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4646         phi is not a pattern statement and has not been replaced by
4647         a pattern statement.
4648         * tree-vect-patterns.c (type_conversion_p): Don't check
4649         STMT_VINFO_IN_PATTERN_P.
4650         (vect_recog_vector_vector_shift_pattern): Likewise.
4651         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4652         the pattern statement rather than the original statement; check
4653         directly for a WIDEN_MULT_EXPR here.
4654         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4655         vect_is_simple_use to return the pattern statement rather
4656         than the original statement; use is_pattern_stmt_p to check
4657         for such a pattern statement.
4658         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4659         to return the pattern statement rather than the original statement;
4660         don't do the same transformation here.
4661         (vect_is_simple_use): If the defining statement has been replaced
4662         by a pattern statement, return the pattern statement instead.
4663         Remove the corresponding (local) transformation from the vectype
4664         overload.
4666 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4668         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4669         end and default to null.
4670         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4671         (vectorizable_reduction): Update calls accordingly, dropping the
4672         gimple ** argument if the passed-back statement isn't needed.
4673         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4674         (vect_recog_rotate_pattern): Likewise.
4675         (vect_recog_mask_conversion_pattern): Likewise.
4676         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4677         (vect_mask_constant_operand_p): Likewise.
4678         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4679         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4680         (get_group_load_store_type, get_load_store_type): Likewise.
4681         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4682         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4683         (vectorizable_conversion, vectorizable_assignment): Likewise.
4684         (vectorizable_shift, vectorizable_operation): Likewise.
4685         (vectorizable_store, vect_is_simple_cond): Likewise.
4686         (vectorizable_condition, vectorizable_comparison): Likewise.
4687         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4688         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4689         and move it to the end.  Cope with null def_stmt_outs.
4691 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4693         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4695 2018-06-29  Jeff Law  <law@redhat.com>
4697         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4698         displacements for TARGET_V850E2V3 and newer.
4699         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4700         * config/v850/v850.md (sign23byte_load): Remove.
4701         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4702         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4704 2018-06-29  Martin Liska  <mliska@suse.cz>
4706         PR lto/85759
4707         * coverage.c (coverage_init): Mangle full path name.
4708         * doc/invoke.texi: Document the change.
4709         * gcov-io.c (mangle_path): New.
4710         * gcov-io.h (mangle_path): Likewise.
4711         * gcov.c (mangle_name): Use mangle_path for path mangling.
4713 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4715         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4716         if starting source register is not even.
4718 2018-06-29  Martin Liska  <mliska@suse.cz>
4720         PR tree-optimization/86263
4721         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4722         Make edge redirection.
4724 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4726         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4727         (dump_scope_depth): New variable.
4728         (get_dump_scope_depth): New function.
4729         (dump_begin_scope): New function.
4730         (dump_end_scope): New function.
4731         * dumpfile.h (get_dump_scope_depth): New declaration.
4732         (dump_begin_scope): New declaration.
4733         (dump_end_scope): New declaration.
4734         (class auto_dump_scope): New class.
4735         (AUTO_DUMP_SCOPE): New macro.
4736         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4737         AUTO_DUMP_SCOPE.
4739 2018-06-29  Richard Biener  <rguenther@suse.de>
4741         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4742         compute_all_dependences succeeds.
4743         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4744         exceed --param loop-max-datarefs-for-datadeps.
4746 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4748         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4750 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4752         PR target/86348
4753         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4754         alternative 0 in preferred_for_speed attribute.
4756 2018-06-28  Paul Koning  <ni1d@arrl.net>
4758         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4759         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4760         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4761         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4762         for shift insn patterns.
4764 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4766         * cgraph.c (cgraph_node::get_body): Replace assignments to
4767         "dump_file" with calls to set_dump_file.
4768         * dumpfile.c (alt_dump_file): Make static, and group with...
4769         (alt_flags): ...this definition.
4770         (dumps_are_enabled): New variable.
4771         (refresh_dumps_are_enabled): New function.
4772         (set_dump_file): New function.
4773         (set_alt_dump_file): New function.
4774         (gcc::dump_manager::dump_start): Replace assignments to
4775         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4776         set_alt_dump_file.
4777         (gcc::dump_manager::dump_finish): Likewise.
4778         * dumpfile.h (alt_dump_file): Delete decl.
4779         (dumps_are_enabled): New variable decl.
4780         (set_dump_file): New function decl.
4781         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4782         global.
4783         * tree-nested.c (lower_nested_functions): Replace assignments to
4784         "dump_file" with calls to set_dump_file.
4786 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4788         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4789         goto_locus of each outgoing edge of each basic block.
4791 2018-06-28  Richard Biener  <rguenther@suse.de>
4793         * dwarf2out.c (decl_scope_table): Remove.
4794         (push_decl_scope): Likewise.
4795         (pop_decl_scope): Likewise.
4796         (gen_type_die_for_member): Do not call push/pop_decl_scope.
4797         (gen_struct_or_union_type_die): Likewise.
4798         (gen_tagged_type_die): Likewise.
4799         (dwarf2out_init): Do not initialize decl_scope_table.
4800         (dwarf2out_c_finalize): Do not free it.
4802 2018-06-28  Richard Biener  <rguenther@suse.de>
4804         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4805         deciding whether to not re-use a DIE.
4807 2018-06-28  Richard Biener  <rguenther@suse.de>
4809         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4810         DW_AT_abstract_origin attribute.
4812 2018-06-28  Martin Liska  <mliska@suse.cz>
4814         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4815         Use newly introduced constants.
4816         * tree-switch-conversion.h (struct jump_table_cluster):
4817         Define max_ratio_for_size and max_ratio_for_speed.
4819 2018-06-28  Martin Liska  <mliska@suse.cz>
4821         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4822         Add new checking assert to catch invalid state.
4823         (jump_table_cluster::can_be_handled): Handle single case
4824         clusters.
4825         (jump_table_cluster::is_beneficial): Bail out for such case.
4826         (bit_test_cluster::find_bit_tests):
4827         Add new checking assert to catch invalid state.
4828         (bit_test_cluster::can_be_handled): Handle single case
4829         clusters.
4830         (bit_test_cluster::is_beneficial): Bail out for such case.
4831         (switch_decision_tree::analyze_switch_statement):
4832         Fix comment.
4834 2018-06-28  Martin Liska  <mliska@suse.cz>
4836         * common.opt: Introduce -completion option.
4837         * gcc.c (driver_handle_option): Handle it.
4838         (driver::main): Print completions if completion
4839         is set.
4840         * opt-suggestions.c (option_proposer::get_completions):
4841         New function.
4842         (option_proposer::suggest_completion): Likewise.
4843         (option_proposer::find_param_completions): Likewise.
4844         (verify_autocompletions): Likewise.
4845         (test_completion_valid_options): Likewise.
4846         (test_completion_valid_params): Likewise.
4847         (in_completion_p): Likewise.
4848         (empty_completion_p): Likewise.
4849         (test_completion_partial_match): Likewise.
4850         (test_completion_garbage): Likewise.
4851         (opt_proposer_c_tests): Likewise.
4852         * opt-suggestions.h: Declare new functions.
4853         * opts.c (common_handle_option): Handle OPT__completion_.
4854         * selftest-run-tests.c (selftest::run_tests): Add
4855         opt_proposer_c_tests.
4856         * selftest.c (assert_str_startswith): New.
4857         * selftest.h (assert_str_startswith): Likewise.
4858         (opt_proposer_c_tests): New.
4859         (ASSERT_STR_STARTSWITH): Likewise.
4861 2018-06-28  Martin Liska  <mliska@suse.cz>
4863         * Makefile.in: Add opt-suggestions.o.
4864         * gcc-main.c: Include opt-suggestions.h.
4865         * gcc.c (driver::driver): Likewise.
4866         (driver::~driver): Remove m_option_suggestions.
4867         (driver::build_option_suggestions): Moved to option_proposer.
4868         (driver::suggest_option): Likewise.
4869         (driver::handle_unrecognized_options): Use option_proposer.
4870         * gcc.h (class driver): Add new memver m_option_proposer.
4871         * opt-suggestions.c: New file.
4872         * opt-suggestions.h: New file.
4874 2018-06-28  Martin Liska  <mliska@suse.cz>
4876         * vec.h (class auto_string_vec): New (moved from auto_argvec).
4877         (auto_string_vec::~auto_string_vec): Likewise.
4879 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4881         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4882         prevent_decl_creation_for_types fields up and add reset_location field.
4883         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4884         statement if id->reset_location is true.
4885         (copy_edges_for_bb): Do not set goto_locus on the new edges if
4886         id->reset_location is true.
4887         (copy_phis_for_bb): Force input_location on the arguments if
4888         id->reset_location is true.
4889         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4890         is set on the function to be inlined.
4892 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
4894         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4896 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
4898         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4899         registers for Pmode.
4900         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4901         hard registers for the clobbered pseudo.
4903 2018-06-27  Paul Koning  <ni1d@arrl.net>
4905         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4906         mutually exclusive options.
4907         * config/pdp11/constraints.md (h): New constraint.
4908         (O): Update definition to match shift code generation.
4909         (D): New constraint.
4910         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4911         (CCFP): Remove.
4912         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4913         function.
4914         (output_jump): Change arguments.
4915         (pdp11_fixed_cc_regs): New function.
4916         (pdp11_cc_mode): Ditto.
4917         (pdp11_expand_shift): Ditto.
4918         (pdp11_assemble_shift): Ditto.
4919         (pdp11_small_shift): Ditto.
4920         (pdp11_branch_cost): Remove.
4921         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4922         from output.
4923         (pdp11_register_move_cost): Update for CC registers.
4924         (pdp11_rtx_costs): Add case for LSHIFTRT.
4925         (pdp11_output_jump): Add CCNZ mode conditional branches.
4926         (notice_update_cc_on_set): Remove.
4927         (pdp11_cc_mode): New function.
4928         (simple_memory_operand): Correct pre/post decrement case.
4929         (no_side_effect_operand): New function.
4930         (pdp11_regno_reg_class): Add CC_REGS class.
4931         (pdp11_fixed_cc_regs): New function.
4932         (pdp11_small_shift): New function.
4933         (pdp11_expand_shift): New function to expand shift insns.
4934         (pdp11_assemble_shift): New function to output shifts.
4935         (pdp11_branch_cost): Remove.
4936         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4937         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4938         (WCHAR_TYPE): Ditto.
4939         (PTRDIFF_TYPE): Ditto.
4940         (ADJUST_INSN_LENGTH): New macro.
4941         (FIXED_REGISTERS): Add CC registers.
4942         (CALL_USED_REGISTERS): Ditto.
4943         (reg_class): Ditto.
4944         (REG_CLASS_NAMES): Ditto.
4945         (REG_CLASS_CONTENTS): Ditto.
4946         (SELECT_CC_MODE): Use new function.
4947         (TARGET_FLAGS_REGNUM): New macro.
4948         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4949         (cc0_reg_rtx): Remove.
4950         (CC_STATUS_MDEP): Remove.
4951         (CC_STATUS_MDEFP_INIT): Remove.
4952         (CC_IN_FPU): Remove.
4953         (NOTICE_UPDATE_CC): Remove.
4954         (REGISTER_NAMES): Add CC registers.
4955         (BRANCH_COST): Change to constant 1.
4956         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4957         handling.
4958         * config/pdp11/pdp11.opt (mbcopy): Remove.
4959         (mbcopy-builtin): Remove.
4960         (mbranch-cheap): Remove.
4961         (mbranch-expensive): Remove.
4962         * config/pdp11/predicates.md (expand_shift_operand): Update to
4963         match shift code generation.
4964         (ccnz_operator): New predicate.
4965         * doc/invoke.texi (PDP-11 Options): Remove deleted options
4966         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4967         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
4968         exclusive options.
4969         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
4970         description of O constraint.
4972 2018-06-27  Jeff Law  <law@redhat.com>
4973             Austin Law  <austinklaw@gmail.com>
4975         * config/v850/v850.md (addsi3_set_flags): New pattern.
4976         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4977         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4978         (zero_extendhisi2_v850_set_flags): Likewise.
4979         (zero_extendqisi2_v850_set_flags): Likewise.
4980         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4981         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4982         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4984         * config/v850/v850-protos.h (notice_update_cc): Remove.
4985         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4986         (v850_print_operand): Handle 'D' and "d".
4987         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4988         Add handling of arithmetic/logical operations compared against zero.
4989         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4990         Do not look at v850_compare_op, instead get mode from last argument.
4991         (v850_gen_compare): Remove
4992         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4993         after reload for prologue insns.
4994         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4995         patterns.
4996         (construct_save_jarl): Likewise.
4997         (TARGET_FLAGS_REGNUM): Define.
4998         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4999         (NOTICE_UPDATE_CC): Remove.
5000         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5001         than cc0.  Conditionalize on reload_completed.
5002         (cmpsi_insn, setfcc_insn): Likewise.
5003         (tst1 splitter): Turn into define_and_split which sets the flags
5004         after reload.
5005         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5006         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5007         (cstoresf4, cstoredf4): Clobber the flags.
5008         (cmpsi, cmpsf, cmpdf): Remove expanders.
5009         (setf_insn): Remove pattern.
5010         (addsi3): Turn into define_and_split which clobbers the flags after
5011         reload and a suitable pattern (addsi3_clobber_flags) for use after
5012         reload.
5013         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5014         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5015         (ashrsi3, ashrsi3_v850e2): Likewise.
5016         (bins): Clobber the flags.
5017         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5018         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5019         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5020         (call_value_internal_short, call_value_internal_long): Likewise.
5021         (callt_save_interrupt, callt_return_interrupt): Likewise.
5022         (save_interrupt, return_interrupt): Likewise.
5023         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5024         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5025         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5026         (All FP comparisons): Only allow after reload has completed.
5027         (trfsr): Likewise.
5028         (divh, divhu): Tweak output template.
5029         (branch_z_normal, branch_z_invert): Remove
5030         (branch_nz_normal, branch_nz_invert): Likewise.
5031         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5033         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5034         * config/v850/v850.c (notice_update_cc): Remove.
5035         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5036         (CC_NO_CARRY): Likewise.
5037         (NOTICE_UPDATE_CC): Define to nothing.
5038         * config/v850/v850.md: Remove block comment on cc0 handling
5039         Remove "cc" attribute from all patterns.  Remove cc_status handling
5040         from all patterns.  Minor formatting fixes.
5042 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5044         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5045         (cortex-a76.cortex-a55): Likewise.
5046         * config/aarch64/aarch64-tune.md: Regenerate.
5047         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5048         cortex-a76.cortex-a55.
5050 2018-06-27  Jeff Law  <law@redhat.com>
5052         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5053         (MULTILIB_DIRNAMES): Similarly.
5055 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5057         * gimple.h (gimple_return_retbnd): Delete.
5058         (gimple_return_set_retbnd): Likewise.
5059         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5060         gimple_return_set_retbnd.
5061         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5062         gimple_return_retbnd and adjust.
5063         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5064         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5065         Explicitly return NULL in a couple more cases.  Move assertion
5066         on debug statements and remove unreachable code.
5067         (reset_debug_binding): Do not test id->retbnd.
5068         (expand_call_inline): Do not set it.
5070 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5072         * configure.ac: Add --disable-gcov option.
5073         * configure: Regenerate.
5074         * Makefile.in: Honour @enable_gcov@.
5075         * doc/install.texi: Document --disable-gcov.
5077 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5079         * config/arm/arm-cpus.in (cortex-a76): New entry.
5080         (cortex-a76.cortex-a55): Likewise.
5081         * config/arm/arm-tables.opt: Regenerate.
5082         * config/arm/arm-tune.md: Likewise.
5083         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5084         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5085         cortex-a76.cortex-a55.
5087 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
5089         PR target/85769
5090         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5092 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5094         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5095         comment.
5096         (EPILOGUE_USES): Likewise.
5098 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5100         * tree-inline.c (remap_location): New function extracted from...
5101         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5102         (copy_phis_for_bb): ...here.  Call remap_location.
5103         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5105 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5107         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5108         unaligned vsx for 16B memset.
5110 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5112         PR target/86285
5113         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5114         ieee128_float_type_node to long_double_type_node unless
5115         TARGET_LONG_DOUBLE_128 is set.
5117 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5119         * cfgloop.c (get_loop_location): Convert return type from
5120         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5121         by implicit construction from rtx_insn *, and using
5122         dump_user_location_t::from_function_decl for the fallback case.
5123         * cfgloop.h (get_loop_location): Convert return type from
5124         location_t to dump_user_location_t.
5125         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5126         dump_printf_loc to pass in a dump_location_t rather than a
5127         location_t, via the gimple stmt.
5128         * coverage.c (get_coverage_counts): Update calls to
5129         dump_printf_loc to pass in dump_location_t rather than a
5130         location_t.
5131         * doc/optinfo.texi (Dump types): Convert example of
5132         dump_printf_loc from taking "locus" to taking "insn".  Update
5133         description of the "_loc" calls to cover dump_location_t.
5134         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5135         "selftest.h".
5136         (dump_user_location_t::dump_user_location_t): New constructors,
5137         from gimple *stmt and rtx_insn *.
5138         (dump_user_location_t::from_function_decl): New function.
5139         (dump_loc): Make static.
5140         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5141         const dump_location_t &.
5142         (dump_generic_expr_loc): Delete.
5143         (dump_printf_loc): Convert param "loc" from location_t to
5144         const dump_location_t &.
5145         (selftest::test_impl_location): New function.
5146         (selftest::dumpfile_c_tests): New function.
5147         * dumpfile.h: Include "profile-count.h".
5148         (class dump_user_location_t): New class.
5149         (struct dump_impl_location_t): New struct.
5150         (class dump_location_t): New class.
5151         (dump_printf_loc): Convert 2nd param from source_location to
5152         const dump_location_t &.
5153         (dump_generic_expr_loc): Delete.
5154         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5155         const dump_location_t &.
5156         * gimple-fold.c (fold_gimple_assign): Update call to
5157         dump_printf_loc to pass in a dump_location_t rather than a
5158         location_t, via the gimple stmt.
5159         (gimple_fold_call): Likewise.
5160         * gimple-loop-interchange.cc
5161         (loop_cand::analyze_iloop_reduction_var): Update for change to
5162         check_reduction_path.
5163         (tree_loop_interchange::interchange): Update for change to
5164         find_loop_location.
5165         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5166         change in return-type of find_loop_location.
5167         (graphite_regenerate_ast_isl): Likewise.
5168         * graphite-optimize-isl.c (optimize_isl): Likewise.
5169         * graphite.c (graphite_transform_loops): Likewise.
5170         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5171         pass in a dump_location_t rather than a location_t, via the
5172         gimple stmt.
5173         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5174         * ipa.c (walk_polymorphic_call_targets): Likewise.
5175         * loop-unroll.c (report_unroll): Convert "locus" param from
5176         location_t to dump_location_t.
5177         (decide_unrolling): Update for change to get_loop_location's
5178         return type.
5179         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5180         location_t to dump_user_location_t.
5181         (grid_find_single_omp_among_assignments_1): Updates calls to
5182         dump_printf_loc to pass in a dump_location_t rather than a
5183         location_t, via the gimple stmt.
5184         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5185         location_t to dump_location_t.  Updates calls to dump_printf_loc
5186         to pass in a dump_location_t rather than a location_t, via the
5187         gimple stmt.
5188         (grid_inner_loop_gridifiable_p): Likewise.
5189         (grid_dist_follows_simple_pattern): Likewise.
5190         (grid_gfor_follows_tiling_pattern): Likewise.
5191         (grid_target_follows_gridifiable_pattern): Likewise.
5192         (grid_attempt_target_gridification): Convert initialization
5193         of local "grid" from memset to zero-initialization; FIXME: does
5194         this require C++11?  Update call to dump_printf_loc to pass in a
5195         optinfo_location rather than a location_t, via the gimple stmt.
5196         * profile.c (read_profile_edge_counts): Updates call to
5197         dump_printf_loc to pass in a dump_location_t rather than a
5198         location_t
5199         (compute_branch_probabilities): Likewise.
5200         * selftest-run-tests.c (selftest::run_tests): Call
5201         dumpfile_c_tests.
5202         * selftest.h (dumpfile_c_tests): New decl.
5203         * tree-loop-distribution.c (pass_loop_distribution::execute):
5204         Update for change in return type of find_loop_location.
5205         * tree-parloops.c (parallelize_loops): Likewise.
5206         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5207         "locus" from location_t to dump_user_location_t.
5208         (canonicalize_loop_induction_variables): Likewise.
5209         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5210         for change in return type of find_loop_location.
5211         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5212         to dump_printf_loc to pass in a dump_location_t rather than a
5213         location_t, via the stmt.
5214         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5215         Likewise.
5216         * tree-vect-loop-manip.c (find_loop_location): Convert return
5217         type from source_location to dump_user_location_t.
5218         (vect_do_peeling): Update for above change.
5219         (vect_loop_versioning): Update for change in type of
5220         vect_location.
5221         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5222         from location_t to dump_user_location_t.
5223         (vect_estimate_min_profitable_iters): Update for change in type
5224         of vect_location.
5225         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5226         location_t to dump_location_t.
5227         (vect_slp_bb): Update for change in type of vect_location.
5228         * tree-vectorizer.c (vect_location): Convert from source_location
5229         to dump_user_location_t.
5230         (try_vectorize_loop_1): Update for change in vect_location's type.
5231         (vectorize_loops): Likewise.
5232         (increase_alignment): Likewise.
5233         * tree-vectorizer.h (vect_location): Convert from source_location
5234         to dump_user_location_t.
5235         (find_loop_location): Convert return type from source_location to
5236         dump_user_location_t.
5237         (check_reduction_path): Convert 1st param from location_t to
5238         dump_user_location_t.
5239         * value-prof.c (check_counter): Update call to dump_printf_loc to
5240         pass in a dump_user_location_t rather than a location_t; update
5241         call to error_at for change in type of "locus".
5242         (check_ic_target): Update call to dump_printf_loc to
5243         pass in a dump_user_location_t rather than a location_t, via the
5244         call_stmt.
5246 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5248         * config/s390/s390.h (enum processor_flags): Do not use
5249         default tune parameter when -march was specified.
5251 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5253         PR target/86314
5254         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5255         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5256         operands.
5258 2018-06-26  Richard Biener  <rguenther@suse.de>
5260         PR tree-optimization/86287
5261         PR bootstrap/86316
5262         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5263         (vect_analyze_loop): Initialize n_stmts.
5265 2018-06-26  Richard Biener  <rguenther@suse.de>
5267         PR middle-end/86271
5268         * fold-const.c (fold_convertible_p): Pointer extension
5269         isn't valid.
5271 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5273         PR debug/86064
5274         * dwarf2out.c (loc_list_has_views): Adjust comments.
5275         (dw_loc_list): Split single cross-partition range with
5276         nonzero locview.
5278 2018-06-25  Jeff Law  <law@redhat.com>
5280         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5281         on -mbig-switch by default.
5283         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5284         test.
5285         (const_float_0_operand): Remove unused predicate.
5286         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5287         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5288         (recipsf2): New expander.  Original pattern now called
5289         (recipsf2_insn).
5290         (recipdf2, recipdf2_insn): Similarly.
5291         (rsqrtsf2, rsqrtsf2_insn): Similarly
5292         (rsqrtdf2, rsqrtdf2_insn): Similarly
5294 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5296         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5297         Simplify logic for FreeBSD (twice).
5299 2018-06-25  Martin Sebor  <msebor@redhat.com>
5301         PR tree-optimization/86204
5302         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5303         a strnlen result if it's less than the length of the string.
5305 2018-06-25  Martin Sebor  <msebor@redhat.com>
5307         PR tree-optimization/85700
5308         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5309         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5310         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5312 2018-06-25  Martin Sebor  <msebor@redhat.com>
5314         * doc/extend.texi (Zero-length arrays): Update and clarify.
5316 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5318         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5319         added IEEE/IBM long double multilib support on PowerPC little
5320         endian Linux systems.
5321         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5322         (MULTILIB_DEFAULTS): Likewise.
5323         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5324         Likewise.
5325         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5326         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5327         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5329 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5331         PR middle-end/86311
5332         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5333         (REORDER_45): Likewise.
5335 2018-06-25  Jeff Law  <law@redhat.com>
5337         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5338         dividend to 32 bits.  Adjust length.
5339         (udivmodhi4): Cleanup output template.  Fix length.
5341 2018-06-25  Carl Love  <cel@us.ibm.com>
5343         * config/rs6000/vsx.md: Change word selector to prefered location.
5345 2018-06-25  Richard Biener  <rguenther@suse.de>
5347         PR tree-optimization/86304
5348         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5349         epilogue-if-converted loops as well.
5351 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5353         * lto-section-out.c (lto_begin_section): Do not print section
5354         name for noaddr and unnumbered dumps.
5356 2018-06-25  Richard Biener  <rguenther@suse.de>
5358         * tree-vectorizer.h (struct vec_info_shared): New structure
5359         with parts split out from struct vec_info and loop_nest from
5360         struct _loop_vec_info.
5361         (struct vec_info): Adjust accordingly.
5362         (struct _loop_vec_info): Likewise.
5363         (LOOP_VINFO_LOOP_NEST): Adjust.
5364         (LOOP_VINFO_DATAREFS): Likewise.
5365         (LOOP_VINFO_DDRS): Likewise.
5366         (struct _bb_vec_info): Likewise.
5367         (BB_VINFO_DATAREFS): Likewise.
5368         (BB_VINFO_DDRS): Likewise.
5369         (struct _stmt_vec_info): Add dr_aux member.
5370         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5371         (DR_MISALIGNMENT_UNINITIALIZED): New.
5372         (set_dr_misalignment): Adjust.
5373         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5374         (vect_analyze_loop): Adjust prototype.
5375         (vect_analyze_loop_form): Likewise.
5376         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5377         Compute dependences lazily.
5378         (vect_record_base_alignments): Use shared datarefs/ddrs.
5379         (vect_verify_datarefs_alignment): Likewise.
5380         (vect_analyze_data_refs_alignment): Likewise.
5381         (vect_analyze_data_ref_accesses): Likewise.
5382         (vect_analyze_data_refs): Likewise.
5383         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5384         constructor parameter for shared part.
5385         (vect_analyze_loop_form): Pass in shared part and adjust.
5386         (vect_analyze_loop_2): Pass in storage for the number of
5387         stmts.  Move loop nest finding to the caller.  Compute
5388         datarefs lazily.
5389         (vect_analyze_loop): Pass in shared part.
5390         (vect_transform_loop): Verify shared datarefs are unchanged.
5391         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5392         constructor parameter for shared part.
5393         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5394         (vect_slp_bb): Verify shared datarefs are unchanged before
5395         transform.
5396         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5397         change.
5398         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5399         DR_MISALIGNMENT_UNINITIALIZED.
5400         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5401         parameter for shared part.
5402         (vec_info::~vec_info): Adjust.
5403         (vec_info_shared::vec_info_shared): New.
5404         (vec_info_shared::~vec_info_shared): Likewise.
5405         (vec_info_shared::save_datarefs): Likewise.
5406         (vec_info_shared::check_datarefs): Likewise.
5407         (try_vectorize_loop_1): Construct shared part live for analyses
5408         of a single loop for multiple vector sizes.
5409         * tree-parloops.c (gather_scalar_reductions): Adjust.
5411 2018-06-25  Richard Biener  <rguenther@suse.de>
5413         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5414         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5415         (vect_analyze_data_refs): Remove similar code from here and
5416         simplify accordingly.
5418 2018-06-25  Richard Biener  <rguenther@suse.de>
5420         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5421         for reverse storage order accesses rather than asserting
5422         they cannot happen here.
5424 2018-06-25  Tom de Vries  <tdevries@suse.de>
5426         PR debug/86257
5427         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5428         Use data16 instead of .byte for insn prefix.
5430 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5432         PR C++/86082
5433         * parser.c (make_char_string_pack): Pass this literal chars
5434         through cpp_interpret_string.
5435         (cp_parser_userdef_numeric_literal): Check the result of
5436         make_char_string_pack.
5438 2018-06-24  Maya Rashish  <coypu@sdf.org>
5440         * ginclude/stddef.h: Simplify conditions around avoiding
5441         re-definition of __size_t.
5443 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5445         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5446         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5448 2018-06-22  Maya Rashish  <coypu@sdf.org>
5450         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5451         made to OpenBSD and NetBSD through the years.
5453 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5455         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5456         behavior of vec_pack (vector double, vector double) to match
5457         behavior of vec_float2 (vector double, vector double).
5459 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5461         * gimplify.c (gimplify_function_tree): Prevent creation
5462         of a trampoline for the address of the current function
5463         passed to entry/exit instrumentation hooks.
5465 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5467         PR target/86222
5468         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5469         correctly.
5471 2018-06-22  Martin Liska  <mliska@suse.cz>
5473         PR tree-optimization/86263
5474         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5475         Bail out if is_enabled is false.
5476         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5477         New declaration.
5478         (jump_table_cluster::is_enabled): New function.
5480 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5482         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5483         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5484         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5485         (lto_input_ts_binfo_tree_pointers): Likewise.
5486         * tree-streamer-out.c (streamer_write_tree_bitfields,
5487         write_ts_binfo_tree_pointers): Likewise.
5488         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5490 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5492         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5494 2018-06-22  Martin Liska  <mliska@suse.cz>
5496         * symbol-summary.h (get): Make it pure and inline move
5497         functionality from ::get function.
5498         (get): Remove and inline into ::get and ::get_create.
5499         (get_create): Move code from ::get function.
5501 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5503         PR target/85994
5504         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5505         -x assembler-with-cpp.
5507 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5509         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5510         _FILE_OFFSET_BITS=64 for C++.
5512 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5514         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5515         conversion insn that shows up when pr85657-3.c is compiled using
5516         IEEE 128-bit long double.
5517         (neg<mode>2_internal): Use the correct mode to check whether the
5518         mode is IBM extended.
5519         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5520         multiply and divide external functions from being created more
5521         than once.
5523 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5525         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5526         functions.
5527         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5528         the edge can be forwarded.
5529         (cfg_layout_merge_blocks): Likewise.
5531 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5533         * except.c (finish_eh_generation): Commit edge insertions only after
5534         the EH edges have been redirected from post-landing to landing pads.
5536 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5538         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5539         create_tmp_var_for to create the FRAME decl.
5540         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5542 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5544         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5545         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5546         debug statement when resetting its value.
5547         (expand_call_inline): Copy the locus of the call onto the assignment
5548         of the return value, if any.  Use local variable in more cases.
5550 2018-06-21  Martin Liska  <mliska@suse.cz>
5552         * ipa-pure-const.c (propagate_nothrow): Use
5553         funct_state_summaries->get.
5554         (dump_malloc_lattice): Likewise.
5555         (propagate_malloc): Likewise.
5557 2018-06-21  Richard Biener  <rguenther@suse.de>
5559         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5560         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5561         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5562         comment.
5563         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5564         BLOCK_ABSTRACT_ORIGIN unconditionally.
5566 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5568         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5569         deleting it.
5570         * ipa-reference.c (ipa_reference_c_finalize): Delete
5571         ipa_ref_opt_sum_summaries and set it to NULL.
5573 2018-06-21  Tom de Vries  <tdevries@suse.de>
5575         PR tree-optimization/85859
5576         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5577         test with comment from bb_no_side_effects_p.
5579 2018-06-21  Richard Biener  <rguenther@suse.de>
5581         PR tree-optimization/86232
5582         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5583         max for constant niter.
5585 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5587         * config/aarch64/aarch64-simd.md
5588         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5590 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5592         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5593         Make opernads of the unspec commutative.
5595 2018-06-21  Richard Biener  <rguenther@suse.de>
5597         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5598         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5599         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5600         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5601         NULL DR_STEP.
5602         (vect_record_base_alignments): Do not record base alignment
5603         for gathers or scatters.
5604         (vect_compute_data_ref_alignment): Drop return value that is always
5605         true.  Bail out early for gathers or scatters.
5606         (vect_enhance_data_refs_alignment): Bail out early for gathers
5607         or scatters.
5608         (vect_find_same_alignment_drs): Likewise.
5609         (vect_analyze_data_refs_alignment): Remove dead code.
5610         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5611         (vect_analyze_data_refs): For possible gathers or scatters do
5612         not create an alternate DR, just check their possible validity
5613         and mark them.  Adjust DECL_NONALIASED handling to not rely
5614         on DR_BASE_ADDRESS.
5615         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5616         update inits of gathers or scatters.
5617         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5618         Also copy gather/scatter flag to pattern vinfo.
5620 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5622         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5623         behavior of vec_packsu (vector unsigned long long, vector unsigned
5624         long long) to match behavior of vec_packs with same signature.
5626 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5627             Thomas Schwinge <thomas@codesourcery.com>
5628             Cesar Philippidis  <cesar@codesourcery.com>
5630         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5631         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5632         (gimplify_adjust_omp_clauses): Likewise.
5633         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5634         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5635         (gimplify_omp_target_update): Update handling of acc update and
5636         enter/exit data.
5637         * omp-low.c (install_var_field): Remove unused parameter
5638         base_pointers_restrict.
5639         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5640         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5641         FINALIZE}
5642         (omp_target_base_pointers_restrict_p): Delete.
5643         (scan_omp_target): Update call to scan_sharing_clauses.
5644         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5645         FINALIZE}.
5646         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5647         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5648         (convert_local_omp_clauses): Likewise.
5649         * tree-pretty-print.c (dump_omp_clause): Likewise.
5650         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5651         FINALIZE}.
5652         (omp_clause_code_name): Likewise.
5654 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5656         PR debug/86194
5657         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5658         be narrowed.
5660         PR tree-optimization/86231
5661         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5662         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5664 2018-06-20  Tom de Vries  <tdevries@suse.de>
5666         PR tree-optimization/86097
5667         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5668         iv type if signedness of iv type is not the same as that of *nit.
5670 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5672         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5673         EDGE_EH edges, verify they are all EDGE_EH.
5675 2018-06-20  Maya Rashish  <coypu@sdf.org>
5677         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5679 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5681         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5682         * config/aarch64/aarch64.c (xgene1_tunings): Add
5683         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5684         (aarch64_mode_valid_for_sched_fusion_p):
5685         Allow 16-byte modes.
5686         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5687         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5688         128-bit modes.
5689         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5690         New pattern.
5691         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5692         * config/aarch64/iterators.md (VQ2): New mode iterator.
5694 2018-06-20  Martin Liska  <mliska@suse.cz>
5696         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5697         Change default ratio from 10 to 8.
5699 2018-06-20  Martin Liska  <mliska@suse.cz>
5701         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5702         New.
5703         (bit_test_cluster::find_bit_tests): Likewise.
5704         (switch_decision_tree::analyze_switch_statement): Find clusters.
5705         * tree-switch-conversion.h (struct jump_table_cluster): Document
5706         hierarchy.
5708 2018-06-20  Martin Liska  <mliska@suse.cz>
5710         * tree-switch-conversion.c (switch_conversion::collect):
5711         Record m_uniq property.
5712         (switch_conversion::expand): Bail out for special conditions.
5713         (group_cluster::~group_cluster): New.
5714         (group_cluster::group_cluster): Likewise.
5715         (group_cluster::dump): Likewise.
5716         (jump_table_cluster::emit): New.
5717         (switch_decision_tree::fix_phi_operands_for_edges): New.
5718         (struct case_node): Remove struct.
5719         (jump_table_cluster::can_be_handled): New.
5720         (case_values_threshold): Moved to header.
5721         (reset_out_edges_aux): Likewise.
5722         (jump_table_cluster::is_beneficial): New.
5723         (bit_test_cluster::can_be_handled): Likewise.
5724         (add_case_node): Remove.
5725         (bit_test_cluster::is_beneficial): New.
5726         (case_bit_test::cmp): New.
5727         (bit_test_cluster::emit): New.
5728         (expand_switch_as_decision_tree_p): Remove.
5729         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5730         (fix_phi_operands_for_edge): Likewise.
5731         (switch_decision_tree::analyze_switch_statement): New.
5732         (compute_cases_per_edge): Move ...
5733         (switch_decision_tree::compute_cases_per_edge): ... here.
5734         (try_switch_expansion): Likewise.
5735         (switch_decision_tree::try_switch_expansion): Likewise.
5736         (record_phi_operand_mapping): Likewise.
5737         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5738         (emit_case_decision_tree): Likewise.
5739         (switch_decision_tree::emit): Likewise.
5740         (balance_case_nodes): Likewise.
5741         (switch_decision_tree::balance_case_nodes): Likewise.
5742         (dump_case_nodes): Likewise.
5743         (switch_decision_tree::dump_case_nodes): Likewise.
5744         (emit_jump): Likewise.
5745         (switch_decision_tree::emit_jump): Likewise.
5746         (emit_cmp_and_jump_insns): Likewise.
5747         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5748         (emit_case_nodes): Likewise.
5749         (switch_decision_tree::emit_case_nodes): Likewise.
5750         (conditional_probability): Remove.
5751         * tree-switch-conversion.h (enum cluster_type): New.
5752         (PRINT_CASE): New.
5753         (struct cluster): Likewise.
5754         (cluster::cluster): Likewise.
5755         (struct simple_cluster): Likewise.
5756         (simple_cluster::simple_cluster): Likewise.
5757         (struct group_cluster): Likewise.
5758         (struct jump_table_cluster): Likewise.
5759         (struct bit_test_cluster): Likewise.
5760         (struct min_cluster_item): Likewise.
5761         (struct case_tree_node): Likewise.
5762         (case_tree_node::case_tree_node): Likewise.
5763         (jump_table_cluster::case_values_threshold): Likewise.
5764         (struct case_bit_test): Likewise.
5765         (struct switch_decision_tree): Likewise.
5766         (struct switch_conversion): Likewise.
5767         (switch_decision_tree::reset_out_edges_aux): Likewise.
5769 2018-06-20  Martin Liska  <mliska@suse.cz>
5771         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5772         (hoist_edge_and_branch_if_true): Likewise.
5773         (expand_switch_using_bit_tests_p): Likewise.
5774         (struct case_bit_test): Likewise.
5775         (case_bit_test_cmp): Likewise.
5776         (emit_case_bit_tests): Likewise.
5777         (switch_conversion::switch_conversion): New class.
5778         (struct switch_conv_info): Remove old struct.
5779         (collect_switch_conv_info): More to ...
5780         (switch_conversion::collect): ... this.
5781         (check_range): Likewise.
5782         (switch_conversion::check_range): Likewise.
5783         (check_all_empty_except_final): Likewise.
5784         (switch_conversion::check_all_empty_except_final): Likewise.
5785         (check_final_bb): Likewise.
5786         (switch_conversion::check_final_bb): Likewise.
5787         (create_temp_arrays): Likewise.
5788         (switch_conversion::create_temp_arrays): Likewise.
5789         (free_temp_arrays): Likewise.
5790         (gather_default_values): Likewise.
5791         (switch_conversion::gather_default_values): Likewise.
5792         (build_constructors): Likewise.
5793         (switch_conversion::build_constructors): Likewise.
5794         (constructor_contains_same_values_p): Likewise.
5795         (switch_conversion::contains_same_values_p): Likewise.
5796         (array_value_type): Likewise.
5797         (switch_conversion::array_value_type): Likewise.
5798         (build_one_array): Likewise.
5799         (switch_conversion::build_one_array): Likewise.
5800         (build_arrays): Likewise.
5801         (switch_conversion::build_arrays): Likewise.
5802         (gen_def_assigns): Likewise.
5803         (switch_conversion::gen_def_assigns): Likewise.
5804         (prune_bbs): Likewise.
5805         (switch_conversion::prune_bbs): Likewise.
5806         (fix_phi_nodes): Likewise.
5807         (switch_conversion::fix_phi_nodes): Likewise.
5808         (gen_inbound_check): Likewise.
5809         (switch_conversion::gen_inbound_check): Likewise.
5810         (process_switch): Use the newly created class.
5811         (switch_conversion::expand): New.
5812         (switch_conversion::~switch_conversion): New.
5813         * tree-switch-conversion.h: New file.
5815 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5817         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5818         tree-vect-patterns.c.
5819         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5820         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
5821         (vect_recog_sad_pattern): Likewise.
5822         (vect_recog_widen_sum_pattern): Likewise.
5823         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
5824         (vect_recog_widen_shift_pattern): Remove the type_in argument.
5825         (vect_recog_rotate_pattern): Likewise.
5826         (vect_recog_mult_pattern): Likewise.
5827         (vect_recog_vector_vector_shift_pattern): Likewise.
5828         (vect_recog_divmod_pattern): Likewise.
5829         (vect_recog_mixed_size_cond_pattern): Likewise.
5830         (vect_recog_bool_pattern): Likewise.
5831         (vect_recog_mask_conversion_pattern): Likewise.
5832         (vect_try_gather_scatter_pattern): Likewise.
5833         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
5834         (vect_recog_over_widening_pattern): Likewise.
5835         (vect_recog_gather_scatter_pattern): Likewise.
5836         (vect_recog_func_ptr): Move from tree-vectorizer.h
5837         (vect_vect_recog_func_ptrs): Move further down the file.
5838         (vect_recog_func): Likewise.  Remove the third argument.
5839         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5840         (vect_pattern_recog_1): Expect the pattern function to do any
5841         necessary target tests.  Also expect it to provide a vector type.
5842         Remove the type_in handling.
5844 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5846         * tree-vect-patterns.c (vect_pattern_detected): New function.
5847         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5848         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5849         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5850         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5851         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5852         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5853         (vect_recog_mask_conversion_pattern)
5854         (vect_try_gather_scatter_pattern): Likewise.
5856 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5858         * tree-vect-patterns.c (vect_get_internal_def): New function.
5859         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5860         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5861         (search_type_for_mask_1): Use it.
5863 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5865         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5866         redundant WIDEN_SUM_EXPR handling.
5867         (vect_recog_sad_pattern): Likewise.
5869 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5871         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5872         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5873         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5874         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5875         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5877 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5879         * tree-vect-stmts.c (vectorizable_call): Make sure that we
5880         use the stmt_vec_info of the original bb statement for the
5881         new zero assignment, even if the call is part of a pattern.
5883 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5885         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5886         that the sequence is attached to the original statement rather
5887         than the pattern statement.
5888         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5889         PATTERN_DEF_SEQ from the original statement rather than
5890         the main pattern statement.
5891         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5892         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5893         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5895 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5897         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5898         definition statements before the early exit for statements that aren't
5899         live or relevant.
5900         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5901         split out from...
5902         (vect_transform_loop): ...here.  Process pattern definition
5903         statements without first checking whether the main pattern
5904         statement is live or relevant.
5906 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5908         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5909         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5911 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
5913         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5914         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5915         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5916         (expand_block_compare): Change select_block_compare_mode call.
5917         (expand_strncmp_align_check): Use new functions, fix comment.
5918         (emit_final_str_compare_gpr): New function.
5919         (expand_strn_compare): Refactor and clean up code.
5920         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5922 2018-06-19  Tony Reix  <tony.reix@atos.com>
5923             Damien Bergamini  <damien.bergamini@atos.com>
5924             David Edelsohn  <dje.gcc@gmail.com>
5926         * collect2.c (static_obj): New variable.
5927         (static_libs): New variable.
5928         (is_in_list): Uncomment declaration.
5929         (main): Track AIX libraries linked statically.
5930         (is_in_list): Uncomment definition.
5931         (scan_prog_file): Don't add AIX shared libraries initializer
5932         to constructor list if linking statically.
5934 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
5936         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5937         constant.
5938         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5940 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
5942         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5943         blocks.
5945 2018-06-19  Martin Liska  <mliska@suse.cz>
5947         * config/i386/i386.c (ix86_can_inline_p): Do not use
5948         ipa_fn_summaries::get_create.
5949         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5950         get.
5951         (devirtualization_time_bonus): Likewise.
5952         (ipcp_propagate_stage): Likewise.
5953         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5954         (edge_set_predicate): Likewise.
5955         (evaluate_conditions_for_known_args): Likewise.
5956         (evaluate_properties_for_edge): Likewise.
5957         (ipa_call_summary::reset): Tranform to ...
5958         (ipa_call_summary::~ipa_call_summary): ... this.
5959         (ipa_fn_summary::reset): Transform to ...
5960         (ipa_fn_summary::~ipa_fn_summary): ... this.
5961         (ipa_fn_summary_t::remove): Rename to ...
5962         (ipa_fn_summary_t::remove_callees): ... this.
5963         (ipa_fn_summary_t::duplicate): Use placement new
5964         instead of memory copy.
5965         (ipa_call_summary_t::duplicate): Likewise.
5966         (ipa_call_summary_t::remove): Remove.
5967         (dump_ipa_call_summary): Change get_create to get.
5968         (ipa_dump_fn_summary): Dump only when summary exists.
5969         (analyze_function_body): Use symbol_summary::get instead
5970         of get_create.
5971         (compute_fn_summary): Likewise.
5972         (estimate_edge_devirt_benefit): Likewise.
5973         (estimate_edge_size_and_time): Likewise.
5974         (inline_update_callee_summaries): Likewise.
5975         (remap_edge_change_prob): Likewise.
5976         (remap_edge_summaries): Likewise.
5977         (ipa_merge_fn_summary_after_inlining): Likewise.
5978         (write_ipa_call_summary): Likewise.
5979         (ipa_fn_summary_write): Likewise.
5980         (ipa_free_fn_summary): Likewise.
5981         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5982         (struct ipa_call_summary): Likewise.
5983         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5984         of get_create.
5985         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5986         (estimate_size_after_inlining): Likewise.
5987         (estimate_growth): Likewise.
5988         (growth_likely_positive): Likewise.
5989         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5990         (inline_call): Likewise.
5991         * ipa-inline.c (caller_growth_limits): Likewise.
5992         (can_inline_edge_p): Likewise.
5993         (can_inline_edge_by_limits_p): Likewise.
5994         (compute_uninlined_call_time): Likewise.
5995         (compute_inlined_call_time): Likewise.
5996         (want_inline_small_function_p): Likewise.
5997         (edge_badness): Likewise.
5998         (update_caller_keys): Likewise.
5999         (update_callee_keys): Likewise.
6000         (inline_small_functions): Likewise.
6001         (inline_to_all_callers_1): Likewise.
6002         (dump_overall_stats): Likewise.
6003         (early_inline_small_functions): Likewise.
6004         (early_inliner): Likewise.
6005         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6006         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6007         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6008         * ipa-split.c (execute_split_functions): Likewise.
6009         * symbol-summary.h: Likewise.
6010         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6012 2018-06-19  Richard Biener  <rguenther@suse.de>
6014         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6015         (vectorize_loops): ... here.  Fix dbgcnt handling.
6016         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6018 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6020         PR target/86197
6021         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6022         ieee128 argument takes up only one (vector) register, not two (floating
6023         point) registers.
6025 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6027         * gimplify.c (gimplify_init_constructor): Really never clear for an
6028         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6030 2018-06-19  Richard Biener  <rguenther@suse.de>
6032         PR tree-optimization/86179
6033         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6034         after failed recognition.
6036 2018-06-18  Martin Sebor  <msebor@redhat.com>
6038         PR middle-end/85602
6039         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6040         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6041         Handle integer subtraction.
6042         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6043         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6045 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6047         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6048         param from rtx to rtx_insn *.
6049         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6050         param.
6051         (frv_ifcvt_modify_insn): Likwise.
6052         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6053         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6054         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6055         as_a <rtx_insn *> cast to local "unprotected_region" once
6056         it's been established that it's not NULL or pc_rtx.
6057         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6058         param "sethi" from rtx to rtx_insn *.
6059         (nds32_group_float_insns): Likewise for param "insn".
6060         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6061         param.
6062         (vax_output_int_subtract): Likewise.
6063         * config/vax/vax.c (vax_output_int_add): Likewise for param
6064         "insn".
6065         (vax_output_int_subtract): Likewise.
6066         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6067         (emit_pattern_after): Likewise for param "after".
6068         (emit_insn_after): Likewise.
6069         (emit_jump_insn_after): Likewise.
6070         (emit_call_insn_after): Likewise.
6071         (emit_debug_insn_after): Likewise.
6072         (emit_pattern_before): Likewise for param "before".
6073         (emit_insn_before): Likewise.
6074         (emit_jump_insn_before): Likewise.
6075         * final.c (get_insn_template): Likewise for param "insn", removing
6076         a cast.
6077         * output.h (get_insn_template): Likewise for 2nd param.
6078         * rtl.h (emit_insn_before): Likewise.
6079         (emit_jump_insn_before): Likewise.
6080         (emit_debug_insn_before_noloc): Likewise.
6081         (emit_insn_after): Likewise.
6082         (emit_jump_insn_after): Likewise.
6083         (emit_call_insn_after): Likewise.
6084         (emit_debug_insn_after): Likewise.
6085         (set_insn_deleted): Likewise for param.
6087 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6089         PR target/85358
6090         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6091         floating point modes, so that IFmode is numerically greater than
6092         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6093         to declare the ordering.  This prevents IFmode from being
6094         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6095         machine.  Include rs6000-modes.h to share the fractional values
6096         between genmodes* and the rest of the compiler.
6097         (IFmode): Likewise.
6098         (KFmode): Likewise.
6099         (TFmode): Likewise.
6100         * config/rs6000/rs6000-modes.h: New file.
6101         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6102         meaning of rs6000_long_double_size so that 126..128 selects an
6103         appropriate 128-bit floating point type.
6104         (rs6000_option_override_internal): Likewise.
6105         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6106         (TARGET_LONG_DOUBLE_128): Change the meaning of
6107         rs6000_long_double_size so that 126..128 selects an appropriate
6108         128-bit floating point type.
6109         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6110         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6111         source and destination to match the standard usage.
6112         (truncifkf2): Likewise.
6113         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6114         ISA 2.07 to use an explicit clobber, instead of passing in a
6115         temporary.
6116         (copysign<mode>3_soft): Likewise.
6118 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6120         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6121         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6122         (vect_slp_analyze_instance_dependence): Likewise.
6123         (vect_enhance_data_refs_alignment): Likewise.
6124         (vect_analyze_data_refs_alignment): Likewise.
6125         (vect_slp_analyze_and_verify_instance_alignment
6126         (vect_analyze_data_ref_accesses): Likewise.
6127         (vect_prune_runtime_alias_test_list): Likewise.
6128         (vect_analyze_data_refs): Likewise.
6129         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6130         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6131         (vect_analyze_scalar_cycles_1): Likewise.
6132         (vect_get_loop_niters): Likewise.
6133         (vect_analyze_loop_form_1): Likewise.
6134         (vect_update_vf_for_slp): Likewise.
6135         (vect_analyze_loop_operations): Likewise.
6136         (vect_analyze_loop): Likewise.
6137         (vectorizable_induction): Likewise.
6138         (vect_transform_loop): Likewise.
6139         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6140         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6141         (vect_make_slp_decision): Likewise.
6142         (vect_detect_hybrid_slp): Likewise.
6143         (vect_slp_analyze_operations): Likewise.
6144         (vect_slp_bb): Likewise.
6145         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6146         (vectorizable_bswap): Likewise.
6147         (vectorizable_call): Likewise.
6148         (vectorizable_simd_clone_call): Likewise.
6149         (vectorizable_conversion): Likewise.
6150         (vectorizable_assignment): Likewise.
6151         (vectorizable_shift): Likewise.
6152         (vectorizable_operation): Likewise.
6153         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6155 2018-06-18  Martin Sebor  <msebor@redhat.com>
6157         PR tree-optimization/81384
6158         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6159         * builtins.c (expand_builtin_strnlen): New function.
6160         (expand_builtin): Call it.
6161         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6162         * builtins.def (BUILT_IN_STRNLEN): New.
6163         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6164         Warn for bounds in excess of maximum object size.
6165         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6166         single-value ranges.  Handle strnlen.
6167         (handle_builtin_strlen): Handle strnlen.
6168         (strlen_check_and_optimize_stmt): Same.
6169         * doc/extend.texi (Other Builtins): Document strnlen.
6171 2018-06-18  Maya Rashish  <coypu@sdf.org>
6173         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6174         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6175         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6177         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6178         here to ...
6179         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6181 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6183         * tree.c (escaped_string::escape): Replace cast to char * by
6184         const_cast<char *> (unescaped).
6186 2018-06-18  Nick Clifton  <nickc@redhat.com>
6188         PR 84195
6189         * tree.c (escaped_string): New class.  Converts an unescaped
6190         string into its escaped equivalent.
6191         (warn_deprecated_use): Use the new class to convert the
6192         deprecation message, if present.
6193         (test_escaped_strings): New self test.
6194         (test_c_tests): Add test_escaped_strings.
6195         * doc/extend.texi (deprecated): Add a note that the
6196         deprecation message is affected by the -fmessage-length
6197         option, and that control characters will be escaped.
6198         (#pragma GCC error): Document this pragma.
6199         (#pragma GCC warning): Likewise.
6200         * doc/invoke.texi (-fmessage-length): Document this option's
6201         effect on the #warning and #error preprocessor directives and
6202         the deprecated attribute.
6204 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6206         * tree.c (decl_value_expr_lookup): Revert latest change.
6207         (decl_value_expr_insert): Likewise.
6209 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6211         * gimplify.c (nonlocal_vlas): Delete.
6212         (nonlocal_vla_vars): Likewise.
6213         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6214         referenced VLAs.
6215         (gimplify_body): Do not create and destroy nonlocal_vlas.
6216         * tree-nested.c: Include diagnostic.h.
6217         (use_pointer_in_frame): Tweak.
6218         (lookup_field_for_decl): Add assertion and declare the transformation.
6219         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6220         internal error when the reference is in a wrong context.  Do not
6221         create a debug decl by default.
6222         (note_nonlocal_block_vlas): Delete.
6223         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6224         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6225         create a debug decl by default.
6226         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6227         call is in a wrong context.
6228         (fixup_vla_decls): New function.
6229         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6230         debug variables were created.
6231         * tree.c (decl_value_expr_lookup): Add checking assertion.
6232         (decl_value_expr_insert): Likewise.
6234 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6236         PR middle-end/82479
6237         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6238         * tree-scalar-evolution.c (interpret_expr): Likewise.
6239         (expression_expensive_p): Likewise.
6240         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6241         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6242         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6243         (ssa_defined_by_minus_one_stmt_p): New.
6245 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6247         PR middle-end/64946
6248         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6249         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6250         * dojump.c (do_jump): Likewise.
6251         * expr.c (expand_expr_real_2): Check operand type's sign.
6252         * fold-const.c (const_unop): Handle ABSU_EXPR.
6253         (fold_abs_const): Likewise.
6254         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6255         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6256         (strip_sign_op_1): Likesise.
6257         * match.pd: Add new pattern to generate ABSU_EXPR.
6258         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6259         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6260         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6261         * tree-inline.c (estimate_operator_cost): Likewise.
6262         * tree-pretty-print.c (dump_generic_node): Likewise.
6263         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6264         * tree.def (ABSU_EXPR): New.
6266 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6268         PR middle-end/86095
6269         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6270         documented as preserved for backward compatibility only.
6271         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6273         PR rtl-optimization/86108
6274         * bb-reorder.c (create_forwarder_block): Renamed to ...
6275         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6276         jump from new landing pad to the second part.
6277         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6278         Adjust callers.
6280 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6282         PR middle-end/85878
6283         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6284         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6285         Only call store_expr for halves if the mode is the same.
6287         PR middle-end/86123
6288         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6289         Fix up comment formatting.
6291 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6293         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6294         (typed_splay_tree::closure,
6295         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6296         (typed_splay_tree::typed_splay_tree,
6297         typed_splay_tree::operator =): Declared private.
6298         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6299         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6300         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6301         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6302         typed_splay_tree::splay_tree_splay,
6303         typed_splay_tree::splay_tree_foreach_helper,
6304         typed_splay_tree::splay_tree_insert,
6305         typed_splay_tree::splay_tree_remove,
6306         typed_splay_tree::splay_tree_lookup,
6307         typed_splay_tree::splay_tree_predecessor,
6308         typed_splay_tree::splay_tree_successor,
6309         typed_splay_tree::splay_tree_min,
6310         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6311         (typed_splay_tree::root, typed_splay_tree::comp,
6312         typed_splay_tree::delete_key,
6313         typed_splay_tree::delete_value): New data members.
6314         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6315         typed_splay_tree::remove.
6317 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6319         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6320         -mginv and -mno-ginv to the assembler.
6321         * config/mips/mips.opt (-mcrc): New option.
6322         (-mginv): Likewise.
6323         * doc/invoke.text (-mcrc): Document.
6324         (-mginv): Likewise.
6326 2018-06-15  Nick Clifton  <nickc@redhat.com>
6328         PR 84195
6329         * tree.c (escaped_string): New class.  Converts an unescaped
6330         string into its escaped equivalent.
6331         (warn_deprecated_use): Use the new class to convert the
6332         deprecation message, if present.
6333         (test_escaped_strings): New self test.
6334         (test_c_tests): Add test_escaped_strings.
6335         * doc/extend.texi (deprecated): Add a note that the
6336         deprecation message is affected by the -fmessage-length
6337         option, and that control characters will be escaped.
6338         (#pragma GCC error): Document this pragma.
6339         (#pragma GCC warning): Likewise.
6340         * doc/invoke.texi (-fmessage-length): Document this option's
6341         effect on the #warning and #error preprocessor directives and
6342         the deprecated attribute.
6344 2018-06-15  Richard Biener  <rguenther@suse.de>
6346         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6347         here, also noting vector size used.
6348         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6349         size used in MSG_OPTIMIZED_LOCATIONS dump.
6350         (pass_slp_vectorize::execute): Adjust.
6352 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6354         PR target/85968
6355         * config/arc/arc.c (arc_return_address_register): Fix
6356         if-condition.
6358 2018-06-15  Richard Biener  <rguenther@suse.de>
6360         PR middle-end/86159
6361         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6362         leave useless conversion stripping to force_gimple_operand_gsi.
6363         (gimplify_build2): Likewise.
6364         (gimplify_build1): Likewise.
6366 2018-06-15  Richard Biener  <rguenther@suse.de>
6368         PR middle-end/86076
6369         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6370         before adjusting their block.
6372 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6374         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6375         multilibs for *-*-rtems*.
6376         * config/riscv/t-rtems: New file.
6378 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6380         PR middle-end/86122
6381         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6382         unsigned_type_for returns NULL.
6384         PR target/85945
6385         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6386         subregs of multi-word pseudos unless the float mode has word size.
6388 2018-06-14  Richard Biener  <rguenther@suse.de>
6390         PR middle-end/86139
6391         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6392         duplicate and harmful type_hash_canon.
6393         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6395 2018-06-14  Richard Biener  <rguenther@suse.de>
6397         PR ipa/86124
6398         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6399         NULL cgraph_node.
6401 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6403         * config/rtems.h (STDINT_LONG32): Define.
6405 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6406             Prachi Godbole  <prachi.godbole@imgtec.com>
6408         * config/mips/mips-cpus.def: Define P6600.
6409         * config/mips/mips-tables.opt: Regenerate.
6410         * config/mips/mips.c (mips_ucbranch_type): New enum.
6411         (mips_rtx_cost_data): Add support for P6600.
6412         (mips_issue_rate): Likewise.
6413         (mips_multipass_dfa_lookahead): Likewise.
6414         (mips_avoid_hazard): Likewise.
6415         (mips_reorg_process_insns): Likewise.
6416         (mips_classify_branch_p6600): New function.
6417         * config/mips/mips.h (TUNE_P6600): New define.
6418         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6419         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6420         * config/mips/mips.md: Include p6600.md.
6421         (processor): Add p6600.
6422         * config/mips/p6600.md: New file.
6423         * doc/invoke.texi: Add p6600 to supported architectures.
6425 2018-06-13  Martin Sebor  <msebor@redhat.com>
6427         PR tree-optimization/86114
6428         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6429         of integer types.
6430         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6432 2018-06-13  Richard Biener  <rguenther@suse.de>
6434         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6435         Properly set vector type of the intermediate stmt.
6436         * tree-vect-stmts.c (vectorizable_operation): The destination
6437         var always has vectype_out type.
6439 2018-06-13  Jeff Law  <law@redhat.com>
6441         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6442         integer 0 for argument to print_rtl_with_bb.
6443         (rl78_reorg): Likewise.
6445 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6447         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6448         from rtx to rtx_insn *.
6449         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6450         "label".
6451         (add_sched_insns_for_speculation): Likewise for local "target",
6452         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6453         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6454         from rtx_insn ** to rtx_code_label **.
6455         (reorg_emit_nops): Likewise.
6456         (c6x_reorg): Likewise for local "call_labels".
6457         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6458         rtx to rtx_insn *.
6459         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6460         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6461         the loops over LABEL_REFS.
6462         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6463         braf_label.
6464         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6465         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6466         (split_branches): Strengthen local "olabel" from rtx to
6467         rtx_insn *, adding a safe_as_a cast.
6468         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6469         to "rtx_insn *".
6470         (add_insn_after): Likewise for first two params.
6471         (add_insn_before): Likewise.
6472         (remove_insn): Likewise for param.
6473         (emit_pattern_before_noloc): Likewise for second and third params.
6474         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6475         (emit_call_insn_before_noloc): Likewise.
6476         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6477         to "rtx_insn *".
6478         (emit_barrier_before): Likewise.
6479         (emit_label_before): Strengthen "label" param from "rtx" to
6480         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6481         "rtx_insn *".
6482         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6483         "rtx_insn *".
6484         (emit_pattern_after_noloc): Likewise.
6485         (emit_insn_after_noloc): Likewise.
6486         (emit_jump_insn_after_noloc): Likewise.
6487         (emit_call_insn_after_noloc): Likewise.
6488         (emit_debug_insn_after_noloc): Likewise.
6489         (emit_barrier_after): Likewise.
6490         (emit_label_after): Likewise for both params.
6491         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6492         "loc" param from "int" to "location_t".
6493         (emit_insn_after_setloc): Likewise.
6494         (emit_jump_insn_after_setloc): Likewise.
6495         (emit_call_insn_after_setloc): Likewise.
6496         (emit_debug_insn_after_setloc): Likewise.
6497         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6498         "loc" param from "int" to "location_t".
6499         (emit_pattern_before): Convert NULL_RTX to NULL.
6500         (emit_insn_before_setloc): Convert "loc" param from "int" to
6501         "location_t".
6502         (emit_jump_insn_before_setloc): Likewise.
6503         (emit_call_insn_before_setloc): Likewise.
6504         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6505         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6506         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6507         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6508         Convert 3rd param from "int" to "location_t".
6509         (emit_barrier_before, emit_barrier_after, next_real_insn):
6510         Strengthen param from rtx to rtx_insn *.
6511         (emit_label_before): Strengthen 1st param from "rtx" to
6512         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6513         "rtx_insn *".
6514         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6515         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6516         Strengthen 2nd param from "rtx" to "rtx_insn *".
6517         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6518         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6519         Likewise. Convert 3rd param from "int" to "location_t".
6520         (emit_label_after): Strengthen 1st param from "rtx" to
6521         "rtx_code_label *".
6522         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6523         "rtx_insn *".
6524         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6525         from "rtx" to "rtx_insn *".
6527 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6529         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6530         bodies streamed in with -Q.
6531         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6532         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6533         * gimple-streamer-out.c: Include gimple-pretty-print.h
6534         (output_bb): Dump stmts streamed.
6535         * lto-section-out.c: Include print-tree.h
6536         (lto_begin_section): Dump sections created.
6537         (lto_output_decl_index): Dump decl encoded.
6538         * lto-streamer-out.c: Include print-tree.h
6539         (create_output_block): Dump output block created.
6540         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6541         (output_function): Dump function output.
6542         (output_constructor): Dump constructor streamed.
6543         (write_global_stream): Output indexes encoded.
6544         (produce_asm_for_decls): Dump streams encoded.
6545         * lto-streamer.c (streamer_dump_file): New global var.
6546         * lto-streamer.h (streamer_dump_file): Declare.
6547         * passes.c (ipa_write_summaries): Initialize streamer dump.
6548         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6549         in.
6551 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6553         PR target/86048
6554         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6555         offsets for register save directives.  Emit a second batch of save
6556         directives, if need be, when the function accesses prior frames.
6558 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6560         * config/arc/fpu.md (fmasf4): Force operand to register.
6561         (fnmasf4): Likewise.
6563 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6565         * config/arc/arc-protos.h (arc_pad_return): Remove.
6566         * config/arc/arc.c (machine_function): Remove force_short_suffix
6567         and size_reason.
6568         (arc_print_operand): Adjust printing of '&'.
6569         (arc_verify_short): Remove conditional printing of short suffix.
6570         (arc_final_prescan_insn): Remove reference to size_reason.
6571         (pad_return): New function.
6572         (arc_reorg): Call pad_return.
6573         (arc_pad_return): Remove.
6574         (arc_init_machine_status): Remove reference to force_short_suffix.
6575         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6576         (attr length): When attribute iscompact is true force to 2
6577         regardless; in the case of maybe check if we want to force the
6578         instruction to have 4 bytes length.
6579         (nopv): Change it to generate 4 byte long nop as well.
6580         (blockage): New pattern.
6581         (simple_return): Remove call to arc_pad_return.
6582         (p_return_i): Likewise.
6584 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6586         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6588 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6590         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6591         ARC cores.
6593 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6595         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6596         for ARC700 and ARCv2.
6598 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6600         PR target/86076
6601         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6602         operands[2] instead of operands[1].
6605 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6607         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6608         case, check whether the outer register overlaps an unallocatable
6609         register, not just whether it fits the required class.
6611 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6613         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6614         are poly_ints.
6615         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6616         (memrefs_conflict_p): Likewise.
6617         (init_alias_analysis): Likewise.
6618         * cfgexpand.c (expand_debug_expr): Likewise.
6619         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6620         * cse.c (fold_rtx): Likewise.
6621         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6622         * expr.c (emit_block_move_hints): Likewise.
6623         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6624         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6625         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6626         (emit_group_store): Likewise.
6627         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6628         to read the PRE/POST_MODIFY increment.
6629         * calls.c (store_one_arg): Use strip_offset.
6630         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6631         poly_int_rtx_p.
6632         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6633         by a VEC_SELECT.
6634         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6635         (simplify_binary_operation_1): Extend CONST_INT handling to
6636         poly_int_rtx_p.
6637         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6638         than a HOST_WIDE_INT.
6639         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6640         poly_int64.
6641         (adjust_mems, add_stores): Update accodingly.
6642         (vt_canonicalize_addr): Track polynomial offsets.
6643         (emit_note_insn_var_location): Likewise.
6644         (vt_add_function_parameter): Likewise.
6645         (vt_initialize): Likewise.
6647 2018-06-12  Jeff Law  <law@redhat.com>
6649         * config.gcc (alpha*-*-freebsd*): Remove.
6650         * config/alpha/freebsd.h: Remove.
6652 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6654         PR other/69968
6655         * spellcheck-tree.c (levenshtein_distance): Rename to...
6656         (get_edit_distance): ...this, and update for underlying renaming.
6657         * spellcheck-tree.h (levenshtein_distance): Rename to...
6658         (get_edit_distance): ...this.
6659         * spellcheck.c (levenshtein_distance): Rename to...
6660         (get_edit_distance): ...this.  Convert from Levenshtein distance
6661         to Damerau-Levenshtein distance by supporting transpositions of
6662         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6663         "v_one_ago".
6664         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6665         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6666         update for underlying renaming.
6667         (selftest::levenshtein_distance_unit_test): Rename to...
6668         (selftest::test_get_edit_distance_unit): ...this, and update for
6669         underlying renaming.
6670         (selftest::test_find_closest_string): Add example from PR 69968
6671         where transposition helps
6672         (selftest::test_metric_conditions): Update for renaming.
6673         (selftest::test_metric_conditions): Likewise.
6674         (selftest::spellcheck_c_tests): Likewise.
6675         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6676         (get_edit_distance): ...this.
6677         (best_match::consider): Update for renaming.
6679 2018-06-12  Martin Sebor  <msebor@redhat.com>
6681         PR tree-optimization/85259
6682         * builtins.c (compute_objsize): Handle constant offsets.
6683         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6684         true iff a warning has been issued.
6685         * gimple.h (gimple_nonartificial_location): New function.
6686         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6687         gimple_nonartificial_location and handle -Wno-system-headers.
6688         (handle_builtin_stxncpy): Same.
6690 2018-06-12  Martin Sebor  <msebor@redhat.com>
6692         PR c/85931
6693         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6695 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6697         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6698         BUILTIN_VEC_XST entries for pointer to double and long long.
6700 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6702         PR target/85990
6703         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6704         Update comments.
6705         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6706         Likewise.
6708 2018-06-12  Martin Liska  <mliska@suse.cz>
6710         * doc/options.texi: Document IntegerRange.
6712 2018-06-12  Martin Liska  <mliska@suse.cz>
6714         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6715         * opt-functions.awk: Handle Deprecated flag.
6716         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6717         and report error.
6718         (read_cmdline_option): Report warning for a deprecated option.
6719         * opts.h (struct cl_option): Add new field cl_deprecated.
6720         (CL_ERR_DEPRECATED): New.
6722 2018-06-12  Martin Liska  <mliska@suse.cz>
6724         * doc/options.texi: Document Deprecated option flag.
6726 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6728         * config/arc/arc-arch.h (arc_extras): New enum.
6729         (arc_cpu_t):Add field extra.
6730         (arc_cpu_types): Consider the extras.
6731         * config/arc/arc-cpus.def: Add extras info.
6732         * config/arc/arc-opts.h (processor_type): Consider extra field.
6733         * config/arc/arc.c (arc_override_options): Handle extra field.
6735 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6737         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6738         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6739         field.
6740         * config/arc/arc.c (arc_init): Update pic warning.
6741         (irq_range): Update irq range parsing warnings.
6742         (arc_override_options): Update various warning messages.
6743         (arc_handle_aux_attribute): Likewise.
6745 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6747         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6749 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6751         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6752         compiler messages directives.
6754 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6756         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6757         * config/mips/mips-tables.opt: Regenerate.
6758         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6759         mips64r6.
6760         * doc/invoke.texi: Document -march=i6500.
6762 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6764         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6765         (i6400_gpmul): Add cpu_unit.
6766         (i6400_gpdiv): Likewise.
6767         (i6400_msa_add_d): Update reservations.
6768         (i6400_msa_int_add) Likewise.
6769         (i6400_msa_short_logic3) Likewise.
6770         (i6400_msa_short_logic2) Likewise.
6771         (i6400_msa_short_logic) Likewise.
6772         (i6400_msa_move) Likewise.
6773         (i6400_msa_cmp) Likewise.
6774         (i6400_msa_short_float2) Likewise.
6775         (i6400_msa_div_d) Likewise.
6776         (i6400_msa_long_logic1) Likewise.
6777         (i6400_msa_long_logic2) Likewise.
6778         (i6400_msa_mult) Likewise.
6779         (i6400_msa_long_float2) Likewise.
6780         (i6400_msa_long_float4) Likewise.
6781         (i6400_msa_long_float5) Likewise.
6782         (i6400_msa_long_float8) Likewise.
6783         (i6400_fpu_fadd): Include frint type.
6784         (i6400_fpu_store): New define_insn_reservation.
6785         (i6400_fpu_load): Likewise.
6786         (i6400_fpu_move): Likewise.
6787         (i6400_fpu_fcmp): Likewise.
6788         (i6400_fpu_fmadd): Likewise.
6789         (i6400_int_mult): Include imul3nc type and update reservation.
6790         (i6400_int_div): Include idiv3 type and update reservation.
6791         (i6400_int_load): Update to check type not move_type.
6792         (i6400_int_store): Likewise.
6793         (i6400_int_prefetch): Set zero latency.
6795 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6797         * gcc.c: Document new %@{...} sequence.
6798         (LINK_COMMAND_SPEC): Use it for the -L switches.
6799         (cpp_unique_options): Use it for the -I switches.
6800         (at_file_argbuf): New global variable.
6801         (in_at_file): Likewise.
6802         (alloc_args): Create at_file_argbuf.
6803         (clear_args): Truncate at_file_argbuf.
6804         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6805         (open_at_file): New function.
6806         (close_at_file): Likewise.
6807         (create_at_file): Delete.
6808         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6809         <'o'>: Likewise.
6810         <'@'>: New case.
6811         (validate_switches_from_spec): Deal with %@{...} sequence.
6812         (validate_switches): Likewise.
6813         (driver::finalize): Call clear_args.
6815 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
6817         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6819 2018-06-11  Martin Sebor  <msebor@redhat.com>
6821         * doc/invoke.texi (-Wall): List -Wc++17-compat.
6822         (Wno-class-memaccess): Add @opindex.
6823         (Wno-templates, Wno-multiple-inheritance): Same.
6824         (Wno-virtual-inheritance, Wno-namespaces): Same.
6825         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6826         (Wno-format-overflow, Wno-format-truncation): Same.
6827         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6828         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6829         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6830         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6831         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6832         (Wno-misspelled-isr): Same.
6834 2018-06-11  Martin Sebor  <msebor@redhat.com>
6836         * PR tree-optimization/86083
6837         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6839 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6841         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6843 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
6845         PR target/85755
6846         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6847         on the correct operand.
6848         (*movdi_internal64): Ditto.
6850 2018-06-11  Martin Liska  <mliska@suse.cz>
6852         PR tree-optimization/86089
6853         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6855 2018-06-11  Julia Koval  <julia.koval@intel.com>
6857         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6858         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6859         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6861 2018-06-11  Olivier Hainque  <hainque@adacore.com>
6863         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6864         for Ada with strict dwarf2.
6866 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
6868         PR target/85755
6869         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6870         addresses.
6872 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
6874         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6876 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
6878         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6879         TARGET_ELF.
6881 2018-06-08  Martin Liska  <mliska@suse.cz>
6883         * tree-cfg.h (debug_function): Fix argument type to match
6884         implementation.
6886 2018-06-08  Martin Liska  <mliska@suse.cz>
6888         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6889         Remove usage of MPX-related (and removed) fields.
6890         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6892 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
6894         * cfg.c (debug): Use TDF_NONE rather than 0.
6895         * cfghooks.c (debug): Likewise.
6896         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6897         (struct dump_option_value_info): Convert to...
6898         (struct kv_pair): ...this template type.
6899         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6900         rather than 0.
6901         (optinfo_verbosity_options): Likewise.
6902         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6903         OPTGROUP_NONE.
6904         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6905         than int for "optgroup_flags" param.
6906         (dump_generic_expr_loc): Use dump_flags_t rather than int for
6907         "dump_kind" param.
6908         (dump_dec): Likewise.
6909         (dump_finish): Use TDF_NONE rather than 0.
6910         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6911         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
6912         than 0.  Update for change to option_ptr.
6913         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6914         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
6915         0.  Update for changes to optinfo_verbosity_options and
6916         optgroup_options.
6917         (opt_info_switch_p): Convert optgroup_flags from int to
6918         optgroup_flags_t.
6919         (dump_basic_block): Use dump_flags_t rather than int
6920         for "dump_kind" param.
6921         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6922         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6923         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6924         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6925         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6926         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6927         TDF_NONE): Convert from macros to...
6928         (enum dump_flag): ...this new enum.
6929         (dump_flags_t): Update to use enum.
6930         (operator|, operator&, operator~, operator|=, operator&=):
6931         Implement for dump_flags_t.
6932         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6933         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6934         Convert from macros to...
6935         (enum optgroup_flag): ...this new enum.
6936         (optgroup_flags_t): New typedef.
6937         (operator|, operator|=): Implement for optgroup_flags_t.
6938         (struct dump_file_info): Convert field "alt_flags" to
6939         dump_flags_t.  Convert field "optgroup_flags" to
6940         optgroup_flags_t.
6941         (dump_basic_block): Use dump_flags_t rather than int for param.
6942         (dump_generic_expr_loc): Likewise.
6943         (dump_dec): Likewise.
6944         (dump_register): Convert param "optgroup_flags" to
6945         optgroup_flags_t.
6946         (opt_info_enable_passes): Likewise.
6947         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6948         than 0.
6949         * gimple-pretty-print.c (debug): Likewise.
6950         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6951         (merged_store_group::apply_stores): Likewise.
6952         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6953         * gimple.c (verify_gimple_pp): Likewise.
6954         * graphite-poly.c (print_pbb_body): Likewise.
6955         * passes.c (pass_manager::register_one_dump_file): Convert
6956         local "optgroup_flags" to optgroup_flags_t.
6957         * print-tree.c (print_node): Use TDF_NONE rather than 0.
6958         (debug): Likewise.
6959         (debug_body): Likewise.
6960         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6961         to optgroup_flags_t.
6962         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6963         than 0.
6964         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6965         (convert_mult_to_fma): Likewise.
6966         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6967         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6968         * tree-vect-data-refs.c (dump_lower_bound): Convert param
6969         "dump_kind" to dump_flags_t.
6971 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6973         * config/rs6000/rs6000.c (min, max): Delete.
6975 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6977         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6978         -mabi=spe and -mabi=no-spe.
6980 2018-06-08  Martin Liska  <mliska@suse.cz>
6982         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6983         where we expect an existing summary.
6985 2018-06-08  Martin Liska  <mliska@suse.cz>
6987         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6988         * ipa-inline.h (estimate_edge_growth): Likewise.
6990 2018-06-08  Martin Liska  <mliska@suse.cz>
6992         * cgraph.c (function_version_hasher::hash): Use
6993         cgraph_node::get_uid ().
6994         (function_version_hasher::equal):
6995         * cgraph.h (cgraph_node::get_uid): New method.
6996         * ipa-inline.c (update_caller_keys): Use
6997         cgraph_node::get_uid ().
6998         (update_callee_keys): Likewise.
6999         * ipa-utils.c (searchc): Likewise.
7000         (ipa_reduced_postorder): Likewise.
7001         * lto-cgraph.c (input_node): Likewise.
7002         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7003         * symbol-summary.h (symtab_insertion): Likewise.
7004         (symtab_removal): Likewise.
7005         (symtab_duplication): Likewise.
7006         * tree-pretty-print.c (dump_function_header): Likewise.
7007         * tree-sra.c (convert_callers_for_node): Likewise.
7009 2018-06-08  Martin Liska  <mliska@suse.cz>
7011         * cgraph.c (symbol_table::create_edge): Always assign a new
7012         unique number.
7013         (symbol_table::free_edge): Do not recycle numbers.
7014         * cgraph.h (cgraph_edge::get): New method.
7015         * symbol-summary.h (symtab_removal): Use it.
7016         (symtab_duplication): Likewise.
7017         (call_summary::hashable_uid): Remove.
7019 2018-06-08  Martin Liska  <mliska@suse.cz>
7021         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7022         (initialize_growth_caches): Remove.
7023         (free_growth_caches): Likewise.
7024         (do_estimate_edge_time): Use edge_growth_cache.
7025         (do_estimate_edge_size): Likewise.
7026         (do_estimate_edge_hints): Likewise.
7027         * ipa-inline.c (reset_edge_caches): Likewise.
7028         (recursive_inlining): Likewise.
7029         (inline_small_functions): Likewise.
7030         * ipa-inline.h (initialize_growth_caches): Remove.
7031         (estimate_edge_size): Likewise.
7032         (estimate_edge_time): Likewise.
7033         (estimate_edge_hints): Likewise.
7034         (reset_edge_growth_cache): Likewise.
7035         * symbol-summary.h (call_summary::remove): New method.
7037 2018-06-08  Martin Liska  <mliska@suse.cz>
7039         * ipa-cp.c (class edge_clone_summary): New summary.
7040         (grow_edge_clone_vectors): Remove.
7041         (ipcp_edge_duplication_hook): Remove.
7042         (class edge_clone_summary_t): New call_summary class.
7043         (ipcp_edge_removal_hook): Remove.
7044         (edge_clone_summary_t::duplicate): New function.
7045         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7046         (create_specialized_node): Likewise.
7047         (ipcp_driver): Initialize edge_clone_summaries and do not
7048         register hooks.
7050 2018-06-08  Martin Liska  <mliska@suse.cz>
7052         * symbol-summary.h (get): New function.
7053         (call_summary::m_initialize_when_cloning): New class member.
7055 2018-06-08  Martin Liska  <mliska@suse.cz>
7057         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7058         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7059         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7060         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7061         (remove_cgraph_node_from_order): Use the removed_nodes set.
7062         (do_per_function_toporder): Likwise.
7063         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7064         instead of summary_uid.
7065         (symtab_removal): Likewise.
7066         (symtab_duplication): Likewise.
7068 2018-06-08  Martin Liska  <mliska@suse.cz>
7070         * ipa-cp.c (ipcp_store_bits_results): Use
7071         ipcp_transformation_sum.
7072         (ipcp_store_vr_results): Likewise.
7073         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7074         to ...
7075         (ipcp_transformation_initialize): ... this.
7076         (ipa_set_node_agg_value_chain):
7077         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7078         (write_ipcp_transformation_info): Likewise.
7079         (read_ipcp_transformation_info): Likewise.
7080         (ipcp_update_bits): Likewise.
7081         (ipcp_update_vr): Likewise.
7082         (ipcp_transform_function): Likewise.
7083         * ipa-prop.h: Rename ipcp_transformation_summary to
7084         ipcp_transformation.
7085         (class ipcp_transformation_t): New function summary.
7086         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7087         (ipa_get_agg_replacements_for_node): Likewise.
7089 2018-06-08  Martin Liska  <mliska@suse.cz>
7091         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7092         of struct.
7093         (class funct_state_summary_t): New function_summary class.
7094         (has_function_state): Remove.
7095         (get_function_state): Likewise.
7096         (set_function_state): Likewise.
7097         (add_new_function): Likewise.
7098         (funct_state_summary_t::insert): New function.
7099         (duplicate_node_data): Remove.
7100         (remove_node_data): Remove.
7101         (funct_state_summary_t::duplicate): New function.
7102         (register_hooks): Create new funct_state_summaries.
7103         (pure_const_generate_summary): Use it.
7104         (pure_const_write_summary): Likewise.
7105         (pure_const_read_summary): Likewise.
7106         (propagate_pure_const): Likewise.
7107         (propagate_nothrow): Likewise.
7108         (dump_malloc_lattice): Likewise.
7109         (propagate_malloc): Likewise.
7110         (execute): Do not register hooks, just remove summary
7111         instead.
7112         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7113         constructor.
7115 2018-06-08  Martin Liska  <mliska@suse.cz>
7117         * ipa-reference.c (remove_node_data): Remove.
7118         (duplicate_node_data): Likewise.
7119         (class ipa_ref_var_info_summary_t): New class.
7120         (class ipa_ref_opt_summary_t): Likewise.
7121         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7122         (get_reference_optimization_summary): Use
7123         ipa_ref_opt_sum_summaries.
7124         (set_reference_vars_info): Remove.
7125         (set_reference_optimization_summary): Likewise.
7126         (ipa_init): Create summaries.
7127         (init_function_info): Use function summary.
7128         (ipa_ref_opt_summary_t::duplicate): New function.
7129         (ipa_ref_opt_summary_t::remove): New function.
7130         (get_read_write_all_from_node): Fix GNU coding style.
7131         (propagate): Use function summary.
7132         (write_node_summary_p): Fix GNU coding style.
7133         (stream_out_bitmap): Likewise.
7134         (ipa_reference_read_optimization_summary): Use function summary.
7135         (ipa_reference_c_finalize): Do not release hooks.
7137 2018-06-08  Martin Liska  <mliska@suse.cz>
7139         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7140         (analyze_function_body): Extract multiple calls of get_create.
7141         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7142         * ipa-inline.c (recursive_inlining): Use ::get method.
7143         * ipa-inline.h (estimate_edge_growth): Likewise.
7145 2018-06-08  Martin Liska  <mliska@suse.cz>
7147         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7148         HSA_INVALID.
7149         (hsa_function_summary::hsa_function_summary): Use the new enum
7150         value.
7151         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7152         * hsa-gen.c (hsa_get_host_function): Likewise.
7153         (get_brig_function_name): Likewise.
7154         * ipa-hsa.c (process_hsa_functions): Likewise.
7155         (ipa_hsa_write_summary): Likewise.
7156         * symbol-summary.h (symtab_duplication): Use ::get function/
7157         (get): New function.
7159 2018-06-08  Martin Liska  <mliska@suse.cz>
7161         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7162         of get.
7163         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7164         (hsa_register_kernel): Likewise.
7165         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7166         * hsa-gen.c (hsa_get_host_function): Likewise.
7167         (get_brig_function_name): Likewise.
7168         (generate_hsa): Likewise.
7169         (pass_gen_hsail::execute): Likewise.
7170         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7171         (devirtualization_time_bonus): Likewise.
7172         (ipcp_propagate_stage): Likewise.
7173         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7174         (edge_set_predicate): Likewise.
7175         (evaluate_conditions_for_known_args): Likewise.
7176         (evaluate_properties_for_edge): Likewise.
7177         (ipa_fn_summary::reset): Likewise.
7178         (ipa_fn_summary_t::duplicate): Likewise.
7179         (dump_ipa_call_summary): Likewise.
7180         (ipa_dump_fn_summary): Likewise.
7181         (analyze_function_body): Likewise.
7182         (compute_fn_summary): Likewise.
7183         (estimate_edge_devirt_benefit): Likewise.
7184         (estimate_edge_size_and_time): Likewise.
7185         (estimate_calls_size_and_time): Likewise.
7186         (estimate_node_size_and_time): Likewise.
7187         (inline_update_callee_summaries): Likewise.
7188         (remap_edge_change_prob): Likewise.
7189         (remap_edge_summaries): Likewise.
7190         (ipa_merge_fn_summary_after_inlining): Likewise.
7191         (ipa_update_overall_fn_summary): Likewise.
7192         (read_ipa_call_summary): Likewise.
7193         (inline_read_section): Likewise.
7194         (write_ipa_call_summary): Likewise.
7195         (ipa_fn_summary_write): Likewise.
7196         (ipa_free_fn_summary): Likewise.
7197         * ipa-hsa.c (process_hsa_functions): Likewise.
7198         (ipa_hsa_write_summary): Likewise.
7199         (ipa_hsa_read_section): Likewise.
7200         * ipa-icf.c (sem_function::merge): Likewise.
7201         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7202         (do_estimate_edge_time): Likewise.
7203         (estimate_size_after_inlining): Likewise.
7204         (estimate_growth): Likewise.
7205         (growth_likely_positive): Likewise.
7206         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7207         (inline_call): Likewise.
7208         * ipa-inline.c (caller_growth_limits): Likewise.
7209         (can_inline_edge_p): Likewise.
7210         (can_inline_edge_by_limits_p): Likewise.
7211         (compute_uninlined_call_time): Likewise.
7212         (compute_inlined_call_time): Likewise.
7213         (want_inline_small_function_p): Likewise.
7214         (edge_badness): Likewise.
7215         (update_caller_keys): Likewise.
7216         (update_callee_keys): Likewise.
7217         (recursive_inlining): Likewise.
7218         (inline_small_functions): Likewise.
7219         (inline_to_all_callers_1): Likewise.
7220         (dump_overall_stats): Likewise.
7221         (early_inline_small_functions): Likewise.
7222         (early_inliner): Likewise.
7223         * ipa-inline.h (estimate_edge_growth): Likewise.
7224         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7225         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7226         * ipa-prop.h (IPA_NODE_REF): Likewise.
7227         (IPA_EDGE_REF): Likewise.
7228         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7229         (propagate_malloc): Likewise.
7230         * ipa-split.c (execute_split_functions): Likewise.
7231         * symbol-summary.h: Rename get to get_create.
7232         (get): Likewise.
7233         (get_create): Likewise.
7234         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7236 2018-06-08  Martin Liska  <mliska@suse.cz>
7238         * symbol-summary.h (release): Move definition out of class
7239         declaration.
7240         (symtab_removal): Likewise.
7241         (symtab_duplication): Likewise.
7243 2018-06-08  Martin Liska  <mliska@suse.cz>
7245         * symbol-summary.h (function_summary): Move constructor
7246         implementation out of class declaration.
7247         (release): Likewise.
7248         (symtab_insertion): Likewise.
7249         (symtab_removal): Likewise.
7250         (symtab_duplication): Likewise.
7251         (get): Likewise.
7253 2018-06-08  Martin Liska  <mliska@suse.cz>
7255         * Makefile.in: Remove support for MPX (macros, related functions,
7256         fields in cgraph_node, ...).
7257         * builtin-types.def (BT_BND): Likewise.
7258         (BT_FN_BND_CONST_PTR): Likewise.
7259         (BT_FN_CONST_PTR_BND): Likewise.
7260         (BT_FN_VOID_PTR_BND): Likewise.
7261         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7262         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7263         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7264         (expand_builtin_mempcpy_with_bounds): Likewise.
7265         (expand_builtin_memset_with_bounds): Likewise.
7266         (expand_builtin_memset_args): Likewise.
7267         (std_expand_builtin_va_start): Likewise.
7268         (expand_builtin): Likewise.
7269         (expand_builtin_with_bounds): Likewise.
7270         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7271         (DEF_LIB_BUILTIN_CHKP): Likewise.
7272         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7273         (DEF_CHKP_BUILTIN): Likewise.
7274         (BUILT_IN_MEMCPY): Likewise.
7275         (BUILT_IN_MEMMOVE): Likewise.
7276         (BUILT_IN_MEMPCPY): Likewise.
7277         (BUILT_IN_MEMSET): Likewise.
7278         (BUILT_IN_STPCPY): Likewise.
7279         (BUILT_IN_STRCAT): Likewise.
7280         (BUILT_IN_STRCHR): Likewise.
7281         (BUILT_IN_STRCPY): Likewise.
7282         (BUILT_IN_STRLEN): Likewise.
7283         (BUILT_IN_MEMCPY_CHK): Likewise.
7284         (BUILT_IN_MEMMOVE_CHK): Likewise.
7285         (BUILT_IN_MEMPCPY_CHK): Likewise.
7286         (BUILT_IN_MEMSET_CHK): Likewise.
7287         (BUILT_IN_STPCPY_CHK): Likewise.
7288         (BUILT_IN_STRCAT_CHK): Likewise.
7289         (BUILT_IN_STRCPY_CHK): Likewise.
7290         * calls.c (store_bounds): Likewise.
7291         (emit_call_1): Likewise.
7292         (special_function_p): Likewise.
7293         (maybe_warn_nonstring_arg): Likewise.
7294         (initialize_argument_information): Likewise.
7295         (finalize_must_preallocate): Likewise.
7296         (compute_argument_addresses): Likewise.
7297         (expand_call): Likewise.
7298         * cfgexpand.c (expand_call_stmt): Likewise.
7299         (expand_return): Likewise.
7300         (expand_gimple_stmt_1): Likewise.
7301         (pass_expand::execute): Likewise.
7302         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7303         (cgraph_node::remove): Likewise.
7304         (cgraph_node::dump): Likewise.
7305         (cgraph_node::verify_node): Likewise.
7306         * cgraph.h (chkp_function_instrumented_p): Likewise.
7307         (symtab_node::get_alias_target): Likewise.
7308         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7309         (cgraph_local_p): Likewise.
7310         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7311         (cgraph_edge::rebuild_references): Likewise.
7312         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7313         (walk_polymorphic_call_targets): Likewise.
7314         (cgraph_node::expand_thunk): Likewise.
7315         (symbol_table::output_weakrefs): Likewise.
7316         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7317         (ix86_handle_option): Likewise.
7318         * config/i386/constraints.md: Likewise.
7319         * config/i386/i386-builtin-types.def (BND): Likewise.
7320         (VOID): Likewise.
7321         (PVOID): Likewise.
7322         (ULONG): Likewise.
7323         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7324         (BDESC_FIRST): Likewise.
7325         (BDESC): Likewise.
7326         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7327         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7328         * config/i386/i386.c (enum reg_class): Likewise.
7329         (ix86_target_string): Likewise.
7330         (ix86_option_override_internal): Likewise.
7331         (ix86_conditional_register_usage): Likewise.
7332         (ix86_valid_target_attribute_inner_p): Likewise.
7333         (ix86_set_indirect_branch_type): Likewise.
7334         (ix86_set_current_function): Likewise.
7335         (ix86_function_arg_regno_p): Likewise.
7336         (init_cumulative_args): Likewise.
7337         (ix86_function_arg_advance): Likewise.
7338         (ix86_function_arg): Likewise.
7339         (ix86_pass_by_reference): Likewise.
7340         (ix86_function_value_regno_p): Likewise.
7341         (ix86_function_value_1): Likewise.
7342         (ix86_function_value_bounds): Likewise.
7343         (ix86_return_in_memory): Likewise.
7344         (ix86_setup_incoming_vararg_bounds): Likewise.
7345         (ix86_va_start): Likewise.
7346         (indirect_thunk_need_prefix): Likewise.
7347         (print_reg): Likewise.
7348         (ix86_print_operand): Likewise.
7349         (ix86_expand_call): Likewise.
7350         (ix86_output_function_return): Likewise.
7351         (reg_encoded_number): Likewise.
7352         (BDESC_VERIFYS): Likewise.
7353         (ix86_init_mpx_builtins): Likewise.
7354         (ix86_init_builtins): Likewise.
7355         (ix86_emit_cmove): Likewise.
7356         (ix86_emit_move_max): Likewise.
7357         (ix86_expand_builtin): Likewise.
7358         (ix86_builtin_mpx_function): Likewise.
7359         (ix86_get_arg_address_for_bt): Likewise.
7360         (ix86_load_bounds): Likewise.
7361         (ix86_store_bounds): Likewise.
7362         (ix86_load_returned_bounds): Likewise.
7363         (ix86_store_returned_bounds): Likewise.
7364         (ix86_class_likely_spilled_p): Likewise.
7365         (ix86_hard_regno_mode_ok): Likewise.
7366         (x86_order_regs_for_local_alloc): Likewise.
7367         (ix86_mitigate_rop): Likewise.
7368         (ix86_bnd_prefixed_insn_p): Likewise.
7369         (ix86_mpx_bound_mode): Likewise.
7370         (ix86_make_bounds_constant): Likewise.
7371         (ix86_initialize_bounds): Likewise.
7372         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7373         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7374         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7375         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7376         (TARGET_CHKP_BOUND_MODE): Likewise.
7377         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7378         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7379         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7380         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7381         * config/i386/i386.h (TARGET_MPX): Likewise.
7382         (TARGET_MPX_P): Likewise.
7383         (VALID_BND_REG_MODE): Likewise.
7384         (FIRST_BND_REG): Likewise.
7385         (LAST_BND_REG): Likewise.
7386         (enum reg_class): Likewise.
7387         (BND_REG_P): Likewise.
7388         (BND_REGNO_P): Likewise.
7389         (BNDmode): Likewise.
7390         (ADJUST_INSN_LENGTH): Likewise.
7391         * config/i386/i386.md: Likewise.
7392         * config/i386/i386.opt: Likewise.
7393         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7394         (defined): Likewise.
7395         (LINK_MPX): Likewise.
7396         (MPX_SPEC): Likewise.
7397         (LIBMPX_SPEC): Likewise.
7398         (LIBMPXWRAPPERS_SPEC): Likewise.
7399         (CHKP_SPEC): Likewise.
7400         * config/i386/predicates.md: Likewise.
7401         * dbxout.c (dbxout_type): Likewise.
7402         * doc/extend.texi: Likewise.
7403         * doc/invoke.texi: Likewise.
7404         * doc/md.texi: Likewise.
7405         * doc/tm.texi: Likewise.
7406         * doc/tm.texi.in: Likewise.
7407         * dwarf2out.c (is_base_type): Likewise.
7408         (gen_formal_types_die): Likewise.
7409         (gen_subprogram_die): Likewise.
7410         (gen_type_die_with_usage): Likewise.
7411         (gen_decl_die): Likewise.
7412         (dwarf2out_late_global_decl): Likewise.
7413         * expr.c (expand_assignment): Likewise.
7414         (emit_storent_insn): Likewise.
7415         (store_expr_with_bounds): Likewise.
7416         (store_expr): Likewise.
7417         (expand_expr_real_1): Likewise.
7418         * expr.h (store_expr_with_bounds): Likewise.
7419         * function.c (use_register_for_decl): Likewise.
7420         (struct bounds_parm_data): Likewise.
7421         (assign_parms_augmented_arg_list): Likewise.
7422         (assign_parm_find_entry_rtl): Likewise.
7423         (assign_parm_is_stack_parm): Likewise.
7424         (assign_parm_load_bounds): Likewise.
7425         (assign_bounds): Likewise.
7426         (assign_parms): Likewise.
7427         (expand_function_start): Likewise.
7428         * gcc.c (CHKP_SPEC): Likewise.
7429         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7430         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7431         (wrestrict_dom_walker::check_call): Likewise.
7432         * gimple.c (gimple_build_call_from_tree): Likewise.
7433         * gimple.h (enum gf_mask): Likewise.
7434         (gimple_call_with_bounds_p): Likewise.
7435         (gimple_call_set_with_bounds): Likewise.
7436         * gimplify.c (gimplify_init_constructor): Likewise.
7437         * ipa-cp.c (initialize_node_lattices): Likewise.
7438         (propagate_constants_across_call): Likewise.
7439         (find_more_scalar_values_for_callers_subset): Likewise.
7440         * ipa-hsa.c (process_hsa_functions): Likewise.
7441         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7442         * ipa-icf.c (sem_function::merge): Likewise.
7443         * ipa-inline.c (early_inliner): Likewise.
7444         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7445         (warn_function_cold): Likewise.
7446         (propagate_pure_const): Likewise.
7447         * ipa-ref.h (enum GTY): Likewise.
7448         * ipa-split.c (find_retbnd): Likewise.
7449         (consider_split): Likewise.
7450         (split_function): Likewise.
7451         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7452         * ipa.c (walk_polymorphic_call_targets): Likewise.
7453         (symbol_table::remove_unreachable_nodes): Likewise.
7454         (process_references): Likewise.
7455         (cgraph_build_static_cdtor_1): Likewise.
7456         * lto-cgraph.c (lto_output_node): Likewise.
7457         (output_refs): Likewise.
7458         (compute_ltrans_boundary): Likewise.
7459         (input_overwrite_node): Likewise.
7460         (input_node): Likewise.
7461         (input_cgraph_1): Likewise.
7462         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7463         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7464         (class pass_chkp_instrumentation_passes): Likewise.
7465         (make_pass_chkp_instrumentation_passes): Likewise.
7466         * passes.def: Likewise.
7467         * rtl.h (struct GTY): Likewise.
7468         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7469         * stor-layout.c (layout_type): Likewise.
7470         * symtab.c: Likewise.
7471         * target.def: Likewise.
7472         * targhooks.c (default_chkp_bound_type): Likewise.
7473         (default_chkp_bound_mode): Likewise.
7474         (default_builtin_chkp_function): Likewise.
7475         (default_chkp_function_value_bounds): Likewise.
7476         (default_chkp_make_bounds_constant): Likewise.
7477         (default_chkp_initialize_bounds): Likewise.
7478         * targhooks.h (default_chkp_bound_type): Likewise.
7479         (default_chkp_bound_mode): Likewise.
7480         (default_builtin_chkp_function): Likewise.
7481         (default_chkp_function_value_bounds): Likewise.
7482         (default_chkp_make_bounds_constant): Likewise.
7483         (default_chkp_initialize_bounds): Likewise.
7484         * toplev.c (compile_file): Likewise.
7485         (process_options): Likewise.
7486         * tree-core.h (DEF_BUILTIN): Likewise.
7487         (DEF_BUILTIN_CHKP): Likewise.
7488         * tree-inline.c (declare_return_variable): Likewise.
7489         (remap_gimple_stmt): Likewise.
7490         (copy_bb): Likewise.
7491         (initialize_inlined_parameters): Likewise.
7492         (expand_call_inline): Likewise.
7493         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7494         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7495         (make_pass_ipa_chkp_produce_thunks): Likewise.
7496         (make_pass_chkp): Likewise.
7497         (make_pass_chkp_opt): Likewise.
7498         (make_pass_chkp_instrumentation_passes): Likewise.
7499         * tree-pretty-print.c (dump_generic_node): Likewise.
7500         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7501         * tree-ssa-dce.c (propagate_necessity): Likewise.
7502         (eliminate_unnecessary_stmts): Likewise.
7503         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7504         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7505         * tree-ssa-sccvn.h: Likewise.
7506         * tree-ssa-strlen.c (get_string_length): Likewise.
7507         (valid_builtin_call): Likewise.
7508         (adjust_last_stmt): Likewise.
7509         (handle_builtin_strchr): Likewise.
7510         (handle_builtin_strcpy): Likewise.
7511         (handle_builtin_stxncpy): Likewise.
7512         (handle_builtin_memcpy): Likewise.
7513         (handle_builtin_strcat): Likewise.
7514         (strlen_check_and_optimize_stmt): Likewise.
7515         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7516         * tree-streamer-in.c: Likewise.
7517         * tree-streamer.c (record_common_node): Likewise.
7518         * tree.c (tree_code_size): Likewise.
7519         (wide_int_to_tree_1): Likewise.
7520         (type_contains_placeholder_1): Likewise.
7521         (build_common_tree_nodes): Likewise.
7522         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7523         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7524         (POINTER_BOUNDS_P): Likewise.
7525         (BOUNDED_TYPE_P): Likewise.
7526         (BOUNDED_P): Likewise.
7527         (CALL_WITH_BOUNDS_P): Likewise.
7528         (pointer_bounds_type_node): Likewise.
7529         * value-prof.c (gimple_ic): Likewise.
7530         * var-tracking.c (vt_add_function_parameters): Likewise.
7531         * varasm.c (make_decl_rtl): Likewise.
7532         (assemble_start_function): Likewise.
7533         (output_constant): Likewise.
7534         (maybe_assemble_visibility): Likewise.
7535         * varpool.c (ctor_for_folding): Likewise.
7536         * chkp-builtins.def: Remove.
7537         * ipa-chkp.c: Remove.
7538         * ipa-chkp.h: Remove.
7539         * rtl-chkp.c: Remove.
7540         * rtl-chkp.h: Remove.
7541         * tree-chkp-opt.c: Remove.
7542         * tree-chkp.c: Remove.
7543         * tree-chkp.h: Remove.
7545 2018-06-07  Carl Love  <cel@us.ibm.com>
7547         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7548         vextract_fp_from_shortl): Add BE support.
7550 2018-06-07  Paul Koning  <ni1d@arrl.net>
7552         * compare-elim.c (try_merge_compare): Don't merge compare if
7553         address contains a side effect.
7554         (try_eliminate_compare): Likewise.
7556 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7558         * config.gcc: Support "tremont".
7559         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7560         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7561         PROCESSOR_TREMONT.
7562         * config/i386/i386.c (m_TREMONT): Define.
7563         (processor_target_table): Add "tremont".
7564         (PTA_TREMONT): Define.
7565         (ix86_lea_outperforms): Add TARGET_TREMONT.
7566         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7567         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7568         and M_INTEL_GOLDMONT_PLUS.
7569         (fold_builtin_cpu): Add "tremont".
7570         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7571         (ix86_option_override_internal): Add "tremont".
7572         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7573         (processor_type): Add PROCESSOR_TREMONT.
7574         * config/i386/x86-tune.def: Add m_TREMONT.
7575         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7577 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7579         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7580         symbol defined for msp430i* devices to be lower case.
7582 2018-06-07  Richard Biener  <rguenther@suse.de>
7584         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7585         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7586         Properly wrap signed arithmetic if overflow wraps.
7588 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7590         PR tree-optimization/69615
7591         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7592         of a cast from a same precision integral SSA_NAME in a bb dominated
7593         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7594         cast to utype if rhs2 has already a compatible type.
7596 2018-06-07  Richard Biener  <rguenther@suse.de>
7598         PR tree-optimization/85935
7599         * graphite-scop-detection.c (find_params_in_bb): Analyze
7600         condition operands with respect to the correct loop.  Assert
7601         the analysis doesn't fail.
7603 2018-06-04  Carl Love  <cel@us.ibm.com>
7605         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7606         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7607         as it is slightly cheaper.
7608         (first_match_or_eos_index_<mode>):
7609         Calculate index using natural element order.
7610         (first_match_index_<mode>):
7611         Calculate index using natural element order.
7612         (first_match_or_eos_index_<mode>):
7613         Calculate index using natural order.
7614         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7615         for BE and LE modes.
7616         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7617         P9V_BUILTIN_VCLZLSBB_V16QI.
7618         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7619         specific.
7621 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7623         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7624         indentation and line wrap for many prototypes.  Add missing
7625         @smallexample directives around block of prototypes for vec_xl and
7626         vec_xst.
7628 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7630         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7631         track if we pass or return IEEE 128-bit floating point.
7632         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7633         C++ mangling that is compatible with GCC 8.1.
7634         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7635         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7636         floating point types.
7637         (rs6000_function_arg_advance_1): Likewise.
7638         (rs6000_mangle_type): Optionally generate mangled names that match
7639         what GCC 8.1 generated for IEEE 128-bit floating point types.
7640         (rs6000_globalize_decl_name): If we have an external function that
7641         passes or returns IEEE 128-bit types, generate a weak reference
7642         from the mangled name used in GCC 8.1 to the current mangled
7643         name.
7644         (rs6000_init_builtins): Make __ibm128 use the long double type if
7645         long double is IBM extended double.  Make __float128 use the long
7646         double type if long double is IEEE 128-bit.
7648         PR target/85657
7649         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7650         macro for __ibm128 built-in functions.
7651         (PACK_IF): Add __ibm128 pack/unpack functions.
7652         (UNPACK_IF): Likewise.
7653         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7654         enable long double built-in functions if long double is IEEE
7655         128-bit floating point.
7656         (rs6000_invalid_builtin): Update long double built-in function
7657         error message.
7658         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7659         functions, adjust the built-in function to use the long double
7660         built-in function if __ibm128 and long double are the same type.
7661         * doc/extend.texi (PowerPC builtins): Update documention for
7662         __builtin_{,un}pack_longdouble.  Add documentation for
7663         __builtin_{,un}pack_ibm128.
7665 2018-06-06  Jim Wilson  <jimw@sifive.com>
7667         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7668         (struct machine_function): New field interrupt_mode.
7669         (riscv_handle_type_attribute): New function.  Add forward declaration.
7670         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7671         (riscv_expand_epilogue): Check interrupt_mode field.
7672         (riscv_set_current_function): Check interrupt attribute args and
7673         set interrupt_mode field.
7674         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7675         (riscv_sret, riscv_uret): New.
7676         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7677         new arguments to interrupt attribute.
7679 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7681         PR target/63177
7682         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7683         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7685 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7687         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7688         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7689         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7690         several redundant entries.
7692 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7694         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7695         type from "rtx" to "rtx_insn *".
7696         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7697         for local "call_insn", removing cast.
7698         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7700 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7702         PR tree-optimization/86066
7703         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7704         for BIT_INSERT_EXPR stores.
7706 2018-06-06  Richard Biener  <rguenther@suse.de>
7708         PR tree-optimization/86062
7709         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7710         component refs ontop
7711         of to be offsetted base.
7713 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7715         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7716         to be static and remove check on interrupt attribute name.
7718 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7720         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7721         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7723 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7725         PR target/79924
7726         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7727         second argument.
7728         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7729         Remove second argument, change how error is called.
7730         (aarch64_layout_arg): Remove second argument from
7731         aarch64_err_no_fpadvsimd call.
7732         (aarch64_init_cumulative_args): Ditto.
7733         (aarch64_gimplify_va_arg_expr): Ditto.
7734         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7736 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7738         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7739         (*simple_return_indirect_internal<mode>): Rename from
7740         simple_return_indirect_internal.  Use W mode iterator.
7741         (rstorssp): New expander.
7742         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7743         (clrssbsy): New expander.
7744         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7746 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7748         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7749         __typeof__.
7750         (cmse_check_pointed_object): Likewise.
7752 2018-06-05  Martin Liska  <mliska@suse.cz>
7754         PR gcov-profile/47618
7755         * doc/invoke.texi: Document how -fprofile-dir format
7756         is extended.
7758 2018-06-05  Richard Biener  <rguenther@suse.de>
7760         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7761         removal pretend DOM info isn't available so we do not update
7762         it and only remove edges, not dominated blocks.  Actually free
7763         DOM info in case we removed something.  Remove unreachable blocks.
7764         (mfb_keep_latches): Work with either DOM info or marked backedges.
7765         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7766         first.  Mark backedges if DOM info isn't available.
7767         (Re-)compute DOM info after cleanup_control_flow_pre.
7769 2018-06-05  Richard Biener  <rguenther@suse.de>
7771         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7772         (locus_discrim_hasher::hash): Adjust.
7773         (locus_discrim_hasher::equal): Likewise.
7774         (next_discriminator_for_locus): Work on line directly.
7775         (same_line_p): Pass in expanded locus1 as well.
7776         (assign_discriminators): Avoid redundant location expansions.
7778 2018-06-05  Richard Biener  <rguenther@suse.de>
7780         PR tree-optimization/86046
7781         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7782         if required after clearing TREE_ADDRESSABLE.
7784 2018-06-05  Richard Biener  <rguenther@suse.de>
7786         PR tree-optimization/86047
7787         * tree-ssa-loop.c (for_each_index): Glob handling of all
7788         decls and constants and really handle all of them.
7790 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7792         PR target/81497
7793         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7794         qualifier_void_pointer and qualifier_const_void_pointer.
7795         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7796         (arm_init_builtins): Handle the above.
7797         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7798         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7799         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7800         void intrinsics.
7802 2018-06-05  Martin Liska  <mliska@suse.cz>
7804         * auto-profile.c (read_autofdo_file): Do not use
7805         gcov_ctr_summary struct.
7806         (afdo_callsite_hot_enough_for_early_inline): Likewise.
7807         * coverage.c (struct counts_entry): Likewise.
7808         (read_counts_file): Read just single summary entry.
7809         (get_coverage_counts): Use gcov_summary struct.
7810         * coverage.h (get_coverage_counts): Likewise.
7811         * gcov-dump.c (dump_working_sets): Likewise.
7812         (tag_summary): Dump just single summary.
7813         * gcov-io.c (gcov_write_summary): Write just histogram
7814         summary.
7815         (gcov_read_summary): Read just single summary.
7816         (compute_working_sets): Use gcov_summary struct.
7817         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7818         of GCOV_COUNTERS_SUMMABLE.
7819         (GCOV_COUNTERS_SUMMABLE): Remove.
7820         (GCOV_FIRST_VALUE_COUNTER): Replace with
7821         GCOV_COUNTER_V_INTERVAL.
7822         (struct gcov_ctr_summary): Remove.
7823         (struct gcov_summary): Directly use fields of former
7824         gcov_ctr_summary.
7825         (compute_working_sets): Use gcov_summary struct.
7826         * gcov.c (read_count_file): Do not use ctrs fields.
7827         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7828         struct.
7829         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7830         struct.
7831         * profile.c: Likewise.
7832         * profile.h: Likewise.
7834 2018-06-05  Martin Liska  <mliska@suse.cz>
7836         PR gcov-profile/84846
7837         * gcov.c (output_lines): Print working directory only
7838         in intermediate format.
7840 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
7842         * config/s390/s390-builtin-types.def: Add void function type.
7843         * config/s390/s390-builtins.def: Use the function type for the
7844         tbeginc builtin.
7846 2018-06-04  Jim Wilson  <jimw@sifive.com>
7848         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7849         to int.
7850         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7851         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
7852         handle EH_RETURN_DATA_REGNO registers properly.
7853         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7854         (riscv_expand_epilogue): Update comment.  Change argument name and
7855         type.  Update code to use new name and type.  Pass new args to
7856         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
7857         EXCEPTION_RETURN.
7858         * config/riscv/riscv.md (NORMAL_RETURN): New.
7859         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7860         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7861         (eh_return): Call gen_eh_return_internal and emit barrier.
7862         (eh_return_internal): Call riscv_expand_epilogue.
7864 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7866         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7867         bit_insertion field and declare can_be_merged_into method.
7868         (merged_store_group::can_be_merged_into): New method.
7869         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7870         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
7871         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7873 2018-06-04  Richard Biener  <rguenther@suse.de>
7875         PR tree-optimization/85955
7876         * builtins.c (fold_builtin_sincos): Convert pointers to
7877         destination to appropriate type before dereferencing.
7879 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
7881         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7883 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
7885         * expr.c (expand_expr_real_1): Force the operand into memory if
7886         its TYPE_MODE is BLKmode and if there is no integer mode for
7887         the number of bits being extracted.
7889 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7891         PR target/85832
7892         PR target/86036
7893         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7894         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7896 2018-06-04  Richard Biener  <rguenther@suse.de>
7898         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7899         (cleanup_tree_cfg_noloop): ... single caller.  Do
7900         start_recording_case_labels later.
7902 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
7904         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7905         to _IMMINTRIN_H_INCLUDED.
7906         * config/i386/pconfigintrin.h: Ditto.
7907         * config/i386/waitpkgintrin.h: Ditto.
7908         * config/i386/immintrin.h: Add includes for sgxintrin.h,
7909         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7910         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7911         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7912         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7913         waitpkgintrin.h and cldemoteintrin.h.
7915 2018-06-04  Richard Biener  <rguenther@suse.de>
7917         PR tree-optimization/86038
7918         * tracer.c (find_best_successor): Check probability for
7919         being initialized, bail out if not.
7921 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
7923         PR target/86003
7924         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7925         of bits to ignore when comparing architectures.
7927 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7929         PR tree-optimization/69615
7930         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7931         maximum or minimum of the type, try to merge it also as if
7932         range1 is + [-, x - 1] or + [x + 1, -].
7934         PR c++/86025
7935         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7937 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
7939         PR tree-optimization/86034
7940         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7941         the unsigned bitfield type in a bit insertion sequence if it does not
7942         have a larger precision than the bitfield size.
7943         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7945 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
7947         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7949 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7951         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7952         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7953         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7954         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7956 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7958         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7959         Disable -fdelete-null-pointer-checks for ELF toolchain.
7961 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7962             Kito Cheng  <kito.cheng@gmail.com>
7964         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7965         (nds32le-*-*, nds32be-*-*): Integrate checking process.
7966         (nds32*-*-*): Add glibc and uclibc conditions.
7967         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7968         (TARGET_EXCEPT_UNWIND_INFO): Define.
7969         * config/nds32/elf.h: New file.
7970         * config/nds32/linux.h: New file.
7971         * config/nds32/nds32-elf.opt: New file.
7972         * config/nds32/nds32-linux.opt: New file.
7973         * config/nds32/nds32-fp-as-gp.c
7974         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7975         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7976         TARGET_LINUX_ABI.
7977         (nds32_asm_file_end): Ditto.
7978         (nds32_print_operand): Ditto.
7979         (nds32_insert_attributes): Ditto.
7980         (nds32_init_libfuncs): New function.
7981         (TARGET_HAVE_TLS): Define.
7982         (TARGET_INIT_LIBFUNCS): Define.
7983         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7984         spec content.
7985         (TARGET_ELF): Apply different mcmodel setting.
7986         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7987         been migrated into elf.h and linux.h files.
7988         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7989         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7990         (mcmodel): The content has been migrated into nds32-elf.opt and
7991         nds32-linux.opt files.
7992         * config/nds32/t-elf: New file.
7993         * config/nds32/t-linux: New file.
7995 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7996             Shiva Chen  <shiva0217@gmail.com>
7998         * config/nds32/constants.md (unspec_volatile_element): Add
7999         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8000         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8001         optimization.
8002         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8003         (make_pass_nds32_fp_as_gp): Declare.
8004         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8005         optmization pass.
8006         (nds32_asm_function_end_prologue): Remove unused asm output.
8007         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8008         (nds32_asm_file_start): Output necessary fp_as_gp information.
8009         (nds32_option_override): Adjust register usage.
8010         (nds32_expand_prologue): Consider fp_as_gp situation.
8011         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8012         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8013         (epilogue): Ditto.
8014         (return): Ditto.
8015         (simple_return): Ditto.
8016         (omit_fp_begin): Output special directive for fp_as_gp.
8017         (omit_fp_end): Output special directive for fp_as_gp.
8018         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8019         mforbid-fp-as-gp): New options.
8021 2018-06-01  Mark Wielaard  <mark@klomp.org>
8023         * dwarf2out.c (dwarf2out_finish): Remove generation of
8024         DW_AT_loclists_base.
8026 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8028         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8029         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8030         (struct merged_store_group): Add bit_insertion field.
8031         (dump_char_array): Use standard hexadecimal format.
8032         (merged_store_group::merged_store_group): Set bit_insertion to false.
8033         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8034         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8035         also print the mask in the dump file.
8036         (pass_store_merging::gate): Minor tweak.
8037         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8038         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8039         stores with INTEGER_CST stores.
8040         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8041         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8042         and use it throughout.  Generate bit insertion sequences if need be.
8043         (pass_store_merging::process_store): Remove redundant condition.
8044         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8046 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8048         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8049         the 128-bit floating point types.  Fix function comment.
8051 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8053         * config/aarch64/aarch64-simd.md
8054         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8055         mnemonics.
8056         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8057         mnemonics.
8059 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8061         PR tree-optimization/85989
8062         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8063         variable.
8064         (backprop::intersect_uses): Check it when deciding whether this
8065         is a backedge reference.
8066         (backprop::process_block): Add each phi to m_visited_phis
8067         after visiting it, then clear it at the end.
8069 2018-06-01  Richard Biener  <rguenther@suse.de>
8071         * tree-vectorizer.h (vect_dr_stmt): New function.
8072         (vect_get_load_cost): Adjust.
8073         (vect_get_store_cost): Likewise.
8074         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8075         Use vect_dr_stmt instead of DR_SMTT.
8076         (vect_record_base_alignments): Likewise.
8077         (vect_calculate_target_alignment): Likewise.
8078         (vect_compute_data_ref_alignment): Likewise and make static.
8079         (vect_update_misalignment_for_peel): Likewise.
8080         (vect_verify_datarefs_alignment): Likewise.
8081         (vector_alignment_reachable_p): Likewise.
8082         (vect_get_data_access_cost): Likewise.  Pass down
8083         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8084         (vect_get_peeling_costs_all_drs): Likewise.
8085         (vect_peeling_hash_get_lowest_cost): Likewise.
8086         (vect_enhance_data_refs_alignment): Likewise.
8087         (vect_find_same_alignment_drs): Likewise.
8088         (vect_analyze_data_refs_alignment): Likewise.
8089         (vect_analyze_group_access_1): Likewise.
8090         (vect_analyze_group_access): Likewise.
8091         (vect_analyze_data_ref_access): Likewise.
8092         (vect_analyze_data_ref_accesses): Likewise.
8093         (vect_vfa_segment_size): Likewise.
8094         (vect_small_gap_p): Likewise.
8095         (vectorizable_with_step_bound_p): Likewise.
8096         (vect_prune_runtime_alias_test_list): Likewise.
8097         (vect_analyze_data_refs): Likewise.
8098         (vect_supportable_dr_alignment): Likewise.
8099         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8100         (vect_gen_prolog_loop_niters): Likewise.
8101         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8102         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8103         modify DR_STMT.
8104         (vect_recog_mask_conversion_pattern): Likewise.
8105         (vect_try_gather_scatter_pattern): Likewise.
8106         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8107         to vect_get_store_cost.
8108         (vect_get_store_cost): Get stmt_info instead of DR.
8109         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8110         (vect_get_load_cost): Get stmt_info instead of DR.
8112 2018-06-01  Richard Biener  <rguenther@suse.de>
8114         PR middle-end/86017
8115         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8116         vars wrapped in MEM_REFs.
8118 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8120         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8121         Fix subreg tests so that we only return a choice between
8122         GENERAL_REGS and FP_REGS if the original classes included both.
8124 2018-06-01  Richard Biener  <rguenther@suse.de>
8126         PR ipa/85960
8127         * tree-ssa-structalias.c (get_function_part_constraint):
8128         Handle NULL fi->decl.
8129         (find_func_aliases_for_call): Properly handle indirect
8130         fi from direct call.
8131         (find_func_clobbers): Likewise.
8132         (ipa_pta_execute): Likewise.
8133         (create_variable_info_for): For functions that are ifunc_resolver
8134         resolve to a varinfo that contains the result of the resolver call.
8135         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8136         aliases.
8138 2018-05-31  Michael Collison  <michael.collison@arm.com>
8140         * config/aarch64/aarch64.md:
8141         (*fix_to_zero_extenddfdi2): New pattern.
8142         * gcc.target/aarch64/fix_extend1.c: New testcase.
8144 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8146         PR middle-end/78809
8147         PR middle-end/83026
8148         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8149         and BUILT_IN_STRNCMP_EQ.
8150         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8151         BUILT_IN_STRNCMP_EQ.
8152         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8153         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8154         (gimple_fold_builtin): Likewise.
8155         * tree-ssa-strlen.c (compute_string_length): New function.
8156         (determine_min_obsize): New function.
8157         (handle_builtin_string_cmp): New function to handle calls to
8158         string compare functions.
8159         (strlen_optimize_stmt): Add handling to builtin string compare
8160         calls.
8161         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8162         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8163         * tree.c (build_common_builtin_nodes): Add new defines of
8164         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8166 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8168         PR target/85984
8169         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8170         functions with naked attribute.
8172 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8174         * config/i386/sse.md (avx_vec_concat<mode>):
8175         Substitute concat_tg_mode mode attribute with xtg_mode.
8176         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8177         (concat_tg_mode): Remove mode attribute.
8179 2018-05-31  Martin Sebor  <msebor@redhat.com>
8181         PR c/82063
8182         * calls.c (alloc_max_size): Correct a logic error/typo.
8183         Treat excessive arguments as infinite.  Warn for invalid arguments.
8184         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8186 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8188         PR target/85829
8189         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8190         and movx for Haswell.
8192 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8193             Cesar Philippidis  <cesar@codesourcery.com>
8195         PR middle-end/85879
8196         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8197         when emitting error on private/firstprivate reductions.
8198         * omp-low.c (lower_omp_target): Avoid reference-type processing
8199         on pointers for firstprivate clause.
8201 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8203         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8204         (st1x2): Likewise.
8205         (st1x3): Likewise.
8206         * config/aarch64/aarch64-simd.md
8207         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8208         (aarch64_ld1_x3_<mode>): Likewise
8209         (aarch64_st1x2<VALLDIF:mode>): Likewise
8210         (aarch64_st1_x2_<mode>): Likewise
8211         (aarch64_st1x3<VALLDIF:mode>): Likewise
8212         (aarch64_st1_x3_<mode>): Likewise
8213         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8214         (vld1_s8_x3): Likewise.
8215         (vld1_u16_x3): Likewise.
8216         (vld1_s16_x3): Likewise.
8217         (vld1_u32_x3): Likewise.
8218         (vld1_s32_x3): Likewise.
8219         (vld1_u64_x3): Likewise.
8220         (vld1_s64_x3): Likewise.
8221         (vld1_f16_x3): Likewise.
8222         (vld1_f32_x3): Likewise.
8223         (vld1_f64_x3): Likewise.
8224         (vld1_p8_x3): Likewise.
8225         (vld1_p16_x3): Likewise.
8226         (vld1_p64_x3): Likewise.
8227         (vld1q_u8_x3): Likewise.
8228         (vld1q_s8_x3): Likewise.
8229         (vld1q_u16_x3): Likewise.
8230         (vld1q_s16_x3): Likewise.
8231         (vld1q_u32_x3): Likewise.
8232         (vld1q_s32_x3): Likewise.
8233         (vld1q_u64_x3): Likewise.
8234         (vld1q_s64_x3): Likewise.
8235         (vld1q_f16_x3): Likewise.
8236         (vld1q_f32_x3): Likewise.
8237         (vld1q_f64_x3): Likewise.
8238         (vld1q_p8_x3): Likewise.
8239         (vld1q_p16_x3): Likewise.
8240         (vld1q_p64_x3): Likewise.
8241         (vst1_s64_x2): Likewise.
8242         (vst1_u64_x2): Likewise.
8243         (vst1_f64_x2): Likewise.
8244         (vst1_s8_x2): Likewise.
8245         (vst1_p8_x2): Likewise.
8246         (vst1_s16_x2): Likewise.
8247         (vst1_p16_x2): Likewise.
8248         (vst1_s32_x2): Likewise.
8249         (vst1_u8_x2): Likewise.
8250         (vst1_u16_x2): Likewise.
8251         (vst1_u32_x2): Likewise.
8252         (vst1_f16_x2): Likewise.
8253         (vst1_f32_x2): Likewise.
8254         (vst1_p64_x2): Likewise.
8255         (vst1q_s8_x2): Likewise.
8256         (vst1q_p8_x2): Likewise.
8257         (vst1q_s16_x2): Likewise.
8258         (vst1q_p16_x2): Likewise.
8259         (vst1q_s32_x2): Likewise.
8260         (vst1q_s64_x2): Likewise.
8261         (vst1q_u8_x2): Likewise.
8262         (vst1q_u16_x2): Likewise.
8263         (vst1q_u32_x2): Likewise.
8264         (vst1q_u64_x2): Likewise.
8265         (vst1q_f16_x2): Likewise.
8266         (vst1q_f32_x2): Likewise.
8267         (vst1q_f64_x2): Likewise.
8268         (vst1q_p64_x2): Likewise.
8269         (vst1_s64_x3): Likewise.
8270         (vst1_u64_x3): Likewise.
8271         (vst1_f64_x3): Likewise.
8272         (vst1_s8_x3): Likewise.
8273         (vst1_p8_x3): Likewise.
8274         (vst1_s16_x3): Likewise.
8275         (vst1_p16_x3): Likewise.
8276         (vst1_s32_x3): Likewise.
8277         (vst1_u8_x3): Likewise.
8278         (vst1_u16_x3): Likewise.
8279         (vst1_u32_x3): Likewise.
8280         (vst1_f16_x3): Likewise.
8281         (vst1_f32_x3): Likewise.
8282         (vst1_p64_x3): Likewise.
8283         (vst1q_s8_x3): Likewise.
8284         (vst1q_p8_x3): Likewise.
8285         (vst1q_s16_x3): Likewise.
8286         (vst1q_p16_x3): Likewise.
8287         (vst1q_s32_x3): Likewise.
8288         (vst1q_s64_x3): Likewise.
8289         (vst1q_u8_x3): Likewise.
8290         (vst1q_u16_x3): Likewise.
8291         (vst1q_u32_x3): Likewise.
8292         (vst1q_u64_x3): Likewise.
8293         (vst1q_f16_x3): Likewise.
8294         (vst1q_f32_x3): Likewise.
8295         (vst1q_f64_x3): Likewise.
8296         (vst1q_p64_x3): Likewise.
8298 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8300         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8301         user_label_prefix to name.
8303         * tree-core.h: Update comment about the format of NAME string
8304         passed to handler in attribute_spec.
8306         * config/msp430/msp430.md: Remove erroneous subreg expression from
8307         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8308         zero_extend{q,h}isi2.
8310 2018-05-30  Borislav Petkov  <bp@suse.de>
8312         * doc/extend.texi: Document some architecture specific
8313         constraints and sort entries.
8315 2018-05-30  Martin Sebor  <msebor@redhat.com>
8317         PR middle-end/85369
8318         * builtins.c (expand_builtin_stpcpy_1): New function.
8319         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8320         only if the former succeeds.
8322 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8324         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8325         in saphira.
8327 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8329         * doc/invoke.texi (-flinker-output): Document
8331 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8333         * passes.c (ipa_write_summaries): Only modify statements if body
8334         is in memory.
8335         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8336         incrementally linking.
8337         (ipa_passes): Likewise.
8338         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8339         pass down resolution info.
8340         * common.opt (flag_incremental_link): Update info.
8341         * gcc.c (plugin specs): Turn flinker-output=* to
8342         -plugin-opt=-linker-output-known
8343         * toplev.c (compile_file): Also cut compilation when doing incremental
8344         link.
8345         * flag-types. (enum lto_partition_model): Add
8346         LTO_LINKER_OUTPUT_NOLTOREL.
8347         (invoke.texi): Add -flinker-output docs.
8348         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8349         link same way as WPA; do not stream in dead initializers.
8351         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8352         darf2out_register_external_decl): Support incremental link.
8354 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8356         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8358 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8360         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8361         it down to simple_object_copy_lto_debug_sections.
8362         (run_gcc): Determine incremental LTO link time and configure
8363         lto1 into non-wpa mode, disable renaming of debug sections.
8365 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8367         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8368         descriptions of various incorrectly documented functions.
8370 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8372         Revert:
8373         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8374         address check not strict.
8376 2018-05-30  Richard Biener  <rguenther@suse.de>
8378         PR tree-optimization/85964
8379         * tracer.c (better_p): Drop initialized count check, we only
8380         call the function with initialized counts now.
8381         (find_best_successor): Do find a best edge if one
8382         has uninitialized count.
8383         (find_best_predecessor): Likewise.  Do BB frequency check only
8384         if count is initialized.
8386 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8388         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8389         (aarch64_ldrstr_offset_compare): New.
8390         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8391         load/store orderings.
8392         (aarch64_gen_adjusted_ldpstp): Likewise.
8394 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8396         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8397         Check for subset of GENERAL_REGS and FP_REGS.
8398         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8399         r=w alternative.
8401 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8403         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8404         and wi::to_poly_offset.  Add the current offset and then check
8405         whether the sum fits, rather than using an unchecked addition of
8406         a checked term.  Check for a shwi rather than a uhwi.
8407         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8408         (store_constructor): Use poly_int_tree_p.
8409         (expand_expr_real_1): Likewise.
8410         * function.c (assign_temp): Likewise.
8411         * fold-const.c (const_binop): Use poly_int_tree_p and
8412         wi::to_poly_offset.
8413         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8414         division.
8415         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8416         to_poly_offset for MEM offsets.
8417         * ipa-icf.c (sem_variable::equals): Likewise.
8418         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8419         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8420         wi::to_poly_offset for BIT_FIELD_REF offsets.
8421         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8422         wi::to_poly_offset.
8423         * var-tracking.c (emit_note_insn_var_location): Use
8424         tree_to_poly_uint64.
8426 2018-05-29  Jim Wilson  <jimw@sifive.com>
8428         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8430 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8432         PR target/85950
8433         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8434         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8435         sequence.
8436         (sse4_1_round<mode>2): Use nonimmediate_operand
8437         for operand 1 predicate.
8439 2018-05-29  Martin Sebor  <msebor@redhat.com>
8440             Richard Biener  <rguenther@suse.de>
8442         PR testsuite/85888
8443         * calls.c (get_size_range): Call determine_value_range instead
8444         of get_value_range..
8445         * tree-vrp.h (determine_value_range): Declared new function.
8446         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8448 2018-05-29  Richard Biener  <rguenther@suse.de>
8450         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8451         sure to use non-pattern stmts for get_earlier_stmt arguments.
8452         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8453         called on pattern stmts.
8454         (get_later_stmt): Likewise.
8456 2018-05-29  Martin Liska  <mliska@suse.cz>
8458         PR gcov-profile/85759
8459         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8460         env variables.
8462 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8464         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8465         VEC_UNPACK_*_EXPR.
8466         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8467         VEC_PACK_*_EXPR.
8469         PR target/85918
8470         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8471         VEC_PACK_FLOAT_EXPR): New tree codes.
8472         * tree-pretty-print.c (op_code_prio): Handle
8473         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8474         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8475         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8476         * tree-inline.c (estimate_operator_cost): Likewise.
8477         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8478         * fold-const.c (const_binop): Likewise.
8479         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8480         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8481         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8482         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8483         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8484         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8485         * expr.c (expand_expr_real_2): Likewise.
8486         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8487         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8488         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8489         optabs.
8490         * optabs.c (expand_widen_pattern_expr): For
8491         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8492         sign from result type rather than operand's type.
8493         (expand_binop_directly): For vec_packu_float_optab and
8494         vec_packs_float_optab allow result type to be different from operand's
8495         type.
8496         * optabs-tree.c (optab_for_tree_code): Handle
8497         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8498         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8499         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8500         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8501         VEC_PACK_FLOAT_EXPR.
8502         * tree-vect-stmts.c (supportable_widening_operation): Handle
8503         FIX_TRUNC_EXPR.
8504         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8505         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8506         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8507         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8508         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8509         mode attributes.
8510         (vec_pack<floatprefix>_float_<mode>): New expander.
8511         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8512         attributes.
8513         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8514         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8515         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8516         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8517         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8518         Document.
8519         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8520         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8521         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8522         VEC_PACK_FLOAT_EXPR): Document.
8524 2018-05-29  Richard Biener  <rguenther@suse.de>
8526         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8527         member.
8528         (stmt_vec_info_vec): Make pointer.
8529         (init_stmt_vec_info_vec): Remove.
8530         (free_stmt_vec_info_vec): Likewise.
8531         (set_stmt_vec_info_vec): New function.
8532         (free_stmt_vec_infos): Likewise.
8533         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8534         (set_vinfo_for_stmt): Likewise.
8535         (get_earlier_stmt): Likewise.
8536         (get_later_stmt): Likewise.
8537         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8538         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8539         (vec_info::~vec_info): Free stmt_vec_infos.
8540         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8541         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8542         (pass_slp_vectorize::execute): Likewise.
8543         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8544         (free_stmt_vec_info_vec): Likewise.
8545         (set_stmt_vec_info_vec): New function.
8546         (free_stmt_vec_infos): Likewise.
8547         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8548         the global stmt_vec_info_vec.
8549         * tree-parloops.c (gather_scalar_reductions): Use
8550         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8551         vector.
8553 2018-05-29  Richard Biener  <rguenther@suse.de>
8555         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8557 2018-05-29  Martin Liska  <mliska@suse.cz>
8558             David Malcolm  <dmalcolm@redhat.com>
8560         * vec.c (test_reverse): New.
8561         (vec_c_tests): Add new test.
8562         * vec.h (vl_ptr>::reverse): New function.
8564 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8566         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8568         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8569         and later.
8571 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8573         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8575 2018-05-28  Richard Biener  <rguenther@suse.de>
8577         PR tree-optimization/85933
8578         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8579         look at stmts marked as vectorizable.
8581 2018-05-28  Richard Biener  <rguenther@suse.de>
8583         PR tree-optimization/85934
8584         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8585         vector boolean check before scalar optimization.
8587 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8589         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8590         for armv5te.
8592 2018-05-28  Mark Wielaard  <mark@klomp.org>
8594         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8595         if it is an expression containing a minus sign.
8597 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8599         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8601 2018-05-27  Paul Koning  <ni1d@arrl.net>
8603         * config/pdp11/pdp11.md (truncsihi2): Remove.
8605 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8606             Chung-Ju Wu  <jasonwucj@gmail.com>
8608         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8609         implementation.
8610         (unaligned_store_dw): Ditto.
8611         * config/nds32/nds32-memory-manipulation.c
8612         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8613         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8614         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8615         (emit_setmem_word_loop): Rename to ...
8616         (emit_setmem_doubleword_loop): ... this.
8617         (nds32_gen_dup_4_byte_to_word_value): New function.
8618         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8619         (nds32_expand_setmem_loop): Refine implementation.
8620         (nds32_expand_setmem_loop_v3m): Ditto.
8621         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8622         pattern.
8624 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8626         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8628 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8630         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8631         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8632         machine->attr_no_prologue_p.
8633         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8634         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8635         (nds32_expand_epilogue): Consider attr_naked_p.
8636         (nds32_expand_epilogue_v3pop): Likewise.
8637         (nds32_can_use_return_insn): Likewise.
8638         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8639         attr_no_prologue_p fields.
8640         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8642 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8644         PR target/85918
8645         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8646         attributes.
8647         * config/i386/sse.md
8648         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8649         Rename to ...
8650         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8651         ... this.
8652         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8653         Rename to ...
8654         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8655         ... this.
8656         (*<floatsuffix>floatv2div2sf2): Rename to ...
8657         (*float<floatunssuffix>v2div2sf2): ... this.
8658         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8659         (float<floatunssuffix>v2div2sf2_mask): ... this.
8660         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8661         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8662         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8663         to ...
8664         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8665         ... this.
8666         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8667         Rename to ...
8668         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8669         ... this.
8670         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8671         Rename to ...
8672         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8673         ... this.
8674         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8675         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8676         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8677         gen_ufix_truncv8dfv8si2.
8678         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8679         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8680         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8681         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8682         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8683         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8684         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8685         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8687 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8689         PR target/85900
8690         PR target/85345
8691         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8693 2018-05-25  Jim Wilson  <jimw@sifive.com>
8695         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8696         * config/riscv/riscv.c (struct machine_function): Add
8697         interrupt_handler_p and attribute_checked_p fields.
8698         (riscv_attribute_table): Add interrupt.
8699         (riscv_interrupt_type_p): New.
8700         (riscv_save_reg_p): Save extra regs for interrupt handler.
8701         (riscv_use_save_libcall): Return false  for interrupt handler.
8702         (riscv_first_stack_step): Add forward declaration.
8703         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8704         for interrupt handler with large frame.  Use it for saved reg list.
8705         (riscv_expand_prologue): Move flag_stack_usage_info support to
8706         eliminate duplication.
8707         (riscv_expand_epilogue): Generate mret for interrupt handler.
8708         (riscv_epilogue_uses): New.
8709         (riscv_can_use_return_insn): Return false for interrupt handler.
8710         (riscv_function_ok_for_sibcall): Likewise.
8711         (riscv_set_current_function): Add interrupt handler support.
8712         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8713         * config/riscv/riscv.md (UNSPECV_MRET): New.
8714         (GP_REGNUM): New.
8715         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8716         (riscv_mret): New.
8717         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8719 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8721         PR tree-optimization/85712
8722         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8723         this candidate has already been replaced in-situ by a copy.
8725 2018-05-25  Jason Merrill  <jason@redhat.com>
8727         PR c++/80485 - inline function non-zero address.
8728         * symtab.c (nonzero_address): Check DECL_COMDAT.
8730 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8732         PR target/83628
8733         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8734         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8735         extension of SImode operation.  Use const123_operand predicate.
8736         (*saddsi_1): Remove.
8737         (*saddl_se_1): Ditto.
8738         (*ssubsi_1): Ditto.
8739         (*ssubl_se_1): Ditto.
8740         * config/alpha/predicates.md (const123_operand): New predicate.
8741         * config/alpha/constraints.md (P): Use IN_RANGE.
8743 2018-05-25  Richard Biener  <rguenther@suse.de>
8745         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8746         defaulted to true.
8747         (ref_maybe_used_by_stmt_p): Likewise.
8748         (stmt_may_clobber_ref_p): Likewise.
8749         (stmt_may_clobber_ref_p_1): Likewise.
8750         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8751         and pass it along.
8752         (ref_maybe_used_by_stmt_p): Likewise.
8753         (stmt_may_clobber_ref_p): Likewise.
8754         (stmt_may_clobber_ref_p_1): Likewise.
8755         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8756         the alias oracle to disambiguate DRs with stmts DR analysis
8757         couldn't handle.
8758         (vect_analyze_data_refs): Do not give up on not analyzable
8759         DRs for BB vectorization.  Remove code truncating the dataref
8760         vector.
8762 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8764         PR target/85832
8765         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8766         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8767         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8769 2018-05-25  Richard Biener  <rguenther@suse.de>
8771         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8772         function, combining stmt data ref gathering and fatal analysis
8773         parts.
8774         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8775         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8776         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8777         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8778         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8780 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8782         PR tree-optimization/85720
8783         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8784         SCC if all partitions are builtins.
8785         (version_loop_by_alias_check): New parameter.  Generate cancelable
8786         runtime alias check if all partitions are builtins.
8787         (distribute_loop): Update call to above function.
8789 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8791         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8792         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8793         (parm_default_def_partition_arg): Ditto.
8794         (set_parm_default_def_partition): Ditto.
8795         (get_parm_default_def_partitions): Ditto and make it static.
8796         (get_undefined_value_partitions): Ditto and make it static.
8797         (remove_ssa_form): Refactor call to init_var_map here.
8798         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8799         computation for loop region.
8800         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8801         (register_default_def): Delete.
8802         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8803         (parm_default_def_partition_arg): Ditto.
8804         (set_parm_default_def_partition): Ditto.
8805         (get_parm_default_def_partitions): Ditto and make it static.
8806         (get_undefined_value_partitions): Ditto and make it static.
8807         (coalesce_with_default, coalesce_with_default): Update comment.
8808         (create_coalesce_list_for_region): New func factored out from
8809         create_outofssa_var_map.
8810         (populate_coalesce_list_for_outofssa): New func factored out from
8811         create_outofssa_var_map and coalesce_ssa_name.
8812         (create_outofssa_var_map): Delete.
8813         (coalesce_ssa_name): Refactor to support live range computation.
8814         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8815         (get_parm_default_def_partitions): Delete.
8816         (get_undefined_value_partitions): Ditto.
8817         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8818         computation for loop region.
8819         (new_tree_live_info, loe_visit_block): Ditto.
8820         (live_worklist, set_var_live_on_entry): Ditto.
8821         (calculate_live_on_exit, verify_live_on_entry): Ditto.
8822         * tree-ssa-live.h (struct _var_map): New fields.
8823         (init_var_map): Change decl.
8824         (region_contains_p): New.
8826 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8828         * tree-ssa-live.h (live_merge_and_clear): Delete.
8830 2018-05-25  Richard Biener  <rguenther@suse.de>
8832         PR c++/85912
8833         * tree-dump.c (dequeue_and_dump): Remove access to removed
8834         operand 2 of a SWITCH_EXPR.
8836 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8838         * doc/sourcebuild.texi (vect_double_cond_arith): Include
8839         multiplication and division.
8840         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8841         (cond_udiv@var{m}, cond_umod@var{m}): Document.
8842         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8843         (cond_udiv_optab, cond_umod_optab): New optabs.
8844         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8845         (IFN_COND_RDIV): New internal functions.
8846         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8847         TRUNC_MOD_EXPR and RDIV_EXPR.
8848         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8849         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8850         New unspecs.
8851         (SVE_INT_BINARY): Include mult.
8852         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8853         (optab, sve_int_op): Handle mult.
8854         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8855         UNSPEC_COND_DIV.
8856         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8857         for SVE_INT_BINARY_SD.
8859 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8861         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8862         (optab, sve_int_op): Handle div and udiv.
8863         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8864         for SVE_INT_BINARY_SD.
8865         (*<optab><mode>3): New insn for the same.
8867 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8869         * tree-vect-patterns.c: Include predict.h.
8870         (vect_recog_divmod_pattern): Restrict check for division support
8871         to when optimizing for size.
8873 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8875         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8876         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8877         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8878         (gimple_match_op::set_op): Likewise.
8879         (gimple_resimplify4): Declare.
8880         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8881         (expr::gen_transform): Likewise.
8882         (decision_tree::gen): Generate a simplification routine for 4 operands.
8883         * gimple-match-head.c (gimple_simplify): Add an overload for
8884         4 operands.  In the top-level function, handle up to 4 call
8885         arguments and call gimple_resimplify4.
8886         (gimple_resimplify4): New function.
8887         (build_call_internal): Pass a fourth operand.
8888         (maybe_push_to_seq): Likewise.
8889         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8890         Fold VEC_COND_EXPRs of an operation and a default value into
8891         an IFN_COND_* function if possible.
8892         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8893         New unspecs.
8894         (SVE_COND_FP_BINARY): Include them.
8895         (optab, sve_fp_op): Handle them.
8896         (SVE_INT_BINARY_REV): New code iterator.
8897         (SVE_COND_FP_BINARY_REV): New int iterator.
8898         (commutative): New int attribute.
8899         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8900         Declare.
8901         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8902         function.
8903         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8904         (*cond_<optab><mode>): New patterns for reversed operands.
8906 2018-05-25  Richard Biener  <rguenther@suse.de>
8908         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8909         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8910         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8911         (STMT_VINFO_GROUPED_ACCESS): Adjust.
8912         * tree-vect-data-refs.c (everywhere): Adjust users.
8913         * tree-vect-loop.c (everywhere): Likewise.
8914         * tree-vect-slp.c (everywhere): Likewise.
8915         * tree-vect-stmts.c (everywhere): Likewise.
8916         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8918 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8920         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8921         Rename to...
8922         (gcc_cv_as_section_exclude): ... this.
8923         Try Solaris as #exclude syntax.
8924         * configure: Regenerate.
8925         * config.in: Regenerate.
8926         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8927         SECTION_EXCLUDE.
8928         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8929         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8931         * varasm.c (default_elf_asm_named_section): Don't check if
8932         HAVE_GAS_SECTION_EXCLUDE is defined.
8934 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8936         * doc/md.texi: Update the documentation of the cond_* optabs
8937         to mention the new final operand.  Fix GET_MODE_NUNITS call.
8938         Describe the scalar case too.
8939         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8940         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8941         instead of 2.
8942         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8943         (get_conditional_internal_fn): Update comment.
8944         * tree-vect-loop.c (vectorizable_reduction): Pass the original
8945         accumulator value as a final argument to conditional functions.
8946         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8947         a define_expand and add an "else" operand.  Assert for now that
8948         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
8949         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8950         (*cond_<optab><mode>): New patterns.
8951         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8952         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8953         (UNSPEC_COND_EOR): Delete.
8954         (optab): Remove associated mappings.
8955         (SVE_INT_BINARY): New code iterator.
8956         (sve_int_op): Remove int attribute and add "minus" to the code
8957         attribute.
8958         (SVE_COND_INT_OP): Delete.
8959         (SVE_COND_FP_OP): Rename to...
8960         (SVE_COND_FP_BINARY): ...this.
8962 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8964         * optabs.c (can_reuse_operands_p): New function.
8965         (maybe_legitimize_operands): Try to reuse the results for
8966         earlier operands.
8968 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8970         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8971         Add {q} suffix to insn mnemonic.
8973 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8975         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8976         (msp430_warn_func_return): New.
8978 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
8980         * fold-const.c (tree_nonzero_bits): New function.
8981         * fold-const.h (tree_nonzero_bits): Likewise.
8982         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8983         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8985 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8987         PR target/85900
8988         PR target/85345
8989         * varasm.c (assemble_alias): Check ifunc_resolver only on
8990         FUNCTION_DECL.
8992 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8994         PR target/85903
8995         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8996         when memory input operand is handled.
8998 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9000         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9001         global.
9002         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9004 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9006         * match.pd: Delay FMA folds until after vectorization.
9008 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9010         PR target/83009
9011         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9012         address check not strict.
9014 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9016         * gimple-match.h (gimple_match_op): New class.
9017         (mprts_hook): Replace parameters with a gimple_match_op *.
9018         (maybe_build_generic_op): Likewise.
9019         (gimple_simplified_result_is_gimple_val): Replace parameters with
9020         a const gimple_match_op *.
9021         (gimple_simplify): Replace code_helper * and tree * parameters with
9022         a gimple_match_op * parameter.
9023         (gimple_resimplify1): Replace code_helper *, tree and tree *
9024         parameters with a gimple_match_op * parameter.
9025         (gimple_resimplify2): Likewise.
9026         (gimple_resimplify3): Likewise.
9027         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9028         parameters with a gimple_match_op * parameter.
9029         * gimple-match-head.c (gimple_simplify): Change prototypes of
9030         auto-generated functions to take a gimple_match_op * instead of
9031         separate code_helper * and tree * parameters.  Make the same
9032         change in the top-level overload and update calls to the
9033         gimple_resimplify routines.  Update calls to the auto-generated
9034         functions and to maybe_push_res_to_seq in the publicly-facing
9035         operation-specific gimple_simplify overloads.
9036         (gimple_match_op::MAX_NUM_OPS): Define.
9037         (gimple_resimplify1): Replace rcode and ops with a single res_op
9038         parameter.  Update call to gimple_simplify.
9039         (gimple_resimplify2): Likewise.
9040         (gimple_resimplify3): Likewise.
9041         (mprts_hook): Replace parameters with a gimple_match_op *.
9042         (maybe_build_generic_op): Likewise.
9043         (build_call_internal): Replace type, nargs and ops with
9044         a gimple_match_op *.
9045         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9046         with a single gimple_match_op *.  Update calls to mprts_hook,
9047         build_call_internal and gimple_simplified_result_is_gimple_val.
9048         Factor out code that is common to the tree_code and combined_fn cases.
9049         * genmatch.c (expr::gen_transform): Replace tem_code and
9050         tem_ops with a gimple_match_op called tem_op.  Update calls
9051         to the gimple_resimplify functions and maybe_push_res_to_seq.
9052         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9053         res_ops.  Update call to the gimple_resimplify functions.
9054         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9055         (decision_tree::gen): Make the functions take a gimple_match_op *
9056         called res_op instead of separate res_code and res_ops parameters.
9057         Update call accordingly.
9058         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9059         and ops with a single res_op parameter.  Update calls to
9060         maybe_build_generic_op and maybe_push_res_to_seq.
9061         (fold_stmt_1): Update calls to gimple_simplify and
9062         replace_stmt_with_simplification.
9063         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9064         and gimple_simplified_result_is_gimple_val.
9065         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9066         gimple_simplify.
9067         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9068         with a gimple_match_op *.
9069         (vn_nary_build_or_lookup): Likewise.  Update call to
9070         vn_nary_build_or_lookup_1.
9071         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9072         gimple_match_op *.  Update calls to the gimple_resimplify routines
9073         and to gimple_simplified_result_is_gimple_val.
9074         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9075         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9076         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9077         (visit_nary_op): Likewise.
9078         (visit_reference_op_load): Likewise.
9080 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9082         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9083         modifier for printing the step amount.
9085 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9087         PR target/78849
9088         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9089         types.
9091 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9093         * doc/sourcebuild.texi (Endianness): New subsubsection.
9095 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9097         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9098         <prefetch_dynamic_strides>: New const bool field.
9099         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9100         prefetch_dynamic_strides.
9101         (exynosm1_prefetch_tune): Likewise.
9102         (thunderxt88_prefetch_tune): Likewise.
9103         (thunderx_prefetch_tune): Likewise.
9104         (thunderx2t99_prefetch_tune): Likewise.
9105         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9106         false.
9107         (aarch64_override_options_internal): Update to set
9108         PARAM_PREFETCH_DYNAMIC_STRIDES.
9109         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9110         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9111         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9112         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9113         prefetch-dynamic-strides setting.
9115 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9117         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9118         <minimum_stride>: New const int field.
9119         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9120         minimum_stride field defaulting to -1.
9121         (exynosm1_prefetch_tune): Likewise.
9122         (thunderxt88_prefetch_tune): Likewise.
9123         (thunderx_prefetch_tune): Likewise.
9124         (thunderx2t99_prefetch_tune): Likewise.
9125         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9126         <default_opt_level>: Set to 3.
9127         (aarch64_override_options_internal): Update to set
9128         PARAM_PREFETCH_MINIMUM_STRIDE.
9129         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9130         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9131         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9132         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9133         stride is constant and is below the minimum stride threshold.
9135 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9137         * config/arm/arm-cpus.in (mode26): Delete.
9138         (armv4): Delete mode26 reference.
9139         * config/arm/arm.c (arm_configure_build_target): Delete use of
9140         isa_bit_mode26.
9142 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9144         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9145         New insn pattern.
9146         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9147         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9148         for non-SSE modes.
9149         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9150         (floatunsdidf2): Ditto.
9152 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9154         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9155         (fixuns_trunc<mode>si2_avx512f): Ditto.
9156         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9157         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9158         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9160 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9162         PR rtl-optimization/79985
9163         * df-scan.c (df_insn_refs_collect): Remove special case for
9164         global registers and asm statements.
9166 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9168         * extend.texi (Global Register Variables): Rewrite the bullet list.
9169         Note that the register is available for allocation. Note that access
9170         via inline asm must use constraints. Add note about async-signal
9171         handlers. Remove paragraph about automagic register selection.
9173 2018-05-23  Richard Biener  <rguenther@suse.de>
9175         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9176         of fixed offset from memset VN.
9178 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9180         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9181         first_interp field.
9182         (alloc_cand_and_find_basis): Initialize first_interp field.
9183         (slsr_process_mul): Modify first_interp field.
9184         (slsr_process_add): Likewise.
9185         (slsr_process_cast): Modify first_interp field for each new
9186         interpretation.
9187         (slsr_process_copy): Likewise.
9188         (dump_candidate): Dump first_interp field.
9189         (replace_mult_candidate): Process all interpretations, not just
9190         subsequent ones.
9191         (replace_rhs_if_not_dup): Likewise.
9192         (replace_one_candidate): Likewise.
9194 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9196         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9197         Add new boolean.
9198         (aarch64_needs_frame_chain): New function.
9199         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9201 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9203         PR target/84882
9204         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9205         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9206         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9207         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9208         as true for strict-align.
9209         (aarch64_can_inline_p): Perform checks even when callee has no
9210         attributes to check for strict alignment.
9211         * doc/extend.texi (AArch64 Function Attributes): Document
9212         no-strict-align.
9213         * doc/invoke.texi: (AArch64 Options): Likewise.
9215 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9217         PR tree-optimization/85853
9218         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9219         the handling of the root of the node to...
9220         (vect_slp_analyze_node_operations_1): ...this new function,
9221         and run the whole thing with the child nodes' def types
9222         set according to their SLP node's def type.
9224 2018-05-23  Richard Biener  <rguenther@suse.de>
9226         PR middle-end/85874
9227         * tree-data-ref.c (create_runtime_alias_checks): Defer
9228         and ignore overflow warnings.
9230 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9232         PR tree-optimization/85822
9233         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9234         constants.
9236 2018-05-23  Richard Biener  <rguenther@suse.de>
9238         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9239         memset constants via native_interpret_expr.
9241 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9243         PR target/85345
9244         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9245         attribute.
9246         (cgraph_node::create_alias): Likewise.
9247         (cgraph_node::get_availability): Check ifunc_resolver instead
9248         of looking up ifunc attribute.
9249         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9250         * varasm.c (do_assemble_alias): Likewise.
9251         (assemble_alias): Likewise.
9252         (default_binds_local_p_3): Likewise.
9253         * cgraph.h (cgraph_node): Add ifunc_resolver.
9254         (cgraph_node::only_called_directly_or_aliased_p): Return false
9255         for IFUNC resolver.
9256         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9257         attribute.
9258         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9259         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9260         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9261         instead of looking up ifunc attribute.
9263 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9265         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9267 2018-05-22  Martin Sebor  <msebor@redhat.com>
9269         PR middle-end/85359
9270         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9271         only when expasion succeeds.
9272         (expand_builtin_strcmp): Same.
9273         (expand_builtin_strncmp): Same.
9275 2018-05-22  Martin Sebor  <msebor@redhat.com>
9277         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9279 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9280             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9282         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9283         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9284         code.
9285         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9286         Add check for legitimate_address.
9287         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9288         (aarch64_swap_ldrstr_operands): New.
9289         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9290         Define prototype.
9292 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9293             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9295         * config/aarch64/aarch64.md: New patterns to generate stp
9296         and ldp.
9297         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9298         single words and double words.
9299         (load_pair_sw, load_pair_dw): Likewise.
9300         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9301         Delete.
9302         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9303         Delete.
9304         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9305         for different mode ldpstp and add peephole for merged zero stores.
9306         Likewise for loads.
9307         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9308         Add size check.
9309         (aarch64_gen_store_pair): Rename calls to match new patterns.
9310         (aarch64_gen_load_pair): Rename calls to match new patterns.
9311         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9312         (load_pair<DREG:mode><DREG2:mode>): ... This.
9313         (store_pair<mode>): Rename to...
9314         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9315         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9316         New mode iterators.
9317         (V_INT_EQUIV): Handle SImode.
9318         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9319         New predicate.
9321 2018-05-22  Martin Sebor  <msebor@redhat.com>
9323         PR c/85623
9324         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9325         or ajust the presumed bound on an operation to avoid unnecessary
9326         warnings.
9328 2018-05-22  Martin Sebor  <msebor@redhat.com>
9330         PR tree-optimization/85826
9331         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9332         assuming that a DECL necesarily has a constant size.
9334 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9336         PR middle-end/85862
9337         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9339 2018-05-22  Richard Biener  <rguenther@suse.de>
9341         PR tree-optimization/85834
9342         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9343         non-constant and non-zero memset arguments.
9345 2018-05-22  Martin Liska  <mliska@suse.cz>
9347         PR ipa/85607
9348         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9350 2018-05-22  Richard Biener  <rguenther@suse.de>
9352         PR tree-optimization/85863
9353         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9354         comparisons when vectype is specified.
9355         (vectorizable_condition): Do not specify vectype for
9356         vect_is_simple_cond when SLP vectorizing.
9358 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9360         PR target/85657
9361         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9362         define __ibm128 as long double.
9363         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9364         as a distinct type when IEEE 128-bit support is enabled.
9365         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9366         128-bit types to use the correct functions.
9367         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9368         convert between 128-bit floating point types that have different
9369         modes but the same representation, instead of using gen_lowpart to
9370         makean alias.
9371         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9372         KFmode.
9373         (IFKF_reg): New attributes to give the register constraints for
9374         IFmode and KFmode.
9375         (extend<mode>tf2_internal): New insns to mark an explicit
9376         conversion between 128-bit floating point types that have a
9377         different mode but share the same representation.
9379 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9381         PR tree-optimization/85814
9382         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9383         a null return from get_strinfo when unsharing the next
9384         strinfo in the chain.
9386 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9388         PR gcc/84923
9389         * varasm.c (weak_finish): Clean up weak_decls.
9391 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9393         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9394         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9395         UNSPEC_UADALP values.
9396         * config/aarch64/iterators.md (ABAL): New int iterator.
9397         (ABDL2): Likewise.
9398         (ADALP): Likewise.
9399         (sur): Add mappings for the above.
9400         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9401         New define_insn.
9402         (aarch64_<sur>abal<mode>_4): Likewise.
9403         (aarch64_<sur>adalp<mode>_3): Likewise.
9404         (<sur>sadv16qi): New define_expand.
9406 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9408         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9409         (*movdf_internal): Ditto.
9410         (*rcpsf2_sse): Ditto.
9411         (*rsqrtsf2_sse): Ditto.
9412         (*sqrt<mode>2_sse): Ditto.
9414 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9416         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9417         eor3q<mode>4.
9418         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9419         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9420         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9421         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9422         vbcaxq_s64): New.
9423         * config/aarch64/arm_neon.h: Likewise.
9424         * config/aarch64/iterators.md (VQ_I): New.
9426 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9428         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9429         arc*-*-linux*.
9430         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9431         MULTILIB_DIRNAMES
9433 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9435         * config/nds32/constraints.md (S): New constraint.
9436         * config/nds32/nds32.md (call_internal): Use constraint S.
9437         (call_value_internal): Likewise.
9438         (sibcall_internal): Likewise.
9439         (sibcall_value_internal): Likewise.
9441 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9442             Chung-Ju Wu  <jasonwucj@gmail.com>
9444         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9445         into consideration.
9447 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9448             Chung-Ju Wu  <jasonwucj@gmail.com>
9450         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9451         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9452         (nds32_rtx_costs_impl): Simplify.
9453         (nds32_address_cost_impl): Simplify.
9454         (nds32_init_rtx_costs): New function.
9455         (nds32_rtx_costs_speed_prefer): Likewise.
9456         (nds32_rtx_costs_size_prefer): Likewise.
9457         (nds32_address_cost_speed_prefer): Likewise.
9458         (nds32_address_cost_speed_fwprop): Likewise.
9459         (nds32_address_cost_size_prefer): Likewise.
9460         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9461         * config/nds32/nds32.c (nds32_option_override): Use
9462         nds32_init_rtx_costs function.
9464 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9466         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9467         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9468         (TARGET_PIPELINE_N8): Likewise.
9469         (TARGET_PIPELINE_N10): Likewise.
9470         (TARGET_PIPELINE_N13): Likewise.
9471         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9473 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9475         * config/nds32/nds32-fpu.md: Update copyright year.
9477 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9479         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9481 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9483         * config/nds32/nds32.c
9484         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9485         * config/nds32/nds32.opt (minline-asm-r15): New option.
9487 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9489         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9490         MASK_HW_ABS.
9491         * config/nds32/nds32.md (abssi2): New pattern.
9493 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9495         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9496         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9497         Merge insn pattern from sse_cvtsi2ss<round_name> and
9498         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9499         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9500         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9501         using SWI48 mode iterator.
9502         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9503         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9504         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9505         pattern from sse_cvttss2si<round_saeonly_name>
9506         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9507         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9508         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9509         using SWI48 mode iterator.
9510         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9511         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9512         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9513         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9514         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9515         using SWI48 mode iterator.
9516         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9517         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9518         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9519         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9520         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9521         SWI48 mode iterator.
9522         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9523         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9524         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9525         pattern from sse_cvttsd2si<round_saeonly_name>
9526         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9528 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9530         * config/nds32/nds32-md-auxiliary.c
9531         (nds32_valid_smw_lwm_base_p): Refine.
9532         (nds32_output_smw_single_word): Refine.
9533         (nds32_output_smw_double_word): New.
9534         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9536 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9538         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9539         (nds32_output_stack_pop): Refine.
9540         (nds32_expand_unaligned_load): Refine.
9541         (nds32_expand_unaligned_store): Refine.
9543 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9544             Chung-Ju Wu  <jasonwucj@gmail.com>
9546         * config/nds32/constants.md: Add TP_REGNUM constant.
9547         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9548         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9549         UNSPEC_ADD32.
9550         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9551         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9552         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9553         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9554         and PIC code generation.
9555         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9556         code generation.
9557         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9558         optimization.
9559         * config/nds32/nds32.md: Support TLS and PIC.
9560         * config/nds32/nds32.c: Support TLS and PIC.
9561         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9562         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9563         predicate.
9565 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9567         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9568         mode with E_ prefix.
9570 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9571             Chung-Ju Wu  <jasonwucj@gmail.com>
9573         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9574         * config/nds32/nds32-md-auxiliary.c
9575         (symbolic_reference_mentioned_p): New.
9576         (nds32_legitimize_ict_address): New.
9577         (nds32_expand_ict_move): New.
9578         (nds32_indirect_call_referenced_p): New.
9579         (nds32_symbol_binds_local_p): Delete.
9580         (nds32_long_call_p): Modify.
9581         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9582         * config/nds32/nds32-protos.h
9583         (symbolic_reference_mentioned_p): Declare.
9584         (nds32_legitimize_ict_address): Declare.
9585         (nds32_expand_ict_move): Declare.
9586         (nds32_indirect_call_referenced_p): Declare.
9587         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9588         (nds32_relax_group): Use nds32_ict_const_p as condition.
9589         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9590         (nds32_asm_file_start): Output ict_model directive in asm code.
9591         (nds32_legitimate_address_p): Consider indirect call.
9592         (nds32_print_operand): Consider indirect call.
9593         (nds32_print_operand_address): Consider indirect call.
9594         (nds32_insert_attributes): Handle "indirect_call" attribute.
9595         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9596         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9597         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9598         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9599         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9600         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9601         (TARGET_ICT_MODEL_SMALL): Define.
9602         (TARGET_ICT_MODEL_LARGE): Define.
9603         * config/nds32/nds32.md (movsi): Consider ict model.
9604         (call, call_value): Consider ict model.
9605         (sibcall, sibcall_value): Consider ict model.
9606         * config/nds32/nds32.opt (mict-model): New option.
9607         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9608         model.
9610 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9611             Monk Chiang  <sh.chiang04@gmail.com>
9612             Jim Wilson <jimw@sifive.com>
9614         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9615         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9616         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9617         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9618         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9619         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9620         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9621         compute save_libcall_adjustment properly.
9622         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9623         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9624         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9625         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9626         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9627         (ABI_SPEC): Handle mabi=ilp32e.
9628         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9629         (RVE): Add RVE mask.
9630         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9631         <-march>: Add rv32e as an example.
9633 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9635         PR c++/82899
9636         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9637         (intra_create_variable_infos): Handle C++ constructors.
9639 2018-05-18  Martin Liska  <mliska@suse.cz>
9641         * passes.def: Remove a redundant pass.
9643 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9645         PR bootstrap/85838
9646         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9648 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9650         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9651         (ARMv4): Update.
9652         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9653         (ARMv6m): Update.
9654         (armv2, armv2a, armv3, armv3m): Delete architectures.
9655         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9656         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9657         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9658         Delete cpus.
9659         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9660         (*mulsidi3adddi): Likewise.
9661         (mulsidi3): Likewise.
9662         (*mulsidi3_nov6): Likewise.
9663         (umulsidi3): Likewise.
9664         (umulsidi3_nov6): Likewise.
9665         (umaddsidi4): Likewise.
9666         (*umulsidi3adddi): Likewise.
9667         (smulsi3_highpart): Likewise.
9668         (*smulsi3_highpart_nov6): Likewise.
9669         (umulsi3_highpart): Likewise.
9670         (*umulsi3_highpart_nov6): Likewise.
9671         * config/arm/arm.h (arm_arch3m): Delete.
9672         * config/arm/arm.c (arm_arch3m): Delete.
9673         (arm_option_override_internal): Update armv3-related comment.
9674         (arm_configure_build_target): Delete use of isa_bit_mode32.
9675         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9676         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9677         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9678         (mulsa3): Likewise.
9679         (mulusa3): Likewise.
9680         * config/arm/arm-protos.h (arm_arch3m): Delete.
9681         * config/arm/arm-tables.opt: Regenerate.
9682         * config/arm/arm-tune.md: Likewise.
9683         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9684         deleted architectures.
9686 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9688         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9689         (armv5t, armv5te): New features.
9690         (ARMv5, ARMv5e): Delete fgroups.
9691         (ARMv5t, ARMv5te): Adjust for above changes.
9692         (ARMv6m): Likewise.
9693         (armv5, armv5e): Delete arches.
9694         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9695         arm_arch5.
9696         (*call_reg_arm): Likewise.
9697         (*call_value_reg_armv5): Likewise.
9698         (*call_value_reg_arm): Likewise.
9699         (*call_symbol): Likewise.
9700         (*call_value_symbol): Likewise.
9701         (*sibcall_insn): Likewise.
9702         (*sibcall_value_insn): Likewise.
9703         (clzsi2): Likewise.
9704         (prefetch): Likewise.
9705         (define_split and define_peephole2 dependent on arm_arch5):
9706         Likewise.
9707         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9708         arm_arch5e.
9709         (TARGET_ARM_QBIT): Likewise.
9710         (TARGET_DSP_MULTIPLY): Likewise.
9711         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9712         (arm_arch5, arm_arch5e): Delete.
9713         (arm_arch5t, arm_arch5te): Declare.
9714         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9715         (arm_arch5t): Declare.
9716         (arm_option_reconfigure_globals): Update for the above.
9717         (arm_options_perform_arch_sanity_checks): Update comment, replace
9718         use of arm_arch5 with arm_arch5t.
9719         (use_return_insn): Likewise.
9720         (arm_emit_call_insn): Likewise.
9721         (output_return_instruction): Likewise.
9722         (arm_final_prescan_insn): Likewise.
9723         (arm_coproc_builtin_available): Likewise.
9724         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9725         arm_arch5e with arm_arch5t and arm_arch5te.
9726         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9727         (arm_arch5t, arm_arch5te): Declare.
9728         * config/arm/arm-tables.opt: Regenerate.
9729         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9730         * config/arm/t-multilib: Likewise.
9731         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9732         instead of arm_arch5.
9733         (*call_reg_thumb1): Likewise.
9734         (*call_value_reg_thumb1_v5): Likewise.
9735         (*call_value_reg_thumb1): Likewise.
9736         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9737         unreachable path.
9738         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9740 2018-05-18  Martin Liska  <mliska@suse.cz>
9742         PR gcov-profile/84846
9743         * doc/gcov.texi: Document -t option of gcov tool.
9745 2018-05-18  Martin Liska  <mliska@suse.cz>
9747         PR gcov-profile/84846
9748         * gcov.c (print_usage): Add new -t option.
9749         (process_args): Handle the option.
9750         (generate_results): Use stdout as output when requested by
9751         the option.
9753 2018-05-18  Martin Liska  <mliska@suse.cz>
9755         PR gcov-profile/84846
9756         * coverage.c (coverage_init): Write PWD to .gcno file.
9757         * doc/gcov.texi: Document how working directory is printed.
9758         * gcov-dump.c (dump_gcov_file): Print PWD.
9759         * gcov.c (output_intermediate_file): Likewise.
9760         (read_graph_file): Read PWD string.
9761         (output_lines): Print PWD.
9763 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9765         PR middle-end/85817
9766         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9767         for retval and return false if all args to phi are zero.
9769 2018-05-18  Richard Biener  <rguenther@suse.de>
9771         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9772         method.
9773         (evrp_dom_walker::before_dom_children): Call it.
9775 2018-05-18  Richard Biener  <rguenther@suse.de>
9777         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9778         results when processing array refs with variable index.
9780 2018-05-18  Toon Moene  <toon@moene.org>
9782         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9783         directly after that of -floop-interchange. Indicate that both
9784         options are enabled by default when specifying -O3.
9786 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9788         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9789         iterator.  Delete separate integer-mode vec_set<mode> expander.
9790         (aarch64_simd_vec_setv2di): Delete.
9791         (vec_setv2di): Delete.
9792         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9793         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9794         the "w, r" alternative.
9796 2018-05-18  Martin Liska  <mliska@suse.cz>
9798         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9799         * tree-pass.h (make_pass_lower_switch_O0): New function.
9800         * tree-switch-conversion.c (node_has_low_bound): Remove.
9801         (node_has_high_bound): Likewise.
9802         (node_is_bounded): Likewise.
9803         (class pass_lower_switch): Make it a template type and create
9804         two instances.
9805         (pass_lower_switch::execute): Add template argument.
9806         (make_pass_lower_switch): New function.
9807         (make_pass_lower_switch_O0): New function.
9808         (do_jump_if_equal): Remove.
9809         (emit_case_nodes): Simplify to just handle all 3 cases and leave
9810         all the hard work to tree optimization passes.
9812 2018-05-18  Martin Liska  <mliska@suse.cz>
9814         * dbgcnt.c (limit_low): Renamed from limit.
9815         (limit_high): New variable.
9816         (dbg_cnt_is_enabled): Check for upper limit.
9817         (dbg_cnt): Adjust dumping.
9818         (dbg_cnt_set_limit_by_index): Add new argument for high
9819         value.
9820         (dbg_cnt_set_limit_by_name): Likewise.
9821         (dbg_cnt_process_single_pair): Parse new format.
9822         (dbg_cnt_process_opt): Use strtok.
9823         (dbg_cnt_list_all_counters): Remove 'value' and add
9824         'limit_high'.
9825         * doc/invoke.texi: Document changes.
9827 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
9829         * doc/sourcebuild.texi (scalar_all_fma): Document.
9830         * tree.def (FMA_EXPR): Delete.
9831         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9832         * internal-fn.c (ternary_direct): New macro.
9833         (expand_ternary_optab_fn): Likewise.
9834         (direct_ternary_optab_supported_p): Likewise.
9835         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9836         * builtins.c (fold_builtin_fma): Delete.
9837         (fold_builtin_3): Don't call it.
9838         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9839         * expr.c (expand_expr_real_2): Likewise.
9840         * fold-const.c (operand_equal_p): Likewise.
9841         (fold_ternary_loc): Likewise.
9842         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9843         * gimple.c (DEFTREECODE): Likewise.
9844         * gimplify.c (gimplify_expr): Likewise.
9845         * optabs-tree.c (optab_for_tree_code): Likewise.
9846         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9847         * tree-eh.c (operation_could_trap_p): Likewise.
9848         (stmt_could_throw_1_p): Likewise.
9849         * tree-inline.c (estimate_operator_cost): Likewise.
9850         * tree-pretty-print.c (dump_generic_node): Likewise.
9851         (op_code_prio): Likewise.
9852         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9853         * tree-ssa-operands.c (get_expr_operands): Likewise.
9854         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9855         * fold-const-call.h (fold_fma): Delete.
9856         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9857         CFN_FNMA and CFN_FNMS.
9858         (fold_fma): Delete.
9859         * genmatch.c (combined_fn): New enum.
9860         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9861         (commutative_op): New function.
9862         (commutate): Use it.  Handle more than 2 operands.
9863         (dt_operand::gen_gimple_expr): Use commutative_op.
9864         (parser::parse_expr): Allow :c to be used with non-binary
9865         operators if the commutative operand is known.
9866         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9867         CFN_FMS, CFN_FNMA and CFN_FNMS.
9868         (backprop::process_assign_use): Remove FMA_EXPR handling.
9869         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9870         (gen_hsa_fma): New function.
9871         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9872         IFN_FNMA and IFN_FNMS.
9873         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9874         * gimple-fold.h (follow_all_ssa_edges): Declare.
9875         * gimple-fold.c (follow_all_ssa_edges): New function.
9876         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9877         gimple_build interface and use follow_all_ssa_edges to fold the result.
9878         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9879         instead of checking for optabs directly.
9880         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9881         rather than FMA_EXPRs.
9882         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9883         call to IFN_FMA instead of an FMA_EXPR.
9885 2018-05-17  Jim Wilson  <jimw@sifive.com>
9887         * expr.c (do_tablejump): When converting index to Pmode, if we have a
9888         sign extended promoted subreg, and the range does not have the sign bit
9889         set, then do a sign extend.
9891         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9892         test, check for sign extended subreg and/or constant operands, and
9893         do a sign extend in that case.
9895 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
9897         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9898         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9899         Add untyped.
9900         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9901         Change logics_shift_reg to logics_shift_imm.
9902         (thunderx2t99_fp_loadpair_basic): Delete.
9903         (thunderx2t99_fp_storepair_basic): Delete.
9904         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9905         (thunderx2t99_asimd_polynomial): Delete.
9906         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9907         and neon_fp_mul_d_scalar_q.
9908         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9909         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9910         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9911         (thunderx2t99_asimd_lut): Add missing tbl types.
9912         (thunderx2t99_asimd_ext): Delete.
9913         (thunderx2t99_asimd_load1_1_mult): Delete.
9914         (thunderx2t99_asimd_load1_2_mult): Delete.
9915         (thunderx2t99_asimd_load1_ldp): New.
9916         (thunderx2t99_asimd_load1): New.
9917         (thunderx2t99_asimd_load2): Add missing *load2* types.
9918         (thunderx2t99_asimd_load3): New.
9919         (thunderx2t99_asimd_load4): New.
9920         (thunderx2t99_asimd_store1_1_mult): Delete.
9921         (thunderx2t99_asimd_store1_2_mult): Delete.
9922         (thunderx2t99_asimd_store2_mult): Delete.
9923         (thunderx2t99_asimd_store2_onelane): Delete.
9924         (thunderx2t99_asimd_store_stp): New.
9925         (thunderx2t99_asimd_store1): New.
9926         (thunderx2t99_asimd_store2): New.
9927         (thunderx2t99_asimd_store3): New.
9928         (thunderx2t99_asimd_store4): New.
9930 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
9932         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9933         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
9935 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
9936             Segher Boessenkool  <segher@kernel.crashing.org>
9938         PR target/85698
9939         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9940         operand.
9942 2018-05-17  Richard Biener  <rguenther@suse.de>
9944         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9945         for pruning loop and prune defs feeding only already visited PHIs.
9947 2018-05-17  Richard Biener  <rguenther@suse.de>
9949         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9951 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
9952             Richard Biener  <rguenther@suse.de>
9954         PR tree-optimization/85793
9955         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9956         for VMAT_ELEMENTWISE.
9958 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9960         * internal-fn.h (lookup_internal_fn): Declare
9961         * internal-fn.c (lookup_internal_fn): New function.
9962         * gimple.c (gimple_build_call_from_tree): Handle calls to
9963         internal functions.
9964         * gimple-pretty-print.c (dump_gimple_call): Print "." before
9965         internal function names.
9966         * tree-pretty-print.c (dump_generic_node): Likewise.
9967         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9969 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9971         * gimple-fold.h (gimple_build): Make the function forms take
9972         combined_fn rather than built_in_function.
9973         (gimple_simplify): Likewise.
9974         * gimple-match-head.c (gimple_simplify): Likewise.
9975         * gimple-fold.c (gimple_build): Likewise.
9976         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9977         rather than gimple_build_call_internal.
9978         (get_initial_defs_for_reduction): Likewise.
9979         (vect_create_epilog_for_reduction): Likewise.
9980         (vectorizable_live_operation): Likewise.
9982 2018-05-17  Martin Liska  <mliska@suse.cz>
9984         * gimple-ssa-sprintf.c (format_directive): Do not use
9985         space in between 'G_' and '('.
9987 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
9989         PR target/85323
9990         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9991         even if the mask is not all ones.
9993         PR target/85323
9994         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9995         vector.
9996         (ix86_gimple_fold_builtin): Likewise.
9998         PR target/85323
9999         * config/i386/i386.c: Include tree-vector-builder.h.
10000         (ix86_vector_shift_count): New function.
10001         (ix86_fold_builtin): Fold shift builtins by scalar count.
10002         (ix86_gimple_fold_builtin): Likewise.
10004         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10005         _mm512_setzero): New intrinsics.
10007 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10008             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10010         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10011         code generation for cases where splatting a value is not useful.
10012         * simplify-rtx.c (simplify_ternary_operation): Simplify
10013         vec_merge across a vec_duplicate and a paradoxical subreg forming
10014         a vector mode to a vec_concat.
10016 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10018         * config.gcc: Support "goldmont-plus".
10019         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10020         "goldmont-plus".
10021         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10022         PROCESSOR_GOLDMONT_PLUS.
10023         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10024         (processor_target_table): Add "goldmont-plus".
10025         (PTA_GOLDMONT_PLUS): Define.
10026         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10027         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10028         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10029         (fold_builtin_cpu): Add "goldmont-plus".
10030         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10031         (ix86_option_override_internal): Add "goldmont-plus".
10032         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10033         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10034         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10035         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10037 2018-05-17  Richard Biener  <rguenther@suse.de>
10039         PR tree-optimization/85757
10040         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10041         remove defs that only feed that PHI from further processing.
10043 2018-05-16  Jim Wilson  <jimw@sifive.com>
10045         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10046         asterisk to name.
10047         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10049 2018-05-16  Mark Wielaard  <mark@klomp.org>
10051         * dwarf2out.c (count_index_strings): New function.
10052         (output_indirect_strings): Call count_index_strings and generate
10053         header for dwarf_version >= 5.
10055 2018-05-16  Mark Wielaard  <mark@klomp.org>
10057         * dwarf2out.c (dwarf_FORM): New function.
10058         (set_indirect_string): Use dwarf_FORM.
10059         (reset_indirect_string): Likewise.
10060         (size_of_die): Likewise.
10061         (value_format): Likewise.
10062         (output_die): Likewise.
10063         (add_skeleton_AT_string): Likewise.
10064         (output_macinfo_op): Likewise.
10065         (index_string): Likewise.
10066         (output_index_string_offset): Likewise.
10067         (output_index_string): Likewise.
10068         (count_index_strings): Likewise.
10070 2018-05-16  Carl Love  <cel@us.ibm.com>
10072         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10073         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10075 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10077         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10078         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10080 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10082         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10083         (fnma<mode>4): Likewise.
10084         (fms<mode>4): Likewise.
10085         (fnms<mode>4): Likewise.
10086         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10087         (aarch64_fnma<mode>4): Likewise.
10088         (aarch64_fms<mode>4): Likewise.
10089         (aarch64_fnms<mode>4): Likewise.
10090         (aarch64_fnmadd<mode>4): Likewise.
10092 2018-05-16  Jason Merrill  <jason@redhat.com>
10094         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10096 2018-05-16  Richard Biener  <rguenther@suse.de>
10098         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10099         (dump_stmt_cost): Declare.
10100         (add_stmt_cost): Dump cost we add.
10101         (add_stmt_costs): New function.
10102         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10103         No longer exported.
10104         (vect_analyze_stmt): Adjust prototype.
10105         (vectorizable_condition): Likewise.
10106         (vectorizable_live_operation): Likewise.
10107         (vectorizable_reduction): Likewise.
10108         (vectorizable_induction): Likewise.
10109         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10110         cost vector to pass to vectorizable_ and record afterwards.
10111         (vect_model_reduction_cost): Take cost vector argument and adjust.
10112         (vect_model_induction_cost): Likewise.
10113         (vectorizable_reduction): Likewise.
10114         (vectorizable_induction): Likewise.
10115         (vectorizable_live_operation): Likewise.
10116         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10117         SLP_TREE_NUMBER_OF_VEC_STMTS.
10118         (vect_analyze_slp_cost_1): Remove.
10119         (vect_analyze_slp_cost): Likewise.
10120         (vect_slp_analyze_node_operations): Take visited args and
10121         a target cost vector.  Avoid processing already visited stmt sets.
10122         (vect_slp_analyze_operations): Use a local cost vector to gather
10123         costs and register those of non-discarded instances.
10124         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10125         (vect_schedule_slp_instance): Remove copying of
10126         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10127         zero.
10128         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10129         adding cost.  Record cost entry location.
10130         (vect_prologue_cost_for_slp_op): Function to compute cost of
10131         a constant or invariant generated for SLP vect in the prologue,
10132         split out from vect_analyze_slp_cost_1.
10133         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10134         (vect_model_promotion_demotion_cost): Likewise.
10135         (vect_model_store_cost): Likewise, make static.
10136         (vect_model_load_cost): Likewise.
10137         (vectorizable_bswap): Add cost vector arg and adjust.
10138         (vectorizable_call): Likewise.
10139         (vectorizable_simd_clone_call): Likewise.
10140         (vectorizable_conversion): Likewise.
10141         (vectorizable_assignment): Likewise.
10142         (vectorizable_shift): Likewise.
10143         (vectorizable_operation): Likewise.
10144         (vectorizable_store): Likewise.
10145         (vectorizable_load): Likewise.
10146         (vectorizable_condition): Likewise.
10147         (vectorizable_comparison): Likewise.
10148         (can_vectorize_live_stmts): Likewise.
10149         (vect_analyze_stmt): Likewise.
10150         (vect_transform_stmt): Adjust calls to vectorizable_*.
10151         * tree-vectorizer.c: Include gimple-pretty-print.h.
10152         (dump_stmt_cost): New function.
10154 2018-05-16  Richard Biener  <rguenther@suse.de>
10156         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10157         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10158         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10159         (check_name): New callback.
10160         (dse_classify_store): Track cycles via a visited bitmap of PHI
10161         defs and simplify handling of in-loop and across loop dead stores
10162         and properly fail for loop-variant refs.  Handle byte-tracking with
10163         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10164         limiting the walk.
10166 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10168         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10169         (vect_get_mask_type_for_stmt): Likewise.
10170         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10171         split out from...
10172         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10173         to determine the statement's vector type and the vector type that
10174         should be used for calculating nunits.  Deal with cases in which
10175         the type has to be deferred.
10176         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10177         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10178         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10179         (vect_determine_vf_for_stmt): New functions, split out from...
10180         (vect_determine_vectorization_factor): ...here.
10181         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10182         (vect_get_mask_type_for_stmt): New functions, split out from
10183         vect_determine_vectorization_factor.
10185 2018-05-16  Richard Biener  <rguenther@suse.de>
10187         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10188         verify the [VEC_]COND_EXPR embedded comparison.
10190 2018-05-15  Martin Sebor  <msebor@redhat.com>
10192         PR tree-optimization/85753
10193         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10194         RECORD_TYPE in addition to ARRAY_TYPE.
10196 2018-05-15  Martin Sebor  <msebor@redhat.com>
10198         PR middle-end/85643
10199         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10201 2018-05-15  Richard Biener  <rguenther@suse.de>
10203         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10204         add by_clobber_p one.  Change algorithm to collect all defs
10205         representing uses we need to walk and try reducing them to
10206         a single one before failing.
10207         (dse_dom_walker::dse_optimize_stmt): Adjust.
10209 2018-05-13  Mark Wielaard  <mark@klomp.org>
10211         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10212         (size_of_loc_descr): Likewise.
10213         (output_loc_operands): Likewise.
10214         (output_loc_operands_raw): Likewise.
10215         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10216         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10217         (hash_loc_operands): Likewise.
10218         (compare_loc_operands): Likewise.
10220 2018-05-14  Mark Wielaard  <mark@klomp.org>
10222         * dwarf2out.c (count_index_addrs): New function.
10223         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10225 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10227         PR tree-optimization/83648
10228         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10229         return value as malloc candidate.
10231 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10233         PR ipa/85734
10234         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10235         param as true in call to suggest_attribute.
10237 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10239         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10240         -mreadonly-in-sdata.
10242 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10244         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10245         New pattern.
10246         (aarch64_crypto_aesd_fused): Likewise.
10248 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10250         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10251         (movsi_aarch64): Likewise.
10252         (load_pairsi): Likewise.
10253         (load_pairdi): Likewise.
10254         (store_pairsi): Likewise.
10255         (store_pairdi): Likewise.
10256         (load_pairsf): Likewise.
10257         (load_pairdf): Likewise.
10258         (store_pairsf): Likewise.
10259         (store_pairdf): Likewise.
10260         (zero_extend): Likewise.
10261         (trunc): Swap alternatives.
10262         (fcvt_target): Add '?' to prefer w over r.
10264 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10266         PR target/85756
10267         * config/i386/i386.md: Disallow non-commutative arithmetics in
10268         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10269         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10270         in the peephole2 before it.
10272 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10274         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10275         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10276         (ix86_handle_option): Handle -mcldemote.
10277         * config.gcc: New header.
10278         * config/i386/cldemoteintrin.h: New file.
10279         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10280         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10281         -mcldemote.
10282         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10283         OPTION_MASK_ISA_CLDEMOTE.
10284         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10285         (ix86_valid_target_attribute_inner_p): Ditto.
10286         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10287         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10288         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10289         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10290         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10291         (cldemote): New.
10292         * config/i386/i386.opt: Add -mcldemote.
10293         * config/i386/x86intrin.h: New header.
10294         * doc/invoke.texi: Add -mcldemote.
10296 2018-05-14  Richard Biener  <rguenther@suse.de>
10298         * doc/match-and-simplify.texi: Adjust :s documentation.
10300 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10302         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10303         intended memcpy size.
10304         (REORDER_45): Likewise.
10306 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10308         * sort.cc: New file.
10309         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10310         * vec.c (qsort_chk): Use gcc_qsort.
10311         * Makefile.in (OBJS-libcommon): Add sort.o.
10312         (build/sort.o): New target.  Use it...
10313         (BUILD_RTL): ... here, and...
10314         (build/gencfn-macros): ... here, and...
10315         (build/genmatch): ... here.
10317 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10318             Chung-Ju Wu  <jasonwucj@gmail.com>
10320         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10321         * config/nds32/nds32-graywolf.md: New file.
10322         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10323         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10324         pipeline.
10325         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10326         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10327         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10328         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10329         * config/nds32/pipelines.md: Include n15 settings.
10331 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10332             Chung-Ju Wu  <jasonwucj@gmail.com>
10334         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10335         * config/nds32/nds32-n13.md: New file.
10336         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10337         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10338         pipeline.
10339         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10340         * config/nds32/nds32.md (pipeline_model): Add n13.
10341         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10342         * config/nds32/pipelines.md: Include n13 settings.
10344 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10345             Chung-Ju Wu  <jasonwucj@gmail.com>
10347         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10348         * config/nds32/nds32-n10.md: New file.
10349         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10350         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10351         pipeline.
10352         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10353         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10354         * config/nds32/nds32.md (pipeline_model): Add n10.
10355         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10356         * config/nds32/pipelines.md: Include n10 settings.
10358 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10359             Kito Cheng  <kito.cheng@gmail.com>
10360             Chung-Ju Wu  <jasonwucj@gmail.com>
10362         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10363         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10364         Add enum values for DSP extension instructions.
10365         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10366         New constraints.
10367         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10368         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10369         New code iterators.
10370         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10371         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10372         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10373         * config/nds32/nds32-intrinsic.md: Likewise.
10374         * config/nds32/nds32_intrinsic.h: Likewise.
10375         * config/nds32/nds32-md-auxiliary.c: Likewise.
10376         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10377         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10378         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10379         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10380         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10381         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10382         TYPE_DMAC in switch statement.
10383         * config/nds32/nds32.c: New checking and implementation for DSP
10384         extension instructions.
10385         * config/nds32/nds32.h: Likewise.
10386         * config/nds32/nds32.md: Likewise.
10387         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10388         * config/nds32/predicates.md: Implement new predicates for DSP
10389         extension.
10391 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10393         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10394         Reformat alternatives and attributes so it is easier to identify
10395         which constraints/attributes go with which instruction.
10396         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10397         (mov<mode>_softfloat32, FMOVE64): Likewise.
10398         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10399         (mov<mode>_softfloat64, FMOVE64): Likewise.
10401 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10403         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10404         subsection.
10405         (Basic PowerPC Built-in Functions): The new name of the
10406         subsection previously known as "PowerPC Built-in Functions".
10407         (Basic PowerPC Built-in Functions Available on all Configurations):
10408         New subsubsection.
10409         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10410         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10411         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10412         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10414 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10416         PR ipa/85655
10417         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10418         single const.
10420 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10422         PR target/85733
10423         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10425 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10427         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10428         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10429         (ix86_handle_option): Handle -mwaitpkg.
10430         * config.gcc: New header.
10431         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10432         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10433         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10434         function type.
10435         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10436         OPTION_MASK_ISA_WAITPKG.
10437         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10438         (ix86_option_override_internal): Add PTA_WAITPKG.
10439         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10440         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10441         IX86_BUILTIN_TPAUSE.
10442         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10443         __builtin_ia32_umwait and __builtin_ia32_tpause.
10444         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10445         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10446         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10447         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10448         UNSPECV_TPAUSE): New.
10449         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10450         * config/i386/i386.opt: Add -mwaitpkg.
10451         * config/i386/waitpkgintrin.h: New file.
10452         * config/i386/x86intrin.h: New header.
10453         * doc/invoke.texi: Add -mwaitpkg.
10455 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10457         PR target/85606
10458         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10459         equivalent.
10460         (cortex-m0): Use armv6s-m isa.
10461         (cortex-m0plus): Likewise.
10462         (cortex-m1): Likewise.
10463         (cortex-m0.small-multiply): Likewise.
10464         (cortex-m0plus.small-multiply): Likewise.
10465         (cortex-m1.small-multiply): Likewise.
10467 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10468             Jakub Jelinek  <jakub@redhat.com>
10470         PR tree-optimization/85692
10471         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10472         source permute as well.
10474 2018-05-11  Martin Liska  <mliska@suse.cz>
10476         PR sanitizer/85556
10477         * doc/extend.texi: Document LLVM style format for no_sanitize
10478         attribute.
10480 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10482         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10483         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10484         (mode_supports_vsx_dform_quad): Likewise.
10485         (mode_supports_vmx_dform): Move these functions to be next to the
10486         other mode_supports functions.
10487         (mode_supports_dq_form): Likewise.
10488         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10489         mode_supports_dq_form.
10490         (reg_offset_addressing_ok_p): Likewise.
10491         (offsettable_ok_by_alignment): Likewise.
10492         (rs6000_legitimate_offset_address_p): Likewise.
10493         (legitimate_lo_sum_address_p): Likewise.
10494         (rs6000_legitimize_address): Likewise.
10495         (rs6000_legitimize_reload_address): Likewise.
10496         (rs6000_secondary_reload_inner): Likewise.
10497         (rs6000_preferred_reload_class): Likewise.
10498         (rs6000_output_move_128bit): Likewise.
10500 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10502         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10503         Generate SImode target register for null target.
10504         <case IX86_BUILTIN_XGETBV>: Ditto.
10505         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10506         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10508 2018-05-10  Carl Love  <cel@us.ibm.com>
10510         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10511         dcbtt and dcbtstt if operands[2] is 0.
10513 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10515         PR target/85693
10516         * config/i386/sse.md (usadv64qi): New expander.
10518 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10520         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10521         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10522         -maltivec=be support.
10523         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10524         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10525         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10526         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10527         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10528         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10529         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10530         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10531         altivec_vsumsws): Adjust.
10532         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10533         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10534         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10535         support.
10536         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10537         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10538         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10539         (altivec_lve<VI_char>x): Delete expand.
10540         (*altivec_lve<VI_char>x_internal): Rename to...
10541         (altivec_lve<VI_char>x): ... this.
10542         (altivec_lvxl_<mode>): Delete expand.
10543         (*altivec_lvxl_<mode>_internal): Rename to ...
10544         (altivec_lvxl_<mode>): ... this.
10545         (altivec_stvxl_<mode>): Delete expand.
10546         (*altivec_stvxl_<mode>_internal): Rename to ...
10547         (altivec_stvxl_<mode>): ... this.
10548         (altivec_stve<VI_char>x): Delete expand.
10549         (*altivec_stve<VI_char>x_internal): Rename to ...
10550         (altivec_stve<VI_char>x): ... this.
10551         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10552         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10553         reduc_plus_scal_<mode>): Adjust.
10554         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10555         comment.
10556         (rs6000_cpu_cpp_builtins): Adjust.
10557         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10558         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10559         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10560         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10561         -maltivec=be support.
10562         (rs6000_split_vec_extract_var): Adjust.
10563         (rs6000_split_v4si_init): Adjust.
10564         (swap_selector_for_mode): Delete.
10565         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10566         altivec_expand_stvex_be): Delete.
10567         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10568         -maltivec=be support.
10569         (rs6000_gimple_fold_builtin): Ditto.
10570         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10571         Adjust.
10572         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10573         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10574         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10575         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10576         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10577         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10578         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10579         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10580         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10581         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10582         anonymous split): Adjust.
10583         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10584         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10586 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10588         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10589         when --with-gxx-include-dir is also specified.
10590         * configure: Regenerate.
10592 2018-05-09  Jim Wilson  <jimw@sifive.com>
10594         PR target/84797
10595         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10596         * config/riscv/t-withmultilib: New.
10597         * config/riscv/withmultilib.h: New.
10598         * doc/install.texi: Document RISC-V --with-multilib-list support.
10600 2018-05-09  Richard Biener  <rguenther@suse.de>
10602         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10603         vector.
10604         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10605         actual scalar cost using the cost vector and the add_stmt_cost
10606         machinery.
10608 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10610         PR rtl-optimization/85645
10611         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10612         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10614 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10616         PR rtl-optimization/85645
10617         * shrink-wrap.c (spread_components): Return a boolean saying if
10618         anything was changed.
10619         (try_shrink_wrapping_separate): Iterate spread_components until
10620         nothing changes anymore.
10622 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10624         PR rtl-optimization/85645
10625         * regrename.c (build_def_use): Also kill the chains that include the
10626         destination of a REG_CFA_REGISTER note.
10628 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10630         PR rtl-optimization/85645
10631         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10632         insn that has a REG_CFA_REGISTER note.
10634 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10636         * cfgexpand.c (expand_clobber): New function.
10637         (expand_gimple_stmt_1): Use it.
10638         * tree-vect-stmts.c (vect_clobber_variable): New function,
10639         split out from...
10640         (vectorizable_simd_clone_call): ...here.
10641         (vectorizable_store): Emit a clobber either side of an
10642         IFN_STORE_LANES sequence.
10643         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10645 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10647         PR target/85626
10648         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10649         (define_insn "trap_if_false"): Add exit after trap.
10651 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10653         PR rtl-optimization/85638
10654         * bb-reorder.c: Include common/common-target.h.
10655         (create_forwarder_block): New function extracted from...
10656         (fix_up_crossing_landing_pad): ...here.  Rename into...
10657         (dw2_fix_up_crossing_landing_pad): ...this.
10658         (sjlj_fix_up_crossing_landing_pad): New function.
10659         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10660         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10661         from both partitions and exit the loop after one iteration.
10663 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10665         Revert:
10666         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10667         subsection.
10668         (Basic PowerPC Built-in Functions): The new name of the
10669         subsection previously known as "PowerPC Built-in Functions".
10670         (Basic PowerPC Built-in Functions Available on all Configurations):
10671         New subsubsection.
10672         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10673         subsubsection.
10674         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10675         subsubsection.
10676         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10677         subsubsection.
10678         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10679         subsubsection.
10681 2018-05-08  Jim Wilson  <jimw@sifive.com>
10683         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10684         (LD_EMUL_SUFFIX): New.
10685         (LINK_SPEC): Use it.
10687 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10689         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10690         subsection.
10691         (Basic PowerPC Built-in Functions): The new name of the
10692         subsection previously known as "PowerPC Built-in Functions".
10693         (Basic PowerPC Built-in Functions Available on all Configurations):
10694         New subsubsection.
10695         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10696         subsubsection.
10697         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10698         subsubsection.
10699         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10700         subsubsection.
10701         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10702         subsubsection.
10704 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10706         PR target/85683
10707         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10708         after cmpelim optimization.
10710 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10712         * config.gcc: Support "goldmont".
10713         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10714         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10715         PROCESSOR_GOLDMONT.
10716         * config/i386/i386.c (m_GOLDMONT): Define.
10717         (processor_target_table): Add "goldmont".
10718         (PTA_GOLDMONT): Define.
10719         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10720         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10721         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10722         (fold_builtin_cpu): Add "goldmont".
10723         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10724         (ix86_option_override_internal): Add "goldmont".
10725         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10726         (processor_type): Add PROCESSOR_GOLDMONT.
10727         * config/i386/i386.md: Add CPU "glm".
10728         * config/i386/glm.md: New file.
10729         * config/i386/x86-tune.def: Add m_GOLDMONT.
10730         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10732 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10734         PR target/85572
10735         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10736         E_V4DImode.
10737         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10738         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10739         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10741         PR target/85317
10742         * config/i386/i386.c (ix86_fold_builtin): Handle
10743         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10745         PR target/85480
10746         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10747         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10749 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10751         PR target/85658
10752         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10753         (check_arch): Likewise.
10754         (check_fpu): Return the result rather than printing it.
10755         (end arch): Fix operator precedence.
10756         (end cpu): Likewise.
10757         (END): Print the result from check_fpu.
10759 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10760             Alan Hayward  <alan.hayward@arm.com>
10761             David Sherwood  <david.sherwood@arm.com>
10763         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10764         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10765         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10766         (*fcmuo<mode>_and): New patterns.
10768 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10770         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10771         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10772         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10773         (cmp_op, sve_imm_con): New code attributes.
10774         (SVE_COND_INT_CMP, imm_con): Delete.
10775         (cmp_op): Remove above unspecs from int attribute.
10776         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10777         to...
10778         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10779         comparison-specific unspecs.
10780         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10781         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10782         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10783         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10784         (*vec_fcm<cmp_op><mode>): Rename to...
10785         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10786         (*vec_fcmuo<mode>): Rename to...
10787         (*fcmuo<mode>): ...this and adjust likewise.
10788         (*pred_fcm<cmp_op><mode>): New pattern.
10789         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10790         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10791         functions.
10792         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10793         and UNORDERED.
10794         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10795         (aarch64_emit_sve_predicated_cond): New function.
10796         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10797         (aarch64_emit_unspec_cond_or): Replace with...
10798         (aarch64_emit_sve_or_conds): ...this new function.  Use
10799         aarch64_emit_sve_ptrue_op for the individual comparisons and
10800         aarch64_emit_binop to OR them together.
10801         (aarch64_emit_inverted_unspec_cond): Replace with...
10802         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
10803         aarch64_emit_sve_ptrue_op for the comparison and
10804         aarch64_emit_unop to invert the result.
10805         (aarch64_expand_sve_vec_cmp_float): Update after the above
10806         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
10808 2018-05-07  Nathan Sidwell  <nathan@acm.org>
10810         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10811         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10812         (Backwards Compatibility): Likewise.
10814 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10816         PR bootstrap/85681
10817         Revert:
10818         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10820         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10821         <prefetch_dynamic_strides>: New const bool field.
10822         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10823         prefetch_dynamic_strides.
10824         (exynosm1_prefetch_tune): Likewise.
10825         (thunderxt88_prefetch_tune): Likewise.
10826         (thunderx_prefetch_tune): Likewise.
10827         (thunderx2t99_prefetch_tune): Likewise.
10828         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10829         to false.
10830         (aarch64_override_options_internal): Update to set
10831         PARAM_PREFETCH_DYNAMIC_STRIDES.
10832         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10833         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10834         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10835         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10836         prefetch-dynamic-strides setting.
10838         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10840         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10841         <minimum_stride>: New const int field.
10842         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10843         minimum_stride field.
10844         (exynosm1_prefetch_tune): Likewise.
10845         (thunderxt88_prefetch_tune): Likewise.
10846         (thunderx_prefetch_tune): Likewise.
10847         (thunderx2t99_prefetch_tune): Likewise.
10848         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10849         (aarch64_override_options_internal): Update to set
10850         PARAM_PREFETCH_MINIMUM_STRIDE.
10851         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10852         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10853         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10854         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10855         stride is constant and is below the minimum stride threshold.
10857 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10859         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10860         to 512.
10862 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10864         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10865         <prefetch_dynamic_strides>: New const bool field.
10866         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10867         prefetch_dynamic_strides.
10868         (exynosm1_prefetch_tune): Likewise.
10869         (thunderxt88_prefetch_tune): Likewise.
10870         (thunderx_prefetch_tune): Likewise.
10871         (thunderx2t99_prefetch_tune): Likewise.
10872         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10873         to false.
10874         (aarch64_override_options_internal): Update to set
10875         PARAM_PREFETCH_DYNAMIC_STRIDES.
10876         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10877         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10878         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10879         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10880         prefetch-dynamic-strides setting.
10882 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10884         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10885         <minimum_stride>: New const int field.
10886         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10887         minimum_stride field.
10888         (exynosm1_prefetch_tune): Likewise.
10889         (thunderxt88_prefetch_tune): Likewise.
10890         (thunderx_prefetch_tune): Likewise.
10891         (thunderx2t99_prefetch_tune): Likewise.
10892         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10893         (aarch64_override_options_internal): Update to set
10894         PARAM_PREFETCH_MINIMUM_STRIDE.
10895         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10896         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10897         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10898         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10899         stride is constant and is below the minimum stride threshold.
10901 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
10903         PR c++/85659
10904         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10905         the type is addressable.  Don't force op into register if it has
10906         BLKmode.
10908 2018-05-05  Roland McGrath  <mcgrathr@google.com>
10910         PR other/77609
10911         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10912         any section for which we don't know a specific type it should have,
10913         regardless of name.  Previously this was done only for the exact
10914         names ".init_array", ".fini_array", and ".preinit_array".
10915         (default_elf_asm_named_section): Add comment about
10916         relationship with default_section_type_flags and SECTION_NOTYPE.
10917         (get_section): Don't consider it a type conflict if one side has
10918         SECTION_NOTYPE and the other doesn't, as long as neither has the
10919         SECTION_BSS et al used in the default_section_type_flags logic.
10921 2018-05-05  Tom de Vries  <tom@codesourcery.com>
10923         PR target/85653
10924         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10925         (workaround_barsyncs): New function.
10926         (nvptx_reorg): Use workaround_barsyncs.
10927         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10928         (define_expand "nvptx_membar_cta"): New define_expand.
10929         (define_insn "*nvptx_membar_cta"): New insn.
10931 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
10933         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10934         To improve optimization opportunities.
10935         * builtin-types.def: The new needed builtin types for the above.
10937 2018-05-04  Richard Biener  <rguenther@suse.de>
10939         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10940         * gimple-ssa-store-merging.c
10941         (imm_store_chain_info::output_merged_store): Remove redundant create,
10942         release split_store vector contents on failure.
10943         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10944         scalar stmt vector on cache hit.
10946 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
10948         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10949         Xilinx FP support.
10950         * config.gcc (powerpc-xilinx-eabi*): Remove.
10951         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10952         support.
10953         (fusion_addis_mem_combo_load): Ditto.
10954         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10955         FP support.
10956         (rs6000_cpu_cpp_builtins): Ditto.
10957         * config/rs6000/rs6000-linux.c
10958         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10959         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10960         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10961         support.
10962         (rs6000_setup_reg_addr_masks): Ditto.
10963         (rs6000_init_hard_regno_mode_ok): Ditto.
10964         (rs6000_option_override_internal): Ditto.
10965         (legitimate_lo_sum_address_p): Ditto.
10966         (rs6000_legitimize_address): Ditto.
10967         (rs6000_legitimize_reload_address): Ditto.
10968         (rs6000_legitimate_address_p): Ditto.
10969         (abi_v4_pass_in_fpr): Ditto.
10970         (setup_incoming_varargs): Ditto.
10971         (rs6000_gimplify_va_arg): Ditto.
10972         (rs6000_split_multireg_move): Ditto.
10973         (rs6000_savres_strategy): Ditto.
10974         (rs6000_emit_prologue_components): Ditto.
10975         (rs6000_emit_epilogue_components): Ditto.
10976         (rs6000_emit_prologue): Ditto.
10977         (rs6000_emit_epilogue): Ditto.
10978         (rs6000_elf_file_end): Ditto.
10979         (rs6000_function_value): Ditto.
10980         (rs6000_libcall_value): Ditto.
10981         * config/rs6000/rs6000.h: Ditto.
10982         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10983         (TARGET_MINMAX): ... this.  New.
10984         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10985         * config/rs6000/rs6000.md: Remove Xilinx FP support.
10986         (*movsi_internal1_single): Delete.
10987         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10988         mfpu=, mxilinx-fpu): Delete.
10989         * config/rs6000/singlefp.h: Delete.
10990         * config/rs6000/sysv4.h: Remove Xilinx FP support.
10991         * config/rs6000/t-rs6000: Ditto.
10992         * config/rs6000/t-xilinx: Delete.
10993         * config/rs6000/titan.md: Adjust for fp_type removal.
10994         * config/rs6000/vsx.md: Remove Xilinx FP support.
10995         (VStype_simple): Delete.
10996         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10997         * config/rs6000/xfpu.h: Delete.
10998         * config/rs6000/xfpu.md: Delete.
10999         * config/rs6000/xilinx.h: Delete.
11000         * config/rs6000/xilinx.opt: Delete.
11001         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11002         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11004 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11006         PR libgomp/85639
11007         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11008         if ignore == 0.
11010 2018-05-04  Richard Biener  <rguenther@suse.de>
11012         PR middle-end/85627
11013         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11014         (expand_complex_div_wide): Likewise.
11015         (expand_complex_operations_1): Likewise.
11016         (expand_complex_libcall): Preserve EH info of the original stmt.
11017         (tree_lower_complex): Handle removed blocks.
11018         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11019         on complex multiplication and division libcall builtins.
11021 2018-05-04  Richard Biener  <rguenther@suse.de>
11023         PR middle-end/85574
11024         * fold-const.c (negate_expr_p): Restrict negation of operand
11025         zero of a division to when we know that can happen without
11026         overflow.
11027         (fold_negate_expr_1): Likewise.
11029 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11031         PR libstdc++/85466
11032         * real.h (real_nextafter): Declare.
11033         * real.c (real_nextafter): New function.
11034         * fold-const-call.c (fold_const_nextafter): New function.
11035         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11036         CASE_CFN_NEXTTOWARD.
11037         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11038         even when arg1_mode is different from arg0_mode.
11040 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11042         * doc/extend.texi (Deprecated Features): Remove
11043         -ffriend-injection.
11044         (Backwards Compatibility): Likewise.
11045         * doc/invoke.texi (C++ Language Options): Likewise.
11046         (C++ Dialect Options): Likewise.
11048 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11050         PR target/85530
11051         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11052         _mm512_mask_mullox_epi64): New intrinsics.
11054 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11056         PR testsuite/85106
11057         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11058         dump files): Add offload-tree.
11060 2018-05-03  Richard Biener  <rguenther@suse.de>
11062         PR tree-optimization/85615
11063         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11064         to loops not nested in BBs loop father to avoid creating multi-entry
11065         loops.
11067 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11069         PR tree-optimization/70291
11070         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11071         arguments.  Change return type to tree.  Emit libcall as a new
11072         statement rather than replacing existing one when inplace_p is true.
11073         (expand_complex_multiplication_components): New function.
11074         (expand_complex_multiplication): Expand floating-point complex
11075         multiplication using the above.
11076         (expand_complex_division): Rename inner_type parameter to type.
11077         Update expand_complex_libcall call-site.
11078         (expand_complex_operations_1): Update expand_complex_multiplication
11079         and expand_complex_division call-sites.
11081 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11083         PR target/85582
11084         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11085         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11086         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11087         the highest significant bit of the shift count mask is clear.  In
11088         check whether and[sq]i3 is needed verify that all significant bits
11089         of the shift count other than the highest are set.
11091 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11093         PR libgomp/82428
11094         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11095         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11096         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11097         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11098         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11099         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11100         __builtin_goacc_parlevel_size.
11102 2018-05-02  Richard Biener  <rguenther@suse.de>
11104         PR tree-optimization/85597
11105         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11106         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11107         directly.
11109 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11111         PR testsuite/85106
11112         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11113         dump files): Add ltrans-tree.
11115 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11117         PR testsuite/85106
11118         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11119         dump files): Add wpa-ipa.
11121 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11123         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11124         powerpc*-*-linux*paired* target.
11125         * config/rs6000/750cl.h: Delete.
11126         * config/rs6000/paired.h: Delete.
11127         * config/rs6000/paired.md: Delete.
11128         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11129         float support.
11130         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11131         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11132         comment.  Remove paired float support.
11133         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11134         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11135         VECTOR_PAIRED.
11136         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11137         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11138         declarations.
11139         * config/rs6000/rs6000.c: Remove paired float support.
11140         (paired_expand_vector_init, paired_expand_vector_move,
11141         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11142         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11143         paired_expand_builtin, paired_expand_predicate_builtin,
11144         paired_init_builtins): Delete.
11145         * config/rs6000/rs6000.h: Remove paired float support.
11146         * config/rs6000/rs6000.md: Remove paired float support.
11147         (move_from_CR_ov_bit): Delete.
11148         * config/rs6000/rs6000.opt (mpaired): Delete.
11149         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11150         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11152 2018-05-02  Richard Biener  <rguenther@suse.de>
11154         PR middle-end/85567
11155         * gimplify.c (gimplify_save_expr): When in SSA form allow
11156         SAVE_EXPRs to compute to SSA vars.
11158 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11160         PR target/85582
11161         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11162         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11163         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11164         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11166 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11168         PR tree-optimization/85586
11169         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11170         exit early for statements in the same group if the accesses are
11171         not strided.
11173 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11175         PR lto/85451
11176         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11177         error message.
11179 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11181         PR tree-optimization/85143
11182         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11184 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11186         PR lto/85451
11187         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11188         not found" error message.
11190 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11192         PR other/83786
11193         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11194         * vec.c (test_ordered_remove_if): New function.
11195         (vec_c_tests): Call test_ordered_remove_if.
11196         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11197         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11198         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11199         VEC_ORDERED_REMOVE_IF.
11201 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11203         PR tree-optimization/82665
11204         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11205         pointer subtraction where arguments come from a memchr call.
11207 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11209         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11210         --push-state --as-needed and --pop-state instead of --as-needed and
11211         --no-as-needed if ld supports it.
11212         * configure: Regenerated.
11214         PR web/85578
11215         * doc/install.texi2html: Replace _002d with - and _002a with * in
11216         generated html files using sed.
11218 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11220         PR c++/85523
11221         * gcc-rich-location.c (blank_line_before_p): New function.
11222         (use_new_line): New function.
11223         (gcc_rich_location::add_fixit_insert_formatted): New function.
11224         * gcc-rich-location.h
11225         (gcc_rich_location::add_fixit_insert_formatted): New function.
11227 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11229         * selftest.c (assert_streq): Rename "expected" and "actual" to
11230         "val1" and "val2".  Extend NULL-handling to cover both inputs
11231         symmetrically, while still requiring both to be non-NULL for a pass.
11232         * selftest.h (assert_streq): Rename "expected" and "actual" to
11233         "val1" and "val2".
11234         (ASSERT_EQ): Likewise.
11235         (ASSERT_EQ_AT): Likewise.
11236         (ASSERT_KNOWN_EQ): Likewise.
11237         (ASSERT_KNOWN_EQ_AT): Likewise.
11238         (ASSERT_NE): Likewise.
11239         (ASSERT_MAYBE_NE): Likewise.
11240         (ASSERT_MAYBE_NE_AT): Likewise.
11241         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11242         the assertion to pass.
11243         (ASSERT_STREQ_AT): Likewise.
11245 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11247         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11248         interaction with -pie.
11250 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11252         * selftest.h: Fix alphabetization of per-source-file selftest
11253         declarations.
11255 2018-04-30  Jason Merrill  <jason@redhat.com>
11257         PR c++/61982 - dead stores to destroyed objects.
11258         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11259         of clobber.
11261 2018-04-30  Jason Merrill  <jason@redhat.com>
11263         * tree.c (build_clobber): New.
11264         * tree.h: Declare it.
11265         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11267 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11269         * diagnostic-show-locus.c (layout::layout): Update for
11270         location_get_source_line returning a char_span.
11271         (struct char_span): Move to input.h.
11272         (struct correction): Update for fields in char_span becoming
11273         private.
11274         (struct source_line): Update for location_get_source_line
11275         returning a char_span.
11276         (layout::print_line): Likewise.
11277         * edit-context.c (edited_file::print_content): Likewise.
11278         (edited_file::print_diff_hunk): Likewise.
11279         (edited_file::print_run_of_changed_lines): Likewise.
11280         (edited_file::get_num_lines): Likewise.
11281         (edited_line::edited_line): Likewise.
11282         * final.c (asm_show_source): Likewise.
11283         * input.c (location_get_source_line): Convert return type
11284         from const char * to char_span, losing the final "line_len"
11285         param.
11286         (dump_location_info): Update for the above.
11287         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11288         when handling the literal within the line.
11289         (test_reading_source_line): Update for location_get_source_line
11290         returning a char_span.
11291         * input.h (class char_span): Move here from
11292         diagnostic-show-locus.c, converting from a struct to a class.
11293         Make data members private.
11294         (char_span::operator bool): New.
11295         (char_span::length): New.
11296         (char_span::get_buffer): New.
11297         (char_span::operator[]): New.
11298         (char_span::subspan): Make const.
11299         (char_span::xstrdup): New.
11300         (location_get_source_line): Convert return type from const char *
11301         to char_span, losing the final "line_size" param.
11303 2018-04-30  Jan Hubicka  <jh@suse.cz>
11305         * lto-wrapper.c (ltrans_priorities): New static var.
11306         (cmp_priority): New.
11307         (run_gcc): Read priorities and if doing parallel build order
11308         the Makefile by them.
11310 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11312         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11314 2018-04-30  Richard Biener  <rguenther@suse.de>
11316         * tree-cfg.c (verify_address): Remove base argument, add
11317         flag whether to check TREE_ADDRESSABLE and do that.
11318         (verify_expr): Remove.
11319         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11320         (verify_gimple_assign_single): Likewise.
11321         (verify_gimple_switch): Likewise.
11322         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11323         piece from verify_expr.
11324         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11326 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11328         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11330 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11332         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11333         (small_data_pattern): Likewise.
11334         (arc_rewrite_small_data): Likewise.
11335         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11336         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11337         (get_symbol_alignment): New function.
11338         (legitimate_small_data_address_p): Likewise.
11339         (legitimate_scaled_address): Update, call
11340         legitimate_small_data_address_p.
11341         (output_sdata): New static variable.
11342         (arc_print_operand): Update how we handle small data operands.
11343         (arc_print_operand_address): Likewise.
11344         (arc_legitimate_address_p): Update, use
11345         legitimate_small_data_address_p.
11346         (arc_rewrite_small_data_p): Remove.
11347         (arc_rewrite_small_data_1): Likewise.
11348         (arc_rewrite_small_data): Likewise.
11349         (small_data_pattern): Likewise.
11350         (compact_sda_memory_operand): Update to use
11351         legitimate_small_data_address_p and get_symbol_alignment.
11352         (prepare_move_operands): Don't rewite sdata pattern.
11353         (prepare_extend_operands): Remove.
11354         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11355         pattern.
11356         (zero_extendqisi2): Likewise.
11357         (zero_extendhisi2): Likewise.
11358         (extendqihi2): Likewise.
11359         (extendqisi2): Likewise.
11360         (extendhisi2): Likewise.
11361         (addsi3): Likewise.
11362         (subsi3): Likewise.
11363         (andsi3): Likewise.
11364         * config/arc/constraints.md (Usd): Change it to memory constraint.
11366 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11368         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11369         as source of std instructions.
11370         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11371         allow 6-bit constants as source for store instructions.
11372         (movdi_insn): Update instruction pattern to allow 6-bit constants
11373         as source for store instructions.
11375 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11377         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11379 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11380             Sandra Loosemore <sandra@codesourcery.com>
11382         * dumpfile.c (dump_open): Allow '-' for stdout.
11383         * doc/invoke.texi (Developer Options): Document dump filename
11384         determination early.  Document stdin/stdout selection.
11386 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
11388         Microblaze Target: PIC data text relative
11390         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11391         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11392         Add declaration.
11393         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11394         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11395         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11396         New addressing mode for data-text relative position indepenedent code.
11397         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11398         'ADDRESS_SYMBOLIC_TXT_REL'.
11399         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11400         (microblaze_legitimate_pic_operand): Exclude function calls from
11401         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11402         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11403         addresses cases.
11404         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11405         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11406         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11407         for 'address + offset'.
11408         (microblaze_expand_prologue): Add new function prologue call for
11409         'r20' assignation.
11410         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11411         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11412         table in case of TARGET_PIC_DATA_TEXT_REL.
11413         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11414         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11415         Add new macros 'UNSPEC_TEXT',
11416         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11417         + exclude function calls from 'UNSPEC_PLT' in case of data text
11418         relative mode.
11419         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11420         new target hook for generating address diff vector tables in case of
11421         flag_pic.
11422         * doc/tm.texi : Regenerate.
11423         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11424         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11425         of addr diff vector generation.
11426         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11427         target hook definition.
11428         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11429         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11430         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11431         option for data text relative.
11433 2018-04-30  Richard Biener  <rguenther@suse.de>
11435         * tree-chrec.h (evolution_function_is_constant_p): Remove
11436         redundant check.
11437         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11439 2018-04-30  Richard Biener  <rguenther@suse.de>
11441         PR bootstrap/85571
11442         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11444 2018-04-30  Richard Biener  <rguenther@suse.de>
11446         PR tree-optimization/28364
11447         PR tree-optimization/85275
11448         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11449         copying first exit test.
11451 2018-04-28  Mark Wielaard  <mark@klomp.org>
11453         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11454         dwarf_version >= 5.
11455         (dwarf_AT): Handle DW_AT_addr_base.
11456         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11458 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11460         PR target/84431
11461         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11462         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11463         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11464         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11466 2018-04-28  Richard Biener  <rguenther@suse.de>
11468         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11469         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11470         to reflect use.  Only add interesting stmts.
11472 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11474         PR ipa/85549
11475         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11476         the jump function allows for passing through aggregate values.
11478 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11480         * input.h (in_system_header_at): Convert from macro to inline
11481         function.
11482         (from_macro_expansion_at): Likewise.
11483         (from_macro_definition_at): Likewise.
11485 2018-04-27  Jeff Law  <law@redhat.com>
11487         * config.gcc: Mark tile* targets as deprecated/obsolete.
11489 2018-04-27  Richard Biener  <rguenther@suse.de>
11491         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11492         fix for ILP32.
11494 2018-04-27  Richard Biener  <rguenther@suse.de>
11496         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11498 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11500         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11501         with Yd constraint. Set "preferred_for_speed" attribute from
11502         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11503         with Yd constraint.
11504         (*movdi_internal): Ditto.
11505         (movti_interunit splitters): Remove
11506         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11507         (movdi_interunit splitters): Ditto.
11508         * config/i386/constraints.md (Ye): Remove.
11509         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11511 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11513         PR target/85512
11514         * config/aarch64/constraints.md (Usg): Limit to 31.
11515         (Usj): Limit to 63.
11517 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11519         PR tree-optimization/85529
11520         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11521         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11522         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11523         zero extension or masking of the MSB bit.
11524         (optimize_range_tests): Add FIRST_BB argument, pass it through
11525         to optimize_range_tests_var_bound.
11526         (maybe_optimize_range_tests, reassociate_bb): Adjust
11527         optimize_range_tests callers.
11529 2018-04-26  Richard Biener  <rguenther@suse.de>
11530             Jakub Jelinek  <jakub@redhat.com>
11532         * cgraph.h (symbol_table): Just declare debug method here.
11533         * symtab.c (symbol_table::debug): Define.
11535 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11537         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11539 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11541         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11542         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11543         (*movdi_internal): Substitute Yi and Yj constraint with x
11544         and Ym and Yn constraint with y constraint.  Update "isa"
11545         attribute and set "preferred_for_speed" attribute from
11546         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11547         (*movsi_internal): Ditto.
11548         (*movdf_internal): Ditto.
11549         (*movsf_internal): Ditto.
11550         (*zero_extendsidi2): Ditto.
11551         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11552         (sse2_loadld): Ditto.
11553         (*vec_extract<ssevecmodelower>_0): Ditto.
11554         (*vec_extractv4si_0_zext_sse4): Ditto.
11555         (vec_concatv2di): Ditto.
11556         (*vec_dup<mode>): Ditto.
11557         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11558         * config/i386/constraints.md (Yi): Remove.
11559         (Yj): Remove.
11560         (Ym): Remove.
11561         (Yn): Remove.
11563 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11565         * dumpfile.c (dump_open): New.
11566         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11567         (dump_finish): Detect stdio/stderr by value not name.
11569 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11571         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11573 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11575         PR target/84952
11576         * config/nvptx/nvptx.c (verify_neutering_jumps)
11577         (verify_neutering_labels): New function
11578         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11580 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11582         PR target/84025
11583         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11584         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11585         need neutering.
11587 2018-04-26  Richard Biener <rguenther@suse.de>
11588             Tom de Vries  <tom@codesourcery.com>
11590         PR lto/85422
11591         * lto-streamer-out.c (output_function): Fixup loops if required to match
11592         discovery done in the reader.
11594 2018-04-26  Richard Biener  <rguenther@suse.de>
11596         PR tree-optimization/85116
11597         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11598         have a loop exit from the single latch predecessor.  Remove
11599         case of header with just condition.
11600         (ch_base::copy_headers): Exclude infinite loops from any
11601         processing.
11602         (pass_ch::execute): Record exits.
11604 2018-04-26  Richard Biener  <rguenther@suse.de>
11606         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11607         prologue cost vector and pass it to vect_get_load_cost.
11608         (vect_get_peeling_costs_all_drs): Likewise.
11609         (vect_peeling_hash_get_lowest_cost): Likewise.
11610         (vect_enhance_data_refs_alignment): Likewise.
11612 2018-04-26  Richard Biener  <rguenther@suse.de>
11614         PR middle-end/85450
11615         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11616         checking of integer<->pointer conversions.
11617         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11618         sign-/zero-extending pointer types.
11619         (expand_omp_for_static_chunk): Likewise.
11621 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11622             Jean Lee  <xiaoyur347@gmail.com>
11624         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11625         (TARGET_ASAN_SHADOW_OFFSET): Define.
11626         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11627         true for -fsanitize=address.
11629 2018-04-25  Mark Wielaard  <mark@klomp.org>
11631         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11632         shorter ones.
11634 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11636         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11637         than "alu", remove explicit "memory" and "imm_disp" attributes.
11638         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11640         PR middle-end/85414
11641         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11642         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11643         gen_lowpart_no_emit.
11645 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11647         PR target/85473
11648         * config/i386/i386.c (ix86_expand_builtin): Change memory
11649         operand to XI, extend p0 to Pmode.
11650         * config/i386/i386.md: Change unspec volatile and operand
11651         1 mode to XI, change operand 0 mode to P.
11653 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11655         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11656         GET_MODE_MASK before any checking.
11657         (nds32_can_use_bset_p): Likewise.
11658         (nds32_can_use_btgl_p): Likewise.
11660 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11662         * config/nds32/nds32-doubleword.md: New define_split pattern for
11663         illegal register number.
11665 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11667         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11669 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11671         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11673 2018-04-25  Richard Biener  <rguenther@suse.de>
11675         * lto-streamer.h (LTO_major_version): Bump to 8.
11677 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11679         * BASE-VER: Set to 9.0.0.
11681 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11683         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11684         in __abskf2 and __powikf2.
11686 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11688         PR target/85512
11689         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11690         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11691         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11692         Use the above on operand 2.  Reindent.
11693         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11695 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11697         PR target/85485
11698         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11699         handle OPT_mcet.
11700         * config/i386/i386.opt (mcet): Removed.
11701         * doc/install.texi: Remove -mcet documentation.
11702         * doc/invoke.texi: Likewise.
11704 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11706         PR target/85485
11707         * doc/install.texi: Remove -mcet from bootstrap-cet.
11709 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11711         PR target/85511
11712         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11713         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11714         if TARGET_64BIT.
11716         PR target/85503
11717         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11718         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11719         containing a CONST_VECTOR.
11721 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11723         * doc/install.texi: Update newlib dependency for nvptx.
11725 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11727         PR target/85508
11728         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11729         instead of INTVAL when shifting x left.
11731 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11733         PR tree-optimization/85478
11734         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11735         vect_grouped_store_supported for single element vectors.
11737 2018-04-24  Richard Biener  <rguenther@suse.de>
11739         PR target/85491
11740         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11741         load cost increase to the case of non-constant step.
11743 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11745         PR target/84828
11746         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11747         destination if any_malformed_asm.
11749 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11751         PR middle-end/85496
11752         * expr.c (store_field): In the bitfield case, if the value comes from
11753         a function call and is returned in registers by means of a PARALLEL,
11754         do not change the mode of the temporary unless BLKmode and VOIDmode.
11756 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11758         PR rtl-optimization/85423
11759         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11760         dependencies to debug insns when the previous insn is non-debug.
11762 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11764         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11765         enums into a single definition.
11766         (fls): Fix predicates and printing.
11767         (seti): Likewise.
11769 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11771         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11772         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11773         and short u6 immediate.
11774         (check_if_valid_sleep_operand): Remove.
11775         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11777 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11779         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11780         flag_always_save_lp condition.
11781         * config/nds32/nds32.opt (malways-save-lp): New option.
11783 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11785         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11786         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11787         * config/nds32/nds32.h
11788         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11789         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11791 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11793         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11794         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11796 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11797             Chung-Ju Wu  <jasonwucj@gmail.com>
11799         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11800         Declare.
11801         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11802         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11804 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11806         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11808 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11810         * config/nds32/nds32-protos.h (nds32_data_alignment,
11811         nds32_local_alignment): Declare.
11812         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11813         nds32_local_alignment): New functions.
11814         (TARGET_CONSTANT_ALIGNMENT): Define.
11815         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11817 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11819         * config/nds32/nds32.c
11820         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11821         (TARGET_MODES_TIEABLE_P): Likewise.
11823 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11825         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11826         level Ofast and Og.
11828 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
11829             Chung-Ju Wu  <jasonwucj@gmail.com>
11831         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11832         for unaligned access.
11833         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11834         unaligned access.
11835         * config/nds32/nds32-intrinsic.md: Likewise.
11836         * config/nds32/nds32_intrinsic.h: Likewise.
11837         * config/nds32/nds32.h (nds32_builtins): Likewise.
11838         * config/nds32/nds32.opt (munaligned-access): New option.
11839         * config/nds32/nds32.c (nds32_asm_file_start): Display
11840         flag_unaligned_access status.
11842 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11844         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11845         -mno-relax is present.
11846         * config/riscv/linux.h (LINK_SPEC): Ditto.
11848 2018-04-20  Martin Sebor  <msebor@redhat.com>
11850         PR c/85365
11851         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11852         for null pointers.
11853         (gimple_fold_builtin_stxcpy_chk): Same.
11854         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11856 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
11858         PR target/85456
11859         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11860         __powikf2 when long double is IEEE 128-bit.
11862 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11864         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11865         step to make sure stack always aligned.
11867 2018-04-20  Carl Love  <cel@us.ibm.com>
11869         PR target/83402
11870         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11871         size check for arg0.
11873 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11874             Tom de Vries  <tom@codesourcery.com>
11876         PR target/85445
11877         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11878         Emit insns for calls too.
11879         (nvptx_find_par): Always look for worker-level predecessor insn.
11880         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
11881         calls.
11882         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11883         (nvptx_process_pars): Propagate frames for calls.
11885 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
11887         PR target/85469
11888         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11889         Removed.
11890         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11891         (ix86_handle_option): Don't handle OPT_mibt.
11892         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11893         __SHSTK__.
11894         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11895         has_ibt and ibt.
11896         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11897         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11898         (ix86_target_macros): Define __CET__ with flag_cf_protection
11899         for -fcf-protection.
11900         * config/i386/i386.c (isa2_opts): Remove -mibt.
11901         * config/i386/i386.h (TARGET_IBT): Removed.
11902         (TARGET_IBT_P): Likewise.
11903         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11904         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11905         * config/i386/i386.opt (mcet): Update help message.
11906         (mshstk): Likewise.
11907         (mibt): Removed.
11908         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
11909         -mcet as an alias for -mshstk.
11911 2018-04-20  Richard Biener <rguenther@suse.de>
11913         PR middle-end/85475
11914         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11915         complexity by forcing a single use of the multiply operand.
11917 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11919         ipa/85449
11920         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11921         recursion dependency to only apply to non-clones.
11923 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11925         ipa/85447
11926         * ipa-cp.c (create_specialized_node): Check that clones of
11927         self-recursive edges exist during IPA-CP.
11929 2018-04-19  Toon Moene  <toon@moene.org>
11931         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11932         by -O3.
11934 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11936         PR tree-optimization/85467
11937         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11938         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
11939         VECTOR_CST element to type.
11941 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11943         PR target/85397
11944         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11945         * config/i386/i386.md (builtin_setjmp_setup): Removed.
11946         (builtin_longjmp): Likewise.
11947         (save_stack_nonlocal): New pattern.
11948         (restore_stack_nonlocal): Likewise.
11950 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11952         PR target/85404
11953         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11954         Replace ASM_OUTPUT_LABEL with fprintf.
11956 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11958         PR target/85417
11959         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11960         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11961         * config/i386/i386-c.c (ix86_target_macros_internal): Also
11962         define __IBT__ and __SHSTK__ for -fcf-protection.
11963         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11964         TARGET_IBT.
11965         (ix86_trampoline_init): Likewise.
11966         (x86_output_mi_thunk): Likewise.
11967         (ix86_notrack_prefixed_insn_p): Likewise.
11968         (ix86_option_override_internal): Don't disallow -fcf-protection.
11969         * config/i386/i386.md (rdssp<mode>): Also enable for
11970         -fcf-protection.
11971         (incssp<mode>): Likewise.
11972         (nop_endbr): Likewise.
11973         * config/i386/i386.opt (mcet): Change help message to built-in
11974         functions only.
11975         (mibt): Likewise.
11976         (mshstk): Likewise.
11977         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11978         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
11979         enable CET built-in functions.
11981 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
11983         * common/config/i386/i386-common.c
11984         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11985         OPTION_MASK_ISA_MOVDIRI_UNSET,
11986         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11987         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11988         * config.gcc (movdirintrin.h): New header.
11989         * config/i386/cpuid.h (bit_MOVDIRI,
11990         bit_MOVDIR64B): New bits.
11991         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11992         and -mmvodir64b.
11993         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11994         (VOID, PVOID, PCVOID)): New function types.
11995         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11996         __builtin_ia32_directstoreu_u64,
11997         __builtin_ia32_movdir64b): New builtins.
11998         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11999         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12000         and -mmovdiri.
12001         (ix86_valid_target_attribute_inner_p): Ditto.
12002         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12003         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12004         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12005         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12006         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12007         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12008         (movdiri<mode>, movdir64b_<mode>): New.
12009         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12010         * config/i386/immintrin.h: Include movdirintrin.h.
12011         * config/i386/movdirintrin.h: New file.
12012         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12014 2018-04-19  Richard Biener  <rguenther@suse.de>
12016         PR middle-end/85455
12017         * cfg.c (clear_bb_flags): When loop state says we have
12018         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12020 2018-04-19  Richard Biener  <rguenther@suse.de>
12022         PR tree-optimization/84737
12023         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12024         copying restrict info.
12025         (vect_setup_realignment): Use it.
12026         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12027         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12028         the first DR to all generated stores.
12029         (vectorizable_load): Likewise for loads.
12031 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12033         PR tree-optimization/85446
12034         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12035         the integral and pointer types to have the same precision.
12037         * doc/install.texi: Document --disable-cet being the default and
12038         --enable-cet=auto.
12040 2018-04-18  Martin Liska  <mliska@suse.cz>
12042         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12043         style.
12045 2018-04-18  Martin Liska  <mliska@suse.cz>
12047         Revert
12048         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12050         PR ipa/83983
12051         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12052         arguments if they are comparable.
12054 2018-04-18  Martin Liska  <mliska@suse.cz>
12056         Revert
12057         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12059         PR lto/84805
12060         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12061         incomplete types.
12063 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12065         PR target/85388
12066         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12067         ENDBR after calling __morestack.
12069 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12071         PR jit/85384
12072         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12073         by using gcc_base_ver to generate a gcc_driver_version, and use
12074         it when generating GCC_DRIVER_NAME.
12075         * configure: Regenerate.
12077 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12079         PR target/81084
12080         * config.gcc: Obsolete powerpc*-*-*spe*.
12082 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12084         PR debug/84637
12085         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12086         (stabstr_D): Change type of unum from unsigned int to
12087         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12088         type.
12090 2018-04-17  Jim Wilson  <jimw@sifive.com>
12092         PR 84856
12093         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12094         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12095         Set arg_pointer_offset after using pretend_args_size.
12097 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12099         PR rtl-optimization/85431
12100         * dse.c (record_store): Ignore zero width stores.
12102         PR sanitizer/85230
12103         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12104         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12105         __builtin_stack_restore rather than after it.
12106         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12107         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12108         argument instead of virtual_dynamic_stack_rtx.
12110 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12112         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12113         New prototype.
12114         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12115         Add note to error message to explain internal mapping of overloaded
12116         built-in function name to non-overloaded built-in function name.
12117         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12118         function.
12120 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12122         PR target/85424
12123         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12124         where the inputs overlap with the output.
12126 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12128         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12129         (=v, v) alternative and explicit "memory" attribute.
12130         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12131         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12132         attributes.
12133         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12134         "sselog1" type instead of "sselog".
12135         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12136         "sselog".  Remove explicit "memory" attribute.
12137         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12138         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12139         attributes.
12140         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12141         "sselog1" type instead of "sselog".  Remove explicit "memory"
12142         attribute.
12143         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12144         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12145         attribute.
12146         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12147         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12148         attributes.
12149         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12150         "sselog1" type instead of "sselog".  Remove explicit "memory"
12151         attribute.
12152         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12153         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12154         attribute.
12156         PR target/85430
12157         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12159         PR middle-end/85414
12160         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12161         on a SUBREG.
12163 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12165         PR ipa/85421
12166         * ipa-cp.c (create_specialized_node): Call
12167         expand_all_artificial_thunks if necessary.
12169 2018-04-17  Martin Liska  <mliska@suse.cz>
12171         PR lto/85405
12172         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12173         in message, remote space in between '_G' and '('.
12175 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12177         PR target/85281
12178         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12179         avx512f_vmcmp<mode>3<round_saeonly_name>,
12180         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12181         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12182         avx512f_rndscale<mode><round_saeonly_name>,
12183         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12184         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12185         Use %<iptr>2 instead of %2 for -masm=intel.
12186         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12187         avx512f_vcvttss2usi<round_saeonly_name>,
12188         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12189         -masm=intel.
12190         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12191         avx512f_vcvttsd2usi<round_saeonly_name>,
12192         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12193         Use %q1 instead of %1 for -masm=intel.
12194         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12195         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12196         of %3 for -masm=intel.
12197         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12198         -masm=intel.
12199         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12200         -masm=intel.
12201         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12202         -masm=intel.
12203         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12204         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12205         %g1.
12206         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12207         -masm=intel.
12208         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12209         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12210         %g1 and one with %0 and %1.
12211         (avx512er_vmrcp28<mode><round_saeonly_name>,
12212         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12213         %1 for -masm=intel.
12214         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12215         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12216         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12217         of %0 and %{%4%} for -masm=intel.
12218         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12219         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12220         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12221         order of %0 and %{%5%}%{z%} for -masm=intel.
12223 2018-04-17  Jan Hubicka  <jh@suse.cz>
12225         PR lto/85405
12226         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12228 2018-04-17  Martin Liska  <mliska@suse.cz>
12230         PR ipa/85329
12231         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12232         for target_clone error message.  Make default implementation
12233         clone to be a local declaration.
12234         (separate_attrs): Add new argument and check for an empty
12235         string.
12236         (expand_target_clones): Handle it.
12237         (ipa_target_clone): Make redirection just for target_clones
12238         functions.
12240 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12241             Tom de Vries  <tom@codesourcery.com>
12243         PR middle-end/84955
12244         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12245         tiled basic blocks without omp continue statements.
12247 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12249         PR target/83660
12250         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12251         vec_extract expression as having side effects to make sure it gets
12252         a cleanup point.
12254 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12256         PR target/85403
12257         * config/i386/i386.c (get_builtin_code_for_version): Check
12258         error_mark_node.
12260 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12262         PR target/84331
12263         * config.gcc: Support "skylake".
12264         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12265         PROCESSOR_SKYLAKE.
12266         * config/i386/i386.c (m_SKYLAKE): Define.
12267         (processor_target_table): Add "skylake".
12268         (ix86_option_override_internal): Add "skylake".
12269         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12270         PROCESSOR_CANNONLAKE.
12271         (get_builtin_code_for_version): Fix priority for
12272         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12273         PROCESSOR_SKYLAKE-AVX512.
12274         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12275         (processor_type): Add PROCESSOR_SKYLAKE.
12277 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12278             Jason Merrill  <jason@redhat.com>
12280         PR c++/85112
12281         * convert.c (convert_to_integer_1): Use direct recursion for
12282         enumeral types and types with a precision less than the number
12283         of bits in their mode.
12285 2018-04-16  Julia Koval  <julia.koval@intel.com>
12287         PR target/84413
12288         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12289         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12291 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12293         PR target/85293
12294         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12295         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12296         and -mno-direct-move.
12298 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12300         PR target/83402
12301         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12302         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12303         Ensure negative shifts result in {0}.
12305 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12307         PR rtl-optimization/79916
12308         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12309         regs (if any) to define how to gnerate SD moves when LRA is in
12310         progress.
12312 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12314         PR rtl-optimization/85393
12315         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12316         * except.c (expand_dw2_landing_pad_for_region): Make static.
12317         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12318         a label and unconditional jump to old_bb, rather than
12319         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12320         basic block.
12322         PR rtl-optimization/85376
12323         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12324         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12325         instead of a specific value.
12327 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12328             Bin Cheng  <bin.cheng@arm.com>
12330         PR tree-optimization/82965
12331         PR tree-optimization/83991
12332         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12333         by_profile_only parameter.
12334         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12335         information if the loop was predicted to iterate too many times.
12336         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12338 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12340         PR lto/71991
12341         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12342         always inline.
12344 2018-04-13  Martin Liska  <mliska@suse.cz>
12345             Jakub Jelinek  <jakub@redhat.com>
12347         PR middle-end/81657
12348         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12349         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12350         * builtins.c (expand_builtin_memory_copy_args): Use
12351         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12352         handle dest_addr == pc_rtx.
12354 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12356         PR target/85291
12357         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12358         asked to not generate direct moves.
12359         (fix_trunc<mode>si2_stfiwx): Similar.
12360         (fix_trunc<mode>si2_internal): Similar.
12362 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12364         PR debug/83157
12365         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12366         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12367         lookup if dest in some wider mode is known to be const0_rtx and
12368         if so, record permanent equivalence for it to be ZERO_EXTEND of
12369         the narrower mode destination.
12371 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12373         * lto-streamer-out.c (output_function): Revert 259346.
12374         * omp-expand.c (expand_oacc_for): Likewise.
12376 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12378         PR rtl-optimization/85354
12379         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12380         * sel-sched.c (sel_global_init): ... here.
12382 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12384         PR target/85238
12385         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12386         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12387         mode for PE-COFF targets.
12388         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12389         (i386_pe_asm_lto_end): Likewise.
12390         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12391         (TARGET_ASM_LTO_END): Likewise.
12392         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12393         (i386_pe_asm_lto_start): New function.
12394         (i386_pe_asm_lto_end): Likewise.
12396 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12397             Richard Biener  <rguenther@suse.de>
12399         PR middle-end/84955
12400         * lto-streamer-out.c (output_function): Fix CFG loop state before
12401         streaming out.
12402         * omp-expand.c (expand_oacc_for): Handle calls to internal
12403         functions like regular functions.
12405 2018-04-12  Richard Biener  <rguenther@suse.de>
12407         PR lto/85371
12408         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12409         for the early LTO debug to properly generate references to it
12410         during DIE emission.  Do not re-use that for the skeleton for
12411         split-dwarf.
12412         (dwarf2out_early_finish): Likewise.
12414 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12416         PR target/85328
12417         * config/i386/sse.md
12418         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12419         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12420         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12421         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12422         and output is a reg, avoid creating invalid lowpart subreg, but
12423         instead split into a 512-bit move.  Don't split if not AVX512VL,
12424         input is xmm16+ reg and output is a mem.
12425         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12426         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12427         xmm16+ reg and output is a mem.
12429 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12431         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12432         also for flag_dwarf2_cfi_asm.
12434 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12436         PR rtl-optimization/85342
12437         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12438         a bool scalar var inside of the loop instead.  Don't try to update
12439         recog_data.operand after failed apply_change_group.
12441 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12443         PR target/85296
12444         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12445         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12446         array with flexible array member as array without given dimension.
12447         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12448         argument for undefined param to true.
12450 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12452         PR target/85321
12453         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12454         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12455         from PowerPC section.
12456         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12457         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12458         help text that is too long.
12459         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12460         help text that is too long.
12461         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12462         help text that is too long.
12464 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12466         * config/alpha/alpha.md (stack_probe_internal): Rename
12467         from "probe_stack".  Update all callers.
12469 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12471         PR rtl-optimization/84566
12472         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12473         sched_macro_fuse_insns.
12475 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12477         PR target/84301
12478         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12479         (compute_block_dependences): ... from here.
12481 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12483         PR tree-optimization/85331
12484         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12485         from int to HOST_WIDE_INT.
12487 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12489         PR ipa/84149
12490         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12491         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12492         not the same as the source val.
12493         (cgraph_edge_brings_value_p): New parameter.
12494         (gather_edges_for_value): Pass destination value to
12495         cgraph_edge_brings_value_p.
12496         (perhaps_add_new_callers): Likewise.
12497         (get_info_about_necessary_edges): Likewise and exclude values brought
12498         only by self-recursive edges.
12499         (create_specialized_node): Redirect only clones of self-calling edges.
12500         (+self_recursive_pass_through_p): New function.
12501         (find_more_scalar_values_for_callers_subset): Use it.
12502         (find_aggregate_values_for_callers_subset): Likewise.
12503         (known_aggs_to_agg_replacement_list): Removed.
12504         (decide_whether_version_node): Re-calculate known constants for all
12505         remaining context clones.
12507 2018-04-11  Richard Biener  <rguenther@suse.de>
12509         PR lto/85339
12510         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12511         from early DWARF output.
12512         (dwarf2out_early_finish): Output line info unconditionally into
12513         early DWARF and add reference to it.
12515 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12517         PR target/85281
12518         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12519         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12520         other than V2DFmode using iptr mode attribute.
12521         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12523 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12525         PR rtl-optimization/84659
12526         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12528 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12530         PR debug/85302
12531         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12532         SIZEP is NULL.
12533         (output_loc_list): Pass address of a dummy size variable even in the
12534         locview handling loop.
12535         (index_location_lists): Add comment on why skip_loc_list_entry can't
12536         call size_of_locs.
12538 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12540         PR target/85261
12541         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12542         into register.
12544 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12546         PR target/85321
12547         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12548         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12549         and -mstring-compare-inline-limit.
12551 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12553         PR target/85287
12554         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12555         for stack clash protection in a register whenever we need it to be in
12556         a register.
12558 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12560         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12561         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12563 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12565         PR target/85321
12566         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12567         the help text.
12568         (mlong-double-): Ditto.
12569         * config/rs6000/sysv4.opt (msdata=): Ditto.
12570         (mtls-size=): Ditto.
12572 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12574         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12575         erroneous entries for
12576         "vector int vec_ldl (int, long int *)", and
12577         "vector unsigned int vec_ldl (int, unsigned long int *)".
12578         Add comments and entries for
12579         "vector bool char vec_ldl (int, bool char *)",
12580         "vector bool short vec_ldl (int, bool short *)",
12581         "vector bool int vec_ldl (int, bool int *)",
12582         "vector bool long long vec_ldl (int, bool long long *)",
12583         "vector pixel vec_ldl (int, pixel *)",
12584         "vector long long vec_ldl (int, long long *)",
12585         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12586         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12587         type tree bool_long_long_type_node and correct definition of
12588         bool_V2DI_type_node to make reference to this new type tree.
12589         (rs6000_mangle_type): Replace erroneous reference to
12590         bool_long_type_node with bool_long_long_type_node.
12591         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12592         comments to emphasize sign distinctions for char and int types and
12593         replace RS6000_BTI_bool_long constant with
12594         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12595         use of RS6000_BTI_pixel.
12596         (bool_long_type_node): Remove this macro definition.
12597         (bool_long_long_type_node): New macro definition
12599 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12601         PR rtl-optimization/85300
12602         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12603         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12604         simplify_unary_operation fails.
12606 2018-04-10  Martin Liska  <mliska@suse.cz>
12608         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12609         cgraph_edge and ipa_ref.
12611 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12613         PR target/85177
12614         PR target/85255
12615         * config/i386/sse.md
12616         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12617         computation of the VEC_MERGE selector from mask.
12618         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12619         Fix decoding of the VEC_MERGE selector into mask.
12621 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12623         PR tree-optimization/85286
12624         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12626 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12628         * final.c (final_1): Set insn_last_address as well as
12629         insn_current_address.
12631 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12633         PR target/85173
12634         * explow.c (emit_stack_probe): Call validize_mem on memory location
12635         before passing it to gen_probe_stack.  Create address operand and
12636         legitimize it for the probe_stack_address case.
12638 2018-04-09  Jan Hubicka  <jh@suse.cz>
12640         PR lto/85078
12641         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12642         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12643         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12644         walk basetypes.
12645         (free_lang_data): Rebuild type inheritance graph.
12647 2018-04-09  Martin Sebor  <msebor@redhat.com>
12649         * invoke.texi (-finline-small-functions): Mention other optimization
12650         options.
12651         (-findirect-inlining, -fpartial-inlining): Same.
12652         (-finline-functions-called-once): Same.
12653         (-freorder-blocks-and-partition): Same.
12655 2018-04-09  Jan Hubicka  <jh@suse.cz>
12657         PR rtl/84058
12658         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12659         jumps; choose last target that matches the criteria (i.e.
12660         no partition changes for non-crossing jumps).
12661         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12662         support for redirecting crossing jumps to non-crossing.
12664 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12666         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12667         also for naked functions.
12669 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12671         * config/arc/arc.md (add_shift): New pattern.
12672         (add_shift2): Likewise.
12673         (sub_shift): Likewise.
12674         (sub_shift_cmp0_noout): Likewise.
12675         (compare_si_ashiftsi): Likewise.
12676         (xbfu_cmp0_noout): New combine pattern.
12677         (xbfu_cmp0"): Likewise.
12678         (movsi_set_cc_insn): Place the predicable variant first.
12679         (commutative_binary_cmp0_noout): Remove clobber.
12680         (commutative_binary_cmp0): New pattern.
12681         (noncommutative_binary_cmp0): Likewise.
12682         (noncommutative_binary_cmp0_noout): Likewise.
12683         (noncommutative_binary_comparison_result_used): Removed.
12684         (rsub_cmp0): New pattern.
12685         (rsub_cmp0_noout): Likewise.
12686         (extzvsi): Changed, keep only meaningful variants.
12687         (SQH, SEZ): New iterators.
12688         (SQH_postfix): New mode attribute.
12689         (SEZ_prefix): New code attribute.
12690         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12691         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12692         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12693         of numerical value.
12694         (noncommutative_operator): Check the availability of barrel
12695         shifter option.
12697 2018-04-09  Richard Biener  <rguenther@suse.de>
12699         PR tree-optimization/85284
12700         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12701         Only use the niter constraining form of simple_iv when the exit
12702         is always executed.
12704 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12706         PR target/84041
12707         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12708         (define_expand "*memory_barrier"): New define_expand.
12709         (define_insn "memory_barrier"): New insn.
12711 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12713         PR rtl-optimization/80463
12714         PR rtl-optimization/83972
12715         PR rtl-optimization/83480
12717         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12718         correct producer for the insn.
12719         (tidy_control_flow): Fixup seqnos in case of debug insns.
12721 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12723         PR rtl-optimization/83913
12725         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12726         different sched-times when merging exprs.
12728 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12730         PR rtl-optimization/83962
12732         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12733         tidy_fallthru_edge and tidy_control_flow.
12735 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12737         PR rtl-optimization/83530
12739         * sel-sched.c (force_next_insn): New global variable.
12740         (remove_insn_for_debug): When force_next_insn is true, also leave only
12741         next insn in the ready list.
12742         (sel_sched_region): When the region wasn't scheduled, make another pass
12743         over it with force_next_insn set to 1.
12745 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12747         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12748         into tm_file.
12749         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12750         for interrupt control.
12751         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12752         functions for interrupt control.
12753         * config/nds32/nds32-intrinsic.md: Likewise.
12754         * config/nds32/nds32_intrinsic.h: Likewise.
12755         * config/nds32/nds32.h (nds32_builtins): Likewise.
12757 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12759         * config/nds32/nds32.c (nds32_init_machine_status,
12760         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12761         strict_aligned_p field.
12762         (nds32_expand_to_rtl_hook): New function.
12763         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12764         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12766 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12767             Chung-Ju Wu  <jasonwucj@gmail.com>
12769         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12770         * config/nds32/nds32-n7.md: New file.
12771         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12772         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12773         pipeline.
12774         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12775         * config/nds32/nds32.md (pipeline_model): Add n7.
12776         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12777         * config/nds32/pipelines.md: Include n7 settings.
12779 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12780             Chung-Ju Wu  <jasonwucj@gmail.com>
12782         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12783         * config/nds32/nds32-e8.md: New file.
12784         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12785         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12786         pipeline.
12787         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12788         * config/nds32/nds32.md (pipeline_model): Add e8.
12789         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12790         * config/nds32/pipelines.md: Include e8 settings.
12792 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12793             Chung-Ju Wu  <jasonwucj@gmail.com>
12795         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12796         * config/nds32/nds32-n8.md: New file.
12797         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12798         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12799         pipeline.
12800         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12801         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12802         * config/nds32/nds32.md (pipeline_model): Add n8.
12803         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12804         * config/nds32/pipelines.md: Include n8 settings.
12806 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12807             Chung-Ju Wu  <jasonwucj@gmail.com>
12809         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12810         * config/nds32/nds32-n9-2r1w.md: New file.
12811         * config/nds32/nds32-n9-3r2w.md: New file.
12812         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12813         nds32_register_ports): New or modify for cpu n9.
12814         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12815         pipeline.
12816         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12817         * config/nds32/nds32-utils.c: New file.
12818         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12819         TARGET_MUL_SLOW): Define.
12820         * config/nds32/nds32.md (pipeline_model): New attribute.
12821         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12822         New options that support cpu n9.
12823         * config/nds32/pipelines.md: Include n9 settings.
12824         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12826 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12828         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12829         information if necessary.
12830         (output_cond_branch_compare_zero): Likewise.
12831         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12832         (nds32_target_alignment): Refine for alignment.
12833         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12834         (FUNCTION_BOUNDARY): Modify.
12835         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12836         align case.
12837         * config/nds32/nds32.opt (malways-align, malign-functions): New.
12839 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12841         * config/nds32/constants.md (unspec_volatile_element): Add values for
12842         TLB operation and data prefetch.
12843         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12844         functions for TLB operation and data prefetch.
12845         * config/nds32/nds32-intrinsic.md: Likewise.
12846         * config/nds32/nds32_intrinsic.h: Likewise.
12847         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12848         (nds32_print_operand): Likewise.
12849         * config/nds32/nds32.h (nds32_builtins): Likewise.
12851 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
12852         Andrew Pinski <pinsika@gcc.gnu.org>
12854         PR middle-end/82976
12855         * match.pd: Use constant_boolean_node of correct type instead of
12856         boolean_true_node or boolean_false_node for simplifying
12857         pointer comparisons to zero.
12859 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12861         PR tree-optimization/80021
12862         * tree.c (verify_type_variant): Make error call in verify_variant_match
12863         translatable and remove final full stop.
12865 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12867         * config/nds32/constants.md (unspec_volatile_element): Add
12868         UNSPEC_VOLATILE_EH_RETURN.
12869         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12870         nds32_output_stack_pop): Support dwarf exception handling process.
12871         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12872         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12873         exception handling process.
12874         (nds32_compute_stack_frame): Likewise.
12875         (nds32_return_addr_rtx): Likewise.
12876         (nds32_initial_elimination_offset): Likewise.
12877         (nds32_expand_prologue): Likewise.
12878         (nds32_expand_epilogue): Likewise.
12879         (nds32_dynamic_chain_address): New function.
12880         * config/nds32/nds32.h (machine_function): Add fields for dwarf
12881         exception handling.
12882         (DYNAMIC_CHAIN_ADDRESS): Define.
12883         (EH_RETURN_DATA_REGNO): Define.
12884         (EH_RETURN_STACKADJ_RTX): Define.
12885         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12886         patterns for dwarf exception handling.
12888 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12890         * config/nds32/nds32.h: Clean up obsolete macros.
12892 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12894         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12895         Add enum values for particular instructions.
12896         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12897         particular intrinsic functions.
12898         * config/nds32/nds32-intrinsic.md: Likewise.
12899         * config/nds32/nds32_intrinsic.h: Likewise.
12900         * config/nds32/nds32.h (nds32_builtins): Likewise.
12901         * config/nds32/nds32.md (type): Add pbsad and pbsada.
12902         (btst, ave): New patterns for particular instructions.
12904 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12906         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12907         Add enum values for atomic load/store and memory sync.
12908         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12909         and memory sync.
12910         * config/nds32/nds32-intrinsic.md: Likewise.
12911         * config/nds32/nds32_intrinsic.h: Likewise.
12912         * config/nds32/nds32.h (nds32_builtins): Likewise.
12914 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12916         PR tree-optimization/85257
12917         * fold-const.c (native_encode_vector): If not all elts could fit
12918         and off is -1, return 0 rather than offset.
12919         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12920         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12921         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
12922         adjust buffer in native_interpret_expr call.
12924 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12926         * config/nds32/constants.md (unspec_volatile_element): Add cache
12927         control enum values.
12928         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12929         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12930         * config/nds32/nds32.c (nds32_cctl_names): New.
12931         (nds32_print_operand): Handle cache control register names.
12932         * config/nds32/nds32.h (nds32_builtins): New enum values.
12933         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12934         macros.
12935         * config/nds32/nds32.md (type): Add mmu.
12936         * config/nds32/pipelines.md (simple_insn): Add mmu.
12938 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12940         * config/nds32/nds32.md (type): Remove call.
12941         * config/nds32/pipelines.md (simple_insn): Likewise.
12943 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12945         * config/nds32/constants.md (unspec_volatile_element): Add
12946         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12947         UNSPEC_VOLATILE_FMFCFG.
12948         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12949         description for fmfcfg and fmfcsr.
12950         (bdesc_1arg): Add fmtcsr.
12951         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12952         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12953         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12954         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12955         unspec_fmfcfg): New patterns.
12956         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12957         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12958         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12959         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12960         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12961         __nds32__fmfcfg): Define.
12963 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12965         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12966         intrinsic register names.
12967         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12968         intrinsic register enum values and macros.
12970 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12972         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12973         for load/store addressing form.
12974         (nds32_print_operand_address): Likewise.
12976 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
12978         PR target/85196
12979         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12980         based on LABEL_REF.  Remove useless assertion.
12981         (pic_address_needs_scratch): Fix formatting.
12982         (sparc_legitimize_pic_address): Minor tweaks.
12983         (sparc_delegitimize_address): Adjust assertion accordingly.
12984         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12985         into symbolic_operand.
12986         (movsi_high_pic_label_ref): Likewise.
12987         (movsi_lo_sum_pic_label_ref): Likewise.
12988         (movdi_pic_label_ref): Likewise.
12989         (movdi_high_pic_label_ref): Likewise.
12990         (movdi_lo_sum_pic_label_ref): Likewise.
12992 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
12994         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12995         custom LIB_SPEC setup.
12997 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
12998             Kito Cheng  <kito.cheng@gmail.com>
13000         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13001         * config/riscv/freebsd.h: New.
13003 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13005         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13006         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13007         file.
13009 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13010             Kito Cheng  <kito.cheng@gmail.com>
13012         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13013         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13014         * config/nds32/nds32-protos.h (nds32_output_call,
13015         nds32_output_return): Declare.
13016         * config/nds32/nds32.md: Refine all the call and return patterns.
13018 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13020         PR debug/85252
13021         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13022         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13024         PR rtl-optimization/84872
13025         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13026         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13027         EDGE_CROSSING edge.
13029 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13031         * expr.c (copy_blkmode_to_reg): Revert 254862.
13032         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13034 2018-04-06  Richard Biener  <rguenther@suse.de>
13036         PR middle-end/85244
13037         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13038         after seeing a component reference with an adjacent field.  Treat
13039         refs to arrays at struct end of external decls similar to
13040         refs to unconstrained commons.
13042 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13044         PR sanitizer/85213
13045         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13046         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13047         recursive calls.
13048         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13049         save_p here.
13051 2018-04-06  Richard Biener  <rguenther@suse.de>
13053         PR middle-end/85180
13054         * alias.c (find_base_term): New wrapper around find_base_term
13055         unwinding CSELIB_VAL_PTR changes.
13056         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13057         recursion.
13059 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13061         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13062         instructions.
13063         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13064         constant definitions.
13065         ("nop"): lr 0,0 -> nopr r0
13066         ("nop_lr0", "nop_lr1"): New insn definitions.
13068 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13070         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13071         NDS32_V3PUSH_AVAILABLE_P macro.
13073 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13074             Chung-Ju Wu  <jasonwucj@gmail.com>
13076         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13077         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13078         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13079         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13080         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13081         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13082         * config/nds32/constraints.md: New constraints and checking for hard
13083         float configuration.
13084         * config/nds32/iterators.md: New mode iterator and attribute for hard
13085         float configuration.
13086         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13087         patterns.
13088         * config/nds32/nds32-fpu.md: New file.
13089         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13090         deal with hard float code generation.
13091         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13092         ARCH_V3S.
13093         (abi_type, float_reg_number): New enum type.
13094         * config/nds32/nds32-predicates.c: New predicates for hard float.
13095         * config/nds32/nds32-protos.h: Declare functions for hard float.
13096         * config/nds32/nds32.c: Implementation for hard float configuration.
13097         * config/nds32/nds32.h: Definitions for hard float configuration.
13098         * config/nds32/nds32.md: Include hard float machine description and
13099         modify patterns for hard float configuration.
13100         * config/nds32/nds32.opt: New options for hard float configuration.
13101         * config/nds32/predicates.md: New predicates for hard float
13102         configuration.
13104 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13106         * common/config/nds32/nds32-common.c
13107         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13109 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13111         PR middle-end/85195
13112         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13113         CONSTRUCTOR_ELT (ctor, ...)->value.
13115 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13117         PR target/85193
13118         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13120 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13122         PR target/85204
13123         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13124         cond jump.
13126 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13127             Kito Cheng  <kito.cheng@gmail.com>
13129         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13130         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13131         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13132         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13134 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13135             Kito Cheng  <kito.cheng@gmail.com>
13137         * config/nds32/constraints.md (Ufe): New memory constraint.
13138         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13139         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13140         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13141         operands.
13142         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13143         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13145 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13147         * config/nds32/nds32.md: Use optimize_size in the condition for
13148         alu-shift instructions.
13150 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13152         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13154 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13156         * config/nds32/nds32.md (negsi2): Refine pattern.
13158 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13159             Chung-Ju Wu  <jasonwucj@gmail.com>
13161         * config/nds32/iterators.md (shift_rotate): New code iterator.
13162         (shift): New code attribute.
13163         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13164         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13165         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13166         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13167         bit-wise operations.
13168         (andsi3, *andsi3): Ditto.
13169         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13170         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13171         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13172         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13173         nds32_ior_operand, nds32_xor_operand): New predicates.
13175 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13177         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13178         (addsi3, subsi3): ... this.
13180 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13182         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13184 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13186         * config/nds32/nds32.md: Adjust indention.
13188 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13190         * config/nds32/nds32.md (feature): New attribute.
13192 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13194         * config/nds32/nds32.md (subtype): New attribute.
13196 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13198         PR target/85203
13199         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13200         expansion to perform a bitwise AND of the argument followed by a
13201         boolean negation of the result.
13203 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13205         PR rtl-optimization/84878
13206         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13207         the basic block.  Assert the use reference is not artificial and that
13208         it has an associated insn.
13210 2018-04-04  Michael Matz  <matz@suse.de>
13212         * builtins.c (compute_objsize): Pass correct operand
13213         to array_at_struct_end_p.
13215 2018-04-04  Richard Biener  <rguenther@suse.de>
13217         PR lto/85176
13218         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13219         from contexts for DINFO_LEVEL_TERSE and below.
13221 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13223         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13224         resiter_operand condition.
13225         * config/nds32/nds32.md (*move<mode>): Ditto.
13227 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13228             Monk Chiang  <sh.chiang04@gmail.com>
13230         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13232 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13234         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13236 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13237             Kito Cheng  <kito.cheng@gmail.com>
13239         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13240         nds32_cond_code_str, output_cond_branch,
13241         output_cond_branch_compare_zero, nds32_expand_cbranch,
13242         nds32_expand_cstore, nds32_expand_movcc,
13243         nds32_output_cbranchsi4_equality_zero,
13244         nds32_output_cbranchsi4_equality_reg,
13245         nds32_output_cbranchsi4_equality_reg_or_const_int,
13246         nds32_output_cbranchsi4_greater_less_zero: New functions.
13247         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13248         nds32_expand_cstore, nds32_expand_movcc,
13249         nds32_output_cbranchsi4_equality_zero,
13250         nds32_output_cbranchsi4_equality_reg,
13251         nds32_output_cbranchsi4_equality_reg_or_const_int,
13252         nds32_output_cbranchsi4_greater_less_zero): Declare.
13253         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13254         nds32_rimm11s_operand): New predicates.
13255         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13256         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13257         patterns.
13259 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13261         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13262         * config/nds32/nds32.md: Ditto.
13263         * config/nds32/pipelines.md: Ditto.
13265 2018-04-04  Richard Biener  <rguenther@suse.de>
13267         PR tree-optimization/85168
13268         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13269         propagating abnormals.
13271 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13273         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13275 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13276             Kito Cheng  <kito.cheng@gmail.com>
13278         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13279         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13280         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13281         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13282         * config/nds32/nds32.md (sibcall_internal): New.
13283         (sibcall_register): Remove.
13284         (sibcall_immediate): Remove.
13285         (sibcall_value_internal): New.
13286         (sibcall_value_register): Remove.
13287         (sibcall_value_immediate): Remove.
13288         * config/nds32/predicates.md (nds32_general_register_operand): New.
13289         (nds32_call_address_operand): New.
13291 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13293         PR rtl-optimization/85167
13294         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13295         bb_defs if *split_p, instead preinitialize it to NULL.
13297         PR tree-optimization/85156
13298         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13299         evaluating the argument multiple times.
13301 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13303         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13304         than vector.
13305         (_mm_cvtpd_ps): Likewise.
13306         (_mm_cvttpd_epi32): Likewise.
13307         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13308         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13309         vector, pixel, and bool following altivec.h include.
13311 2018-04-03  Martin Sebor  <msebor@redhat.com>
13313         * doc/extend.texi (Common Function Attributes): Clarify.
13314         (const attribute): Likewise.
13315         (pure attribute): Likewise.
13317 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13319         PR target/85169
13320         * config/i386/i386.c (ix86_expand_vector_set): Use
13321         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13323 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13325         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13326         instructions when changing rounding bits to preserve precision bits
13327         in the x87 control word.
13329 2018-04-03  Martin Liska  <mliska@suse.cz>
13331         PR tree-optimization/82491
13332         * rtl.h (strip_offset_and_add): Replace += suboffset with
13333         poly_uint64 () + suboffset.
13335 2018-03-29  Martin Liska  <mliska@suse.cz>
13336             Martin Jambor  <mjambor@suse.cz>
13338         PR ipa/84947
13339         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13340         param_type is not an integral or pointer type.
13342 2018-04-03  Richard Biener  <rguenther@suse.de>
13344         * sese.h (recompute_all_dominators): Remove.
13346 2018-04-02  Martin Sebor  <msebor@redhat.com>
13348         * doc/invoke.texi (-Wrestrict): Fix typos.
13350 2018-04-02  Jim Wilson  <jimw@sifive.com>
13352         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13353         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13354         (<optab>di3, <optab>si3_extend): Likewise.
13355         (<optab>si3_mask, <optab>si3_mask_1): New.
13356         (<optab>di3_mask, <optab>di3_mask_1): New.
13357         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13358         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13359         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13361 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13363         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13364         example.
13366 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13368         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13369         (nds32_canonicalize_comparison): New function.
13371 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13372             Kito Cheng  <kito.cheng@gmail.com>
13373             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13375         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13376         * config/nds32/constants.md (unspec_volatile_element): Add
13377         UNSPEC_VOLATILE_RELAX_GROUP.
13378         * config/nds32/nds32-relax-opt.c: New file.
13379         * config/nds32/nds32-predicates.c
13380         (nds32_symbol_load_store_p): New function.
13381         * config/nds32/nds32-protos.h
13382         (nds32_symbol_load_store_p): Declare function.
13383         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13384         * config/nds32/nds32.c
13385         (nds32_register_pass): New function to register pass.
13386         (nds32_register_passes): New function to register passes.
13387         * config/nds32/nds32.md (relax_group): New pattern.
13388         * config/nds32/nds32.opt (mrelax-hint): New option.
13389         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13391 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13393         * config/nds32/t-nds32: Modify files dependency.
13395 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13397         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13398         (PROFILE_HOOK): Define its implementation.
13400 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13402         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13403         type and 32-bit size.
13405 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13407         PR middle-end/85090
13408         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13409         (V_128_256): New mode iterator.
13410         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13411         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13412         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13413         of V.
13414         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13415         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13417 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13419         PR target/83315
13420         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13421         NaN inputs correctly.
13423 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13425         PR target/80546
13426         * config/rs6000/vsx.md (??r): New mode attribute.
13427         (*vsx_mov<mode>_64bit): Use it.
13428         (*vsx_mov<mode>_32bit): Likewise.
13430 2018-03-30  Martin Sebor  <msebor@redhat.com>
13432         PR tree-optimization/84818
13433         * builtins.c (check_access): Use warning_n.
13435 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13437         PR target/83822
13438         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13439         condition.
13440         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13441         condition.
13443 2018-03-30  Julia Koval  <julia.koval@intel.com>
13445         PR target/84413
13446         * x86-tune.def (movx, partial_reg_dependency): Enable for
13447         m_SKYLAKE_AVX512.
13449 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13451         PR inline-asm/84985
13452         * lra-constraints.c (process_alt_operands): Move setting
13453         this_alternative_matches below.
13455 2018-03-29  Martin Liska  <mliska@suse.cz>
13457         PR lto/84995.
13458         * doc/invoke.texi: Document how LTO works with debug info.
13459         Describe auto-load support of binutils.  Mention 'x86-64'
13460         as valid option value of -march option.
13462 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13464         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13466         PR c/85094
13467         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13468         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13469         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13470         checking.
13472 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13474         PR target/84912
13475         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13476         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13477         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13478         for RS6000_BTM_POWERPC64.
13479         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13480         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13481         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13482         definition.
13483         (DIVDE): Use it.
13484         (DIVDEU): Likewise.
13486 2018-03-28 Carl Love  <cel@us.ibm.com>
13488         Revert
13489         2017-09-27  Carl Love  <cel@us.ibm.com>
13491         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13492         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13493         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13494         fctiw instruction.
13496 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13498         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13499         instead of __vector bool.
13500         (_mm_max_pu8): Likewise.
13501         (_mm_min_pi16): Likewise.
13503 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13505         PR target/84912
13506         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13507         (DIVWEUO): Likewise.
13508         (DIVDEO): Likewise.
13509         (DIVDEUO): Likewise.
13510         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13511         DIVWEUO and DIVDEUO.
13512         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13513         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13514         (div_extend): Likewise.
13515         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13516         builtin function.
13517         (__builtin_divweuo): Likewise.
13518         (__builtin_divdeo): Likewise.
13519         (__builtin_divdeuo): Likewise.
13521 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13523         PR target/85095
13524         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13525         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13527         PR tree-optimization/82004
13528         * gimple-match-head.c (optimize_pow_to_exp): New function.
13529         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13530         Don't fold to exp if optimize_pow_to_exp is false.
13532 2018-03-28  Martin Liska  <mliska@suse.cz>
13534         PR other/84819
13535         * calls.c (initialize_argument_information): Fix trailing space.
13536         * common.opt: Fix typo and provide better explanation for
13537         -fsanitize-coverage option.
13538         * config/i386/i386.opt: Fix typo.
13540 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13541             Martin Liska  <mliska@suse.cz>
13543         PR sanitizer/85081
13544         * gimplify.c (asan_poison_variable): Don't do the check for
13545         gimplify_omp_ctxp here.
13546         (gimplify_decl_expr): Do it here.
13547         (gimplify_target_expr): Likewise.
13549 2018-03-28  Martin Liska  <mliska@suse.cz>
13551         PR target/84988
13552         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13553         chkp_type_bounds_count if MPX is not enabled.
13555 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13557         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13559 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13561         PR target/84914
13562         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13563         function to create the function decl for complex long double
13564         multiply and divide for -mabi=ieeelongdouble.
13565         (init_float128_ieee): Call it.
13567 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13569         PR target/85044
13570         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13571         -fcf-protection=branch -mibt.
13572         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13574 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13576         PR target/81863
13577         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13578         arm_word_relocations.
13580 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13582         PR target/85056
13583         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13584         extern array declarations.
13586 2018-03-27  Richard Biener  <rguenther@suse.de>
13588         PR middle-end/84067
13589         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13590         explicit single_use checks.
13592 2018-03-27  Richard Biener  <rguenther@suse.de>
13594         PR tree-optimization/85082
13595         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13596         Valueize the VUSE.
13598 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13600         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13601         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13602         Turn on fasynchronous-unwind-tables and funwind-tables.
13604 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13606         PR target/85073
13607         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13608         (*bmi_blsr_<mode>_ccz): Ditto.
13610 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13612         PR tree-optimization/85063
13613         * omp-general.c (offloading_function_p): New function.  Factor out
13614         of ...
13615         * omp-offload.c (pass_omp_target_link::gate): ... here.
13616         * omp-general.h (offloading_function_p): Declare.
13617         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13618         with attribute omp declare target for offloading functions.
13620 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13622         PR tree-optimization/84005
13623         * tree-data-ref.h (get_base_for_alignment): Declare.
13624         * tree-data-ref.c (get_base_for_alignment_1): New function.
13625         (get_base_for_alignment): Likewise.
13626         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13627         get_base_for_alignment to find a suitable base object, instead
13628         of always using drb->base_address.
13630 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13632         PR inline-asm/85022
13633         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13634         known size by default.
13636 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13638         PR inline-asm/85030
13639         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13640         and non BLKmode operands.
13642 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13644         PR target/85026
13645         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13646         Clean up attributes.
13648 2018-03-23  Richard Biener  <rguenther@suse.de>
13650         PR debug/85020
13651         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13652         we are going to emit early debug for LTO.
13654 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13656         PR inline-asm/85034
13657         * function.c (match_asm_constraints_1): Don't optimize if input
13658         doesn't satisfy general_operand predicate for output's mode.
13660         PR inline-asm/85022
13661         * alias.c (write_dependence_p): Don't require for x_canonicalized
13662         non-VOIDmode if x has VOIDmode.
13664         PR sanitizer/85029
13665         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13666         just don't try to optimize it rather than assert it never happens.
13668 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13670         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13671         macro expansions for definition of ST_INTERNAL_<mode> and
13672         LD_INTERNAL_<mode> builtins.
13673         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13674         Remove prototype.
13675         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13676         function.
13677         (altivec_expand_st_builtin): Likewise.
13678         (altivec_expand_builtin): Remove calls to deleted functions.
13679         (rs6000_address_for_altivec): Delete this function.
13680         * config/rs6000/vector.md: Remove expands for
13681         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13683 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13685         PR target/84826
13686         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13687         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13688         re-computing once computed.
13689         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13690         (arm_init_machine_status): Initialize
13691         machine->static_chain_stack_bytes.
13693 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13695         PR target/84760
13696         * doc/extend.texi: Add four new prototypes for vec_ld.
13697         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13698         definitions for more logical presentation.
13699         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13700         entries for V1TI variants of __builtin_altivec_ld builtin.
13701         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13702         handling of V1TI variant of LVX icode pattern.
13703         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13704         (rs6000_gimple_fold_builtin): Likewise.
13705         (altivec_init_builtins): Add code to define
13706         __builtin_altivec_lvx_v1ti function.
13708 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13710         PR inline-asm/84941
13711         * function.c (match_asm_constraints_1): Don't do the optimization
13712         if input isn't a REG, SUBREG, MEM or constant.
13714 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13716         PR tree-optimization/84956
13717         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13718         bb_has_abnormal_pred.
13720 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13722         PR sanitizer/85018
13723         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13724         DECL_INITIAL (decl) to decl at the end.
13725         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13726         adjust the comment.
13728 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13730         * doc/extend.texi (__builtin_tgmath): Document when complex
13731         integer types are treated as _Complex _Float64.
13733 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13735         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13737 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13739         PR tree-optimization/84960
13740         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13741         if it is ENTRY block, move them into single succ of ENTRY in that case.
13743 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13745         PR tree-optimization/84811
13746         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13747         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13748         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13749         (known_subrange_p): Update accordingly.  Cast each value involved
13750         in the size comparison, rather than casting the result of the
13751         subtraction.
13753 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13755         PR tree-optimization/84982
13756         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13757         by flipping the least significant bit rather than all bits from
13758         bitpos to bitpos + bitsize - 1.
13760 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13762         * doc/extend.texi (Deprecated Features): Remove mention of
13763         long-deleted deprecations.
13765 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13767         PR jit/84288
13768         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13769         * configure: Regenerate.
13771 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13773         PR tree-optimization/83126
13774         * tree-parloops.c (num_phis): New function.
13775         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13777 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13779         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13780         mention anon-struct/union members and trailing attributes.
13782 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13784         PR tree-optimization/84969
13785         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13786         builtin memset partitions if they set different rhs values.
13788 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13790         PR rtl-optimization/84989
13791         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13792         VEC_DUPLICATE with scalar result mode.
13794 2018-03-21  Martin Liska  <mliska@suse.cz>
13796         PR ipa/84963
13797         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13798         not intended return statement.
13800 2018-03-21  Martin Liska  <mliska@suse.cz>
13802         PR target/84988
13803         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13804         (chkp_find_bound_slots_1): Limit number of iterations.
13806 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
13808         PR target/84838
13809         * Minor grammar fixes for x86 options.
13811 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13813         PR debug/84875
13814         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13815         holding REG_CFA_RESTORE notes, instead turn them into a USE.
13817 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
13819         PR target/83789
13820         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13821         (altivec_lvx_<mode>_1op): Likewise.
13822         (altivec_stvx_<mode>_2op): Likewise.
13823         (altivec_stvx_<mode>_1op): Likewise.
13824         (altivec_lvx_<VM2:mode>): New define_expand.
13825         (altivec_stvx_<VM2:mode>): Likewise.
13826         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13827         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13828         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13829         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13830         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13831         (rs6000_gen_lvx): Likewise.
13832         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13833         (altivec_expand_stv_builtin): Likewise.
13834         (altivec_expand_builtin): Likewise.
13835         * config/rs6000/vector.md: Likewise.
13837 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13839         PR target/82518
13840         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13841         BYTES_BIG_ENDIAN.
13843 2018-03-20  Richard Biener  <rguenther@suse.de>
13845         PR target/84986
13846         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13847         sign-conversions as zero, fall back to standard scalar_stmt
13848         cost for the rest.
13850 2018-03-20  Martin Liska  <mliska@suse.cz>
13852         PR ipa/84825
13853         * predict.c (rebuild_frequencies): Handle case when we have
13854         PROFILE_ABSENT, but flag_guess_branch_prob is false.
13856 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13858         PR target/84990
13859         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13860         flag_section_anchors.
13861         * varasm.c (use_blocks_for_decl_p): Remove hack for
13862         dw2_force_const_mem.
13864         PR target/84845
13865         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13866         to ...
13867         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
13868         be created, use lowpart_subreg of operands[0] rather than operands[0]
13869         itself.
13870         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13871         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13872         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13873         and n constraint instead of aarch64_shift_imm_di and Usd.
13874         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13875         (*aarch64_<optab>_reg_minus<mode>3): ... this.
13877 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
13879         PR target/82989
13880         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13881         to favor GPR over NEON registers.
13882         (<shift>di3_neon): Likewise.
13884 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13886         PR target/84952
13887         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13888         (nvptx_process_pars): Emit bar.sync asap and alap.
13890 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13892         PR target/84954
13893         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13894         seen_label if seen_label is already set.
13896 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13898         PR target/84945
13899         * config/i386/i386.c (fold_builtin_cpu): For features above 31
13900         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13901         Use 1U instead of 1.  Formatting fixes.
13903         PR c/84953
13904         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13905         instead of TREE_TYPE (s1) for the return value.
13907 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
13909         PR tree-optimization/84946
13910         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13911         bitsize + bitsize in poly_uint64 rather than poly_int64.
13913         PR sanitizer/78651
13914         * dwarf2asm.c: Include fold-const.c.
13915         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13916         of decl rather than decl itself.
13918         PR rtl-optimization/84643
13919         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13921 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
13923         PR sanitizer/78651
13924         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13925         calling assemble_variable.
13927 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
13929         PR target/81647
13930         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13931         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13933 2018-03-19  Jim Wilson  <jimw@sifive.com>
13935         PR bootstrap/84856
13936         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13937         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13938         (riscv_first_stack_step): Likewise.
13939         (riscv_option_override): Use STACK_BOUNDARY instead of
13940         MIN_STACK_BOUNDARY.
13941         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13942         MIN_STACK_BOUNDARY.
13943         (BIGGEST_ALIGNMENT): Set to 128.
13944         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13945         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13946         STACK_BOUNDARY.
13948 2018-03-19  Richard Biener  <rguenther@suse.de>
13950         PR tree-optimization/84933
13951         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13952         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13954 2018-03-19  Richard Biener  <rguenther@suse.de>
13956         PR tree-optimization/84859
13957         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13958         (cond_if_else_store_replacement): Perform sinking operation on
13959         single-store BBs regardless of MAX_STORES_TO_SINK setting.
13960         Generalize what a BB with a single eligible store is.
13962 2018-03-19  Richard Biener  <rguenther@suse.de>
13964         PR tree-optimization/84929
13965         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13966         chrec_is_positive against non-chrec arg.
13968 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
13970         PR target/84711
13971         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13973 2018-03-18  Martin Liska  <mliska@suse.cz>
13975         PR rtl-optimization/84635
13976         * regrename.c (build_def_use): Use matches_mode only when
13977         matches >= 0.
13979 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
13981         PR tree-optimization/84913
13982         * tree-vect-loop.c (vectorizable_reduction): Don't try to
13983         vectorize chains of COND_EXPRs.
13985 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13987         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13989 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13991         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13993 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13995         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13997 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13998             Kito Cheng  <kito.cheng@gmail.com>
14000         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14001         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14002         (nds32_adjust_reg_alloc_order): New function.
14003         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14005 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14007         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14008         nds32_print_operand, nds32_print_operand_address): Use
14009         HOST_WIDE_INT_PRINT_DEC instead.
14011 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14013         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14015 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14017         PR target/84902
14018         * config/i386/i386.c (initial_ix86_tune_features,
14019         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14020         unsigned long long.
14021         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14022         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14023         rather than 1u << ix86_tune.  Formatting fix.
14024         (ix86_option_override_internal): Change ix86_arch_mask from
14025         unsigned int to unsigned HOST_WIDE_INT, initialize to
14026         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14027         (ix86_function_specific_restore): Likewise.
14029 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14031         PR target/84899
14032         * postreload.c (reload_combine_recognize_pattern): Perform
14033         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14034         truncate_int_for_mode the result for the destination's mode.
14036         PR c/84909
14037         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14038         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14039         Likewise.
14040         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14041         Likewise.
14043 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14045         PR target/84876
14046         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14047         regno_allocno_class_array and sorted_pseudos.
14048         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14049         insns where regno is used.
14051 2018-03-16  Martin Liska  <mliska@suse.cz>
14053         PR ipa/84833
14054         * multiple_target.c (create_dispatcher_calls): Redirect
14055         reference in the symbol table.
14057 2018-03-16  Martin Liska  <mliska@suse.cz>
14059         PR ipa/84722
14060         * multiple_target.c (create_dispatcher_calls): Redirect also
14061         an alias.
14063 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14065         PR c++/79937
14066         PR c++/82410
14067         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14068         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14069         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14071 2018-03-16  Julia Koval  <julia.koval@intel.com>
14073         * doc/invoke.texi (Skylake Server): Add CLWB.
14074         Cannonlake): Remove CLWB.
14076 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14078         PR tree-optimization/84841
14079         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14080         1 << 3.
14081         (FLOAT_ONE_CONST_TYPE): Define.
14082         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14083         (sort_by_operand_rank): Put entries with higher constant_type last
14084         rather than first to match comments.
14086 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14088         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14089         split predicate.
14091 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14093         PR c++/79085
14094         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14095         check and use address of target always.
14097 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14099         PR target/84574
14100         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14101         (indirect_thunk_bnd_needed): Likewise.
14102         (indirect_thunks_used): Likewise.
14103         (indirect_thunks_bnd_used): Likewise.
14104         (indirect_return_needed): New.
14105         (indirect_return_bnd_needed): Likewise.
14106         (output_indirect_thunk_function): Add a bool argument for
14107         function return.
14108         (output_indirect_thunk_function): Don't generate alias for
14109         function return thunk.
14110         (ix86_code_end): Call output_indirect_thunk_function to generate
14111         function return thunks.
14112         (ix86_output_function_return): Set indirect_return_bnd_needed
14113         and indirect_return_needed instead of indirect_thunk_bnd_needed
14114         and indirect_thunk_needed.
14116 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14118         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14119         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14120         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14122 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14123             Paul Hua <paul.hua.gm@gmail.com>
14125         PR c/84852
14126         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14128 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14130         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14131         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14132         resp. SFmode cases.
14134 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14136         PR target/84711
14137         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14138         instead of GET_MODE_SIZE when comparing Units.
14140 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14142         PR target/68256
14143         * varasm.c (hash_section): Return an unchangeble hash value
14144         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14145         Return !aarch64_can_use_per_function_literal_pools_p ().
14147 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14149         PR target/84860
14150         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14151         rather than address of cmode as last argument to prepare_cmp_insn.
14153 2018-03-15  Julia Koval  <julia.koval@intel.com>
14155         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14156         F_AVX512VNNI, F_AVX512BITALG): New.
14158 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14160         PR target/83451
14161         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14162         insn for floating-point loads and stores.
14164 2018-03-14  Carl Love  <cel@us.ibm.com>
14166         * config/rs6000/rs6000-c.c: Add macro definitions for
14167         ALTIVEC_BUILTIN_VEC_PERMXOR.
14168         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14169         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14170         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14171         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14172         UNSPEC_VPERMXOR.
14173         * config/doc/extend.texi: Add prototypes for vec_permxor.
14175 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14177         PR c/84852
14178         * diagnostic-show-locus.c (class layout_point): Convert m_line
14179         from int to linenum_type.
14180         (line_span::comparator): Use linenum "compare" function when
14181         comparing line numbers.
14182         (test_line_span): New function.
14183         (layout_range::contains_point): Convert param "row" from int to
14184         linenum_type.
14185         (layout_range::intersects_line_p): Likewise.
14186         (layout::will_show_line_p): Likewise.
14187         (layout::print_source_line): Likewise.
14188         (layout::should_print_annotation_line_p): Likewise.
14189         (layout::print_annotation_line): Likewise.
14190         (layout::print_leading_fixits): Likewise.
14191         (layout::annotation_line_showed_range_p): Likewise.
14192         (struct line_corrections): Likewise for field m_row.
14193         (line_corrections::line_corrections): Likewise for param "row".
14194         (layout::print_trailing_fixits): Likewise.
14195         (layout::get_state_at_point): Likewise.
14196         (layout::get_x_bound_for_row): Likewise.
14197         (layout::print_line): Likewise.
14198         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14199         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14200         * input.c (selftest::test_linenum_comparisons): New function.
14201         (selftest::input_c_tests): Call it.
14202         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14203         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14204         * selftest.h (ASSERT_GT): New macro.
14205         (ASSERT_GT_AT): New macro.
14206         (ASSERT_LT): New macro.
14207         (ASSERT_LT_AT): New macro.
14209 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14211         PR rtl-optimization/84780
14212         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14214 2018-03-14  Martin Liska  <mliska@suse.cz>
14216         * tree.c (record_node_allocation_statistics): Use
14217         get_stats_node_kind.
14218         (get_stats_node_kind): New function extracted from
14219         record_node_allocation_statistics.
14220         (free_node): Use get_stats_node_kind.
14222 2018-03-14  Richard Biener  <rguenther@suse.de>
14224         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14225         that the value-set of ANTIC_IN doesn't grow.
14227         Revert
14228         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14229         member.
14230         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14231         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14233 2018-03-14  Julia Koval  <julia.koval@intel.com>
14235         * config.gcc (icelake-client, icelake-server): New.
14236         (icelake): Remove.
14237         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14238         (initial_ix86_arch_features): Ditto.
14239         (PTA_SKYLAKE): Add SGX.
14240         (PTA_ICELAKE): Remove.
14241         (PTA_ICELAKE_CLIENT): New.
14242         (PTA_ICELAKE_SERVER): New.
14243         (ix86_option_override_internal): Split up icelake on icelake client and
14244         icelake server.
14245         (get_builtin_code_for_version): Ditto.
14246         (fold_builtin_cpu): Ditto.
14247         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14248         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14249         * config/i386/i386.h (processor_type): Ditto.
14250         * doc/invoke.texi: Ditto.
14252 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14254         PR sanitizer/83392
14255         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14256         INTEGER_CST offset, add it together with bitpos / 8 and
14257         sign extend based on POINTER_SIZE.
14259         PR target/84844
14260         Revert
14261         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14263         PR target/78090
14264         * config/i386/constraints.md (Yc): New register constraint.
14265         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14266         Use Yc constraint for alternative 2 of operand 0.  Remove
14267         preferred_for_speed attribute.
14269 2018-03-14  Richard Biener  <rguenther@suse.de>
14271         PR tree-optimization/84830
14272         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14273         with the old one to avoid oscillations.
14275 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14277         PR target/83712
14278         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14279         pseudos.
14280         (assign_by_spills): Return a flag of reload assignment failure.
14281         Do not process the reload assignment failures.  Do not spill other
14282         reload pseudos if they has the same reg class.  Update n if
14283         necessary.
14284         (lra_assign): Add a return arg.  Set up from the result of
14285         assign_by_spills call.
14286         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14287         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14288         usage_insns if it is not NULL.
14289         (spill_hard_reg_in_range): New function.
14290         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14291         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14292         function prototypes.
14293         (lra_assign): Change prototype.
14294         * lra.c (lra): Add code to deal with fails by splitting hard reg
14295         live ranges.
14297 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14299         * config/riscv/riscv.opt (mrelax): New option.
14300         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14301         "norelax" when riscv_mrelax is disabled.
14302         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14304 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14306         PR target/84743
14307         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14308         reassociation for int modes.
14310 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14312         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14313         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14314         for big-endian.
14315         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14316         * config/aarch64/aarch64-sve.md
14317         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14318         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14319         (*extend<mode><Vwide>2): Rename to...
14320         (aarch64_sve_extend<mode><Vwide>2): ...this.
14321         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14322         renaming the old pattern to...
14323         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14324         unsigned packs.
14325         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14326         define_expand, renaming the old pattern to...
14327         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14328         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14329         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14330         account when deciding which SVE instruction the optab should use.
14331         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14333 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14335         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14336         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14337         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14338         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14339         (tlsdesc_small_<mode>): Turn a define_expand and use
14340         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14341         (tlsdesc_small_advsimd_<mode>): ...this.
14342         (tlsdesc_small_sve_<mode>): New pattern.
14344 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14346         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14347         (UNSPEC_UMUL_HIGHPART): New constants.
14348         (MUL_HIGHPART): New int iteraor.
14349         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14350         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14351         define_expand.
14352         (*<su>mul<mode>3_highpart): New define_insn.
14354 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14356         PR lto/84805
14357         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14358         incomplete types.
14360 2018-03-13  Martin Liska  <mliska@suse.cz>
14362         PR ipa/84658.
14363         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14364         vector.
14365         (sem_item_optimizer::~sem_item_optimizer): Release it.
14366         (sem_item_optimizer::merge_classes): Register variable aliases.
14367         (sem_item_optimizer::fixup_pt_set): New function.
14368         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14369         * ipa-icf.h: Declare new variables and functions.
14371 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14373         PR middle-end/84834
14374         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14375         integer_pow2p@2 and test integer_pow2p in condition.
14376         (A < 0 ? C : 0): Similarly for @1.
14378         PR middle-end/84831
14379         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14380         characters starting at p contain '\0' character, don't look beyond
14381         that.
14383         PR target/84827
14384         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14385         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14387         PR target/84828
14388         * reg-stack.c (change_stack): Change update_end var from int to
14389         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14390         also call set_block_for_insn on the newly added insns and rescan.
14392         PR target/84786
14393         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14394         on the last operand.
14396         PR c++/84704
14397         * tree.c (stabilize_reference_1): Return save_expr (e) for
14398         STATEMENT_LIST even if it doesn't have side-effects.
14400 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14402         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14404 2018-03-12  Renlin Li  <renlin.li@arm.com>
14406         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14407         aarch64_output_scalar_simd_mov_immediate.
14409 2018-03-12  Martin Sebor  <msebor@redhat.com>
14411         PR tree-optimization/83456
14412         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14413         for perfectly overlapping calls to memcpy.
14414         (gimple_fold_builtin_memory_chk): Same.
14415         (gimple_fold_builtin_strcpy): Handle no-warning.
14416         (gimple_fold_builtin_stxcpy_chk): Same.
14417         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14419 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14421         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14422         parameter.  Use it for SFmode.
14423         (rs6000_function_arg_advance_1): Adjust.
14424         (rs6000_function_arg): Adjust.
14425         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14427 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14429         PR rtl-optimization/84169
14430         PR rtl-optimization/84780
14431         * combine.c (can_combine_p): Check for a 2-insn combination whether
14432         the destination register is used between the two insns, too.
14434 2018-03-12  Richard Biener  <rguenther@suse.de>
14436         PR tree-optimization/84803
14437         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14438         for refs DR analysis didn't process.
14440 2018-03-12  Richard Biener  <rguenther@suse.de>
14442         PR tree-optimization/84777
14443         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14444         force-vectorize loops ignore whether we are optimizing for size.
14446 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14448         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14449         (TARGET_MD_ASM_ADJUST): Define.
14451 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14452             Kito Cheng  <kito.cheng@gmail.com>
14453             Chung-Ju Wu  <jasonwucj@gmail.com>
14455         * config/nds32/nds32.c (nds32_compute_stack_frame,
14456         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14457         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14458         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14459         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14460         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14461         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14462         * config/nds32/nds32.md (prologue, epilogue): Use macro
14463         NDS32_V3PUSH_AVAILABLE_P to do checking.
14465 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14467         PR debug/58150
14468         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14469         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14470         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14471         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14472         addition of most attributes on !orig_type_die or the attribute not
14473         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14475 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14476             Chung-Ju Wu  <jasonwucj@gmail.com>
14478         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14479         __NDS32_VH__ macro.
14480         * config/nds32/nds32.opt (mvh): New option.
14482 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14483             Chung-Ju Wu  <jasonwucj@gmail.com>
14485         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14486         function.
14487         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14488         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14489         definition.
14491 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14492             Chung-Ju Wu  <jasonwucj@gmail.com>
14494         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14495         function.
14496         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14497         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14499 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14500             Kito Cheng  <kito.cheng@gmail.com>
14501             Chung-Ju Wu  <jasonwucj@gmail.com>
14503         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14504         UNSPEC_FFMISM and UNSPEC_FLMISM.
14505         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14506         for ffb, ffmism and flmism.
14507         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14508         (unspec_ffmism): Ditto.
14509         (unspec_flmism): Ditto.
14510         (nds32_expand_builtin_impl): Check if string extension is available.
14511         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14512         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14514 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14516         Reverting patch:
14517         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14519         PR target/83712
14520         * lra-assigns.c (assign_by_spills): Return a flag of reload
14521         assignment failure.  Do not process the reload assignment
14522         failures.  Do not spill other reload pseudos if they has the same
14523         reg class.
14524         (lra_assign): Add a return arg.  Set up from the result of
14525         assign_by_spills call.
14526         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14527         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14528         usage_insns if it is not NULL.
14529         (spill_hard_reg_in_range): New function.
14530         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14531         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14532         function prototypes.
14533         (lra_assign): Change prototype.
14534         * lra.c (lra): Add code to deal with fails by splitting hard reg
14535         live ranges.
14537 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14539         PR target/84807
14540         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14542 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14544         PR debug/84620
14545         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14546         (dw_val_node): Add val_symbolic_view.
14547         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14548         (symview_upper_bound): New.
14549         (new_line_info_table): Initialize symviews_since_reset.
14550         (dwarf2out_source_line): Count symviews_since_reset and set
14551         symview_upper_bound.
14552         (dw_val_equal_p): Handle symview.
14553         (add_AT_symview): New.
14554         (print_dw_val): Handle symview.
14555         (attr_checksum, attr_checksum_ordered): Likewise.
14556         (same_dw_val_p, size_of_die): Likewise.
14557         (value_format, output_die): Likewise.
14558         (add_high_low_attributes): Use add_AT_symview for entry_view.
14559         (dwarf2out_finish): Reset symview_upper_bound, clear
14560         zero_view_p.
14562 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14564         PR target/83969
14565         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14566         Add strict argument and use it.
14567         (rs6000_split_multireg_move): Update for new strict argument.
14568         (mem_operand_gpr): Disallow all non-offsettable addresses.
14569         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14571 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14573         PR target/84772
14574         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14575         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14576         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14578         PR c++/84767
14579         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14580         decl, use remap_type if we want to use the type.
14582 2018-03-09  Martin Sebor  <msebor@redhat.com>
14584         PR tree-optimization/84526
14585         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14586         Remove dead code.
14587         (builtin_access::generic_overlap): Be prepared to handle non-array
14588         base objects.
14590 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14592         PR rtl-optimization/84682
14593         * lra-constraints.c (process_address_1): Check is_address flag
14594         for address constraints.
14595         (process_alt_operands): Likewise.
14596         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14597         preprocess_constraints.
14598         * recog.h (preprocess_constraints): Add oploc parameter.
14599         Adjust callers.
14600         * recog.c (preprocess_constraints): Test address_operand for
14601         CT_ADDRESS constraints.
14603 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14605         PR target/83712
14606         * lra-assigns.c (assign_by_spills): Return a flag of reload
14607         assignment failure.  Do not process the reload assignment
14608         failures.  Do not spill other reload pseudos if they has the same
14609         reg class.
14610         (lra_assign): Add a return arg.  Set up from the result of
14611         assign_by_spills call.
14612         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14613         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14614         usage_insns if it is not NULL.
14615         (spill_hard_reg_in_range): New function.
14616         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14617         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14618         function prototypes.
14619         (lra_assign): Change prototype.
14620         * lra.c (lra): Add code to deal with fails by splitting hard reg
14621         live ranges.
14623 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14625         PR target/83193
14626         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14627         Accept complain bool parameter.  Only emit errors if it is true.
14628         (arm_parse_cpu_option_name): Likewise.
14629         (arm_target_thumb_only): Adjust callers of the above.
14630         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14631         prototype to take a default true bool parameter.
14632         (arm_parse_arch_option_name): Likewise.
14634 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14635             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14637         PR jit/64089
14638         PR jit/84288
14639         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14640         * configure: Regenerate.
14641         * configure.ac ("linker --version-script option"): New.
14642         ("linker soname option"): New.
14644 2018-03-09  Richard Biener  <rguenther@suse.de>
14646         PR tree-optimization/84775
14647         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14648         immediate uses of predicate stmts and mark them modified.
14650         Revert
14651         PR tree-optimization/84178
14652         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14653         to caller.
14654         (version_loop_for_if_conversion): Delay update_ssa call.
14655         (tree_if_conversion): Delay update_ssa until after predicate
14656         insertion.
14658 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14660         PR target/84763
14661         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14662         when the function accesses prior frames.
14664 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14666         PR debug/84456
14667         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14668         gen_llsym, otherwise call maybe_gen_llsym.
14670         PR inline-asm/84742
14671         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14672         has ',' character inside of it.
14674 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14676         PR target/84748
14677         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14678         as clobbering CC_REGNUM.
14680 2018-03-08  Richard Biener  <rguenther@suse.de>
14682         PR middle-end/84552
14683         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14684         (follow_copies_to_constant): Do not follow SSA names registered
14685         for update.
14687 2018-03-08  Richard Biener  <rguenther@suse.de>
14689         PR tree-optimization/84178
14690         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14691         to caller.
14692         (version_loop_for_if_conversion): Delay update_ssa call.
14693         (tree_if_conversion): Delay update_ssa until after predicate
14694         insertion.
14696 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14698         PR tree-optimization/84178
14699         * tree-if-conv.c (release_bb_predicate): Remove the
14700         the assertion that the stmts have NULL use_ops.
14701         Discard the statements, asserting that they haven't
14702         yet been added to a BB.
14704 2018-03-08  Richard Biener  <rguenther@suse.de>
14706         PR tree-optimization/84746
14707         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14708         (phi_translate): Pass in destination ANTIC_OUT set.
14709         (phi_translate_1): Likewise.  For a simplified result lookup
14710         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14711         (phi_translate_set): Adjust.
14712         (do_pre_regular_insertion): Likewise.
14713         (do_pre_partial_partial_insertion): Likewise.
14715 2018-03-08  Martin Liska  <mliska@suse.cz>
14717         PR gcov-profile/84735
14718         * doc/gcov.texi: Document usage of profile files.
14719         * gcov-io.h: Document changes in the format.
14721 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14723         PR debug/84404
14724         PR debug/84408
14725         * dwarf2out.c (struct dw_line_info_table): Update comments for
14726         view == -1.
14727         (FORCE_RESET_NEXT_VIEW): New.
14728         (FORCE_RESETTING_VIEW_P): New.
14729         (RESETTING_VIEW_P): Check for -1 too.
14730         (ZERO_VIEW_P): Likewise.
14731         (new_line_info_table): Force-reset next view.
14732         (dwarf2out_begin_function): Likewise.
14733         (dwarf2out_source_line): Simplify zero_view_p initialization.
14734         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14735         view directly.  Omit view when omitting .loc at line 0.
14737 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14739         PR tree-optimization/84740
14740         * tree-switch-conversion.c (process_switch): Call build_constructors
14741         only if info.phi_count is non-zero.
14743         PR tree-optimization/84739
14744         * tree-tailcall.c (find_tail_calls): Check call arguments against
14745         DECL_ARGUMENTS (current_function_decl) rather than
14746         DECL_ARGUMENTS (func) when checking for tail recursion.
14748 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14750         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14751         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14752         Volker Reichelt's entry and add entries for people that perform
14753         GCC fuzzy testing and report numerous bugs.
14755 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14757         PR target/82411
14758         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14759         readonly data in sdata, if that is disabled.
14760         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14761         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14762         -mreadonly-in-sdata option.
14764 2018-03-07  Martin Sebor  <msebor@redhat.com>
14766         PR tree-optimization/84468
14767         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14768         basic block when looking for nul assignment.
14770 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14772         PR target/84277
14773         * except.h (output_function_exception_table): Adjust prototype.
14774         * except.c (output_function_exception_table): Remove FNNAME parameter
14775         and add SECTION parameter.  Ouput one part of the table at a time.
14776         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14777         the first part of the exception table and emit unwind directives.
14778         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14779         (i386_pe_seh_cold_init): Likewise.
14780         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14781         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14782         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14783         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14784         * config/i386/winnt.c: Include except.h.
14785         (struct seh_frame_state): Add reg_offset, after_prologue and
14786         in_cold_section fields.
14787         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14788         (i386_pe_seh_cold_init): New function.
14789         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14790         to seh->in_cold_section.
14791         (seh_emit_push): Record the offset of the push.
14792         (seh_emit_save): Record the offet of the save.
14793         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14794         Test seh->after_prologue to disregard the epilogue.
14795         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14796         (i386_pe_end_cold_function): New function.
14798 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14800         PR fortran/84565
14801         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14802         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14804         PR c++/84704
14805         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14806         on tmp_var.
14807         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14808         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14810         PR middle-end/84723
14811         * multiple_target.c: Include tree-inline.h and intl.h.
14812         (expand_target_clones): Diagnose and fail if node->definition and
14813         !tree_versionable_function_p (node->decl).
14815 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
14817         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14818         sprint_ul.
14819         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14820         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14821         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14823 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14825         PR target/84710
14826         * combine.c (try_combine): Use reg_or_subregno instead of handling
14827         just paradoxical SUBREGs and REGs.
14829 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
14831         * config/arc/arc.c (arc_finalize_pic): Remove function.
14832         (arc_must_save_register): We use single base PIC register, remove
14833         checks to save/restore the PIC register.
14834         (arc_expand_prologue): Likewise.
14835         * config/arc/arc-protos.h (arc_set_default_type_attributes):
14836         Remove.
14837         (arc_verify_short): Likewise.
14838         (arc_attr_type): Likewise.
14839         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14840         (walk_stores): Likewise.
14841         (arc_address_cost): Make it static.
14842         (arc_verify_short): Likewise.
14843         (branch_dest): Likewise.
14844         (arc_attr_type): Likewise.
14845         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14846         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14847         (arc_final_prescan_insn): Remove inserting the nops due to
14848         hardware hazards.  It is done in reorg step.
14849         (insn_length_variant_t): Remove.
14850         (insn_length_parameters_t): Likewise.
14851         (arc_insn_length_parameters): Likewise.
14852         (arc_get_insn_variants): Likewise.
14853         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14855 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14857         PR inline-asm/84683
14858         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14859         assertion failure.
14861         PR tree-optimization/84687
14862         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14863         on new_node->decl.
14864         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14866 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14868         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14869         Rename to ppc_speculation_barrier.
14870         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14871         __builtin_ppc_speculation_barrier.
14873 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14875         PR target/84700
14876         * combine.c (combine_simplify_rtx): Don't try to simplify if
14877         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14878         are equal to x.
14880 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
14882         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14883         to 32 bytes when compiling for POWER9.
14885 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14887         PR target/84564
14888         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14889         regparm >= 3 with no arg reg available also for calls with
14890         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
14892         PR target/84524
14893         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14894         orig,vex.
14895         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
14897 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
14899         PR target/84264
14900         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14902 2018-03-05  Richard Biener  <rguenther@suse.de>
14904         PR tree-optimization/84486
14905         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14906         When inserting a __builtin_assume_aligned call set the LHS
14907         SSA name alignment info accordingly.
14909 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
14911         PR tree-optimization/84114
14912         * config/aarch64/aarch64.c (aarch64_reassociation_width)
14913         Avoid reassociation of FLOAT_MODE addition.
14915 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
14917         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14918         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14919         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14920         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14921         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14922         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14923         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14924         and -mwbnoinvd.
14925         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14926         __builtin_ia32_wbinvd): New builtins.
14927         (SPECIAL_ARGS2): New.
14928         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14929         (SPECIAL_ARGS2): New.
14930         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14931         (ix86_valid_target_attribute_inner_p): Ditto.
14932         (ix86_init_mmx_sse_builtins): Add special_args2.
14933         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14934         TARGET_WBNOINVD_P): New.
14935         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14936         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14937         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14938         * config/i386/immintrin.h (_wbinvd): New intrinsic.
14939         * config/i386/pconfigintrin.h: New file.
14940         * config/i386/wbnoinvdintrin.h: Ditto.
14941         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14942         wbnoinvdintrin.h.
14943         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14945 2018-03-05  Richard Biener  <rguenther@suse.de>
14947         PR tree-optimization/84670
14948         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14949         member.
14950         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14951         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14952         (compute_antic_aux): Only assert the number of values in ANTIC_IN
14953         doesn't grow if all successors (recursively) were visited at least
14954         once.
14956 2018-03-05  Richard Biener  <rguenther@suse.de>
14958         PR tree-optimization/84650
14959         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14960         if executed in the loop pipeline.
14962 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
14964         * doc/configfiles.texi (Configuration Files): Move info about
14965         conditionalizing $target-protos.h to...
14966         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
14967         differs from $target-protos.h.
14969 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
14970             Chung-Ju Wu  <jasonwucj@gmail.com>
14972         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14973         * config/nds32/nds32-multiple.md (setmemsi): Define.
14974         * config/nds32/nds32-memory-manipulation.c
14975         (nds32_gen_dup_4_byte_to_word_value): New.
14976         (emit_setmem_word_loop): New.
14977         (emit_setmem_byte_loop): New.
14978         (nds32_expand_setmem_loop): New.
14979         (nds32_expand_setmem_loop_v3m): New.
14980         (nds32_expand_setmem_unroll): New.
14981         (nds32_expand_setmem): New.
14983 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14984             Chung-Ju Wu  <jasonwucj@gmail.com>
14986         * config/nds32/nds32-memory-manipulation.c
14987         (nds32_emit_load_store): New.
14988         (nds32_emit_post_inc_load_store): New.
14989         (nds32_emit_mem_move): New.
14990         (nds32_emit_mem_move_block): New.
14991         (nds32_expand_movmemsi_loop_unknown_size): New.
14992         (nds32_expand_movmemsi_loop_known_size): New.
14993         (nds32_expand_movmemsi_loop): New.
14994         (nds32_expand_movmemsi_unroll): New.
14995         (nds32_expand_movmemqi): Rename ...
14996         (nds32_expand_movmemsi): ... to this.
14997         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14998         (movmemsi): ... to this.
14999         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15000         (nds32_expand_movmemsi): ... to this.
15002 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15003             Monk Chiang  <sh.chiang04@gmail.com>
15004             Chung-Ju Wu  <jasonwucj@gmail.com>
15006         * config/nds32/nds32-protos.h
15007         (nds32_expand_load_multiple): New arguments.
15008         (nds32_expand_store_multiple): Ditto.
15009         (nds32_valid_multiple_load_store): Rename ...
15010         (nds32_valid_multiple_load_store_p): ... to this.
15011         * config/nds32/nds32-memory-manipulation.c
15012         (nds32_expand_load_multiple): Refine implementation.
15013         (nds32_expand_store_multiple): Ditto.
15014         * config/nds32/nds32-multiple.md
15015         (load_multiple): Update nds32_expand_load_multiple interface.
15016         (store_multiple): Update nds32_expand_store_multiple interface.
15017         * config/nds32/nds32-predicates.c
15018         (nds32_valid_multiple_load_store): Rename ...
15019         (nds32_valid_multiple_load_store_p): ... to this and refine
15020         implementation.
15021         * config/nds32/predicates.md
15022         (nds32_load_multiple_and_update_address_operation): New predicate.
15023         (nds32_store_multiple_and_update_address_operation): New predicate.
15025 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15026             Chung-Ju Wu  <jasonwucj@gmail.com>
15028         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15029         (combo): New attribute.
15030         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15032 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15034         * config/nds32/nds32.opt: Change -mcmodel= default value.
15036 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15037             Monk Chiang  <sh.chiang04@gmail.com>
15038             Chung-Ju Wu  <jasonwucj@gmail.com>
15040         * config/nds32/constants.md (unspec_element): New enum.
15041         * config/nds32/constraints.md (Umw): New constraint.
15042         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15043         * config/nds32/nds32-intrinsic.md: Likewise.
15044         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15045         (nds32_valid_smw_lwm_base_p): New.
15046         (nds32_output_smw_single_word): New.
15047         (nds32_output_lmw_single_word): New.
15048         (nds32_expand_unaligned_load): New.
15049         (nds32_expand_unaligned_store): New.
15050         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15051         (nds32_output_smw_single_word): Declare.
15052         (nds32_output_lmw_single_word): Declare.
15053         (nds32_expand_unaligned_load): Declare.
15054         (nds32_expand_unaligned_store): Declare.
15055         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15056         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15057         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15058         NDS32_BUILTIN_UASTORE_DW.
15059         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15060         predicate.
15062 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15063             Kito Cheng  <kito.cheng@gmail.com>
15064             Chung-Ju Wu  <jasonwucj@gmail.com>
15066         * config/nds32/nds32-intrinsic.c
15067         (nds32_expand_builtin_null_ftype_reg): Delete.
15068         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15069         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15070         (nds32_read_argument): New.
15071         (nds32_legitimize_target): Ditto.
15072         (nds32_legitimize_argument): Ditto.
15073         (nds32_check_constant_argument): Ditto.
15074         (nds32_expand_unop_builtin): Ditto.
15075         (nds32_expand_unopimm_builtin): Ditto.
15076         (nds32_expand_binop_builtin): Ditto.
15077         (nds32_builtin_decl_impl): Ditto.
15078         (builtin_description): Ditto.
15079         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15080         (nds32_init_builtins_impl): Ditto.
15081         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15082         (nds32_builtin_decl): New.
15083         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15084         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15086 2018-03-02  Jeff Law  <law@redhat.com>
15088         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15089         (redundant_insn, fill_simple_delay_slots): Likewise.
15090         (fill_slots_from_thread): Likewise.
15091         * resource.c (mark_referenced_resources): Likewise.
15092         (mark_set_resources, find_dead_or_set_registers): Likewise.
15094 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15096         * substring-locations.h (format_warning_va): Formatting fix for
15097         ATTRIBUTE_GCC_DIAG.
15098         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15099         argument.
15100         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15101         * substring-locations.c: Include intl.h.
15102         (format_warning_va): Turned into small wrapper around
15103         format_warning_n_va, renamed to ...
15104         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15105         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15106         use ngettext.
15107         (format_warning_at_substring_n): New function.
15108         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15109         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15110         format_warning_at_substring with just a shorter name instead of
15111         const function pointer.
15112         (fmtwarn_n): New function.
15113         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15114         appropriate, get rid of all the fmtstr temporaries, move conditionals
15115         with G_() wrapped string literals directly into fmtwarn arguments,
15116         cast dir.len to (int), formatting fixes.
15118 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15120         * doc/invoke.texi: Remove "Cilk Plus" references.
15122 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15123             Richard Biener  <rguenther@suse.de>
15125         PR ipa/84628
15126         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15127         for error or warning attributes if CALL_FROM_THUNK_P is set.
15128         Formatting fixes.
15130 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15132         PR target/56540
15133         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15134         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15136         PR target/56540
15137         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15138         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15140         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15141         instead of -1U in last predictors element's probability member.
15143 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15145         PR ipa/83983
15146         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15147         arguments if they are comparable.
15149 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15151         PR tree-optimization/84634
15152         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15153         masks and masked_loop_p with a single loop_masks, making sure it's
15154         null for bb vectorization.
15156 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15158         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15159         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15160         loop->force_vectorize to check whether there is no alias.
15162 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15164         PR target/84614
15165         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15166         prototypes.
15167         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15168         comments.
15169         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15170         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15171         instead of a loop around prev_real_insn.
15172         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15173         prev_real_insn.
15175         PR inline-asm/84625
15176         * config/i386/i386.c (ix86_print_operand): Use conditional
15177         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15178         zero vector.
15180 2018-03-02  Richard Biener  <rguenther@suse.de>
15182         PR tree-optimization/84427
15183         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15184         (bitmap_set_subtract_values): Rewrite to handle multiple
15185         exprs per value.
15186         (clean): Likewise.
15187         (prune_clobbered_mems): Likewise.
15188         (phi_translate): Take edge instead of pred/phiblock.
15189         (phi_translate_1): Likewise.
15190         (phi_translate_set): Likewise.  Insert all translated
15191         exprs for a value into the set, keeping possibly multiple
15192         expressions per value.
15193         (compute_antic_aux): Adjust for phi_translate changes.
15194         When intersecting union the expressions and prune those
15195         not in the final value set, keeping possibly multiple
15196         expressions per value.  Do not use value-insertion
15197         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15198         all expressions.  Add verification that the value-sets
15199         only shrink during iteration.
15200         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15201         (do_pre_regular_insertion): Likewise.
15202         (do_pre_partial_partial_insertion): Likewise.
15204 2018-03-02  Richard Biener  <rguenther@suse.de>
15206         PR target/82005
15207         * config/darwin.c (saved_debug_info_level): New static global.
15208         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15209         (darwin_asm_lto_end): Restore debug info generation settings.
15211 2018-03-01  Martin Liska  <mliska@suse.cz>
15213         PR sanitizer/82484
15214         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15215         volatile arguments.
15217 2018-03-01  Richard Biener  <rguenther@suse.de>
15219         PR debug/84645
15220         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15221         type annotation with LTO when debug was disabled at compile-time.
15223 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15225         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15226         XINT with INTVAL.
15227         (mips_final_postscan_insn): Likewise.
15229 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15231         PR rtl-optimization/84528
15232         * alias.c (init_alias_target): Add commentary.
15233         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15234         a unique base value if the frame pointer is not eliminated
15235         to the stack pointer.
15237 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15239         PR rtl-optimization/83327
15240         * lra-int.h (hard_regs_spilled_into): Declare.
15241         * lra.c (hard_regs_spilled_into): Define.
15242         (init_reg_info): Init hard_regs_spilled_into.
15243         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15244         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15245         (process_bb_lives): Handle hard_regs_spilled_into.
15246         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15247         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15249 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15251         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15252         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15253         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15254         * config/rs6000/aix72.h: New file.
15256 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15258         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15259         instead of warning_at with conditional singular and plural messages
15260         where possible.
15262         PR target/52991
15263         * stor-layout.c (update_alignment_for_field): For
15264         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15265         && !DECL_PACKED (field), do the alignment update, just use
15266         only desired_align instead of MAX (type_align, desired_align)
15267         as the alignment.
15268         (place_field): Don't do known_align < desired_align handling
15269         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15270         is non-NULL, instead do it after rli->prev_field handling and
15271         only if not within a bitfield word.  For DECL_PACKED (field)
15272         use type_align of BITS_PER_UNIT.
15274 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15276         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15277         superfluous parentheses and trailing spaces.
15279 2018-02-28  Richard Biener  <rguenther@suse.de>
15281         PR tree-optimization/84584
15282         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15283         SCoPs with fake exit edge.
15285 2018-02-28  Martin Liska  <mliska@suse.cz>
15287         PR testsuite/84597
15288         * timevar.c (timer::print): Fix format to properly print 100%
15289         values.
15291 2018-02-28  Richard Biener  <rguenther@suse.de>
15293         PR middle-end/84607
15294         * genmatch.c (capture_info::walk_match): Do not mark
15295         captured expressions without operands as expr_p given
15296         they act more like predicates and should be subject to
15297         "lost tail" side-effect preserving.
15299 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15301         PR rtl-optimization/81611
15302         * auto-inc-dec.c (attempt_change): Move dead note from
15303         mem_insn if it's the next use of regno
15304         (find_address): Take address use of reg holding
15305         non-incremented value.  Add parm to limit search to the named
15306         reg only.
15307         (merge_in_block): Attempt to use a mem insn that is the next
15308         use of the original regno.
15310 2018-02-27  Martin Sebor  <msebor@redhat.com>
15312         PR c++/83871
15313         * doc/invoke.texi (-Wmissing-attributes): New option.
15314         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15316 2018-02-27  Martin Sebor  <msebor@redhat.com>
15318         PR translation/84207
15319         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15320         n argument to unsigned HOST_WIDE_INT.
15321         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15322         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15323         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15324         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15326 2018-02-27  Richard Biener  <rguenther@suse.de>
15328         PR tree-optimization/84512
15329         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15330         Do not use the estimate returned from record_stmt_cost for
15331         the scalar iteration cost but sum properly using add_stmt_cost.
15333 2018-02-27  Richard Biener  <rguenther@suse.de>
15335         PR tree-optimization/84466
15336         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15337         Adjust last change to less strictly validate use operands.
15339 2018-02-27  Martin Liska  <mliska@suse.cz>
15341         PR gcov-profile/84548
15342         * gcov.c (process_file): Allow partial overlap and consider it
15343         also as group functions.
15344         (output_lines): Properly calculate range of lines for a group.
15346 2018-02-27  Martin Liska  <mliska@suse.cz>
15348         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15349         'ggc' suffixes.  Change first column width.
15350         (timer::print): Fix formatting of the column.
15352 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15354         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15355         preserve inline entry blocks for the sake of debug inline
15356         entry point markers alone.
15357         (remove_unused_locals): Suggest in comments a better place to
15358         force the preservation of inline entry blocks that are
15359         otherwise unused, but do not preserve them.
15361 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15363         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15365 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15367         PR target/84039
15368         * config/i386/constraints.md (Bs): Replace
15369         ix86_indirect_branch_register with
15370         TARGET_INDIRECT_BRANCH_REGISTER.
15371         (Bw): Likewise.
15372         * config/i386/i386.md (indirect_jump): Likewise.
15373         (tablejump): Likewise.
15374         (*sibcall_memory): Likewise.
15375         (*sibcall_value_memory): Likewise.
15376         Peepholes of indirect call and jump via memory: Likewise.
15377         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15378         (*sibcall_value_GOT_32): Likewise.
15379         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15380         (GOT_memory_operand): Likewise.
15381         (call_insn_operand): Likewise.
15382         (sibcall_insn_operand): Likewise.
15383         (GOT32_symbol_operand): Likewise.
15384         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15386 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15388         PR rtl-optimization/83496
15389         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15390         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15391         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15392         redundant insn, if any.
15393         (relax_delay_slots): Likewise.
15394         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15396 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15398         PR tree-optimization/83965
15399         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15400         that grouped statements are part of a reduction chain.  Return
15401         true if the statement is not marked as a reduction itself but
15402         is part of a group.
15403         (vect_recog_dot_prod_pattern): Don't check whether the statement
15404         is part of a group here.
15405         (vect_recog_sad_pattern): Likewise.
15406         (vect_recog_widen_sum_pattern): Likewise.
15408 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15410         PR debug/84545
15411         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15413 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15415         PR target/84530
15416         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15417         the bool argument.
15418         (ix86_output_indirect_function_return): New prototype.
15419         (ix86_split_simple_return_pop_internal): Likewise.
15420         * config/i386/i386.c (indirect_return_via_cx): New.
15421         (indirect_return_via_cx_bnd): Likewise.
15422         (indirect_thunk_name): Handle return va CX_REG.
15423         (output_indirect_thunk_function): Create alias for
15424         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15425         (ix86_output_indirect_jmp): Remove the bool argument.
15426         (ix86_output_indirect_function_return): New function.
15427         (ix86_split_simple_return_pop_internal): Likewise.
15428         * config/i386/i386.md (*indirect_jump): Don't pass false
15429         to ix86_output_indirect_jmp.
15430         (*tablejump_1): Likewise.
15431         (simple_return_pop_internal): Change it to define_insn_and_split.
15432         Call ix86_split_simple_return_pop_internal to split it for
15433         -mfunction-return=.
15434         (simple_return_indirect_internal): Call
15435         ix86_output_indirect_function_return instead of
15436         ix86_output_indirect_jmp.
15438 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15440         PR bootstrap/84405
15441         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15442         memset and value initialization afterwards.
15444 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15446         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15448 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15450         PR target/84521
15451         * common/config/aarch64/aarch64-common.c
15452         (aarch_option_optimization_table[]): Switch
15453         off fomit-frame-pointer
15455 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15456             Chung-Ju Wu  <jasonwucj@gmail.com>
15458         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15459         volatile memory.
15460         (store_multiple): Ditto.
15462 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15464         * config.gcc: Add --with-cpu support for nds32 target.
15465         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15466         * config/nds32/nds32.opt: Add -mcpu= option.
15468 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15470         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15471         isel=yes): Warn for these deprecated options.
15473 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15475         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15476         ISA_2_5_MASKS_EMBEDDED.
15478 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15480         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15481         p->max as pointers rather than using iterative_hash_expr.
15483 2018-02-23  Carl Love  <cel@us.ibm.com>
15485         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15486         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15487         BU_P8V_OVERLOAD_2.
15488         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15489         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15490         P8V_BUILTIN_VEC_VUNSIGNED2.
15492 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15494         PR target/81572
15495         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15496         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15497         LRA_UNKNOWN_ALT.
15498         * lra-constraints.c (curr_insn_transform): Set up
15499         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15500         LRA_UNKNOWN_ALT.
15501         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15502         * lra-eliminations.c (spill_pseudos): Ditto.
15503         (process_insn_for_elimination): Ditto.
15504         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15505         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15506         LRA_NON_CLOBBERED_ALT.
15508 2018-02-22  Martin Sebor  <msebor@redhat.com>
15510         PR tree-optimization/84480
15511         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15512         to maybe_diag_stxncpy_trunc.  Call it.
15513         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15514         from gimple_fold_builtin_strcpy.  Print inlining stack.
15515         (handle_builtin_stxncpy): Print inlining stack.
15516         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15518 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15520         PR target/84176
15521         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15522         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15523         and -fcheck-pointer-bounds are used together.
15524         (indirect_thunk_prefix): New enum.
15525         (indirect_thunk_need_prefix): New function.
15526         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15527         "_nt" instead of "_bnd" for NOTRACK prefix.
15528         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15529         (output_indirect_thunk_function): Likewise.
15530         (): Likewise.
15531         (ix86_code_end): Update output_indirect_thunk_function calls.
15532         (ix86_output_indirect_branch_via_reg): Replace
15533         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15534         (ix86_output_indirect_branch_via_push): Likewise.
15535         (ix86_output_function_return): Likewise.
15536         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15537         incompatible with -fcf-protection=branch and
15538         -fcheck-pointer-bounds.
15540 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15542         PR target/83335
15543         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15544         Change gcc_assert call to output_operand_lossage.
15546 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15548         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15550 2018-02-22  DJ Delorie  <dj@redhat.com>
15551             Sebastian Perta  <sebastian.perta@renesas.com>
15552             Oleg Endo  <olegendo@gcc.gnu.org>
15554         * config/rx/rx.c (rx_rtx_costs): New function.
15555         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15557 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15559         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15561 2018-02-22  Martin Liska  <mliska@suse.cz>
15563         PR driver/83193
15564         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15565         Add "native" as a possible value.
15567 2018-02-22  Martin Liska  <mliska@suse.cz>
15569         PR driver/83193
15570         * config/i386/i386.c (ix86_option_override_internal):
15571         Add "native" as a possible value for -march and -mtune.
15573 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15575         PR target/84502
15576         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15577         to all type variants.
15579         PR tree-optimization/84503
15580         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15581         width as info->bitpos + info->bitsize - start.
15582         (merged_store_group::merge_overlapping): Simplify width computation.
15583         (check_no_overlap): New function.
15584         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15585         start + width and last_order of the group, fail if check_no_overlap
15586         fails.
15587         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15588         to group if check_no_overlap fails.
15590 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15592         * config/rs6000/altivec.md: Delete contraint arguments to
15593         define_expand, define_split, and define_peephole2, and in
15594         define_insn_and_split if always unused.
15595         * config/rs6000/darwin.md: Ditto.
15596         * config/rs6000/dfp.md: Ditto.
15597         * config/rs6000/rs6000.md: Ditto.
15598         * config/rs6000/sync.md: Ditto.
15599         * config/rs6000/vector.md: Ditto.
15600         * config/rs6000/vsx.md: Ditto.
15602 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15604         * config/rs6000/altivec.md: Write output control strings as braced
15605         blocks instead of double-quoted strings.
15606         * config/rs6000/darwin.md: Ditto.
15607         * config/rs6000/rs6000.md: Ditto.
15608         * config/rs6000/vector.md: Ditto.
15609         * config/rs6000/vsx.md: Ditto.
15611 2018-02-21  Jason Merrill  <jason@redhat.com>
15613         PR c++/84314 - ICE with templates and fastcall attribute.
15614         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15616 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15618         * ipa-cp.c (determine_versionability): Fix comment typos.
15620 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15622         PR c/84229
15623         * ipa-cp.c (determine_versionability): Do not version functions caling
15624         va_arg_pack.
15626 2018-02-21  Martin Liska  <mliska@suse.cz>
15628         PR driver/83193
15629         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15630         Add "native" as a possible value.
15631         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15632         the macro when native cpu detection is available.
15634 2018-02-21  Martin Liska  <mliska@suse.cz>
15636         PR driver/83193
15637         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15638         Add "native" as a possible value.
15639         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15640         when native cpu detection is available.
15642 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15643             Martin Sebor  <msebor@redhat.com>
15645         PR tree-optimization/84478
15646         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15647         false.
15648         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15649         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15650         support which is conservatively correct, for 2 only stay conservative
15651         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15652         argument to the 2 argument get_range_strlen, adjust 6 arg
15653         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15654         false.
15655         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15656         (gimple_fold_builtin_strlen): Pass true as last argument to
15657         get_range_strlen.
15659 2018-02-20  Martin Sebor  <msebor@redhat.com>
15661         PR middle-end/84095
15662         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15663         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15664         (builtin_memref::builtin_memref): Factor out parts into
15665         set_base_and_offset and call it.
15667 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15669         PR middle-end/84406
15670         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15671         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15672         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15673         search at the associated MODE_INT.
15675 2018-02-20  Jeff Law  <law@redhat.com>
15677         PR middle-end/82123
15678         PR tree-optimization/81592
15679         PR middle-end/79257
15680         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15681         for range data rather than using global data.
15682         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15683         range data rather than using global data.
15684         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15685         pass it to children as needed.
15686         (struct directive::fmtresult): Similarly.
15687         (struct directive::set_width): Similarly.
15688         (struct directive::set_precision): Similarly.
15689         (format_integer, format_directive, parse_directive): Similarly.
15690         (format_none): Accept unnamed vr_values parameter.
15691         (format_percent, format_floating, format_character): Similarly.
15692         (format_string, format_plain): Similarly.
15693         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15694         the EVRP range analyzer for range data rather than using global data.
15695         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15696         gimple-ssa-evrp-analyze.h
15697         (class sprintf_dom_walker): Add after_dom_children member function.
15698         Add evrp_range_analyzer member.
15699         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15700         range analyzer as needed.
15701         (sprintf_dom_walker::after_dom_children): New member function.
15702         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15703         if not optimizing.
15704         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15705         (evrp_range_analyzer::pop_to_marker): Likewise.
15707 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15709         PR tree-optimization/84419
15710         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15711         with the required type if its current type is compatible but
15712         different.
15714 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15716         PR middle-end/82004
15717         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15718         after vectorization.
15720 2018-02-20  Martin Liska  <mliska@suse.cz>
15722         PR driver/83193
15723         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15724         possible values if we don't have a hint.
15726 2018-02-20  Martin Liska  <mliska@suse.cz>
15728         PR c/84310
15729         PR target/79747
15730         * final.c (shorten_branches): Build align_tab array with one
15731         more element.
15732         * opts.c (finish_options): Add alignment option limit check.
15733         (MAX_CODE_ALIGN): Likewise.
15734         (MAX_CODE_ALIGN_VALUE): Likewise.
15735         * doc/invoke.texi: Document maximum allowed option value for
15736         all -falign-* options.
15738 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15740         PR target/84146
15741         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15742         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15743         * var-tracking.c (emit_note_insn_var_location): Remove all references
15744         to NOTE_INSN_CALL_ARG_LOCATION.
15745         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15746         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15747         Use copy_rtx_if_shared.
15748         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15749         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15750         (dwarf2out_var_location): Remove handling of
15751         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15752         on call_insn.
15753         * final.c (final_scan_insn): Remove all references to
15754         NOTE_INSN_CALL_ARG_LOCATION.
15755         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15756         before dumping final insns.
15757         * except.c (emit_note_eh_region_end): Remove all references to
15758         NOTE_INSN_CALL_ARG_LOCATION.
15759         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15760         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15761         * config/arc/arc.c (hwloop_optimize): Likewise.
15762         * config/arm/arm.c (create_fix_barrier): Likewise.
15763         * config/s390/s390.c (s390_chunkify_start): Likewise.
15764         * config/sh/sh.c (find_barrier): Likewise.
15765         * config/i386/i386.c (rest_of_insert_endbranch,
15766         ix86_seh_fixup_eh_fallthru): Likewise.
15767         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15768         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15769         * config/frv/frv.c (frv_function_prologue): Likewise.
15770         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15771         reg note.
15772         (note_outside_basic_block_p): Remove all references to
15773         NOTE_INSN_CALL_ARG_LOCATION.
15774         * gengtype.c (adjust_field_rtx_def): Likewise.
15775         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15776         Likewise.
15777         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15778         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15780         PR c++/84444
15781         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15782         is ADDR_EXPR.
15784         PR tree-optimization/84452
15785         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15786         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15787         is NULL.
15789 2018-02-19  Martin Liska  <mliska@suse.cz>
15791         PR sanitizer/82183
15792         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15794 2018-02-19  Martin Liska  <mliska@suse.cz>
15795             Richard Sandiford  <richard.sandiford@linaro.org>
15797         PR tree-optimization/82491
15798         * gimple-fold.c (get_base_constructor): Make earlier bail out
15799         to prevent ubsan.
15801 2018-02-19  Carl Love  <cel@us.ibm.com>
15803         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15804         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15805         BU_P8V_OVERLOAD_1.
15806         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15807         P8V_BUILTIN_VEC_NEG.
15809 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
15811         * config/rl78/rl78.md (movdf): New define expand.
15813 2018-02-19  Martin Liska  <mliska@suse.cz>
15815         PR other/80589
15816         * doc/invoke.texi: Fix typo.
15817         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15819 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
15821         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15822         handle rs6000_single_float and rs6000_double_float specially for
15823         e500 family CPUs.
15825 2018-02-16  Jeff Law  <law@redhat.com>
15827         * config/rx/rx.c (add_pop_cfi_notes): New function.;
15828         (pop_regs): Use it.
15830 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15832         PR ipa/84425
15833         * ipa-inline.c (inline_small_functions): Fix a typo.
15835 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15837         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15839 2018-02-16  Carl Love  <cel@us.ibm.com>
15841         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15842         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15843         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15844         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15845         expansion to P8V_BUILTIN_VEC_FLOAT2.
15847 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
15849         PR rtl-optimization/70023
15850         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15851         src_regno into account.
15853 2018-02-16  Carl Love  <cel@us.ibm.com>
15855         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15856         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15857         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15858         * config/rs6000/rs6000.c: Remove case statements for
15859         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15860         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15861         and P9V_BUILTIN_VEC_VINSERT4B.
15862         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15863         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15864         * config/rs6000/vsx.md:
15865         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15866         vec_insert4b.
15868 2018-02-16  Carl Love  <cel@us.ibm.com>
15870         * config/rs6000/altivec.h: Add builtin names vec_extract4b
15871         vec_insert4b.
15872         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15873         definitions.
15874         * config/rs6000/rs6000-c.c: Add the definitions for
15875         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15876         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15877         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15878         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
15879         definition for insert4b and define insn *insert3b_internal.
15880         * doc/extend.texi: Add documentation for vec_extract4b.
15882 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15884         * doc/extend.texi (Backwards Compatibility): Mention friend
15885         injection.  Note for-scope is deprecated.
15886         * doc/invoke.texi (-ffriend-injection): Deprecate.
15888 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
15890         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15891         that moved to I2, also allow destinations that are a paradoxical
15892         subreg (instead of a normal reg).
15894 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
15896         PR target/83831
15897         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15898         to QImode.
15900 2018-02-16  Richard Biener  <rguenther@suse.de>
15902         PR tree-optimization/84037
15903         PR tree-optimization/84016
15904         PR target/82862
15905         * config/i386/i386.c (ix86_builtin_vectorization_cost):
15906         Adjust vec_construct for the fact we need additional higher latency
15907         128bit inserts for AVX256 and AVX512 vector builds.
15908         (ix86_add_stmt_cost): Scale vector construction cost for
15909         elementwise loads.
15911 2018-02-16  Richard Biener  <rguenther@suse.de>
15913         PR tree-optimization/84417
15914         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15915         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15916         (non_rewritable_lvalue_p): Likewise, use poly-ints.
15918 2018-02-16  Martin Liska  <mliska@suse.cz>
15920         PR sanitizer/84307
15921         * internal-fn.def (ASAN_CHECK): Set proper flags.
15922         (ASAN_MARK): Likewise.
15924 2018-02-16  Julia Koval  <julia.koval@intel.com>
15926         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15927         from PTA_CANNONLAKE.
15929 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15931         PR target/84272
15932         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15933         Use ++iter rather than iter++ for std::list iterators.
15934         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
15935         defer deleting them until all nodes in the forest are processed.  Do
15936         free even leaf nodes.  Change to_process into auto_vec.
15938         PR bootstrap/84405
15939         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15940         * vec.h (vec_default_construct): Use memset instead of placement new
15941         if BROKEN_VALUE_INITIALIZATION is defined.
15942         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15943         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15944         is defined.
15946         PR rtl-optimization/83723
15947         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15948         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
15949         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
15950         recursive calls.
15951         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15952         callers.
15953         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15955 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
15957         PR rtl-optimization/81443
15958         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15959         from inner REGs to paradoxical SUBREGs.
15961 2018-02-16  Richard Biener  <rguenther@suse.de>
15963         PR tree-optimization/84399
15964         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15965         For operands we can analyze at their definition make sure we can
15966         analyze them at each use as well.
15968 2018-02-16  Richard Biener  <rguenther@suse.de>
15970         PR tree-optimization/84190
15971         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15972         volatile accesses if the decl isn't volatile.
15974 2018-02-15  Jason Merrill  <jason@redhat.com>
15976         PR c++/84314 - ICE with templates and fastcall attribute.
15977         * attribs.c (build_type_attribute_qual_variant): Don't clobber
15978         TYPE_CANONICAL on an existing type.
15980 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15982         PR tree-optimization/84383
15983         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15984         dstoff nor call operand_equal_p if dstbase is NULL.
15986         PR tree-optimization/84334
15987         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15988         also a CONSTANT_CLASS_P, punt.
15990 2018-02-14  Jim Wilson  <jimw@sifive.com>
15992         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15993         first SMALL_OPERAND check.  New local min_second_step.  Move assert
15994         to where locals are set.  Add TARGET_RVC support.
15995         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15997 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
15999         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16001 2018-02-14  Martin Sebor  <msebor@redhat.com>
16003         PR tree-optimization/83698
16004         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16005         arrays constrain the offset range to their bounds.
16006         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16007         (builtin_access::overlap): Avoid setting the size of overlap if it's
16008         already been set.
16009         (maybe_diag_overlap): Also consider arrays when deciding what values
16010         of offsets to include in diagnostics.
16012 2018-02-14  Martin Sebor  <msebor@redhat.com>
16014         PR c/84108
16015         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16016         that correspond to the kind of a declaration.
16018 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16020         PR target/83984
16021         * config/pa/pa.md: Load address of PIC label using the linkage table
16022         if the label is nonlocal.
16024 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16026         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16027         warning message if user requests -maltivec=be.
16028         * doc/invoke.texi: Document deprecation of -maltivec=be.
16030 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16032         PR target/84220
16033         * config/rs6000/rs6000-c.c: Update definitions for
16034         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16035         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16037 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16039         PR target/84239
16040         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16041         add _get_ssp intrinsics. Remove argument from
16042         __builtin_ia32_rdssp[d|q].
16043         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16044         * config/i386/i386-builtin.def: Remove argument from
16045         __builtin_ia32_rdssp[d|q].
16046         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16047         ix86_expand_special_args_builtin for _rdssp[d|q].
16048         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16049         Clear register before usage.
16050         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16051         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16053 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16055         PR tree-optimization/84357
16056         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16057         operand 1 of an ARRAY_REF too.
16059 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16061         PR target/83831
16062         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16063         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16064         declarations.
16065         (set_of_reg): New struct.
16066         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16067         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16068         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16069         functions.
16070         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16071         Split into bitclr, bitset, bitinvert patterns if appropriate.
16072         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16073         use rx_fuse_in_memory_bitop.
16074         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16075         to named insn, correct maximum insn length.
16077 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16079         PR target/79242
16080         * machmode.def: Define a complex mode for PARTIAL_INT.
16081         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16082         MODE_PARTIAL_INT.
16083         * doc/rtl.texi: Document CSPImode.
16084         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16085         handling.
16086         (msp430_hard_regno_nregs_with_padding): Likewise.
16088 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16090         PR target/84279
16091         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16093 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16095         PR rtl-optimization/84169
16096         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16097         we generated a parallel as new i3 and we split that to new i2 and i3
16098         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16099         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16100         those to i2, not i1.  Partially rewrite this scan code.
16102 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16104         PR c/82210
16105         * stor-layout.c (place_field): For variable length fields, adjust
16106         offset_align afterwards not just based on the field's alignment,
16107         but also on the size.
16109         PR middle-end/84309
16110         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16111         of exps and logs in the use_exp2 case.
16113 2018-02-13  Jeff Law  <law@redhat.com>
16115         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16116         entry for "vector".
16118         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16119         ARGS as unused.
16121 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16123         PR debug/84342
16124         PR debug/84319
16125         * common.opt (gas-loc-support, gas-locview-support): New.
16126         (ginline-points, ginternal-reset-location-views): New.
16127         * doc/invoke.texi: Document them.  Use @itemx where intended.
16128         (gvariable-location-views): Adjust.
16129         * target.def (reset_location_view): New.
16130         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16131         (TARGET_RESET_LOCATION_VIEW): New.
16132         * doc/tm.texi: Rebuilt.
16133         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16134         (dwarf2out_default_as_locview_support): New.
16135         (output_asm_line_debug_info): Use option variables.
16136         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16137         (output_loc_list): Likewise.
16138         (add_high_low_attributes): Check option variables.
16139         Don't output entry view attribute in strict mode.
16140         (gen_inlined_subroutine_die): Check option variables.
16141         (dwarf2out_inline_entry): Likewise.
16142         (init_sections_and_labels): Likewise.
16143         (dwarf2out_early_finish): Likewise.
16144         (maybe_reset_location_view): New, from...
16145         (dwarf2out_var_location): ... here.  Call it.
16146         * debug.h (dwarf2out_default_as_loc_support): Declare.
16147         (dwarf2out_default_as_locview_support): Declare.
16148         * hooks.c (hook_int_rtx_insn_0): New.
16149         * hooks.h (hook_int_rtx_insn_0): Declare.
16150         * toplev.c (process_options): Take -gas-loc-support and
16151         -gas-locview-support from dwarf2out.  Enable
16152         -gvariable-location-views by default only with locview
16153         assembler support.  Enable -ginternal-reset-location-views by
16154         default only if the target defines the corresponding hook.
16155         Enable -ginline-points by default if location views are
16156         enabled; force it disabled if statement frontiers are
16157         disabled.
16158         * tree-inline.c (expand_call_inline): Check option variables.
16159         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16161 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16163         PR tree-optimization/84321
16164         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16165         handling.  Also check whether the anti-range contains any values
16166         that satisfy the mask; switch to a VR_RANGE if not.
16168 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16170         PR sanitizer/84340
16171         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16173 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16175         PR c++/83990
16176         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16177         of call statements, also set location of a load to a temporary.
16179 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16181         * config/rl78/rl78.c (add_vector_labels): New function.
16182         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16183         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16184         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16185         which checks that no arguments are passed.
16186         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16187         * doc/extend.texi: Documentation for the new attribute.
16189 2018-02-13  Andreas Schwab  <schwab@suse.de>
16191         * config/riscv/linux.h (CPP_SPEC): Define.
16193 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16195         PR target/84335
16196         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16197         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16198         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16199         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16200         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16201         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16202         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16203         temporarily for AES and PCLMUL builtins.
16205         PR tree-optimization/84339
16206         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16207         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16208         Formatting fixes.
16210         PR middle-end/84309
16211         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16212         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16213         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16214         inline function.
16215         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16216         inline function.
16217         * omp-simd-clone.h: New file.
16218         * omp-simd-clone.c: Include omp-simd-clone.h.
16219         (expand_simd_clones): No longer static.
16220         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16221         cgraph.h and omp-simd-clone.h.
16222         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16223         (vect_recog_widen_shift_pattern): Formatting fix.
16224         (vect_pattern_recog_1): Don't check optab for calls.
16226         PR target/84336
16227         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16228         operands[2] into a REG before using gen_lowpart on it.
16230 2018-02-12  Jeff Law  <law@redhat.com>
16232         PR target/83760
16233         * config/sh/sh.c (find_barrier): Consider a sibling call
16234         a barrier as well.
16236         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16237         successfully back substituting a reg.
16239 2018-02-12  Richard Biener  <rguenther@suse.de>
16241         PR tree-optimization/84037
16242         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16243         parameter, move visited init to caller.
16244         (vect_slp_analyze_operations): Separate cost from validity
16245         check, initialize visited once for all instances.
16246         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16247         for all instances.
16248         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16249         out an assert.
16250         (vect_model_promotion_demotion_cost): Likewise.
16251         (vectorizable_bswap): Guard cost modeling with !slp_node
16252         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16253         SLP stmts.
16254         (vectorizable_call): Likewise.
16255         (vectorizable_conversion): Likewise.
16256         (vectorizable_assignment): Likewise.
16257         (vectorizable_shift): Likewise.
16258         (vectorizable_operation): Likewise.
16259         (vectorizable_store): Likewise.
16260         (vectorizable_load): Likewise.
16261         (vectorizable_condition): Likewise.
16262         (vectorizable_comparison): Likewise.
16264 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16266         PR sanitizer/84307
16267         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16268         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16269         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16271 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16273         PR middle-end/83665
16274         * params.def (inline-min-speedup): Increase from 8 to 15.
16275         (max-inline-insns-auto): Decrease from 40 to 30.
16276         * ipa-split.c (consider_split): Add some buffer for function to
16277         be considered inlining candidate.
16278         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16279         default values.
16281 2018-02-12  Richard Biener  <rguenther@suse.de>
16283         PR tree-optimization/84037
16284         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16285         matched stmts if we cannot swap the non-matched ones.
16287 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16289         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16290         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16291         _mm_maskz_scalef_round_ss): New intrinsics.
16292         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16293         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16294         __builtin_ia32_scalefss_round): Remove.
16295         (__builtin_ia32_scalefsd_mask_round,
16296         __builtin_ia32_scalefss_mask_round): New intrinsics.
16297         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16298         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16299         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16300         "<round_constraint>")): Changed to ...
16301         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16302         "<round_scalar_constraint>")): ... this.
16303         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16304         %0, %1, %2<round_op3>}"): Changed to ...
16305         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16306         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16307         %2<round_scalar_mask_op3>}"): ... this.
16308         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16310 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16312         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16313         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16314         (_mm_maskz_sqrt_round_ss): New intrinsics.
16315         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16316         (__builtin_ia32_sqrtsd_mask_round)
16317         (__builtin_ia32_sqrtss_mask_round): New builtins.
16318         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16319         (__builtin_ia32_sqrtss_round): Remove.
16320         (__builtin_ia32_sqrtsd_mask_round)
16321         (__builtin_ia32_sqrtss_mask_round): New builtins.
16322         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16323         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16324         ((match_operand:VF_128 1 "vector_operand"
16325         "xBm,<round_constraint>")): Changed to ...
16326         ((match_operand:VF_128 1 "vector_operand"
16327         "xBm,<round_scalar_constraint>")): ... this.
16328         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16329         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16330         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16331         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16332         %<iptr>1<round_scalar_mask_op3>}): ... this.
16333         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16334         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16336 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16338         PR target/84266
16339         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16340         Cast vec_cmpeq result to correct type.
16341         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16342         Cast vec_cmpgt result to correct type.
16344 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16346         * final.c (final_scan_insn_1): Renamed from...
16347         (final_scan_insn): ... this.  New wrapper, to recover
16348         seen from the outermost call in recursive ones.
16349         * config/sparc/sparc.c (output_return): Drop seen from call.
16350         (output_sibcall): Likewise.
16351         * config/visium/visium.c (output_branch): Likewise.
16353 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16355         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16356         function label.
16358 2018-02-10  Alan Modra  <amodra@gmail.com>
16360         PR target/84300
16361         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16362         Specify LR as an input.
16364 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16366         PR sanitizer/83987
16367         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16368         remove_member_access_dummy_vars): New functions.
16369         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16370         lower_omp_1, execute_lower_omp): Use them.
16372         PR rtl-optimization/84308
16373         * shrink-wrap.c (spread_components): Release todo vector.
16375 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16377         PR rtl-optimization/57193
16378         * ira-color.c (struct allocno_color_data): Add member
16379         conflict_allocno_hard_prefs.
16380         (update_conflict_allocno_hard_prefs): New.
16381         (bucket_allocno_compare_func): Add a preference based on
16382         conflict_allocno_hard_prefs.
16383         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16384         (color_allocnos): Remove a dead code.  Initiate
16385         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16387 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16389         PR target/84226
16390         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16391         constraint from =wa to wa.  Avoid a subreg on the output operand,
16392         instead use a pseudo and subreg it in a move.
16393         (p9_xxbrd_<mode>): Changed to ...
16394         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16395         (p9_xxbrd_v2df): New expander.
16396         (p9_xxbrw_<mode>): Changed to ...
16397         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16398         (p9_xxbrw_v4sf): New expander.
16400 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16402         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16404 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16406         PR target/83926
16407         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16408         multiply in 32-bit mode.
16409         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16410         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16411         mode.
16413 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16415         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16416         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16417         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16418         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16420 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16422         PR lto/84213
16423         * dwarf2out.c (is_trivial_indirect_ref): New function.
16424         (dwarf2out_late_global_decl): Do not generate a location
16425         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16426         and that are not defined in the current unit.
16428 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16430         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16431         instead of a libcall for UNORDERED.
16433 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16435         PR target/82641
16436         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16437         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16439 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16441         PR target/PR84295
16442         * config/s390/s390.c (s390_set_current_function): Invoke
16443         s390_indirect_branch_settings also if fndecl didn't change.
16445 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16447         * config/rs6000/rs6000.md (blockage): Set length to zero.
16449 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16451         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16453 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16455         PR sanitizer/84285
16456         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16457         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16458         -static-lib*san.
16460         PR debug/84252
16461         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16462         PARALLEL incoming that failed vt_get_decl_and_offset check.
16464         PR middle-end/84237
16465         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16466         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16467         TREE_READONLY bit.
16468         (get_variable_section): For decls in named .bss* sections pass true as
16469         second argument to bss_initializer_p.
16471 2018-02-09  Marek Polacek  <polacek@redhat.com>
16472             Jakub Jelinek  <jakub@redhat.com>
16474         PR c++/83659
16475         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16476         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16477         Sync some changes from cxx_fold_indirect_ref.
16479 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16481         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16482         markers.
16483         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16484         (BLOCK_INLINE_ENTRY_LABEL): New.
16485         (dwarf2out_var_location): Disregard inline entry markers.
16486         (inline_entry_data): New struct.
16487         (inline_entry_data_hasher): New hashtable type.
16488         (inline_entry_data_hasher::hash): New.
16489         (inline_entry_data_hasher::equal): New.
16490         (inline_entry_data_table): New variable.
16491         (add_high_low_attributes): Add DW_AT_entry_pc and
16492         DW_AT_GNU_entry_view attributes if a pending entry is found
16493         in inline_entry_data_table.  Add old entry_pc attribute only
16494         if debug nonbinding markers are disabled.
16495         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16496         markers are enabled.
16497         (block_within_block_p, dwarf2out_inline_entry): New.
16498         (dwarf2out_finish): Check that no entries remained in
16499         inline_entry_data_table.
16500         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16501         (final_scan_insn, notice_source_line): Likewise.
16502         (rest_of_clean_state): Skip inline entry markers.
16503         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16504         markers.
16505         * gimple.c (gimple_build_debug_inline_entry): New.
16506         * gimple.h (enum gimple_debug_subcode): Add
16507         GIMPLE_DEBUG_INLINE_ENTRY.
16508         (gimple_build_debug_inline_entry): Declare.
16509         (gimple_debug_inline_entry_p): New.
16510         (gimple_debug_nonbind_marker_p): Adjust.
16511         * insn-notes.def (INLINE_ENTRY): New.
16512         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16513         inline entry marker notes.
16514         (print_insn): Likewise.
16515         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16516         (INSN_DEBUG_MARKER_KIND): Likewise.
16517         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16518         * tree-inline.c (expand_call_inline): Build and insert
16519         debug_inline_entry stmt.
16520         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16521         inline entry blocks early, if nonbind markers are enabled.
16522         (dump_scope_block): Dump fragment info.
16523         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16524         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16525         (gimple_build_debug_inline_entry): New.
16526         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16527         Enable/disable inline entry points too.
16528         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16529         (DEBUG_INSN): Describe inline entry markers.
16531         * common.opt (gvariable-location-views): New.
16532         (gvariable-location-views=incompat5): New.
16533         * config.in: Rebuilt.
16534         * configure: Rebuilt.
16535         * configure.ac: Test assembler for view support.
16536         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16537         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16538         * dwarf2out.c (var_loc_view): New typedef.
16539         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16540         (dwarf2out_locviews_in_attribute): New.
16541         (dwarf2out_locviews_in_loclist): New.
16542         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16543         (enum dw_line_info_opcode): Add LI_adv_address.
16544         (struct dw_line_info_table): Add view.
16545         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16546         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16547         (zero_view_p): New variable.
16548         (ZERO_VIEW_P): New macro.
16549         (output_asm_line_debug_info): New.
16550         (struct var_loc_node): Add view.
16551         (add_AT_view_list, AT_loc_list): New.
16552         (add_var_loc_to_decl): Add view param.  Test it against last.
16553         (new_loc_list): Add view params.  Record them.
16554         (AT_loc_list_ptr): Handle loc and view lists.
16555         (view_list_to_loc_list_val_node): New.
16556         (print_dw_val): Handle dw_val_class_view_list.
16557         (size_of_die): Likewise.
16558         (value_format): Likewise.
16559         (loc_list_has_views): New.
16560         (gen_llsym): Set vl_symbol too.
16561         (maybe_gen_llsym, skip_loc_list_entry): New.
16562         (dwarf2out_maybe_output_loclist_view_pair): New.
16563         (output_loc_list): Output view list or entries too.
16564         (output_view_list_offset): New.
16565         (output_die): Handle dw_val_class_view_list.
16566         (output_dwarf_version): New.
16567         (output_compilation_unit_header): Use it.
16568         (output_skeleton_debug_sections): Likewise.
16569         (output_rnglists, output_line_info): Likewise.
16570         (output_pubnames, output_aranges): Update version comments.
16571         (output_one_line_info_table): Output view numbers in asm comments.
16572         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16573         Call maybe_gen_llsym.
16574         (loc_list_from_tree_1): Adjust.
16575         (add_AT_location_description): Create view list attribute if
16576         needed, check it's absent otherwise.
16577         (convert_cfa_to_fb_loc_list): Adjust.
16578         (maybe_emit_file): Call output_asm_line_debug_info for test.
16579         (dwarf2out_var_location): Reset views as needed.  Precompute
16580         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16581         attribute.  Set view.
16582         (new_line_info_table): Reset next view.
16583         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16584         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16585         the assembler, or select appropriate line info opcodes.
16586         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16587         (optimize_string_length): Catch it.  Adjust.
16588         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16589         dw_val_class_view_list, and remove it if no longer needed.
16590         (hash_loc_list): Hash view numbers.
16591         (loc_list_hasher::equal): Compare them.
16592         (optimize_location_lists): Check whether a view list symbol is
16593         needed, and whether the locview attribute is present, and
16594         whether they match.  Remove the locview attribute if no longer
16595         needed.
16596         (index_location_lists): Call skip_loc_list_entry for test.
16597         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16598         Use output_dwarf_version.
16599         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16600         (struct dw_val_node): Add val_view_list.
16601         * final.c (SEEN_NEXT_VIEW): New.
16602         (set_next_view_needed): New.
16603         (clear_next_view_needed): New.
16604         (maybe_output_next_view): New.
16605         (final_start_function): Rename to...
16606         (final_start_function_1): ... this.  Take pointer to FIRST,
16607         add SEEN parameter.  Emit param bindings in the initial view.
16608         (final_start_function): Reintroduce SEEN-less interface.
16609         (final): Rename to...
16610         (final_1): ... this.  Take SEEN parameter.  Output final pending
16611         next view at the end.
16612         (final): Reintroduce seen-less interface.
16613         (final_scan_insn): Output pending next view before switching
16614         sections or ending a block.  Mark the next view as needed when
16615         outputting variable locations.  Notify debug backend of section
16616         changes, and of location view changes.
16617         (rest_of_handle_final): Adjust.
16618         * toplev.c (process_options): Autodetect value for debug variable
16619         location views option.  Warn on incompat5 without -gdwarf-5.
16620         * doc/invoke.texi (gvariable-location-views): New.
16621         (gvariable-location-views=incompat5): New.
16622         (gno-variable-location-views): New.
16624 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16626         PR tree-optimization/84136
16627         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16628         that the result of find_edge is non-NULL.
16630 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16632         PR target/83008
16633         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16634         storing integer register in SImode.  Fix cost of 256 and 512
16635         byte aligned SSE register store.
16637 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16639         * config/i386/i386.c (ix86_multiplication_cost): Fix
16640         multiplication cost for TARGET_AVX512DQ.
16642 2018-02-08  Marek Polacek  <polacek@redhat.com>
16644         PR tree-optimization/84238
16645         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16646         get_range_strlen.
16648 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16650         PR tree-optimization/84265
16651         * tree-vect-stmts.c (vectorizable_store): Don't treat
16652         VMAT_CONTIGUOUS accesses as grouped.
16653         (vectorizable_load): Likewise.
16655 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16657         PR tree-optimization/81635
16658         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16659         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16660         (test_round_for_mask): New functions.
16661         (wide_int_cc_tests): Call test_round_for_mask.
16662         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16663         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16664         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16665         range returned by get_range_info.
16667 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16669         PR ipa/81360
16670         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16671         * symtab.c: Include builtins.h
16672         (symtab_node::output_to_lto_symbol_table_p): Move here
16673         from lto-streamer-out.c:output_symbol_p.
16674         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16675         (output_symbol_p): Move all logic to symtab.c
16676         (produce_symtab): Update.
16678 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16680         * config/s390/s390-opts.h (enum indirect_branch): Define.
16681         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16682         (s390_indirect_branch_via_thunk)
16683         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16684         (enum s390_indirect_branch_type): Define.
16685         * config/s390/s390.c (struct s390_frame_layout, struct
16686         machine_function): Remove.
16687         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16688         (indirect_branch_table_label_no, indirect_branch_table_name):
16689         Define variables.
16690         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16691         (enum s390_indirect_branch_option): Define.
16692         (s390_return_addr_from_memory): New function.
16693         (s390_handle_string_attribute): New function.
16694         (s390_attribute_table): Add new attribute handler.
16695         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16696         (s390_indirect_branch_via_thunk): New function.
16697         (s390_indirect_branch_via_inline_thunk): New function.
16698         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16699         sibling call optimization for non z10 compiles.
16700         (s390_emit_call): Force indirect branch target to be a single
16701         register.  Add r1 clobber for non-z10 compiles.
16702         (s390_emit_epilogue): Emit return jump via return_use expander.
16703         (s390_reorg): Handle JUMP_INSNs as execute targets.
16704         (s390_option_override_internal): Perform validity checks for the
16705         new command line options.
16706         (s390_indirect_branch_attrvalue): New function.
16707         (s390_indirect_branch_settings): New function.
16708         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16709         (s390_output_indirect_thunk_function):  New function.
16710         (s390_code_end): Implement target hook.
16711         (s390_case_values_threshold): Implement target hook.
16712         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16713         macros.
16714         * config/s390/s390.h (struct s390_frame_layout)
16715         (struct machine_function): Move here from s390.c.
16716         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16717         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16718         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16719         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16720         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16721         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16722         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16723         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16724         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16725         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16726         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16727         (mnemonic attribute): Add values which aren't recognized
16728         automatically.
16729         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16730         pattern for branch conversion.  Fix mnemonic attribute.
16731         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16732         indirect branch via thunk if requested.
16733         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16734         ("*indirect_jump"): Disable for branch conversion using out of
16735         line thunks.
16736         ("indirect_jump_via_thunk<mode>_z10")
16737         ("indirect_jump_via_thunk<mode>")
16738         ("indirect_jump_via_inlinethunk<mode>_z10")
16739         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16740         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16741         ("casesi_jump_via_inlinethunk<mode>_z10")
16742         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16743         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16744         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16745         ("*indirect2_jump"): Disable for branch conversion.
16746         ("casesi_jump"): Turn into expander and expand patterns for branch
16747         conversion.
16748         ("return_use"): New expander.
16749         ("*return"): Emit return via thunk and rename it to ...
16750         ("*return<mode>"): ... this one.
16751         * config/s390/s390.opt: Add new options and and enum for the
16752         option values.
16754 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16756         * lra-constraints.c (match_reload): Unconditionally use
16757         gen_lowpart_SUBREG, rather than selecting between that
16758         and equivalent gen_rtx_SUBREG code.
16760 2018-02-08  Richard Biener  <rguenther@suse.de>
16762         PR tree-optimization/84233
16763         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16764         changed flag instead of boguously re-using phi_inserted.
16766 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16768         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16769         static local variables.
16771 2018-02-08  Richard Biener  <rguenther@suse.de>
16773         PR tree-optimization/84278
16774         * tree-vect-stmts.c (vectorizable_store): When looking for
16775         smaller vector types to perform grouped strided loads/stores
16776         make sure the mode is supported by the target.
16777         (vectorizable_load): Likewise.
16779 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16781         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16782         Increase LDP/STP opportunities by adding adjacent callee-saves.
16784 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16786         PR rtl-optimization/84068
16787         PR rtl-optimization/83459
16788         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16790 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16792         PR tree-optimization/84224
16793         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16794         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16795         non-zero arguments.
16797 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
16799         PR target/84113
16800         * config/rs6000/altivec.md (*restore_world): Remove LR use.
16801         * config/rs6000/predicates.md (restore_world_operation): Adjust op
16802         count, remove one USE.
16804 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16806         * doc/install.texi (Configuration): Document the
16807         --with-long-double-format={ibm,ieee} PowerPC configuration
16808         options.
16810         PR target/84154
16811         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16812         Convert from define_expand to be define_insn_and_split.  Rework
16813         float/double/_Float128 conversions to QI/HI/SImode to work with
16814         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
16815         conversions to QI/HImode types did a store and then a load to
16816         truncate the value.  For conversions to VSX registers, don't split
16817         the insn, instead emit the code directly.  Use the code iterator
16818         any_fix to combine signed and unsigned conversions.
16819         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16820         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16821         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16822         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16823         (fix_<mode>di2_hw): Likewise.
16824         (fixuns_<mode>di2_hw): Likewise.
16825         (fix_<mode>si2_hw): Likewise.
16826         (fixuns_<mode>si2_hw): Likewise.
16827         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16828         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16829         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16830         fix<uns>_trunc<SFDF:mode>si2_p8.
16831         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16832         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16833         (fix<uns>_<mode>_mem): Likewise.
16834         (fctiw<u>z_<mode>_mem): Likewise.
16835         (fix<uns>_<mode>_mem): Likewise.
16836         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16837         the register allocator from doing a direct move to the GPRs to do
16838         a store, and instead use the ISA 3.0 store byte/half-word from
16839         vector register instruction.  For IEEE 128-bit floating point,
16840         also optimize stores of 32-bit ints.
16841         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16843 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
16845         * genextract.c (push_pathstr_operand): New function to support
16846         [a-zA-Z].
16847         (walk_rtx): Call push_pathstr_operand.
16848         (print_path): Support [a-zA-Z].
16850 2018-02-07  Richard Biener  <rguenther@suse.de>
16852         PR tree-optimization/84037
16853         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16854         (cse_and_gimplify_to_preheader): Declare.
16855         (vect_get_place_in_interleaving_chain): Likewise.
16856         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16857         ivexpr_map.
16858         (_loop_vec_info::~_loop_vec_info): Delete it.
16859         (cse_and_gimplify_to_preheader): New function.
16860         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16861         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16862         (vectorizable_load): Likewise.  For grouped stores always base
16863         the IV on the first element.
16864         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16865         condition before gimplifying.
16867 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16869         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16870         *DIV_EXPR and *MOD_EXPR.
16872 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
16874         PR target/84248
16875         * config/i386/i386.c (ix86_option_override_internal): Mask out
16876         the CF_SET bit when checking -fcf-protection.
16878 2018-02-07  Tom de Vries  <tom@codesourcery.com>
16880         PR libgomp/84217
16881         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16882         enough.
16884 2018-02-07  Richard Biener  <rguenther@suse.de>
16886         PR tree-optimization/84204
16887         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16888         this place.
16890         PR tree-optimization/84205
16891         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16892         special-case isl_ast_op_zdiv_r.
16894         PR tree-optimization/84223
16895         * graphite-scop-detection.c (gather_bbs::before_dom_children):
16896         Only add conditions from within the region.
16897         (gather_bbs::after_dom_children): Adjust.
16899 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
16901         PR target/84209
16902         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16903         * config/avr/avr.md: Only post-reload split REG-REG moves if
16904         either register is GENERAL_REG_P.
16906 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16908         PR tree-optimization/84235
16909         * tree-ssa-scopedtables.c
16910         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16911         if the subtraction is performed in floating point type where NaNs are
16912         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16913         build 1.  Formatting fix.
16915 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
16917         PR target/84146
16918         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16919         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16920         and skip it regardless of bb boundaries.  Use CALL_P macro,
16921         don't test INSN_P (insn) together with CALL_P or JUMP_P check
16922         unnecessarily, formatting fix.
16924 2018-02-06  Michael Collison  <michael.collison@arm.com>
16926         * config/arm/thumb2.md:
16927         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16928         (*thumb_mov_notscc): Ditto.
16930 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
16932         PR target/84154
16933         * config/rs6000/rs6000.md (su code attribute): Use "u" for
16934         unsigned_fix, not "s".
16936 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16938         * configure.ac (gcc_fn_eh_frame_ro): New function.
16939         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16940         correct .eh_frame permissions.
16941         * configure: Regenerate.
16943 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
16945         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16946         irrelevant options.
16948 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16950         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16951         Display warning message for -mno-speculate-indirect-jumps.
16953 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
16955         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16956         Undocumented.
16957         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16959 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
16961         PR tree-optimization/84225
16962         * tree-eh.c (find_trapping_overflow): Only call
16963         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16965 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16967         PR target/84145
16968         * config/i386/i386.c: Reimplement the check of possible options
16969         -mibt/-mshstk conbination. Change error messages.
16970         * doc/invoke.texi: Fix a typo: remove extra '='.
16972 2018-02-06  Marek Polacek  <polacek@redhat.com>
16974         PR tree-optimization/84228
16975         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16977 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
16979         PR target/82641
16980         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16981         emitted arch directives.
16982         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16983         __ARM_FEATURE_COPROC before changing architectures.
16985 2018-02-06  Richard Biener  <rguenther@suse.de>
16987         * config/i386/i386.c (print_reg): Fix typo.
16988         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16990 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
16992         * configure: Regenerate.
16994 2018-02-05  Martin Sebor  <msebor@redhat.com>
16996         PR tree-optimization/83369
16997         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16998         inlining context.
17000 2018-02-05  Martin Liska  <mliska@suse.cz>
17002         * doc/invoke.texi: Cherry-pick upstream r323995.
17004 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17006         * ira.c (ira_init_register_move_cost): Adjust comment.
17008 2018-02-05  Martin Liska  <mliska@suse.cz>
17010         PR gcov-profile/84137
17011         * doc/gcov.texi: Fix typo in documentation.
17013 2018-02-05  Martin Liska  <mliska@suse.cz>
17015         PR gcov-profile/83879
17016         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17017         using dlopen functionality.
17019 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17021         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17022         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17023         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17024         _mm_maskz_range_round_ss): New intrinsics.
17025         (__builtin_ia32_rangesd128_round)
17026         (__builtin_ia32_rangess128_round): Remove.
17027         (__builtin_ia32_rangesd128_mask_round,
17028         __builtin_ia32_rangess128_mask_round): New builtins.
17029         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17030         __builtin_ia32_rangess128_round): Remove.
17031         (__builtin_ia32_rangesd128_mask_round,
17032         __builtin_ia32_rangess128_mask_round): New builtins.
17033         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17034         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17035         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17036         "<round_saeonly_constraint>")): Changed to ...
17037         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17038         "<round_saeonly_scalar_constraint>")): ... this.
17039         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17040         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17041         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17042         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17043         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17045 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17047         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17048         options.
17049         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17050         Remove all values except native, 8540 and 8548.
17052 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17054         * config/i386/i386.c (ix86_output_function_return): Pass
17055         INVALID_REGNUM, instead of -1, as invalid register number to
17056         indirect_thunk_name and output_indirect_thunk.
17058 2018-02-02  Julia Koval  <julia.koval@intel.com>
17060         * config.gcc: Add -march=icelake.
17061         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17062         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17063         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17064         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17065         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17066         (processor_target_table): Add icelake.
17067         (ix86_option_override_internal): Handle new PTAs.
17068         (get_builtin_code_for_version): Handle icelake.
17069         (M_INTEL_COREI7_ICELAKE): New.
17070         (fold_builtin_cpu): Handle icelake.
17071         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17072         * doc/invoke.texi: Add -march=icelake.
17074 2018-02-02  Julia Koval  <julia.koval@intel.com>
17076         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17077         to wide_int_bitmask.
17078         * wide-int-bitmask.h: New.
17080 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17082         PR target/84066
17083         * config/i386/i386.md: Replace Pmode with word_mode in
17084         builtin_setjmp_setup and builtin_longjmp to support x32.
17086 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17088         PR target/56010
17089         PR target/83743
17090         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17091         #include "opts.h".
17092         (rs6000_supported_cpu_names): New static variable.
17093         (linux_cpu_translation_table): Likewise.
17094         (elf_platform) <cpu>: Define new static variable and use it.
17095         Translate kernel AT_PLATFORM name to canonical name if needed.
17096         Error if platform name is unknown.
17098 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17100         PR target/84089
17101         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17103 2018-02-01  Jeff Law  <law@redhat.com>
17105         PR target/84128
17106         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17107         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17108         the scratch if RELEASE_VIA_POP is false.
17109         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17110         If we have to save a temporary register, decrement SIZE appropriately.
17111         Pass new arguments to release_scratch_register_on_entry.
17112         (ix86_adjust_stack_and_probe): Likewise.
17113         (ix86_emit_probe_stack_range): Pass new arguments to
17114         release_scratch_register_on_entry.
17116 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17118         PR rtl-optimization/84157
17119         * combine.c (change_zero_ext): Use REG_P predicate in
17120         front of HARD_REGISTER_P predicate.
17122 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17124         * config/avr/avr.c (avr_option_override): Move disabling of
17125         -fdelete-null-pointer-checks to...
17126         * common/config/avr/avr-common.c (avr_option_optimization_table):
17127         ...here.
17129 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17131         PR tree-optimization/81635
17132         * tree-data-ref.c (split_constant_offset_1): For types that
17133         wrap on overflow, try to use range info to prove that wrapping
17134         cannot occur.
17136 2018-02-01  Renlin Li  <renlin.li@arm.com>
17138         PR target/83370
17139         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17140         TAILCALL_ADDR_REGS.
17141         (aarch64_register_move_cost): Likewise.
17142         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17143         TAILCALL_ADDR_REGS.
17144         (REG_CLASS_NAMES): Likewise.
17145         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17146         TAILCALL_ADDR_REGS. Remove IP registers.
17147         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17149 2018-02-01  Richard Biener  <rguenther@suse.de>
17151         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17152         for specifying RPO order and allow NULL for that.
17153         * domwalk.c (dom_walker::dom_walker): Likewise.
17154         (dom_walker::walk): Handle NULL RPO order.
17155         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17156         in RPO order.
17157         (rewrite_update_dom_walker): Likewise.
17158         (mark_def_dom_walker): Likewise.
17160 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17162         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17163         (aarch64_maybe_expand_sve_subreg_move): Declare.
17164         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17165         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17166         predicate.
17167         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17168         that are semantically a reverse operation.
17169         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17170         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17171         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17172         functions.
17173         (aarch64_can_change_mode_class): For big-endian, forbid changes
17174         between two SVE modes if they have different element sizes.
17176 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17178         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17179         the TImode handling for big-endian targets.
17181 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17183         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17184         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17185         not just bytes.
17186         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17187         Remove BSWAP handing for big-endian targets and use the form of
17188         LD1RQ appropariate for the mode.
17190 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17192         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17193         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17194         duplicated element.
17196 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17198         PR tearget/83845
17199         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17200         check for operands that need to go through aarch64_sve_reload_be.
17202 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17204         PR tree-optimization/81661
17205         PR tree-optimization/84117
17206         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17207         * tree-eh.c: Include gimplify.h.
17208         (find_trapping_overflow, replace_trapping_overflow,
17209         rewrite_to_non_trapping_overflow): New functions.
17210         * tree-vect-loop.c: Include tree-eh.h.
17211         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17212         * tree-data-ref.c: Include tree-eh.h.
17213         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17215 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17217         PR rtl-optimization/84123
17218         * combine.c (change_zero_ext): Check if hard register satisfies
17219         can_change_dest_mode before calling gen_lowpart_SUBREG.
17221 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17223         PR target/82444
17224         * ira.c (ira_init_register_move_cost): Remove assert.
17226 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17228         PR rtl-optimization/84071
17229         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17230         * doc/tm.texi: Regenerate.
17232 2018-01-31  Richard Biener  <rguenther@suse.de>
17234         PR tree-optimization/84132
17235         * tree-data-ref.c (analyze_miv_subscript): Properly
17236         check whether evolution_function_is_affine_multivariate_p
17237         before calling gcd_of_steps_may_divide_p.
17239 2018-01-31  Julia Koval  <julia.koval@intel.com>
17241         PR target/83618
17242         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17243         * config/i386/i386.md (rdpid_rex64) New.
17244         (rdpid): Make 32bit only.
17246 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17248         PR lto/84105
17249         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17250         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17252 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17254         Revert
17255         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17257         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17259 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17261         PR rtl-optimization/84071
17262         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17263         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17265 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17267         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17268         (arc_attribute_table): Add 'aux' attribute.
17269         (arc_in_small_data_p): Consider aux like variables.
17270         (arc_is_aux_reg_p): New function.
17271         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17272         (arc_get_aux_arg): New function.
17273         (prepare_move_operands): Handle aux-register access.
17274         (arc_handle_aux_attribute): New function.
17275         * doc/extend.texi (ARC Variable attributes): Add subsection.
17277 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17279         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17280         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17281         (arc_attribute_table): Add 'uncached' attribute.
17282         (arc_print_operand): Print '.di' flag for uncached memory
17283         accesses.
17284         (arc_in_small_data_p): Do not consider for small data the uncached
17285         types.
17286         (arc_is_uncached_mem_p): New function.
17287         * config/arc/predicates.md (compact_store_memory_operand): Check
17288         for uncached memory accesses.
17289         (nonvol_nonimm_operand): Likewise.
17290         * doc/extend.texi (ARC Type Attribute): New subsection.
17292 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17294         PR c/84100
17295         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17296         falign-loops=): Add Optimization flag.
17298 2018-01-30  Jeff Law  <law@redhat.com>
17300         PR target/84064
17301         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17302         INT_REGISTERS_SAVED.  Check it prior to calling
17303         get_scratch_register_on_entry.
17304         (ix86_adjust_stack_and_probe): Similarly.
17305         (ix86_emit_probe_stack_range): Similarly.
17306         (ix86_expand_prologue): Corresponding changes.
17308 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17310         PR target/40411
17311         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17312         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17314 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17316         PR target/84112
17317         * lra-constraints.c (curr_insn_transform): Process AND in the
17318         address.
17320 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17322         PR rtl-optimization/83986
17323         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17324         dependence against last_pending_memory_flush in addition to
17325         pending_jump_insns.
17327 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17329         PR tree-optimization/81611
17330         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17331         copies.
17333 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17335         PR target/83758
17336         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17337         a reg rtx.
17339 2018-01-30  Richard Biener  <rguenther@suse.de>
17340             Jakub Jelinek  <jakub@redhat.com>
17342         PR tree-optimization/84111
17343         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17344         inner loops added during recursion, as they don't have up-to-date
17345         SSA form.
17347 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17349         PR ipa/81360
17350         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17351         (can_inline_edge_by_limits_p): ... here.
17352         (can_early_inline_edge_p, check_callers,
17353         update_caller_keys, update_callee_keys, recursive_inlining,
17354         add_new_edges_to_heap, speculation_useful_p,
17355         inline_small_functions,
17356         inline_small_functions, flatten_function,
17357         inline_to_all_callers_1): Update.
17359 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17361         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17362         zeros correctly.
17364 2018-01-30  Richard Biener  <rguenther@suse.de>
17366         PR tree-optimization/83008
17367         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17368         invariant and constant vector uses in stmts when they need
17369         more than one stmt.
17371 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17373         PR bootstrap/84017
17374         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17375         * configure: Regenerate.
17377 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17379         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17380         pattern.
17381         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17382         Use gen_rtx_REG rather than gen_lowpart.
17384 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17386         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17387         rather than 0 when creating partial subregs.
17389 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17391         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17392         of usage.
17394 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17396         PR target/81550
17397         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17398         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17399         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17400         flags.  This restores the settings used before the 2017-07-24.
17401         Turning off pre increment/decrement/modify allows IVOPTS to
17402         optimize DF/SF loops where the index is an int.
17404 2018-01-29  Richard Biener  <rguenther@suse.de>
17405             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17407         PR bootstrap/80867
17408         * tree-vect-stmts.c (vectorizable_call): Don't call
17409         targetm.vectorize_builtin_md_vectorized_function if callee is
17410         NULL.
17412 2018-01-22  Carl Love  <cel@us.ibm.com>
17414         * doc/extend.tex: Fix typo in second arg in
17415         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17417 2018-01-29  Richard Biener  <rguenther@suse.de>
17419         PR tree-optimization/84086
17420         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17421         (flush_ssaname_freelist): When SSA names were released reset
17422         the SCEV hash table.
17424 2018-01-29  Richard Biener  <rguenther@suse.de>
17426         PR tree-optimization/84057
17427         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17428         removed paths when removing edges.
17430 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17432         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17433         -mfunction-return=@var{choice}.
17435 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17437         PR diagnostic/84034
17438         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17439         Handle CR like TAB.
17440         (layout::print_source_line): Likewise.
17441         (test_get_line_width_without_trailing_whitespace): Add test cases.
17443 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17445         PR middle-end/84040
17446         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17447         debug insns.
17449 2018-01-26  Jim Wilson  <jimw@sifive.com>
17451         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17453         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17454         specified.
17456 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17458         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17459         and CMP + SUB-immediate -> SUBS.
17461 2018-01-26  Martin Sebor  <msebor@redhat.com>
17463         PR tree-optimization/83896
17464         * tree-ssa-strlen.c (get_string_len): Rename...
17465         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17466         Avoid assuming length is constant.
17467         (handle_char_store): Use HOST_WIDE_INT for string length.
17469 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17471         PR target/81763
17472         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17473         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17475 2018-01-26  Richard Biener  <rguenther@suse.de>
17477         PR rtl-optimization/84003
17478         * dse.c (record_store): Only record redundant stores when
17479         the earlier store aliases at least all accesses the later one does.
17481 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17483         PR rtl-optimization/83985
17484         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17485         REG_CFA_RESTORE insns.
17486         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17487         REG_CFA_RESTORE insns here.
17489         PR c/83989
17490         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17491         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17493 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17495         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17496         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17497         (arc_init): Likewise.
17498         (arc_override_options): Likewise.
17499         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17500         value.
17501         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17502         support.
17503         * config/arc/arc.h (TARGET_DBNZ): Define.
17504         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17505         properly set the tune attribute.
17506         (dbnz): Use TARGET_DBNZ guard.
17507         * config/arc/arc.opt (mtune): Add core3 option.
17509 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17511         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17512         recognize new pic like addresses.
17513         (arc_delegitimize_address): Clean up.
17515 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17517         * config/arc/arc-arches.def: Option mrf16 valid for all
17518         architectures.
17519         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17520         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17521         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17522         * config/arc/arc-tables.opt: Regenerate.
17523         * config/arc/arc.c (arc_conditional_register_usage): Handle
17524         reduced register file case.
17525         (arc_file_start): Set must have build attributes.
17526         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17527         mrf16 option value.
17528         * config/arc/arc.opt (mrf16): Add new option.
17529         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17530         * config/arc/genmultilib.awk: Handle new mrf16 option.
17531         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17532         * config/arc/t-multilib: Regenerate.
17533         * doc/invoke.texi (ARC Options): Document mrf16 option.
17535 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17537         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17538         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17539         (arc_attribute_table): Add 'secure_call' attribute.
17540         (arc_print_operand): Print secure call operand.
17541         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17542         secure.
17543         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17544         (call_i): Add support for sjli instruction.
17545         (call_value_i): Likewise.
17546         * config/arc/constraints.md (Csc): New constraint.
17548 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17549             John Eric Martin  <John.Martin@emmicro-us.com>
17551         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17552         * config/arc/arc.c (_arc_jli_section): New struct.
17553         (arc_jli_section): New type.
17554         (rc_jli_sections): New static variable.
17555         (arc_handle_jli_attribute): New function.
17556         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17557         (arc_file_end): New function.
17558         (TARGET_ASM_FILE_END): Define.
17559         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17560         (arc_add_jli_section): New function.
17561         (jli_call_scan): Likewise.
17562         (arc_reorg): Call jli_call_scan.
17563         (arc_output_addsi): Remove 'S' from printing asm operand.
17564         (arc_is_jli_call_p): New function.
17565         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17566         operand.
17567         (movhi_insn): Likewise.
17568         (movsi_insn): Likewise.
17569         (movsi_set_cc_insn): Likewise.
17570         (loadqi_update): Likewise.
17571         (load_zeroextendqisi_update): Likewise.
17572         (load_signextendqisi_update): Likewise.
17573         (loadhi_update): Likewise.
17574         (load_zeroextendhisi_update): Likewise.
17575         (load_signextendhisi_update): Likewise.
17576         (loadsi_update): Likewise.
17577         (loadsf_update): Likewise.
17578         (movsicc_insn): Likewise.
17579         (bset_insn): Likewise.
17580         (bxor_insn): Likewise.
17581         (bclr_insn): Likewise.
17582         (bmsk_insn): Likewise.
17583         (bicsi3_insn): Likewise.
17584         (cmpsi_cc_c_insn): Likewise.
17585         (movsi_ne): Likewise.
17586         (movsi_cond_exec): Likewise.
17587         (clrsbsi2): Likewise.
17588         (norm_f): Likewise.
17589         (normw): Likewise.
17590         (swap): Likewise.
17591         (divaw): Likewise.
17592         (flag): Likewise.
17593         (sr): Likewise.
17594         (kflag): Likewise.
17595         (ffs): Likewise.
17596         (ffs_f): Likewise.
17597         (fls): Likewise.
17598         (call_i): Remove 'S' asm letter, add jli instruction.
17599         (call_value_i): Likewise.
17600         * config/arc/arc.op (mjli-always): New option.
17601         * config/arc/constraints.md (Cji): New constraint.
17602         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17603         operand.
17604         (subsf3_fpx): Likewise.
17605         (mulsf3_fpx): Likewise.
17606         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17607         asm operand.
17608         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17609         function attrbutes.
17610         * doc/invoke.texi (ARC): Document mjli-always option.
17612 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17614         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17615         avoid addition with 0 and use incw and decw where possible.
17617 2018-01-26  Richard Biener  <rguenther@suse.de>
17619         PR tree-optimization/81082
17620         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17621         association if it requires casting to unsigned.
17622         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17623         from fold_plusminus_mult_expr to catch important cases late when
17624         range info is available.
17626 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17628         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17629         * configure.ac (hidden_linkonce): New test.
17630         * configure: Regenerate.
17631         * config.in: Regenerate.
17633 2018-01-26  Julia Koval  <julia.koval@intel.com>
17635         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17636         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17637         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17638         _mm_mask_bitshuffle_epi64_mask): Fix type.
17639         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17640         USI_FTYPE_V4DI_V4DI_USI): Remove.
17641         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17642         __builtin_ia32_vpshufbitqmb256_mask,
17643         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17644         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17645         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17647 2018-01-26  Alan Modra  <amodra@gmail.com>
17649         PR target/84033
17650         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17651         UNSPEC_VBPERMQ.  Sort other unspecs.
17653 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17655         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17657 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17659         PR middle-end/83055
17660         * predict.c (drop_profile): Do not push/pop cfun; update also
17661         node->count.
17662         (handle_missing_profiles): Fix logic looking for zero profiles.
17664 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17666         PR middle-end/83977
17667         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17668         on functions with #pragma omp declare simd or functions with simd
17669         attribute.
17670         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17671         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17672         Remove trailing \n from warning_at calls.
17674 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17676         PR target/84028
17677         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17678         for neutered workers.
17680 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17682         PR target/68467
17683         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17684         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17686 2018-01-24  Jeff Law  <law@redhat.com>
17688         PR target/83994
17689         * i386.c (get_probe_interval): Move to earlier point.
17690         (ix86_compute_frame_layout): If -fstack-clash-protection and
17691         the frame is larger than the probe interval, then use pushes
17692         to save registers rather than reg->mem moves.
17693         (ix86_expand_prologue): Remove conditional for int_registers_saved
17694         assertion.
17696 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17698         PR target/84014
17699         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17700         min/max for never referenced object.
17702 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17704         PR middle-end/83977
17705         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17706         here.
17707         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17708         attributes from DECL_ATTRIBUTES (decl) without affecting
17709         DECL_ATTRIBUTES (current_function_decl).
17710         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17711         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17713 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17715         PR tree-optimization/83979
17716         * fold-const.c (fold_comparison): Use constant_boolean_node
17717         instead of boolean_{true,false}_node.
17719 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17721         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17722         with zero counts.
17724 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17726         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17727         Simplify the clause that sets the length attribute.
17728         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17729         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17730         clause that sets the length attribute.
17731         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17733 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17735         PR target/83589
17736         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17737         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17738         Add strict parameter.
17739         (prevent_branch_around_nothing): Insert dummy insn between branch to
17740         label and label with no ptx insn inbetween.
17741         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17743 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17745         PR target/81352
17746         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17747         for neutered threads in warp.
17748         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17750 2018-01-24  Richard Biener  <rguenther@suse.de>
17752         PR tree-optimization/83176
17753         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17754         operands.
17756 2018-01-24  Richard Biener  <rguenther@suse.de>
17758         PR tree-optimization/82819
17759         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17760         code generating pluses that are no-ops in the target precision.
17762 2018-01-24  Richard Biener  <rguenther@suse.de>
17764         PR middle-end/84000
17765         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17767 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17769         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17770         to merge probabilities.
17771         * predict.c (probably_never_executed): Also mark as cold functions
17772         with global 0 profile and guessed local profile.
17773         * profile-count.c (profile_probability::combine_with_count): New
17774         member function.
17775         * profile-count.h (profile_probability::operator*,
17776         profile_probability::operator*=, profile_probability::operator/,
17777         profile_probability::operator/=): Reduce precision to adjusted
17778         and set value to guessed on contradictory divisions.
17779         (profile_probability::combine_with_freq): Remove.
17780         (profile_probability::combine_wiht_count): Declare.
17781         (profile_count::force_nonzero):: Set to adjusted.
17782         (profile_count::probability_in):: Set quality to adjusted.
17783         * tree-ssa-tail-merge.c (replace_block_by): Use
17784         combine_with_count.
17786 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17787             Jim Wilson  <jimw@sifive.com>
17789         * config/riscv/riscv.c (riscv_stack_boundary): New.
17790         (riscv_option_override): Set riscv_stack_boundary.  Handle
17791         riscv_preferred_stack_boundary_arg.
17792         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17793         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17794         (STACK_BOUNDARY): Set to riscv_stack_boundary.
17795         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17796         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17797         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17799 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
17801         PR target/83905
17802         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17803         of struct ix86_frame.
17804         (ix86_expand_epilogue): Likewise.  Add a local variable for
17805         the reg_save_offset field in struct ix86_frame.
17807 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
17809         PR tree-optimization/82604
17810         * tree-loop-distribution.c (enum partition_kind): New enum item
17811         PKIND_PARTIAL_MEMSET.
17812         (partition_builtin_p): Support above new enum item.
17813         (generate_code_for_partition): Ditto.
17814         (compute_access_range): Differentiate cases that equality can be
17815         proven at all loops, the innermost loops or no loops.
17816         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17817         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
17818         (finalize_partitions, distribute_loop): Don't fuse partition of
17819         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17820         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17821         parloop is enabled.
17823 2018-01-23  Martin Liska  <mliska@suse.cz>
17825         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17826         order to ignore the predictor.
17827         (PRED_POLYMORPHIC_CALL): Likewise.
17828         (PRED_RECURSIVE_CALL): Likewise.
17830 2018-01-23  Martin Liska  <mliska@suse.cz>
17832         * tree-profile.c (tree_profiling): Print function header to
17833         aware reader which function we are working on.
17834         * value-prof.c (gimple_find_values_to_profile): Do not print
17835         not interesting value histograms.
17837 2018-01-23  Martin Liska  <mliska@suse.cz>
17839         * profile-count.h (enum profile_quality): Add
17840         profile_uninitialized as the first value. Do not number values
17841         as they are zero based.
17842         (profile_count::verify): Update sanity check.
17843         (profile_probability::verify): Likewise.
17845 2018-01-23  Nathan Sidwell  <nathan@acm.org>
17847         * doc/invoke.texi (ffor-scope): Deprecate.
17849 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17851         PR tree-optimization/83510
17852         * domwalk.c (set_all_edges_as_executable): New function.
17853         (dom_walker::dom_walker): Convert bool param
17854         "skip_unreachable_blocks" to enum reachability.  Move setup of
17855         edge flags to set_all_edges_as_executable and only do it when
17856         reachability is REACHABLE_BLOCKS.
17857         * domwalk.h (enum dom_walker::reachability): New enum.
17858         (dom_walker::dom_walker): Convert bool param
17859         "skip_unreachable_blocks" to enum reachability.
17860         (set_all_edges_as_executable): New decl.
17861         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
17862         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17863         "reachability".
17864         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17865         but converting true to REACHABLE_BLOCKS.
17866         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17867         * tree-vrp.c
17868         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17869         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17870         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17871         REACHABLE_BLOCKS.
17872         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17873         if check_all_array_refs will be called.
17875 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17877         * tree.c (selftest::test_location_wrappers): Add more test
17878         coverage.
17880 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17882         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17883         (selftest::test_bit_in_range): Likewise.
17885 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17887         PR testsuite/83888
17888         * doc/sourcebuild.texi (vect_float): Say that the selector
17889         only describes the situation when -funsafe-math-optimizations is on.
17890         (vect_float_strict): Document.
17892 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17894         PR tree-optimization/83965
17895         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17896         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17897         instead of checking only for a reduction.
17898         (vect_recog_widen_sum_pattern): Likewise.
17900 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17902         * predict.c (probably_never_executed): Only use precise profile info.
17903         (compute_function_frequency): Skip after inlining hack since we now
17904         have quality checking.
17906 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17908         * profile-count.h (profile_probability::very_unlikely,
17909         profile_probability::unlikely, profile_probability::even): Set
17910         precision to guessed.
17912 2018-01-23  Richard Biener  <rguenther@suse.de>
17914         PR tree-optimization/83963
17915         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17916         Properly terminate dominator walk when crossing the exit edge not
17917         when visiting its source block.
17919 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
17921         PR c++/83918
17922         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17923         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17925 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
17927         PR tree-optimization/83957
17928         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
17929         semicolon after for body surrounded by braces.
17931         PR tree-optimization/83081
17932         * profile-count.h (profile_probability::split): New method.
17933         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17934         Use profile_probability::split.
17935         (do_compare_rtx_and_jump): Fix adjustment of probabilities
17936         when splitting a single conditional jump into 2.
17938 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
17940         PR tree-optimization/69452
17941         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17942         decl.
17944 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17946         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17947         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17948         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17950 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17952         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17953         declaration.
17954         * config/rl78/rl78.md (movdi): New define_expand.
17955         * config/rl78/rl78.c (rl78_split_movdi): New function.
17957 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
17959         PR target/83862
17960         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17961         no longer used.
17962         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17963         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17964         128-bit to produce an UNSPEC move to get the double word with the
17965         signbit and then a shift directly to do signbit.
17966         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17967         implementation with a new version that just does either a direct
17968         move or a regular move.  Move memory interface to separate insns.
17969         Move insns so they are next to the expander.
17970         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17971         with signbit move.  Split big and little endian case.
17972         (signbit<mode>2_dm_mem_le): Likewise.
17973         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17974         (signbit<mode>2_dm2): Likewise.
17976 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17978         * config/rl78/rl78.md (anddi3): New define_expand.
17980 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17982         * config/rl78/rl78.md (umindi3): New define_expand.
17984 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17986         * config/rl78/rl78.md (smindi3): New define_expand.
17988 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17990         * config/rl78/rl78.md (smaxdi3): New define_expand.
17992 2018-01-22  Carl Love  <cel@us.ibm.com>
17994         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17995         LVX_V1TI): Add macro expansion.
17996         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17997         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17998         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17999         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18000         Change check to determine if the instruction is a byte reversing
18001         entry.  Fix typo in comment.
18002         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18003         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18004         Add def_builtin calls for new builtins.
18005         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18006         Add define_insn expansion.
18008 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18010         * config/rl78/rl78.md (umaxdi3): New define_expand.
18012 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18014         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18015         for non-QImode registers.
18017 2018-01-22  Richard Biener  <rguenther@suse.de>
18019         PR tree-optimization/83963
18020         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18021         including the loop exit block.
18022         (scop_detection::merge_sese): Likewise.
18023         (scop_detection::add_scop): Do it here instead.
18025 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18027         * doc/sourcebuild.texi (arm_softfloat): Document.
18029 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18031         PR gcc/77734
18032         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18033         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18034         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18036 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18037             David Edelsohn  <dje.gcc@gmail.com>
18039         PR target/83946
18040         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18041         Change "crset eq" to "crset 2".
18042         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18043         (*call_indirect_aix<mode>_nospec): Likewise.
18044         (*call_value_indirect_aix<mode>_nospec): Likewise.
18045         (*call_indirect_elfv2<mode>_nospec): Likewise.
18046         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18047         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18048         change assembly output from . to $.
18049         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18050         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18051         (*tablejump<mode>_internal1_nospec): Likewise.
18053 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18055         PR target/80870
18056         * config/sh/sh_optimize_sett_clrt.cc:
18057         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18059 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18061         PR tree-optimization/83940
18062         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18063         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18064         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18065         use it to pass back the definition type.
18066         (vect_check_store_rhs): Likewise rhs_dt_out.
18067         (vect_build_gather_load_calls): Add a mask_dt argument and use
18068         it instead of a call to vect_is_simple_use.
18069         (vectorizable_store): Update calls to vect_check_load_store_mask
18070         and vect_check_store_rhs.  Use the dt returned by the latter instead
18071         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18072         instead of calls to vect_is_simple_use.  Pass the scalar rather
18073         than the vector operand to vect_is_simple_use when handling
18074         second and subsequent copies of an rhs value.
18075         (vectorizable_load): Update calls to vect_check_load_store_mask
18076         and vect_build_gather_load_calls.  Use the cached mask_dt and
18077         gs_info.offset_dt instead of calls to vect_is_simple_use.
18079 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18081         PR middle-end/83945
18082         * tree-emutls.c: Include gimplify.h.
18083         (lower_emutls_2): New function.
18084         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18085         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18086         it before further processing.
18088         PR target/83930
18089         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18090         UINTVAL (trueop1) instead of INTVAL (op1).
18092 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18094         PR debug/81570
18095         PR debug/83728
18096         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18097         INCOMING_FRAME_SP_OFFSET if not defined.
18098         (scan_trace): Add ENTRY argument.  If true and
18099         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18100         emit a note to adjust the CFA offset.
18101         (create_cfi_notes): Adjust scan_trace callers.
18102         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18103         INCOMING_FRAME_SP_OFFSET in the CIE.
18104         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18105         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18106         Likewise.
18107         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18108         * doc/tm.texi: Regenerated.
18110 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18112         PR rtl-optimization/83147
18113         * lra-constraints.c (remove_inheritance_pseudos): Use
18114         lra_substitute_pseudo_within_insn.
18116 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18117             Cesar Philippidis  <cesar@codesourcery.com>
18119         PR target/83920
18120         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18122 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18124         PR target/83790
18125         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18126         spaces for function labels.
18128 2018-01-19  Martin Liska  <mliska@suse.cz>
18130         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18131         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18132         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18133         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18134         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18135         (PRED_CONST_RETURN): Change from 69 to 65.
18136         (PRED_NULL_RETURN): Change from 91 to 71.
18137         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18138         (PRED_LOOP_GUARD): Change from 66 to 73.
18140 2018-01-19  Martin Liska  <mliska@suse.cz>
18142         * predict.c (predict_insn_def): Add new assert.
18143         (struct branch_predictor): Change type to signed integer.
18144         (test_prediction_value_range): Amend test to cover
18145         PROB_UNINITIALIZED.
18146         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18147         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18148         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18149         (PRED_LOOP_IV_COMPARE): Likewise.
18150         * predict.h (PROB_UNINITIALIZED): Define new constant.
18152 2018-01-19  Martin Liska  <mliska@suse.cz>
18154         * predict.c (dump_prediction): Add new format for
18155         analyze_brprob.py script which is enabled with -details
18156         suboption.
18157         * profile-count.h (precise_p): New function.
18159 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18161         PR tree-optimization/83922
18162         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18163         there are no statements that need masking.
18164         (vect_active_double_reduction_p): New function.
18165         (vect_analyze_loop_operations): Use it when handling phis that
18166         are not in the loop header.
18168 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18170         PR tree-optimization/83914
18171         * tree-vect-loop.c (vectorizable_induction): Don't convert
18172         init_expr or apply the peeling adjustment for inductions
18173         that are nested within the vectorized loop.
18175 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18177         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18178         instead of NEG.
18180 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18182         PR sanitizer/81715
18183         PR testsuite/83882
18184         * function.h (gimplify_parameters): Add gimple_seq * argument.
18185         * function.c: Include gimple.h and options.h.
18186         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18187         for the added local temporaries if needed.
18188         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18189         if there are any parameter cleanups, wrap whole body into a
18190         try/finally with the cleanups.
18192 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18194         PR target/82964
18195         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18196         Use GET_MODE_CLASS for scalar floating point.
18198 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18200         PR ipa/82256
18201         patch by PaX Team
18202         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18203         Fix call of call_cgraph_insertion_hooks.
18205 2018-01-18  Martin Sebor  <msebor@redhat.com>
18207         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18209 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18211         PR ipa/83619
18212         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18213         frequencies.
18215 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18217         PR other/70268
18218         * common.opt: (-ffile-prefix-map): New option.
18219         * opts.c (common_handle_option): Defer it.
18220         * opts-global.c (handle_common_deferred_options): Handle it.
18221         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18222         * file-prefix-map.h: New file.
18223         (remap_debug_filename, add_debug_prefix_map): ...here.
18224         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18225         * final.c (debug_prefix_map, add_debug_prefix_map
18226         remap_debug_filename): Move to...
18227         * file-prefix-map.c: New file.
18228         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18229         generalize, get rid of alloca(), use strrchr() instead of strchr().
18230         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18231         Implement in terms of add_prefix_map().
18232         (remap_macro_filename, remap_debug_filename): Implement in term of
18233         remap_filename().
18234         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18235         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18236         * dbxout.c: Include file-prefix-map.h.
18237         * varasm.c: Likewise.
18238         * vmsdbgout.c: Likewise.
18239         * xcoffout.c: Likewise.
18240         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18241         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18242         * doc/invoke.texi (-ffile-prefix-map): Document.
18243         (-fdebug-prefix-map): Update description.
18245 2018-01-18  Martin Liska  <mliska@suse.cz>
18247         * config/i386/i386.c (indirect_thunk_name): Document that also
18248         lfence is emitted.
18249         (output_indirect_thunk): Document why both instructions
18250         (pause and lfence) are generated.
18252 2018-01-18  Richard Biener  <rguenther@suse.de>
18254         PR tree-optimization/83887
18255         * graphite-scop-detection.c
18256         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18257         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18258         (scop_detection::merge_sese): Re-implement with a flood-fill
18259         algorithm that properly finds a SESE region if it exists.
18261 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18263         PR c/61240
18264         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18265         pointer_diff optimizations use view_convert instead of convert.
18267 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18269         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18270         Generate different code for -mno-speculate-indirect-jumps.
18271         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18272         (*call_indirect_aix<mode>): Disable for
18273         -mno-speculate-indirect-jumps.
18274         (*call_indirect_aix<mode>_nospec): New define_insn.
18275         (*call_value_indirect_aix<mode>): Disable for
18276         -mno-speculate-indirect-jumps.
18277         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18278         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18279         -mno-speculate-indirect-jumps.
18280         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18282 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18284         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18285         long double type, set the flags for noting the default long double
18286         type, even if we don't pass or return a long double type.
18288 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18290         PR ipa/83051
18291         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18292         failure.
18294 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18296         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18297         support for merge[hl].
18298         (fold_mergehl_helper): New helper function.
18299         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18300         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18301         (altivec_vmrglw_direct): Add xxmrglw insn.
18303 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18305         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18306         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18308 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18310         PR lto/83121
18311         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18312         call the lto_location_cache before reading the
18313         DECL_SOURCE_LOCATION of the types.
18315 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18316             Richard Sandiford  <richard.sandiford@linaro.org>
18318         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18319         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18320         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18321         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18322         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18323         Add declaration.
18324         * config/aarch64/constraints.md (aarch64_movti_operand):
18325         Limit immediates.
18326         * config/aarch64/predicates.md (Uti): Add new constraint.
18328 2018-01-17 Carl Love  <cel@us.ibm.com>
18330         * config/rs6000/vsx.md (define_expand xl_len_r,
18331         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18332         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18333         lxvll.
18334         (define_expand, define_insn): Move the shift left from  the
18335         define_insn to the define_expand for lxvl and stxvl instructions.
18336         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18337         and XL_LEN_R definitions to PURE.
18339 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18341         * config/i386/i386.c (indirect_thunk_name): Declare regno
18342         as unsigned int.  Compare regno with INVALID_REGNUM.
18343         (output_indirect_thunk): Ditto.
18344         (output_indirect_thunk_function): Ditto.
18345         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18346         in the call to output_indirect_thunk_function.
18348 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18350         PR middle-end/83884
18351         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18352         rather than the size of inner_type to determine the stack slot size
18353         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18355 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18357         PR target/83546
18358         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18359         to PTA_SILVERMONT.
18361 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18363         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18364         endian Linux systems to optionally enable multilibs for selecting
18365         the long double type if the user configured an explicit type.
18366         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18367         have no long double multilibs if not defined.
18368         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18369         warn if the user used -mabi={ieee,ibm}longdouble and we built
18370         multilibs for long double.
18371         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18372         appropriate multilib option.
18373         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18374         multilib options.
18375         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18376         for building long double multilibs.
18377         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18379 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18381         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18382         copies.
18384         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18385         64 bits.
18386         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18387         128 bits.
18389         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18390         variables.
18392         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18393         return value.
18395 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18397         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18398         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18400 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18402         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18403         different rtl trees depending on TARGET_64BIT.
18404         (rs6000_gen_lvx): Likewise.
18406 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18408         * config/visium/visium.md (nop): Tweak comment.
18409         (hazard_nop): Likewise.
18411 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18413         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18414         -mspeculate-indirect-jumps.
18415         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18416         for -mno-speculate-indirect-jumps.
18417         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18418         (*call_value_indirect_elfv2<mode>): Disable for
18419         -mno-speculate-indirect-jumps.
18420         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18421         (indirect_jump): Emit different RTL for
18422         -mno-speculate-indirect-jumps.
18423         (*indirect_jump<mode>): Disable for
18424         -mno-speculate-indirect-jumps.
18425         (*indirect_jump<mode>_nospec): New define_insn.
18426         (tablejump): Emit different RTL for
18427         -mno-speculate-indirect-jumps.
18428         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18429         (tablejumpsi_nospec): New define_expand.
18430         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18431         (tablejumpdi_nospec): New define_expand.
18432         (*tablejump<mode>_internal1): Disable for
18433         -mno-speculate-indirect-jumps.
18434         (*tablejump<mode>_internal1_nospec): New define_insn.
18435         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18436         option.
18438 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18440         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18441         callers updated.
18443 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18444             Richard Biener  <rguenth@suse.de>
18446         PR libgomp/83590
18447         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18448         return early, inline manually is_gimple_sizepos.  Make sure if we
18449         call gimplify_expr we don't end up with a gimple constant.
18450         * tree.c (variably_modified_type_p): Don't return true for
18451         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18452         * gimplify.h (is_gimple_sizepos): Remove.
18454 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18456         PR tree-optimization/83857
18457         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18458         vectorizable_live_operation for pure SLP statements.
18459         (vectorizable_live_operation): Handle PHIs.
18461 2018-01-16  Richard Biener  <rguenther@suse.de>
18463         PR tree-optimization/83867
18464         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18465         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18467 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18469         PR c/83844
18470         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18471         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18472         If off is not INTEGER_CST, issue a may not be aligned warning
18473         rather than isn't aligned.  Use isn%'t rather than isn't.
18474         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18475         into MULT_EXPR.
18476         <case MULT_EXPR>: Improve the case when bottom and one of the
18477         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18478         operand, in that case check if the other operand is multiple of
18479         bottom divided by the INTEGER_CST operand.
18481 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18483         PR target/83858
18484         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18485         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18486         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18487         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18488         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18489         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18490         (pa_function_arg_size): New function.
18492 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18494         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18495         in a separate statement.
18497 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18499         PR tree-optimization/83847
18500         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18501         group gathers and scatters.
18503 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18505         PR rtl-optimization/86620
18506         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18508         PR rtl-optimization/83213
18509         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18510         to last if both are JUMP_INSNs.
18512         PR tree-optimization/83843
18513         * gimple-ssa-store-merging.c
18514         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18515         store_immediate_info for bswap/nop orig_stores.
18517 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18519         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18520         !TARGET_MUL.
18521         <UDIV>: Increase cost if !TARGET_DIV.
18523 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18525         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18526         (define_attr "cr_logical_3op"): New.
18527         (cceq_ior_compare): Adjust.
18528         (cceq_ior_compare_complement): Adjust.
18529         (*cceq_rev_compare): Adjust.
18530         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18531         (is_cracked_insn): Adjust.
18532         (insn_must_be_first_in_group): Adjust.
18533         * config/rs6000/40x.md: Adjust.
18534         * config/rs6000/440.md: Adjust.
18535         * config/rs6000/476.md: Adjust.
18536         * config/rs6000/601.md: Adjust.
18537         * config/rs6000/603.md: Adjust.
18538         * config/rs6000/6xx.md: Adjust.
18539         * config/rs6000/7450.md: Adjust.
18540         * config/rs6000/7xx.md: Adjust.
18541         * config/rs6000/8540.md: Adjust.
18542         * config/rs6000/cell.md: Adjust.
18543         * config/rs6000/e300c2c3.md: Adjust.
18544         * config/rs6000/e500mc.md: Adjust.
18545         * config/rs6000/e500mc64.md: Adjust.
18546         * config/rs6000/e5500.md: Adjust.
18547         * config/rs6000/e6500.md: Adjust.
18548         * config/rs6000/mpc.md: Adjust.
18549         * config/rs6000/power4.md: Adjust.
18550         * config/rs6000/power5.md: Adjust.
18551         * config/rs6000/power6.md: Adjust.
18552         * config/rs6000/power7.md: Adjust.
18553         * config/rs6000/power8.md: Adjust.
18554         * config/rs6000/power9.md: Adjust.
18555         * config/rs6000/rs64.md: Adjust.
18556         * config/rs6000/titan.md: Adjust.
18558 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18560         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18561         ix86_indirect_branch_register logic.
18563 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18565         * config/i386/constraints.md (Bs): Update
18566         ix86_indirect_branch_register check.  Don't check
18567         ix86_indirect_branch_register with GOT_memory_operand.
18568         (Bw): Likewise.
18569         * config/i386/predicates.md (GOT_memory_operand): Don't check
18570         ix86_indirect_branch_register here.
18571         (GOT32_symbol_operand): Likewise.
18573 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18575         * config/i386/predicates.md (constant_call_address_operand):
18576         Rewrite ix86_indirect_branch_register logic.
18577         (sibcall_insn_operand): Likewise.
18579 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18581         * config/i386/constraints.md (Bs): Replace
18582         ix86_indirect_branch_thunk_register with
18583         ix86_indirect_branch_register.
18584         (Bw): Likewise.
18585         * config/i386/i386.md (indirect_jump): Likewise.
18586         (tablejump): Likewise.
18587         (*sibcall_memory): Likewise.
18588         (*sibcall_value_memory): Likewise.
18589         Peepholes of indirect call and jump via memory: Likewise.
18590         * config/i386/i386.opt: Likewise.
18591         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18592         (GOT_memory_operand): Likewise.
18593         (call_insn_operand): Likewise.
18594         (sibcall_insn_operand): Likewise.
18595         (GOT32_symbol_operand): Likewise.
18597 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18599         PR middle-end/83837
18600         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18601         type rather than type addr's type points to.
18602         (expand_omp_atomic_mutex): Likewise.
18603         (expand_omp_atomic): Likewise.
18605 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18607         PR target/83839
18608         * config/i386/i386.c (output_indirect_thunk_function): Use
18609         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18610         for  __x86_return_thunk.
18612 2018-01-15  Richard Biener  <rguenther@suse.de>
18614         PR middle-end/83850
18615         * expmed.c (extract_bit_field_1): Fix typo.
18617 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18619         PR target/83687
18620         * config/arm/iterators.md (VF): New mode iterator.
18621         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18622         Remove integer-related logic from pattern.
18623         (neon_vabd<mode>_3): Likewise.
18625 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18627         PR middle-end/82694
18628         * common.opt (fstrict-overflow): No longer an alias.
18629         (fwrapv-pointer): New option.
18630         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18631         also for pointer types based on flag_wrapv_pointer.
18632         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18633         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18634         opts->x_flag_wrapv got set.
18635         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18636         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18637         POINTER_TYPE_OVERFLOW_UNDEFINED.
18638         * match.pd: Likewise in address comparison pattern.
18639         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18641 2018-01-15  Richard Biener  <rguenther@suse.de>
18643         PR lto/83804
18644         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18645         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18646         Reset type names to their identifier if their TYPE_DECL doesn't
18647         have linkage (and thus is used for ODR and devirt).
18648         (save_debug_info_for_decl): Remove.
18649         (save_debug_info_for_type): Likewise.
18650         (add_tree_to_fld_list): Adjust.
18651         * tree-pretty-print.c (dump_generic_node): Make dumping of
18652         type names more robust.
18654 2018-01-15  Richard Biener  <rguenther@suse.de>
18656         * BASE-VER: Bump to 8.0.1.
18658 2018-01-14  Martin Sebor  <msebor@redhat.com>
18660         PR other/83508
18661         * builtins.c (check_access): Avoid warning when the no-warning bit
18662         is set.
18664 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18666         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18667         * ira-color (allocno_hard_regs_compare): Likewise.
18669 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18671         PR target/83013
18672         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18673         Use .pushsection/.popsection.
18675 2018-01-14  Martin Sebor  <msebor@redhat.com>
18677         PR c++/81327
18678         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18680 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18682         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18683         entry from extra_headers.
18684         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18685         extra_headers, make the list bitwise identical to the i?86-*-* one.
18687 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18689         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18690         -mcmodel=large with -mindirect-branch=thunk,
18691         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18692         -mfunction-return=thunk-extern.
18693         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18694         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18695         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18697 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18699         * config/i386/i386.c (print_reg): Print the name of the full
18700         integer register without '%'.
18701         (ix86_print_operand): Handle 'V'.
18702         * doc/extend.texi: Document 'V' modifier.
18704 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18706         * config/i386/constraints.md (Bs): Disallow memory operand for
18707         -mindirect-branch-register.
18708         (Bw): Likewise.
18709         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18710         (GOT_memory_operand): Likewise.
18711         (call_insn_operand): Likewise.
18712         (sibcall_insn_operand): Likewise.
18713         (GOT32_symbol_operand): Likewise.
18714         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18715         for -mindirect-branch-register.
18716         (tablejump): Likewise.
18717         (*sibcall_memory): Likewise.
18718         (*sibcall_value_memory): Likewise.
18719         Disallow peepholes of indirect call and jump via memory for
18720         -mindirect-branch-register.
18721         (*call_pop): Replace m with Bw.
18722         (*call_value_pop): Likewise.
18723         (*sibcall_pop_memory): Replace m with Bs.
18724         * config/i386/i386.opt (mindirect-branch-register): New option.
18725         * doc/invoke.texi: Document -mindirect-branch-register option.
18727 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18729         * config/i386/i386-protos.h (ix86_output_function_return): New.
18730         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18731         set function_return_type.
18732         (indirect_thunk_name): Add ret_p to indicate thunk for function
18733         return.
18734         (output_indirect_thunk_function): Pass false to
18735         indirect_thunk_name.
18736         (ix86_output_indirect_branch_via_reg): Likewise.
18737         (ix86_output_indirect_branch_via_push): Likewise.
18738         (output_indirect_thunk_function): Create alias for function
18739         return thunk if regno < 0.
18740         (ix86_output_function_return): New function.
18741         (ix86_handle_fndecl_attribute): Handle function_return.
18742         (ix86_attribute_table): Add function_return.
18743         * config/i386/i386.h (machine_function): Add
18744         function_return_type.
18745         * config/i386/i386.md (simple_return_internal): Use
18746         ix86_output_function_return.
18747         (simple_return_internal_long): Likewise.
18748         * config/i386/i386.opt (mfunction-return=): New option.
18749         (indirect_branch): Mention -mfunction-return=.
18750         * doc/extend.texi: Document function_return function attribute.
18751         * doc/invoke.texi: Document -mfunction-return= option.
18753 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18755         * config/i386/i386-opts.h (indirect_branch): New.
18756         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18757         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18758         with local indirect jump when converting indirect call and jump.
18759         (ix86_set_indirect_branch_type): New.
18760         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18761         (indirectlabelno): New.
18762         (indirect_thunk_needed): Likewise.
18763         (indirect_thunk_bnd_needed): Likewise.
18764         (indirect_thunks_used): Likewise.
18765         (indirect_thunks_bnd_used): Likewise.
18766         (INDIRECT_LABEL): Likewise.
18767         (indirect_thunk_name): Likewise.
18768         (output_indirect_thunk): Likewise.
18769         (output_indirect_thunk_function): Likewise.
18770         (ix86_output_indirect_branch_via_reg): Likewise.
18771         (ix86_output_indirect_branch_via_push): Likewise.
18772         (ix86_output_indirect_branch): Likewise.
18773         (ix86_output_indirect_jmp): Likewise.
18774         (ix86_code_end): Call output_indirect_thunk_function if needed.
18775         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18776         needed.
18777         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18778         (ix86_attribute_table): Add indirect_branch.
18779         * config/i386/i386.h (machine_function): Add indirect_branch_type
18780         and has_local_indirect_jump.
18781         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18782         to true.
18783         (tablejump): Likewise.
18784         (*indirect_jump): Use ix86_output_indirect_jmp.
18785         (*tablejump_1): Likewise.
18786         (simple_return_indirect_internal): Likewise.
18787         * config/i386/i386.opt (mindirect-branch=): New option.
18788         (indirect_branch): New.
18789         (keep): Likewise.
18790         (thunk): Likewise.
18791         (thunk-inline): Likewise.
18792         (thunk-extern): Likewise.
18793         * doc/extend.texi: Document indirect_branch function attribute.
18794         * doc/invoke.texi: Document -mindirect-branch= option.
18796 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
18798         PR ipa/83051
18799         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18801 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
18803         * ipa-inline.c (want_inline_small_function_p): Return false if
18804         inlining has already failed with CIF_FINAL_ERROR.
18805         (update_caller_keys): Call want_inline_small_function_p before
18806         can_inline_edge_p.
18807         (update_callee_keys): Likewise.
18809 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18811         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18812         New function.
18813         (rs6000_quadword_masked_address_p): Likewise.
18814         (quad_aligned_load_p): Likewise.
18815         (quad_aligned_store_p): Likewise.
18816         (const_load_sequence_p): Add comment to describe the outer-most loop.
18817         (mimic_memory_attributes_and_flags): New function.
18818         (rs6000_gen_stvx): Likewise.
18819         (replace_swapped_aligned_store): Likewise.
18820         (rs6000_gen_lvx): Likewise.
18821         (replace_swapped_aligned_load): Likewise.
18822         (replace_swapped_load_constant): Capitalize argument name in
18823         comment describing this function.
18824         (rs6000_analyze_swaps): Add a third pass to search for vector loads
18825         and stores that access quad-word aligned addresses and replace
18826         with stvx or lvx instructions when appropriate.
18827         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18828         New function prototype.
18829         (rs6000_quadword_masked_address_p): Likewise.
18830         (rs6000_gen_lvx): Likewise.
18831         (rs6000_gen_stvx): Likewise.
18832         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18833         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18834         when memory address is aligned.
18835         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18836         this split to select lvx instruction when memory address is aligned.
18837         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18838         instruction when memory address is aligned.
18839         (*vsx_le_perm_load_v16qi): Likewise.
18840         (four unnamed splitters): Modify to select the stvx instruction
18841         when memory is aligned.
18843 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
18845         * predict.c (determine_unlikely_bbs): Handle correctly BBs
18846         which appears in the queue multiple times.
18848 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18849             Alan Hayward  <alan.hayward@arm.com>
18850             David Sherwood  <david.sherwood@arm.com>
18852         * tree-vectorizer.h (vec_lower_bound): New structure.
18853         (_loop_vec_info): Add check_nonzero and lower_bounds.
18854         (LOOP_VINFO_CHECK_NONZERO): New macro.
18855         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18856         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18857         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18858         fields.  Make seg_len the distance travelled, not including the
18859         access size.
18860         (dr_direction_indicator): Declare.
18861         (dr_zero_step_indicator): Likewise.
18862         (dr_known_forward_stride_p): Likewise.
18863         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18864         tree-ssanames.h.
18865         (runtime_alias_check_p): Allow runtime alias checks with
18866         variable strides.
18867         (operator ==): Compare access_size and align.
18868         (prune_runtime_alias_test_list): Rework for new distinction between
18869         the access_size and seg_len.
18870         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
18871         segment lengths.
18872         (get_segment_min_max): New function.
18873         (create_intersect_range_checks): Use it.
18874         (dr_step_indicator): New function.
18875         (dr_direction_indicator): Likewise.
18876         (dr_zero_step_indicator): Likewise.
18877         (dr_known_forward_stride_p): Likewise.
18878         * tree-loop-distribution.c (data_ref_segment_size): Return
18879         DR_STEP * (niters - 1).
18880         (compute_alias_check_pairs): Update call to the dr_with_seg_len
18881         constructor.
18882         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18883         (vect_preserves_scalar_order_p): New function, split out from...
18884         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
18885         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18886         (vect_vfa_access_size): New function.
18887         (vect_vfa_align): Likewise.
18888         (vect_compile_time_alias): Take access_size_a and access_b arguments.
18889         (dump_lower_bound): New function.
18890         (vect_check_lower_bound): Likewise.
18891         (vect_small_gap_p): Likewise.
18892         (vectorizable_with_step_bound_p): Likewise.
18893         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18894         depencies if the vectorization factor is 1.  Convert the checks
18895         for nonzero steps into checks on the bounds of DR_STEP.  Try using
18896         a bunds check for variable steps if the minimum required step is
18897         relatively small. Update calls to the dr_with_seg_len
18898         constructor and to vect_compile_time_alias.
18899         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18900         function.
18901         (vect_loop_versioning): Call it.
18902         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18903         when retrying.
18904         (vect_estimate_min_profitable_iters): Account for any bounds checks.
18906 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18907             Alan Hayward  <alan.hayward@arm.com>
18908             David Sherwood  <david.sherwood@arm.com>
18910         * doc/sourcebuild.texi (vect_scatter_store): Document.
18911         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18912         optabs.
18913         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18914         Document.
18915         * genopinit.c (main): Add supports_vec_scatter_store and
18916         supports_vec_scatter_store_cached to target_optabs.
18917         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18918         IFN_MASK_SCATTER_STORE.
18919         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18920         functions.
18921         * internal-fn.h (internal_store_fn_p): Declare.
18922         (internal_fn_stored_value_index): Likewise.
18923         * internal-fn.c (scatter_store_direct): New macro.
18924         (expand_scatter_store_optab_fn): New function.
18925         (direct_scatter_store_optab_supported_p): New macro.
18926         (internal_store_fn_p): New function.
18927         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18928         IFN_MASK_SCATTER_STORE.
18929         (internal_fn_mask_index): Likewise.
18930         (internal_fn_stored_value_index): New function.
18931         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18932         for scatter stores.
18933         * optabs-query.h (supports_vec_scatter_store_p): Declare.
18934         * optabs-query.c (supports_vec_scatter_store_p): New function.
18935         * tree-vectorizer.h (vect_get_store_rhs): Declare.
18936         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18937         true for scatter stores.
18938         (vect_gather_scatter_fn_p): Handle scatter stores too.
18939         (vect_check_gather_scatter): Consider using scatter stores if
18940         supports_vec_scatter_store_p.
18941         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18942         scatter stores too.
18943         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18944         internal_fn_stored_value_index.
18945         (check_load_store_masking): Handle scatter stores too.
18946         (vect_get_store_rhs): Make public.
18947         (vectorizable_call): Use internal_store_fn_p.
18948         (vectorizable_store): Handle scatter store internal functions.
18949         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18950         when deciding whether the end of the group has been reached.
18951         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18952         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18953         (mask_scatter_store<mode>): New insns.
18955 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18956             Alan Hayward  <alan.hayward@arm.com>
18957             David Sherwood  <david.sherwood@arm.com>
18959         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18960         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18961         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18962         function.
18963         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18964         Use vect_truncate_gather_scatter_offset if we can't treat the
18965         operation as a normal gather load or scatter store.
18966         (get_group_load_store_type): Take the gather_scatter_info
18967         as argument.  Try using a gather load or scatter store for
18968         single-element groups.
18969         (get_load_store_type): Update calls to get_group_load_store_type
18970         and vect_use_strided_gather_scatters_p.
18972 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18973             Alan Hayward  <alan.hayward@arm.com>
18974             David Sherwood  <david.sherwood@arm.com>
18976         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18977         optional tree argument.
18978         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18979         null target hooks.
18980         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18981         but continue to use the current value as a fallback.
18982         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18983         to compare the updates.
18984         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18985         (get_load_store_type): Use it when handling a strided access.
18986         (vect_get_strided_load_store_ops): New function.
18987         (vect_get_data_ptr_increment): Likewise.
18988         (vectorizable_load): Handle strided gather loads.  Always pass
18989         a step to vect_create_data_ref_ptr and bump_vector_ptr.
18991 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18992             Alan Hayward  <alan.hayward@arm.com>
18993             David Sherwood  <david.sherwood@arm.com>
18995         * doc/md.texi (gather_load@var{m}): Document.
18996         (mask_gather_load@var{m}): Likewise.
18997         * genopinit.c (main): Add supports_vec_gather_load and
18998         supports_vec_gather_load_cached to target_optabs.
18999         * optabs-tree.c (init_tree_optimization_optabs): Use
19000         ggc_cleared_alloc to allocate target_optabs.
19001         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19002         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19003         functions.
19004         * internal-fn.h (internal_load_fn_p): Declare.
19005         (internal_gather_scatter_fn_p): Likewise.
19006         (internal_fn_mask_index): Likewise.
19007         (internal_gather_scatter_fn_supported_p): Likewise.
19008         * internal-fn.c (gather_load_direct): New macro.
19009         (expand_gather_load_optab_fn): New function.
19010         (direct_gather_load_optab_supported_p): New macro.
19011         (direct_internal_fn_optab): New function.
19012         (internal_load_fn_p): Likewise.
19013         (internal_gather_scatter_fn_p): Likewise.
19014         (internal_fn_mask_index): Likewise.
19015         (internal_gather_scatter_fn_supported_p): Likewise.
19016         * optabs-query.c (supports_at_least_one_mode_p): New function.
19017         (supports_vec_gather_load_p): Likewise.
19018         * optabs-query.h (supports_vec_gather_load_p): Declare.
19019         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19020         and memory_type field.
19021         (NUM_PATTERNS): Bump to 15.
19022         * tree-vect-data-refs.c: Include internal-fn.h.
19023         (vect_gather_scatter_fn_p): New function.
19024         (vect_describe_gather_scatter_call): Likewise.
19025         (vect_check_gather_scatter): Try using internal functions for
19026         gather loads.  Recognize existing calls to a gather load function.
19027         (vect_analyze_data_refs): Consider using gather loads if
19028         supports_vec_gather_load_p.
19029         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19030         (vect_get_gather_scatter_offset_type): Likewise.
19031         (vect_convert_mask_for_vectype): Likewise.
19032         (vect_add_conversion_to_patterm): Likewise.
19033         (vect_try_gather_scatter_pattern): Likewise.
19034         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19035         (vect_vect_recog_func_ptrs): Add it.
19036         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19037         internal_fn_mask_index and internal_gather_scatter_fn_p.
19038         (check_load_store_masking): Take the gather_scatter_info as an
19039         argument and handle gather loads.
19040         (vect_get_gather_scatter_ops): New function.
19041         (vectorizable_call): Check internal_load_fn_p.
19042         (vectorizable_load): Likewise.  Handle gather load internal
19043         functions.
19044         (vectorizable_store): Update call to check_load_store_masking.
19045         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19046         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19047         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19048         (aarch64_gather_scale_operand_d): New predicates.
19049         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19050         (mask_gather_load<mode>): New insns.
19052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19053             Alan Hayward  <alan.hayward@arm.com>
19054             David Sherwood  <david.sherwood@arm.com>
19056         * optabs.def (fold_left_plus_optab): New optab.
19057         * doc/md.texi (fold_left_plus_@var{m}): Document.
19058         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19059         * internal-fn.c (fold_left_direct): Define.
19060         (expand_fold_left_optab_fn): Likewise.
19061         (direct_fold_left_optab_supported_p): Likewise.
19062         * fold-const-call.c (fold_const_fold_left): New function.
19063         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19064         * tree-parloops.c (valid_reduction_p): New function.
19065         (gather_scalar_reductions): Use it.
19066         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19067         (vect_finish_replace_stmt): Declare.
19068         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19069         (needs_fold_left_reduction_p): New function, split out from...
19070         (vect_is_simple_reduction): ...here.  Accept reductions that
19071         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19072         (vect_force_simple_reduction): Also store the reduction type in
19073         the assignment's STMT_VINFO_REDUC_TYPE.
19074         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19075         (merge_with_identity): New function.
19076         (vect_expand_fold_left): Likewise.
19077         (vectorize_fold_left_reduction): Likewise.
19078         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19079         scalar phi in place for it.  Check for target support and reject
19080         cases that would reassociate the operation.  Defer the transform
19081         phase to vectorize_fold_left_reduction.
19082         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19083         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19084         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19086 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19088         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19089         call to ifc_temp_var.
19091 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19092             Alan Hayward  <alan.hayward@arm.com>
19093             David Sherwood  <david.sherwood@arm.com>
19095         * target.def (legitimize_address_displacement): Take the original
19096         offset as a poly_int.
19097         * targhooks.h (default_legitimize_address_displacement): Update
19098         accordingly.
19099         * targhooks.c (default_legitimize_address_displacement): Likewise.
19100         * doc/tm.texi: Regenerate.
19101         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19102         as an argument, moving assert of ad->disp == ad->disp_term to...
19103         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19104         Try calling targetm.legitimize_address_displacement before expanding
19105         the address rather than afterwards, and adjust for the new interface.
19106         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19107         Match the new hook interface.  Handle SVE addresses.
19108         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19109         new hook interface.
19111 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19113         * Makefile.in (OBJS): Add early-remat.o.
19114         * target.def (select_early_remat_modes): New hook.
19115         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19116         * doc/tm.texi: Regenerate.
19117         * targhooks.h (default_select_early_remat_modes): Declare.
19118         * targhooks.c (default_select_early_remat_modes): New function.
19119         * timevar.def (TV_EARLY_REMAT): New timevar.
19120         * passes.def (pass_early_remat): New pass.
19121         * tree-pass.h (make_pass_early_remat): Declare.
19122         * early-remat.c: New file.
19123         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19124         function.
19125         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19127 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19128             Alan Hayward  <alan.hayward@arm.com>
19129             David Sherwood  <david.sherwood@arm.com>
19131         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19132         vfm1 with a bound_epilog parameter.
19133         (vect_do_peeling): Update calls accordingly, and move the prologue
19134         call earlier in the function.  Treat the base bound_epilog as 0 for
19135         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19136         this base when peeling for gaps.
19137         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19138         with fully-masked loops.
19139         (vect_estimate_min_profitable_iters): Handle the single peeled
19140         iteration in that case.
19142 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19143             Alan Hayward  <alan.hayward@arm.com>
19144             David Sherwood  <david.sherwood@arm.com>
19146         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19147         single-element interleaving even if the size is not a power of 2.
19148         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19149         accesses for single-element interleaving if the group size is
19150         not a power of 2.
19152 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19153             Alan Hayward  <alan.hayward@arm.com>
19154             David Sherwood  <david.sherwood@arm.com>
19156         * doc/md.texi (fold_extract_last_@var{m}): Document.
19157         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19158         * optabs.def (fold_extract_last_optab): New optab.
19159         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19160         * internal-fn.c (fold_extract_direct): New macro.
19161         (expand_fold_extract_optab_fn): Likewise.
19162         (direct_fold_extract_optab_supported_p): Likewise.
19163         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19164         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19165         EXTRACT_LAST_REDUCTION.
19166         (get_initial_def_for_reduction): Do not create an initial vector
19167         for EXTRACT_LAST_REDUCTION reductions.
19168         (vectorizable_reduction): Leave the scalar phi in place for
19169         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19170         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19171         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19172         transform phase to vectorizable_condition.
19173         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19174         split out from...
19175         (vect_finish_stmt_generation): ...here.
19176         (vect_finish_replace_stmt): New function.
19177         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19178         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19179         pattern.
19180         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19182 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19183             Alan Hayward  <alan.hayward@arm.com>
19184             David Sherwood  <david.sherwood@arm.com>
19186         * doc/md.texi (extract_last_@var{m}): Document.
19187         * optabs.def (extract_last_optab): New optab.
19188         * internal-fn.def (EXTRACT_LAST): New internal function.
19189         * internal-fn.c (cond_unary_direct): New macro.
19190         (expand_cond_unary_optab_fn): Likewise.
19191         (direct_cond_unary_optab_supported_p): Likewise.
19192         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19193         loops using EXTRACT_LAST.
19194         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19195         (extract_last_<mode>): ...this optab.
19196         (vec_extract<mode><Vel>): Update accordingly.
19198 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19199             Alan Hayward  <alan.hayward@arm.com>
19200             David Sherwood  <david.sherwood@arm.com>
19202         * target.def (empty_mask_is_expensive): New hook.
19203         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19204         * doc/tm.texi: Regenerate.
19205         * targhooks.h (default_empty_mask_is_expensive): Declare.
19206         * targhooks.c (default_empty_mask_is_expensive): New function.
19207         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19208         if the target says that empty masks are expensive.
19209         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19210         New function.
19211         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19213 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19214             Alan Hayward  <alan.hayward@arm.com>
19215             David Sherwood  <david.sherwood@arm.com>
19217         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19218         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19219         (vect_use_loop_mask_for_alignment_p): New function.
19220         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19221         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19222         niters_skip argument.  Make sure that the first niters_skip elements
19223         of the first iteration are inactive.
19224         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19225         Update call to vect_set_loop_masks_directly.
19226         (get_misalign_in_elems): New function, split out from...
19227         (vect_gen_prolog_loop_niters): ...here.
19228         (vect_update_init_of_dr): Take a code argument that specifies whether
19229         the adjustment should be added or subtracted.
19230         (vect_update_init_of_drs): Likewise.
19231         (vect_prepare_for_masked_peels): New function.
19232         (vect_do_peeling): Skip prologue peeling if we're using a mask
19233         instead.  Update call to vect_update_inits_of_drs.
19234         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19235         mask_skip_niters.
19236         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19237         alignment.  Do not include the number of peeled iterations in
19238         the minimum threshold in that case.
19239         (vectorizable_induction): Adjust the start value down by
19240         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19241         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19242         Take the number of skipped iterations into account when calculating
19243         the loop bounds.
19244         * tree-vect-stmts.c (vect_gen_while_not): New function.
19246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19247             Alan Hayward  <alan.hayward@arm.com>
19248             David Sherwood  <david.sherwood@arm.com>
19250         * doc/sourcebuild.texi (vect_fully_masked): Document.
19251         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19252         default value to 0.
19253         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19254         split out from...
19255         (vect_analyze_loop_2): ...here. Don't check the vectorization
19256         factor against the number of loop iterations if the loop is
19257         fully-masked.
19259 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19260             Alan Hayward  <alan.hayward@arm.com>
19261             David Sherwood  <david.sherwood@arm.com>
19263         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19264         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19265         (dump_groups): Update accordingly.
19266         (iv_use::mem_type): New member variable.
19267         (address_p): New function.
19268         (record_use): Add a mem_type argument and initialize the new
19269         mem_type field.
19270         (record_group_use): Add a mem_type argument.  Use address_p.
19271         Remove obsolete null checks of base_object.  Update call to record_use.
19272         (find_interesting_uses_op): Update call to record_group_use.
19273         (find_interesting_uses_cond): Likewise.
19274         (find_interesting_uses_address): Likewise.
19275         (get_mem_type_for_internal_fn): New function.
19276         (find_address_like_use): Likewise.
19277         (find_interesting_uses_stmt): Try find_address_like_use before
19278         calling find_interesting_uses_op.
19279         (addr_offset_valid_p): Use the iv mem_type field as the type
19280         of the addressed memory.
19281         (add_autoinc_candidates): Likewise.
19282         (get_address_cost): Likewise.
19283         (split_small_address_groups_p): Use address_p.
19284         (split_address_groups): Likewise.
19285         (add_iv_candidate_for_use): Likewise.
19286         (autoinc_possible_for_pair): Likewise.
19287         (rewrite_groups): Likewise.
19288         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19289         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19290         (get_alias_ptr_type_for_ptr_address): New function.
19291         (rewrite_use_address): Rewrite address uses in calls that were
19292         identified by find_address_like_use.
19294 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19295             Alan Hayward  <alan.hayward@arm.com>
19296             David Sherwood  <david.sherwood@arm.com>
19298         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19299         TARGET_MEM_REFs.
19300         * gimple-expr.h (is_gimple_addressable: Likewise.
19301         * gimple-expr.c (is_gimple_address): Likewise.
19302         * internal-fn.c (expand_call_mem_ref): New function.
19303         (expand_mask_load_optab_fn): Use it.
19304         (expand_mask_store_optab_fn): Likewise.
19306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19307             Alan Hayward  <alan.hayward@arm.com>
19308             David Sherwood  <david.sherwood@arm.com>
19310         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19311         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19312         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19313         (cond_umax@var{mode}): Document.
19314         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19315         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19316         (cond_umin_optab, cond_umax_optab): New optabs.
19317         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19318         (COND_IOR, COND_XOR): New internal functions.
19319         * internal-fn.h (get_conditional_internal_fn): Declare.
19320         * internal-fn.c (cond_binary_direct): New macro.
19321         (expand_cond_binary_optab_fn): Likewise.
19322         (direct_cond_binary_optab_supported_p): Likewise.
19323         (get_conditional_internal_fn): New function.
19324         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19325         Cope with reduction statements that are vectorized as calls rather
19326         than assignments.
19327         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19328         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19329         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19330         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19331         (UNSPEC_COND_EOR): New unspecs.
19332         (optab): Add mappings for them.
19333         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19334         (sve_int_op, sve_fp_op): New int attributes.
19336 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19337             Alan Hayward  <alan.hayward@arm.com>
19338             David Sherwood  <david.sherwood@arm.com>
19340         * optabs.def (while_ult_optab): New optab.
19341         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19342         * internal-fn.def (WHILE_ULT): New internal function.
19343         * internal-fn.h (direct_internal_fn_supported_p): New override
19344         that takes two types as argument.
19345         * internal-fn.c (while_direct): New macro.
19346         (expand_while_optab_fn): New function.
19347         (convert_optab_supported_p): Likewise.
19348         (direct_while_optab_supported_p): New macro.
19349         * wide-int.h (wi::udiv_ceil): New function.
19350         * tree-vectorizer.h (rgroup_masks): New structure.
19351         (vec_loop_masks): New typedef.
19352         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19353         and fully_masked_p.
19354         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19355         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19356         (vect_max_vf): New function.
19357         (slpeel_make_loop_iterate_ntimes): Delete.
19358         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19359         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19360         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19361         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19362         internal-fn.h, stor-layout.h and optabs-query.h.
19363         (vect_set_loop_mask): New function.
19364         (add_preheader_seq): Likewise.
19365         (add_header_seq): Likewise.
19366         (interleave_supported_p): Likewise.
19367         (vect_maybe_permute_loop_masks): Likewise.
19368         (vect_set_loop_masks_directly): Likewise.
19369         (vect_set_loop_condition_masked): Likewise.
19370         (vect_set_loop_condition_unmasked): New function, split out from
19371         slpeel_make_loop_iterate_ntimes.
19372         (slpeel_make_loop_iterate_ntimes): Rename to..
19373         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19374         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19375         (vect_do_peeling): Update call accordingly.
19376         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19377         loops.
19378         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19379         mask_compare_type, can_fully_mask_p and fully_masked_p.
19380         (release_vec_loop_masks): New function.
19381         (_loop_vec_info): Use it to free the loop masks.
19382         (can_produce_all_loop_masks_p): New function.
19383         (vect_get_max_nscalars_per_iter): Likewise.
19384         (vect_verify_full_masking): Likewise.
19385         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19386         retries, and free the mask rgroups before retrying.  Check loop-wide
19387         reasons for disallowing fully-masked loops.  Make the final decision
19388         about whether use a fully-masked loop or not.
19389         (vect_estimate_min_profitable_iters): Do not assume that peeling
19390         for the number of iterations will be needed for fully-masked loops.
19391         (vectorizable_reduction): Disable fully-masked loops.
19392         (vectorizable_live_operation): Likewise.
19393         (vect_halve_mask_nunits): New function.
19394         (vect_double_mask_nunits): Likewise.
19395         (vect_record_loop_mask): Likewise.
19396         (vect_get_loop_mask): Likewise.
19397         (vect_transform_loop): Handle the case in which the final loop
19398         iteration might handle a partial vector.  Call vect_set_loop_condition
19399         instead of slpeel_make_loop_iterate_ntimes.
19400         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19401         (check_load_store_masking): New function.
19402         (prepare_load_store_mask): Likewise.
19403         (vectorizable_store): Handle fully-masked loops.
19404         (vectorizable_load): Likewise.
19405         (supportable_widening_operation): Use vect_halve_mask_nunits for
19406         booleans.
19407         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19408         (vect_gen_while): New function.
19409         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19410         (aarch64_uqdec<mode>): New insn.
19412 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19413             Alan Hayward  <alan.hayward@arm.com>
19414             David Sherwood  <david.sherwood@arm.com>
19416         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19417         (reduc_xor_scal_optab): New optabs.
19418         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19419         (reduc_xor_scal_@var{m}): Document.
19420         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19421         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19422         internal functions.
19423         * fold-const-call.c (fold_const_call): Handle them.
19424         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19425         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19426         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19427         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19428         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19429         (UNSPEC_XORV): New unspecs.
19430         (optab): Add entries for them.
19431         (BITWISEV): New int iterator.
19432         (bit_reduc_op): New int attributes.
19434 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19435             Alan Hayward  <alan.hayward@arm.com>
19436             David Sherwood  <david.sherwood@arm.com>
19438         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19439         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19440         * optabs.def (vec_shl_insert_optab): New optab.
19441         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19442         (duplicate_and_interleave): Likewise.
19443         * tree-vect-loop.c: Include internal-fn.h.
19444         (neutral_op_for_slp_reduction): New function, split out from
19445         get_initial_defs_for_reduction.
19446         (get_initial_def_for_reduction): Handle option 2 for variable-length
19447         vectors by loading the neutral value into a vector and then shifting
19448         the initial value into element 0.
19449         (get_initial_defs_for_reduction): Replace the code argument with
19450         the neutral value calculated by neutral_op_for_slp_reduction.
19451         Use gimple_build_vector for constant-length vectors.
19452         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19453         but the first group_size elements have a neutral value.
19454         Use duplicate_and_interleave otherwise.
19455         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19456         Update call to get_initial_defs_for_reduction.  Handle SLP
19457         reductions for variable-length vectors by creating one vector
19458         result for each scalar result, with the elements associated
19459         with other scalar results stubbed out with the neutral value.
19460         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19461         Require IFN_VEC_SHL_INSERT for double reductions on
19462         variable-length vectors, or SLP reductions that have
19463         a neutral value.  Require can_duplicate_and_interleave_p
19464         support for variable-length unchained SLP reductions if there
19465         is no neutral value, such as for MIN/MAX reductions.  Also require
19466         the number of vector elements to be a multiple of the number of
19467         SLP statements when doing variable-length unchained SLP reductions.
19468         Update call to vect_create_epilog_for_reduction.
19469         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19470         and remove initial values.
19471         (duplicate_and_interleave): Make public.
19472         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19473         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19475 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19476             Alan Hayward  <alan.hayward@arm.com>
19477             David Sherwood  <david.sherwood@arm.com>
19479         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19480         (can_duplicate_and_interleave_p): New function.
19481         (vect_get_and_check_slp_defs): Take the vector of statements
19482         rather than just the current one.  Remove excess parentheses.
19483         Restriction rejectinon of vect_constant_def and vect_external_def
19484         for variable-length vectors to boolean types, or types for which
19485         can_duplicate_and_interleave_p is false.
19486         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19487         (duplicate_and_interleave): New function.
19488         (vect_get_constant_vectors): Use gimple_build_vector for
19489         constant-length vectors and suitable variable-length constant
19490         vectors.  Use duplicate_and_interleave for other variable-length
19491         vectors.  Don't defer the update when inserting new statements.
19493 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19494             Alan Hayward  <alan.hayward@arm.com>
19495             David Sherwood  <david.sherwood@arm.com>
19497         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19498         min_profitable_iters doesn't go negative.
19500 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19501             Alan Hayward  <alan.hayward@arm.com>
19502             David Sherwood  <david.sherwood@arm.com>
19504         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19505         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19506         * optabs.def (vec_mask_load_lanes_optab): New optab.
19507         (vec_mask_store_lanes_optab): Likewise.
19508         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19509         (MASK_STORE_LANES): Likewise.
19510         * internal-fn.c (mask_load_lanes_direct): New macro.
19511         (mask_store_lanes_direct): Likewise.
19512         (expand_mask_load_optab_fn): Handle masked operations.
19513         (expand_mask_load_lanes_optab_fn): New macro.
19514         (expand_mask_store_optab_fn): Handle masked operations.
19515         (expand_mask_store_lanes_optab_fn): New macro.
19516         (direct_mask_load_lanes_optab_supported_p): Likewise.
19517         (direct_mask_store_lanes_optab_supported_p): Likewise.
19518         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19519         parameter.
19520         (vect_load_lanes_supported): Likewise.
19521         * tree-vect-data-refs.c (strip_conversion): New function.
19522         (can_group_stmts_p): Likewise.
19523         (vect_analyze_data_ref_accesses): Use it instead of checking
19524         for a pair of assignments.
19525         (vect_store_lanes_supported): Take a masked_p parameter.
19526         (vect_load_lanes_supported): Likewise.
19527         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19528         vect_store_lanes_supported and vect_load_lanes_supported.
19529         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19530         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19531         parameter.  Don't allow gaps for masked accesses.
19532         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19533         and vect_load_lanes_supported.
19534         (get_load_store_type): Take a masked_p parameter and update
19535         call to get_group_load_store_type.
19536         (vectorizable_store): Update call to get_load_store_type.
19537         Handle IFN_MASK_STORE_LANES.
19538         (vectorizable_load): Update call to get_load_store_type.
19539         Handle IFN_MASK_LOAD_LANES.
19541 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19542             Alan Hayward  <alan.hayward@arm.com>
19543             David Sherwood  <david.sherwood@arm.com>
19545         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19546         modes for SVE.
19547         * config/aarch64/aarch64-protos.h
19548         (aarch64_sve_struct_memory_operand_p): Declare.
19549         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19550         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19551         (VPRED, vpred): Handle SVE structure modes.
19552         * config/aarch64/constraints.md (Utx): New constraint.
19553         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19554         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19555         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19556         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19557         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19558         structure modes.  Split into pieces after RA.
19559         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19560         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19561         New patterns.
19562         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19563         SVE structure modes.
19564         (aarch64_classify_address): Likewise.
19565         (sizetochar): Move earlier in file.
19566         (aarch64_print_operand): Handle SVE register lists.
19567         (aarch64_array_mode): New function.
19568         (aarch64_sve_struct_memory_operand_p): Likewise.
19569         (TARGET_ARRAY_MODE): Redefine.
19571 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19572             Alan Hayward  <alan.hayward@arm.com>
19573             David Sherwood  <david.sherwood@arm.com>
19575         * target.def (array_mode): New target hook.
19576         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19577         * doc/tm.texi: Regenerate.
19578         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19579         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19580         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19581         targetm.array_mode.
19582         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19583         type sizes.
19585 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19586             Alan Hayward  <alan.hayward@arm.com>
19587             David Sherwood  <david.sherwood@arm.com>
19589         * fold-const.c (fold_binary_loc): Check the argument types
19590         rather than the result type when testing for a vector operation.
19592 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19594         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19595         * doc/tm.texi: Regenerate.
19597 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19598             Alan Hayward  <alan.hayward@arm.com>
19599             David Sherwood  <david.sherwood@arm.com>
19601         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19602         (sve): Document new AArch64 extension.
19603         * doc/md.texi (w): Extend the description of the AArch64
19604         constraint to include SVE vectors.
19605         (Upl, Upa): Document new AArch64 predicate constraints.
19606         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19607         enum.
19608         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19609         (msve-vector-bits=): New option.
19610         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19611         SVE when these are disabled.
19612         (sve): New extension.
19613         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19614         modes.  Adjust their number of units based on aarch64_sve_vg.
19615         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19616         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19617         aarch64_addr_query_type.
19618         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19619         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19620         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19621         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19622         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19623         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19624         (aarch64_simd_imm_zero_p): Delete.
19625         (aarch64_check_zero_based_sve_index_immediate): Declare.
19626         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19627         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19628         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19629         (aarch64_sve_float_mul_immediate_p): Likewise.
19630         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19631         rather than an rtx.
19632         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19633         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19634         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19635         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19636         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19637         (aarch64_regmode_natural_size): Likewise.
19638         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19639         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19640         left one place.
19641         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19642         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19643         for VG and the SVE predicate registers.
19644         (V_ALIASES): Add a "z"-prefixed alias.
19645         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19646         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19647         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19648         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19649         (REG_CLASS_NAMES): Add entries for them.
19650         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19651         and the predicate registers.
19652         (aarch64_sve_vg): Declare.
19653         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19654         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19655         (REGMODE_NATURAL_SIZE): Define.
19656         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19657         SVE macros.
19658         * config/aarch64/aarch64.c: Include cfgrtl.h.
19659         (simd_immediate_info): Add a constructor for series vectors,
19660         and an associated step field.
19661         (aarch64_sve_vg): New variable.
19662         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19663         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19664         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19665         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19666         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19667         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19668         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19669         (aarch64_get_mask_mode): New functions.
19670         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19671         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19672         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19673         predicate modes and predicate registers.  Explicitly restrict
19674         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19675         to store a vector mode if it is recognized by
19676         aarch64_classify_vector_mode.
19677         (aarch64_regmode_natural_size): New function.
19678         (aarch64_hard_regno_caller_save_mode): Return the original mode
19679         for predicates.
19680         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19681         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19682         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19683         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19684         functions.
19685         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19686         does not overlap dest if the function is frame-related.  Handle
19687         SVE constants.
19688         (aarch64_split_add_offset): New function.
19689         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19690         them aarch64_add_offset.
19691         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19692         and update call to aarch64_sub_sp.
19693         (aarch64_add_cfa_expression): New function.
19694         (aarch64_expand_prologue): Pass extra temporary registers to the
19695         functions above.  Handle the case in which we need to emit new
19696         DW_CFA_expressions for registers that were originally saved
19697         relative to the stack pointer, but now have to be expressed
19698         relative to the frame pointer.
19699         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19700         functions above.
19701         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19702         IP0 and IP1 values for SVE frames.
19703         (aarch64_expand_vec_series): New function.
19704         (aarch64_expand_sve_widened_duplicate): Likewise.
19705         (aarch64_expand_sve_const_vector): Likewise.
19706         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19707         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19708         into the register, rather than emitting a SET directly.
19709         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19710         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19711         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19712         (offset_9bit_signed_scaled_p): New functions.
19713         (aarch64_replicate_bitmask_imm): New function.
19714         (aarch64_bitmask_imm): Use it.
19715         (aarch64_cannot_force_const_mem): Reject expressions involving
19716         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19717         (aarch64_classify_index): Handle SVE indices, by requiring
19718         a plain register index with a scale that matches the element size.
19719         (aarch64_classify_address): Handle SVE addresses.  Assert that
19720         the mode of the address is VOIDmode or an integer mode.
19721         Update call to aarch64_classify_symbol.
19722         (aarch64_classify_symbolic_expression): Update call to
19723         aarch64_classify_symbol.
19724         (aarch64_const_vec_all_in_range_p): New function.
19725         (aarch64_print_vector_float_operand): Likewise.
19726         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19727         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19728         and the FP immediates 1.0 and 0.5.
19729         (aarch64_print_address_internal): Handle SVE addresses.
19730         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19731         (aarch64_regno_regclass): Handle predicate registers.
19732         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19733         data modes.
19734         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19735         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19736         (aarch64_convert_sve_vector_bits): New function.
19737         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19738         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19739         rather than an rtx.
19740         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19741         Handle SVE vector and predicate modes.  Accept VL-based constants
19742         that need only one temporary register, and VL offsets that require
19743         no temporary registers.
19744         (aarch64_conditional_register_usage): Mark the predicate registers
19745         as fixed if SVE isn't available.
19746         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19747         Return true for SVE vector and predicate modes.
19748         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19749         rather than an unsigned int.  Handle SVE modes.
19750         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19751         SVE modes.
19752         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19753         if SVE is enabled.
19754         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19755         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19756         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19757         (aarch64_sve_float_mul_immediate_p): New functions.
19758         (aarch64_sve_valid_immediate): New function.
19759         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19760         Explicitly reject structure modes.  Check for INDEX constants.
19761         Handle PTRUE and PFALSE constants.
19762         (aarch64_check_zero_based_sve_index_immediate): New function.
19763         (aarch64_simd_imm_zero_p): Delete.
19764         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19765         vector modes.  Accept constants in the range of CNT[BHWD].
19766         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19767         ask for an Advanced SIMD mode.
19768         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19769         (aarch64_simd_vector_alignment): Handle SVE predicates.
19770         (aarch64_vectorize_preferred_vector_alignment): New function.
19771         (aarch64_simd_vector_alignment_reachable): Use it instead of
19772         the vector size.
19773         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19774         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19775         functions.
19776         (MAX_VECT_LEN): Delete.
19777         (expand_vec_perm_d): Add a vec_flags field.
19778         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19779         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19780         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19781         for SVE modes.
19782         (aarch64_evpc_rev): Rename to...
19783         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19784         (aarch64_evpc_rev_global): New function.
19785         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19786         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19787         MAX_VECT_LEN.
19788         (aarch64_evpc_sve_tbl): New function.
19789         (aarch64_expand_vec_perm_const_1): Update after rename of
19790         aarch64_evpc_rev.  Handle SVE permutes too, trying
19791         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19792         than aarch64_evpc_tbl.
19793         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19794         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19795         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19796         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19797         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19798         (aarch64_expand_sve_vcond): New functions.
19799         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19800         of aarch64_vector_mode_p.
19801         (aarch64_dwarf_poly_indeterminate_value): New function.
19802         (aarch64_compute_pressure_classes): Likewise.
19803         (aarch64_can_change_mode_class): Likewise.
19804         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19805         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19806         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19807         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19808         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19809         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19810         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19811         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19812         constraints.
19813         (Dn, Dl, Dr): Accept const as well as const_vector.
19814         (Dz): Likewise.  Compare against CONST0_RTX.
19815         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19816         of "vector" where appropriate.
19817         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19818         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19819         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19820         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19821         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19822         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19823         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19824         (v_int_equiv): Extend to SVE modes.
19825         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19826         mode attributes.
19827         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19828         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19829         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19830         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19831         (SVE_COND_FP_CMP): New int iterators.
19832         (perm_hilo): Handle the new unpack unspecs.
19833         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19834         attributes.
19835         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19836         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19837         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19838         (aarch64_equality_operator, aarch64_constant_vector_operand)
19839         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19840         (aarch64_sve_nonimmediate_operand): Likewise.
19841         (aarch64_sve_general_operand): Likewise.
19842         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19843         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19844         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19845         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19846         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19847         (aarch64_sve_float_arith_immediate): Likewise.
19848         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19849         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19850         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19851         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19852         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19853         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19854         (aarch64_sve_float_arith_operand): Likewise.
19855         (aarch64_sve_float_arith_with_sub_operand): Likewise.
19856         (aarch64_sve_float_mul_operand): Likewise.
19857         (aarch64_sve_vec_perm_operand): Likewise.
19858         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19859         (aarch64_mov_operand): Accept const_poly_int and const_vector.
19860         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19861         as well as const_vector.
19862         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19863         in file.  Use CONST0_RTX and CONSTM1_RTX.
19864         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
19865         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19866         Use aarch64_simd_imm_zero.
19867         * config/aarch64/aarch64-sve.md: New file.
19868         * config/aarch64/aarch64.md: Include it.
19869         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19870         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19871         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19872         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19873         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19874         (sve): New attribute.
19875         (enabled): Disable instructions with the sve attribute unless
19876         TARGET_SVE.
19877         (movqi, movhi): Pass CONST_POLY_INT operaneds through
19878         aarch64_expand_mov_immediate.
19879         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19880         CNT[BHSD] immediates.
19881         (movti): Split CONST_POLY_INT moves into two halves.
19882         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19883         Split additions that need a temporary here if the destination
19884         is the stack pointer.
19885         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19886         (*add<mode>3_poly_1): New instruction.
19887         (set_clobber_cc): New expander.
19889 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19891         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19892         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
19893         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19894         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19895         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
19896         Change innermode from fixed_mode_size to machine_mode.
19897         (simplify_subreg): Update call accordingly.  Handle a constant-sized
19898         subreg of a variable-length CONST_VECTOR.
19900 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19901             Alan Hayward  <alan.hayward@arm.com>
19902             David Sherwood  <david.sherwood@arm.com>
19904         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19905         (add_offset_to_base): New function, split out from...
19906         (create_mem_ref): ...here.  When handling a scale other than 1,
19907         check first whether the address is valid without the offset.
19908         Add it into the base if so, leaving the index and scale as-is.
19910 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19912         PR c++/83778
19913         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19914         fold_for_warn before checking if arg2 is INTEGER_CST.
19916 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
19918         * config/rs6000/predicates.md (load_multiple_operation): Delete.
19919         (store_multiple_operation): Delete.
19920         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19921         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19922         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19923         guarded by TARGET_STRING.
19924         (rs6000_output_load_multiple): Delete.
19925         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19926         OPTION_MASK_STRING / TARGET_STRING handling.
19927         (print_operand) <'N', 'O'>: Add comment that these are unused now.
19928         (const rs6000_opt_masks) <"string">: Change mask to 0.
19929         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19930         (MASK_STRING): Delete.
19931         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19932         parts.  Simplify.
19933         (load_multiple): Delete.
19934         (*ldmsi8): Delete.
19935         (*ldmsi7): Delete.
19936         (*ldmsi6): Delete.
19937         (*ldmsi5): Delete.
19938         (*ldmsi4): Delete.
19939         (*ldmsi3): Delete.
19940         (store_multiple): Delete.
19941         (*stmsi8): Delete.
19942         (*stmsi7): Delete.
19943         (*stmsi6): Delete.
19944         (*stmsi5): Delete.
19945         (*stmsi4): Delete.
19946         (*stmsi3): Delete.
19947         (movmemsi_8reg): Delete.
19948         (corresponding unnamed define_insn): Delete.
19949         (movmemsi_6reg): Delete.
19950         (corresponding unnamed define_insn): Delete.
19951         (movmemsi_4reg): Delete.
19952         (corresponding unnamed define_insn): Delete.
19953         (movmemsi_2reg): Delete.
19954         (corresponding unnamed define_insn): Delete.
19955         (movmemsi_1reg): Delete.
19956         (corresponding unnamed define_insn): Delete.
19957         * config/rs6000/rs6000.opt (mno-string): New.
19958         (mstring): Replace by deprecation warning stub.
19959         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19961 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19963         * regrename.c (regrename_do_replace): If replacing the same
19964         reg multiple times, try to reuse last created gen_raw_REG.
19966         PR debug/81155
19967         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19968         main to workaround a bug in GDB.
19970 2018-01-12  Tom de Vries  <tom@codesourcery.com>
19972         PR target/83737
19973         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19975 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
19977         PR rtl-optimization/80481
19978         * ira-color.c (get_cap_member): New function.
19979         (allocnos_conflict_by_live_ranges_p): Use it.
19980         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19981         (setup_slot_coalesced_allocno_live_ranges): Ditto.
19983 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
19985         PR target/83628
19986         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19987         (*saddl_se_1): Ditto.
19988         (*ssubsi_1): Ditto.
19989         (*ssubl_se_1): Ditto.
19991 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19993         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19994         rather than wi::to_widest for DR_INITs.
19995         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19996         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19997         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19998         INTEGER_CSTs.
19999         (vect_analyze_group_access_1): Note that here.
20001 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20003         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20004         polynomial type sizes.
20006 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20008         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20009         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20010         (gimple_add_tmp_var): Likewise.
20012 2018-01-12  Martin Liska  <mliska@suse.cz>
20014         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20015         (gimple_alloc_sizes): Likewise.
20016         (dump_gimple_statistics): Use PRIu64 in printf format.
20017         * gimple.h: Change uint64_t to int.
20019 2018-01-12  Martin Liska  <mliska@suse.cz>
20021         * tree-core.h: Use uint64_t instead of int.
20022         * tree.c (tree_node_counts): Likewise.
20023         (tree_node_sizes): Likewise.
20024         (dump_tree_statistics): Use PRIu64 in printf format.
20026 2018-01-12  Martin Liska  <mliska@suse.cz>
20028         * Makefile.in: As qsort_chk is implemented in vec.c, add
20029         vec.o to linkage of gencfn-macros.
20030         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20031         passing the info to record_node_allocation_statistics.
20032         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20033         and pass the info.
20034         * ggc-common.c (struct ggc_usage): Add operator== and use
20035         it in operator< and compare function.
20036         * mem-stats.h (struct mem_usage): Likewise.
20037         * vec.c (struct vec_usage): Remove operator< and compare
20038         function. Can be simply inherited.
20040 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20042         PR target/81616
20043         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20044         * tree-ssa-math-opts.c: Include domwalk.h.
20045         (convert_mult_to_fma_1): New function.
20046         (fma_transformation_info): New type.
20047         (fma_deferring_state): Likewise.
20048         (cancel_fma_deferring): New function.
20049         (result_of_phi): Likewise.
20050         (last_fma_candidate_feeds_initial_phi): Likewise.
20051         (convert_mult_to_fma): Added deferring logic, split actual
20052         transformation to convert_mult_to_fma_1.
20053         (math_opts_dom_walker): New type.
20054         (math_opts_dom_walker::after_dom_children): New method, body moved
20055         here from pass_optimize_widening_mul::execute, added deferring logic
20056         bits.
20057         (pass_optimize_widening_mul::execute): Moved most of code to
20058         math_opts_dom_walker::after_dom_children.
20059         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20060         * config/i386/i386.c (ix86_option_override_internal): Added
20061         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20063 2018-01-12  Richard Biener  <rguenther@suse.de>
20065         PR debug/83157
20066         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20067         inline instance vars.
20069 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20071         PR target/81819
20072         * config/rx/rx.c (rx_is_restricted_memory_address):
20073         Handle SUBREG case.
20075 2018-01-12  Richard Biener  <rguenther@suse.de>
20077         PR tree-optimization/80846
20078         * target.def (split_reduction): New target hook.
20079         * targhooks.c (default_split_reduction): New function.
20080         * targhooks.h (default_split_reduction): Declare.
20081         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20082         target requests first reduce vectors by combining low and high
20083         parts.
20084         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20085         (get_vectype_for_scalar_type_and_size): Export.
20086         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20087         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20088         * doc/tm.texi: Regenerate.
20089         * config/i386/i386.c (ix86_split_reduction): Implement
20090         TARGET_VECTORIZE_SPLIT_REDUCTION.
20092 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20094         PR target/83368
20095         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20096         in PIC mode except for TARGET_VXWORKS_RTP.
20097         * config/sparc/sparc.c: Include cfgrtl.h.
20098         (TARGET_INIT_PIC_REG): Define.
20099         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20100         (sparc_pic_register_p): New predicate.
20101         (sparc_legitimate_address_p): Use it.
20102         (sparc_legitimize_pic_address): Likewise.
20103         (sparc_delegitimize_address): Likewise.
20104         (sparc_mode_dependent_address_p): Likewise.
20105         (gen_load_pcrel_sym): Remove 4th parameter.
20106         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20107         (sparc_expand_prologue): Do not call load_got_register here.
20108         (sparc_flat_expand_prologue): Likewise.
20109         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20110         (sparc_use_pseudo_pic_reg): New function.
20111         (sparc_init_pic_reg): Likewise.
20112         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20113         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20115 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20117         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20118         Add item for branch_cost.
20120 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20122         PR rtl-optimization/83565
20123         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20124         not extend the result to a larger mode for rotate operations.
20125         (num_sign_bit_copies1): Likewise.
20127 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20129         PR target/40411
20130         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20131         -symbolic.
20132         Use values-Xc.o for -pedantic.
20133         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20135 2018-01-12  Martin Liska  <mliska@suse.cz>
20137         PR ipa/83054
20138         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20139         New function.
20140         (possible_polymorphic_call_targets): Use it.
20141         (ipa_devirt): Likewise.
20143 2018-01-12  Martin Liska  <mliska@suse.cz>
20145         * profile-count.h (enum profile_quality): Use 0 as invalid
20146         enum value of profile_quality.
20148 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20150         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20151         -mext-string options.
20153 2018-01-12  Richard Biener  <rguenther@suse.de>
20155         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20156         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20157         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20158         Likewise.
20159         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20161 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20163         * configure.ac (--with-long-double-format): Add support for the
20164         configuration option to change the default long double format on
20165         PowerPC systems.
20166         * config.gcc (powerpc*-linux*-*): Likewise.
20167         * configure: Regenerate.
20168         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20169         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20170         used without modification.
20172 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20174         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20175         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20176         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20177         MISC_BUILTIN_SPEC_BARRIER.
20178         (rs6000_init_builtins): Likewise.
20179         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20180         enum value.
20181         (speculation_barrier): New define_insn.
20182         * doc/extend.texi: Document __builtin_speculation_barrier.
20184 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20186         PR target/83203
20187         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20188         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20189         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20190         iterators.
20191         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20192         integral modes instead of "ss" and "sd".
20193         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20194         vectors with 32-bit and 64-bit elements.
20195         (vecdupssescalarmodesuffix): New mode attribute.
20196         (vec_dup<mode>): Use it.
20198 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20200         PR target/83330
20201         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20202         frame if argument is passed on stack.
20204 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20206         PR target/82682
20207         * ree.c (combine_reaching_defs): Optimize also
20208         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20209         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20211 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20213         PR middle-end/83189
20214         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20216 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20218         PR middle-end/83718
20219         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20220         after they are computed.
20222 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20224         PR tree-optimization/83695
20225         * gimple-loop-linterchange.cc
20226         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20227         reset cached scev information after interchange.
20228         (pass_linterchange::execute): Remove call to scev_reset_htab.
20230 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20232         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20233         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20234         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20235         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20236         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20237         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20238         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20239         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20240         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20241         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20242         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20243         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20244         (V_lane_reg): Likewise.
20245         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20246         New define_expand.
20247         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20248         (vfmal_lane_low<mode>_intrinsic,
20249         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20250         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20251         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20252         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20253         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20254         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20256 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20258         * config/arm/arm-cpus.in (fp16fml): New feature.
20259         (ALL_SIMD): Add fp16fml.
20260         (armv8.2-a): Add fp16fml as an option.
20261         (armv8.3-a): Likewise.
20262         (armv8.4-a): Add fp16fml as part of fp16.
20263         * config/arm/arm.h (TARGET_FP16FML): Define.
20264         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20265         when appropriate.
20266         * config/arm/arm-modes.def (V2HF): Define.
20267         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20268         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20269         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20270         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20271         vfmsl_low, vfmsl_high): New set of builtins.
20272         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20273         (vfml_op): New code attribute.
20274         (VFMLHALVES): New int iterator.
20275         (VFML, VFMLSEL): New mode attributes.
20276         (V_reg): Define mapping for V2HF.
20277         (V_hi, V_lo): New mode attributes.
20278         (VF_constraint): Likewise.
20279         (vfml_half, vfml_half_selector): New int attributes.
20280         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20281         define_expand.
20282         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20283         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20284         New define_insn.
20285         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20286         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20287         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20288         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20289         documentation.
20290         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20291         Document new effective target and option set.
20293 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20295         * config/arm/arm-cpus.in (armv8_4): New feature.
20296         (ARMv8_4a): New fgroup.
20297         (armv8.4-a): New arch.
20298         * config/arm/arm-tables.opt: Regenerate.
20299         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20300         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20301         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20302         Add matching rules for -march=armv8.4-a and extensions.
20303         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20305 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20307         PR target/81821
20308         * config/rx/rx.md (BW): New mode attribute.
20309         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20311 2018-01-11  Richard Biener  <rguenther@suse.de>
20313         PR tree-optimization/83435
20314         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20315         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20316         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20318 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20319             Alan Hayward  <alan.hayward@arm.com>
20320             David Sherwood  <david.sherwood@arm.com>
20322         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20323         field.
20324         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20325         (aarch64_print_address_internal): Use it to check for a zero offset.
20327 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20328             Alan Hayward  <alan.hayward@arm.com>
20329             David Sherwood  <david.sherwood@arm.com>
20331         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20332         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20333         Return a poly_int64 rather than a HOST_WIDE_INT.
20334         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20335         rather than a HOST_WIDE_INT.
20336         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20337         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20338         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20339         final_offset from HOST_WIDE_INT to poly_int64.
20340         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20341         to_constant when getting the number of units in an Advanced SIMD
20342         mode.
20343         (aarch64_builtin_vectorized_function): Check for a constant number
20344         of units.
20345         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20346         GET_MODE_SIZE.
20347         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20348         attribute instead of GET_MODE_NUNITS.
20349         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20350         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20351         GET_MODE_SIZE for fixed-size registers.
20352         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20353         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20354         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20355         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20356         (aarch64_print_operand, aarch64_print_address_internal)
20357         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20358         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20359         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20360         Handle polynomial GET_MODE_SIZE.
20361         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20362         wider than SImode without modification.
20363         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20364         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20365         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20366         passing and returning SVE modes.
20367         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20368         rather than GEN_INT.
20369         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20370         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20371         (aarch64_allocate_and_probe_stack_space): Likewise.
20372         (aarch64_layout_frame): Cope with polynomial offsets.
20373         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20374         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20375         polynomial offsets.
20376         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20377         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20378         poly_int64 rather than a HOST_WIDE_INT.
20379         (aarch64_get_separate_components, aarch64_process_components)
20380         (aarch64_expand_prologue, aarch64_expand_epilogue)
20381         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20382         (aarch64_anchor_offset): New function, split out from...
20383         (aarch64_legitimize_address): ...here.
20384         (aarch64_builtin_vectorization_cost): Handle polynomial
20385         TYPE_VECTOR_SUBPARTS.
20386         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20387         GET_MODE_NUNITS.
20388         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20389         number of elements from the PARALLEL rather than the mode.
20390         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20391         rather than GET_MODE_BITSIZE.
20392         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20393         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20394         (aarch64_expand_vec_perm_const_1): Handle polynomial
20395         d->perm.length () and d->perm elements.
20396         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20397         Apply to_constant to d->perm elements.
20398         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20399         polynomial CONST_VECTOR_NUNITS.
20400         (aarch64_move_pointer): Take amount as a poly_int64 rather
20401         than an int.
20402         (aarch64_progress_pointer): Avoid temporary variable.
20403         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20404         the mode attribute instead of GET_MODE.
20406 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20407             Alan Hayward  <alan.hayward@arm.com>
20408             David Sherwood  <david.sherwood@arm.com>
20410         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20411         x exists before using it.
20412         (aarch64_add_constant_internal): Rename to...
20413         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20414         src and dest rtxes.  Handle the case in which they're different,
20415         including when the offset is zero.  Replace scratchreg with an rtx.
20416         Use 2 additions if there is no spare register into which we can
20417         move a 16-bit constant.
20418         (aarch64_add_constant): Delete.
20419         (aarch64_add_offset): Replace reg with separate src and dest
20420         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20421         Use aarch64_add_offset_1.
20422         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20423         an rtx rather than an int.  Take the delta as a poly_int64
20424         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20425         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20426         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20427         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20428         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20429         and aarch64_add_sp.
20430         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20431         aarch64_add_constant.
20433 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20435         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20436         Use scalar_float_mode.
20438 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20440         * config/aarch64/aarch64-simd.md
20441         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20442         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20443         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20444         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20445         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20446         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20447         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20448         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20449         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20450         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20452 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20454         PR target/83514
20455         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20456         targ_options->x_arm_arch_string is non NULL.
20458 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20460         * config/aarch64/aarch64.h
20461         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20463 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20465         PR target/82096
20466         * expmed.c (emit_store_flag_force): Swap if const op0
20467         and change VOIDmode to mode of op0.
20469 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20471         PR rtl-optimization/83761
20472         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20473         than bytes to mode_for_size.
20475 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20477         PR middle-end/83189
20478         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20479         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20480         profile.
20482 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20484         PR middle-end/83575
20485         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20486         when in layout mode.
20487         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20488         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20489         partition fixup.
20491 2018-01-10  Michael Collison  <michael.collison@arm.com>
20493         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20494         * config/aarch64/aarch64-option-extension.def: Add
20495         AARCH64_OPT_EXTENSION of 'fp16fml'.
20496         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20497         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20498         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20499         * config/aarch64/constraints.md (Ui7): New constraint.
20500         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20501         (VFMLA_SEL_W): Ditto.
20502         (f16quad): Ditto.
20503         (f16mac1): Ditto.
20504         (VFMLA16_LOW): New int iterator.
20505         (VFMLA16_HIGH): Ditto.
20506         (UNSPEC_FMLAL): New unspec.
20507         (UNSPEC_FMLSL): Ditto.
20508         (UNSPEC_FMLAL2): Ditto.
20509         (UNSPEC_FMLSL2): Ditto.
20510         (f16mac): New code attribute.
20511         * config/aarch64/aarch64-simd-builtins.def
20512         (aarch64_fmlal_lowv2sf): Ditto.
20513         (aarch64_fmlsl_lowv2sf): Ditto.
20514         (aarch64_fmlalq_lowv4sf): Ditto.
20515         (aarch64_fmlslq_lowv4sf): Ditto.
20516         (aarch64_fmlal_highv2sf): Ditto.
20517         (aarch64_fmlsl_highv2sf): Ditto.
20518         (aarch64_fmlalq_highv4sf): Ditto.
20519         (aarch64_fmlslq_highv4sf): Ditto.
20520         (aarch64_fmlal_lane_lowv2sf): Ditto.
20521         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20522         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20523         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20524         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20525         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20526         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20527         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20528         (aarch64_fmlal_lane_highv2sf): Ditto.
20529         (aarch64_fmlsl_lane_highv2sf): Ditto.
20530         (aarch64_fmlal_laneq_highv2sf): Ditto.
20531         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20532         (aarch64_fmlalq_lane_highv4sf): Ditto.
20533         (aarch64_fmlsl_lane_highv4sf): Ditto.
20534         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20535         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20536         * config/aarch64/aarch64-simd.md:
20537         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20538         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20539         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20540         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20541         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20542         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20543         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20544         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20545         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20546         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20547         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20548         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20549         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20550         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20551         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20552         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20553         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20554         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20555         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20556         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20557         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20558         (vfmlsl_low_u32): Ditto.
20559         (vfmlalq_low_u32): Ditto.
20560         (vfmlslq_low_u32): Ditto.
20561         (vfmlal_high_u32): Ditto.
20562         (vfmlsl_high_u32): Ditto.
20563         (vfmlalq_high_u32): Ditto.
20564         (vfmlslq_high_u32): Ditto.
20565         (vfmlal_lane_low_u32): Ditto.
20566         (vfmlsl_lane_low_u32): Ditto.
20567         (vfmlal_laneq_low_u32): Ditto.
20568         (vfmlsl_laneq_low_u32): Ditto.
20569         (vfmlalq_lane_low_u32): Ditto.
20570         (vfmlslq_lane_low_u32): Ditto.
20571         (vfmlalq_laneq_low_u32): Ditto.
20572         (vfmlslq_laneq_low_u32): Ditto.
20573         (vfmlal_lane_high_u32): Ditto.
20574         (vfmlsl_lane_high_u32): Ditto.
20575         (vfmlal_laneq_high_u32): Ditto.
20576         (vfmlsl_laneq_high_u32): Ditto.
20577         (vfmlalq_lane_high_u32): Ditto.
20578         (vfmlslq_lane_high_u32): Ditto.
20579         (vfmlalq_laneq_high_u32): Ditto.
20580         (vfmlslq_laneq_high_u32): Ditto.
20581         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20582         (AARCH64_FL_FOR_ARCH8_4): New.
20583         (AARCH64_ISA_F16FML): New ISA flag.
20584         (TARGET_F16FML): New feature flag for fp16fml.
20585         (doc/invoke.texi): Document new fp16fml option.
20587 2018-01-10  Michael Collison  <michael.collison@arm.com>
20589         * config/aarch64/aarch64-builtins.c:
20590         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20591         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20592         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20593         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20594         (AARCH64_ISA_SHA3): New ISA flag.
20595         (TARGET_SHA3): New feature flag for sha3.
20596         * config/aarch64/iterators.md (sha512_op): New int attribute.
20597         (CRYPTO_SHA512): New int iterator.
20598         (UNSPEC_SHA512H): New unspec.
20599         (UNSPEC_SHA512H2): Ditto.
20600         (UNSPEC_SHA512SU0): Ditto.
20601         (UNSPEC_SHA512SU1): Ditto.
20602         * config/aarch64/aarch64-simd-builtins.def
20603         (aarch64_crypto_sha512hqv2di): New builtin.
20604         (aarch64_crypto_sha512h2qv2di): Ditto.
20605         (aarch64_crypto_sha512su0qv2di): Ditto.
20606         (aarch64_crypto_sha512su1qv2di): Ditto.
20607         (aarch64_eor3qv8hi): Ditto.
20608         (aarch64_rax1qv2di): Ditto.
20609         (aarch64_xarqv2di): Ditto.
20610         (aarch64_bcaxqv8hi): Ditto.
20611         * config/aarch64/aarch64-simd.md:
20612         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20613         (aarch64_crypto_sha512su0qv2di): Ditto.
20614         (aarch64_crypto_sha512su1qv2di): Ditto.
20615         (aarch64_eor3qv8hi): Ditto.
20616         (aarch64_rax1qv2di): Ditto.
20617         (aarch64_xarqv2di): Ditto.
20618         (aarch64_bcaxqv8hi): Ditto.
20619         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20620         (vsha512h2q_u64): Ditto.
20621         (vsha512su0q_u64): Ditto.
20622         (vsha512su1q_u64): Ditto.
20623         (veor3q_u16): Ditto.
20624         (vrax1q_u64): Ditto.
20625         (vxarq_u64): Ditto.
20626         (vbcaxq_u16): Ditto.
20627         * config/arm/types.md (crypto_sha512): New type attribute.
20628         (crypto_sha3): Ditto.
20629         (doc/invoke.texi): Document new sha3 option.
20631 2018-01-10  Michael Collison  <michael.collison@arm.com>
20633         * config/aarch64/aarch64-builtins.c:
20634         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20635         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20636         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20637         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20638         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20639         (AARCH64_ISA_SM4): New ISA flag.
20640         (TARGET_SM4): New feature flag for sm4.
20641         * config/aarch64/aarch64-simd-builtins.def
20642         (aarch64_sm3ss1qv4si): Ditto.
20643         (aarch64_sm3tt1aq4si): Ditto.
20644         (aarch64_sm3tt1bq4si): Ditto.
20645         (aarch64_sm3tt2aq4si): Ditto.
20646         (aarch64_sm3tt2bq4si): Ditto.
20647         (aarch64_sm3partw1qv4si): Ditto.
20648         (aarch64_sm3partw2qv4si): Ditto.
20649         (aarch64_sm4eqv4si): Ditto.
20650         (aarch64_sm4ekeyqv4si): Ditto.
20651         * config/aarch64/aarch64-simd.md:
20652         (aarch64_sm3ss1qv4si): Ditto.
20653         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20654         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20655         (aarch64_sm4eqv4si): Ditto.
20656         (aarch64_sm4ekeyqv4si): Ditto.
20657         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20658         (sm3part_op): Ditto.
20659         (CRYPTO_SM3TT): Ditto.
20660         (CRYPTO_SM3PART): Ditto.
20661         (UNSPEC_SM3SS1): New unspec.
20662         (UNSPEC_SM3TT1A): Ditto.
20663         (UNSPEC_SM3TT1B): Ditto.
20664         (UNSPEC_SM3TT2A): Ditto.
20665         (UNSPEC_SM3TT2B): Ditto.
20666         (UNSPEC_SM3PARTW1): Ditto.
20667         (UNSPEC_SM3PARTW2): Ditto.
20668         (UNSPEC_SM4E): Ditto.
20669         (UNSPEC_SM4EKEY): Ditto.
20670         * config/aarch64/constraints.md (Ui2): New constraint.
20671         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20672         * config/arm/types.md (crypto_sm3): New type attribute.
20673         (crypto_sm4): Ditto.
20674         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20675         (vsm3tt1aq_u32): Ditto.
20676         (vsm3tt1bq_u32): Ditto.
20677         (vsm3tt2aq_u32): Ditto.
20678         (vsm3tt2bq_u32): Ditto.
20679         (vsm3partw1q_u32): Ditto.
20680         (vsm3partw2q_u32): Ditto.
20681         (vsm4eq_u32): Ditto.
20682         (vsm4ekeyq_u32): Ditto.
20683         (doc/invoke.texi): Document new sm4 option.
20685 2018-01-10  Michael Collison  <michael.collison@arm.com>
20687         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20688         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20689         (AARCH64_FL_FOR_ARCH8_4): New.
20690         (AARCH64_FL_V8_4): New flag.
20691         (doc/invoke.texi): Document new armv8.4-a option.
20693 2018-01-10  Michael Collison  <michael.collison@arm.com>
20695         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20696         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20697         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20698         * config/aarch64/aarch64-option-extension.def: Add
20699         AARCH64_OPT_EXTENSION of 'sha2'.
20700         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20701         (crypto): Disable sha2 and aes if crypto disabled.
20702         (crypto): Enable aes and sha2 if enabled.
20703         (simd): Disable sha2 and aes if simd disabled.
20704         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20705         New flags.
20706         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20707         (TARGET_SHA2): New feature flag for sha2.
20708         (TARGET_AES): New feature flag for aes.
20709         * config/aarch64/aarch64-simd.md:
20710         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20711         conditional on TARGET_AES.
20712         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20713         (aarch64_crypto_sha1hsi): Make pattern conditional
20714         on TARGET_SHA2.
20715         (aarch64_crypto_sha1hv4si): Ditto.
20716         (aarch64_be_crypto_sha1hv4si): Ditto.
20717         (aarch64_crypto_sha1su1v4si): Ditto.
20718         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20719         (aarch64_crypto_sha1su0v4si): Ditto.
20720         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20721         (aarch64_crypto_sha256su0v4si): Ditto.
20722         (aarch64_crypto_sha256su1v4si): Ditto.
20723         (doc/invoke.texi): Document new aes and sha2 options.
20725 2018-01-10  Martin Sebor  <msebor@redhat.com>
20727         PR tree-optimization/83781
20728         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20729         as string arrays.
20731 2018-01-11  Martin Sebor  <msebor@gmail.com>
20732             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20734         PR tree-optimization/83501
20735         PR tree-optimization/81703
20737         * tree-ssa-strlen.c (get_string_cst): Rename...
20738         (get_string_len): ...to this.  Handle global constants.
20739         (handle_char_store): Adjust.
20741 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20742             Jim Wilson  <jimw@sifive.com>
20744         * config/riscv/riscv-protos.h (riscv_output_return): New.
20745         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20746         (riscv_attribute_table, riscv_output_return),
20747         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20748         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20749         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20750         function.
20751         (riscv_expand_prologue): Add early return for naked function.
20752         (riscv_expand_epilogue): Likewise.
20753         (riscv_function_ok_for_sibcall): Return false for naked function.
20754         (riscv_set_current_function): New.
20755         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20756         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20757         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20758         * doc/extend.texi (RISC-V Function Attributes): New.
20760 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20762         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20763         check for 128-bit long double before checking TCmode.
20764         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20765         128-bit long doubles before checking TFmode or TCmode.
20766         (FLOAT128_IBM_P): Likewise.
20768 2018-01-10  Martin Sebor  <msebor@redhat.com>
20770         PR tree-optimization/83671
20771         * builtins.c (c_strlen): Unconditionally return zero for the empty
20772         string.
20773         Use -Warray-bounds for warnings.
20774         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20775         for non-constant array indices with COMPONENT_REF, arrays of
20776         arrays, and pointers to arrays.
20777         (gimple_fold_builtin_strlen): Determine and set length range for
20778         non-constant character arrays.
20780 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20782         PR middle-end/81897
20783         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20784         empty blocks.
20786 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20788         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20790 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20792         PR target/83399
20793         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20794         VECTOR_MEM_ALTIVEC_OR_VSX_P.
20795         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20796         indexed_or_indirect_operand predicate.
20797         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20798         (*vsx_le_perm_load_v8hi): Likewise.
20799         (*vsx_le_perm_load_v16qi): Likewise.
20800         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20801         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20802         (*vsx_le_perm_store_v8hi): Likewise.
20803         (*vsx_le_perm_store_v16qi): Likewise.
20804         (eight unnamed splitters): Likewise.
20806 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20808         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20809         * config/rs6000/emmintrin.h: Likewise.
20810         * config/rs6000/mmintrin.h: Likewise.
20811         * config/rs6000/xmmintrin.h: Likewise.
20813 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
20815         PR c++/43486
20816         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20817         "public_flag".
20818         * tree.c (tree_nop_conversion): Return true for location wrapper
20819         nodes.
20820         (maybe_wrap_with_location): New function.
20821         (selftest::check_strip_nops): New function.
20822         (selftest::test_location_wrappers): New function.
20823         (selftest::tree_c_tests): Call it.
20824         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20825         (maybe_wrap_with_location): New decl.
20826         (EXPR_LOCATION_WRAPPER_P): New macro.
20827         (location_wrapper_p): New inline function.
20828         (tree_strip_any_location_wrapper): New inline function.
20830 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
20832         PR target/83735
20833         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20834         stack_realign_offset for the largest alignment of stack slot
20835         actually used.
20836         (ix86_find_max_used_stack_alignment): New function.
20837         (ix86_finalize_stack_frame_flags): Use it.  Set
20838         max_used_stack_alignment if we don't realign stack.
20839         * config/i386/i386.h (machine_function): Add
20840         max_used_stack_alignment.
20842 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
20844         * config/arm/arm.opt (-mbranch-cost): New option.
20845         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20846         account.
20848 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
20850         PR target/83629
20851         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20852         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20854 2018-01-10  Richard Biener  <rguenther@suse.de>
20856         PR debug/83765
20857         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20858         early out so it also covers the case where we have a non-NULL
20859         origin.
20861 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20863         PR tree-optimization/83753
20864         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20865         for non-strided grouped accesses if the number of elements is 1.
20867 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20869         PR target/81616
20870         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20871         * i386.h (TARGET_USE_GATHER): Define.
20872         * x86-tune.def (X86_TUNE_USE_GATHER): New.
20874 2018-01-10  Martin Liska  <mliska@suse.cz>
20876         PR bootstrap/82831
20877         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20878         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20879         partitioning.
20880         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20881         CLEANUP_NO_PARTITIONING is not set.
20883 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20885         * doc/rtl.texi: Remove documentation of (const ...) wrappers
20886         for vectors, as a partial revert of r254296.
20887         * rtl.h (const_vec_p): Delete.
20888         (const_vec_duplicate_p): Don't test for vector CONSTs.
20889         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20890         * expmed.c (make_tree): Likewise.
20892         Revert:
20893         * common.md (E, F): Use CONSTANT_P instead of checking for
20894         CONST_VECTOR.
20895         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20896         checking for CONST_VECTOR.
20898 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20900         PR middle-end/83575
20901         * predict.c (force_edge_cold): Handle in more sane way edges
20902         with no prediction.
20904 2018-01-09  Carl Love  <cel@us.ibm.com>
20906         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20907         V4SI, V4SF types.
20908         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20909         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20910         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20911         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
20912         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20913         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
20914         * config/rs6000/rs6000-protos.h: Add extern defition for
20915         rs6000_generate_float2_double_code.
20916         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20917         function.
20918         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20919         (float2_v2df): Add define_expand.
20921 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
20923         PR target/83628
20924         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20925         op_mode in the force_to_mode call.
20927 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20929         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20930         instead of checking each element individually.
20931         (aarch64_evpc_uzp): Likewise.
20932         (aarch64_evpc_zip): Likewise.
20933         (aarch64_evpc_ext): Likewise.
20934         (aarch64_evpc_rev): Likewise.
20935         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20936         instead of checking each element individually.  Return true without
20937         generating rtl if
20938         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20939         whether all selected elements come from the same input, instead of
20940         checking each element individually.  Remove calls to gen_rtx_REG,
20941         start_sequence and end_sequence and instead assert that no rtl is
20942         generated.
20944 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20946         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20947         order of HIGH and CONST checks.
20949 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20951         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20952         if the destination isn't an SSA_NAME.
20954 2018-01-09  Richard Biener  <rguenther@suse.de>
20956         PR tree-optimization/83668
20957         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20958         move prologue...
20959         (canonicalize_loop_form): ... here, renamed from ...
20960         (canonicalize_loop_closed_ssa_form): ... this and amended to
20961         swap successor edges for loop exit blocks to make us use
20962         the RPO order we need for initial schedule generation.
20964 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
20966         PR tree-optimization/64811
20967         * match.pd: When optimizing comparisons with Inf, avoid
20968         introducing or losing exceptions from comparisons with NaN.
20970 2018-01-09  Martin Liska  <mliska@suse.cz>
20972         PR sanitizer/82517
20973         * asan.c (shadow_mem_size): Add gcc_assert.
20975 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
20977         Don't save registers in main().
20979         PR target/83738
20980         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20981         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20982         * config/avr/avr.c (avr_set_current_function): Don't error if
20983         naked, OS_task or OS_main are specified at the same time.
20984         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20985         OS_main.
20986         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20987         attribute.
20988         * common/config/avr/avr-common.c (avr_option_optimization_table):
20989         Switch on -mmain-is-OS_task for optimizing compilations.
20991 2018-01-09  Richard Biener  <rguenther@suse.de>
20993         PR tree-optimization/83572
20994         * graphite.c: Include cfganal.h.
20995         (graphite_transform_loops): Connect infinite loops to exit
20996         and remove fake edges at the end.
20998 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21000         * ipa-inline.c (edge_badness): Revert accidental checkin.
21002 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21004         PR ipa/80763
21005         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21006         symbols; not inline clones.
21008 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21010         PR target/83507
21011         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21012         hard registers.  Formatting fixes.
21014         PR preprocessor/83722
21015         * gcc.c (try_generate_repro): Pass
21016         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21017         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21018         do_report_bug.
21020 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21021             Kito Cheng  <kito.cheng@gmail.com>
21023         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21024         (riscv_leaf_function_p): Delete.
21025         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21027 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21029         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21030         function.
21031         (do_ifelse): New function.
21032         (do_isel): New function.
21033         (do_sub3): New function.
21034         (do_add3): New function.
21035         (do_load_mask_compare): New function.
21036         (do_overlap_load_compare): New function.
21037         (expand_compare_loop): New function.
21038         (expand_block_compare): Call expand_compare_loop() when appropriate.
21039         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21040         option description.
21041         (-mblock-compare-inline-loop-limit): New option.
21043 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21045         PR target/83677
21046         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21047         Reverse order of second and third operands in first alternative.
21048         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21049         of first and second elements in UNSPEC_VPERMR vector.
21050         (altivec_expand_vec_perm_le): Likewise.
21052 2018-01-08  Jeff Law  <law@redhat.com>
21054         PR rtl-optimizatin/81308
21055         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21056         (process_switch): If group_case_labels makes a change, then set
21057         cfg_altered.
21058         (pass_convert_switch::execute): If a switch is converted, then
21059         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21061         PR rtl-optimization/81308
21062         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21063         splitting insns.
21065 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21067         PR target/83663 - Revert r255946
21068         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21069         generation for cases where splatting a value is not useful.
21070         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21071         across a vec_duplicate and a paradoxical subreg forming a vector
21072         mode to a vec_concat.
21074 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21076         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21077         -march=armv8.3-a variants.
21078         * config/arm/t-multilib: Likewise.
21079         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21081 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21083         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21084         to generate rtl.
21085         (cceq_ior_compare_complement): Give it a name so I can use it, and
21086         change boolean_or_operator predicate to boolean_operator so it can
21087         be used to generate a crand.
21088         (eqne): New code iterator.
21089         (bd/bd_neg): New code_attrs.
21090         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21091         a single define_insn.
21092         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21093         decrement (bdnzt/bdnzf/bdzt/bdzf).
21094         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21095         with the new names of the branch decrement patterns, and added the
21096         names of the branch decrement conditional patterns.
21098 2018-01-08  Richard Biener  <rguenther@suse.de>
21100         PR tree-optimization/83563
21101         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21102         cache.
21104 2018-01-08  Richard Biener  <rguenther@suse.de>
21106         PR middle-end/83713
21107         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21109 2018-01-08  Richard Biener  <rguenther@suse.de>
21111         PR tree-optimization/83685
21112         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21113         references to abnormals.
21115 2018-01-08  Richard Biener  <rguenther@suse.de>
21117         PR lto/83719
21118         * dwarf2out.c (output_indirect_strings): Handle empty
21119         skeleton_debug_str_hash.
21120         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21122 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21124         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21125         (emit_store_direct): Likewise.
21126         (arc_trampoline_adjust_address): Likewise.
21127         (arc_asm_trampoline_template): New function.
21128         (arc_initialize_trampoline): Use asm_trampoline_template.
21129         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21130         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21131         * config/arc/arc.md (flush_icache): Delete pattern.
21133 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21135         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21136         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21137         munaligned-access.
21139 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21141         PR target/83681
21142         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21143         by not USED_FOR_TARGET.
21144         (make_pass_resolve_sw_modes): Likewise.
21146 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21148         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21149         USED_FOR_TARGET.
21151 2018-01-08  Richard Biener  <rguenther@suse.de>
21153         PR middle-end/83580
21154         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21156 2018-01-08  Richard Biener  <rguenther@suse.de>
21158         PR middle-end/83517
21159         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21161 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21163         PR middle-end/81897
21164         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21165         basic blocks with a small number of successors.
21166         (convert_control_dep_chain_into_preds): Improve handling of
21167         forwarder blocks.
21168         (dump_predicates): Split apart into...
21169         (dump_pred_chain): ...here...
21170         (dump_pred_info): ...and here.
21171         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21172         (can_chain_union_be_invalidated_p): Improve check for invalidation
21173         of paths.
21174         (uninit_uses_cannot_happen): Avoid unnecessary if
21175         convert_control_dep_chain_into_preds yielded nothing.
21177 2018-01-06  Martin Sebor  <msebor@redhat.com>
21179         PR tree-optimization/83640
21180         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21181         subtracting negative offset from size.
21182         (builtin_access::overlap): Adjust offset bounds of the access to fall
21183         within the size of the object if possible.
21185 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21187         PR rtl-optimization/83699
21188         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21189         extract_bit_field_as_subreg to cases in which the extracted
21190         value is also a vector.
21192         * lra-constraints.c (process_alt_operands): Test for the equivalence
21193         substitutions when detecting a possible reload cycle.
21195 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21197         PR debug/83480
21198         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21199         by default if flag_selective_schedling{,2}.  Formatting fixes.
21201         PR rtl-optimization/83682
21202         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21203         if it has non-VECTOR_MODE element mode.
21204         (vec_duplicate_p): Likewise.
21206         PR middle-end/83694
21207         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21208         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21210 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21212         PR target/83604
21213         * config/i386/i386-builtin.def
21214         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21215         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21216         Require also OPTION_MASK_ISA_AVX512F in addition to
21217         OPTION_MASK_ISA_GFNI.
21218         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21219         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21220         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21221         to OPTION_MASK_ISA_GFNI.
21222         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21223         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21224         OPTION_MASK_ISA_AVX512BW.
21225         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21226         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21227         addition to OPTION_MASK_ISA_GFNI.
21228         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21229         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21230         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21231         to OPTION_MASK_ISA_GFNI.
21232         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21233         a requirement for all ISAs rather than any of them with a few
21234         exceptions.
21235         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21236         processing.
21237         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21238         bitmasks to be enabled with 3 exceptions, instead of requiring any
21239         enabled ISA with lots of exceptions.
21240         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21241         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21242         Change avx512bw in isa attribute to avx512f.
21243         * config/i386/sgxintrin.h: Add license boilerplate.
21244         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21245         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21246         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21247         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21248         defined.
21249         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21250         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21251         temporarily sse2 rather than sse if not enabled already.
21253         PR target/83604
21254         * config/i386/sse.md (VI248_VLBW): Rename to ...
21255         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21256         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21257         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21258         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21259         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21260         mode iterator instead of VI248_VLBW.
21262 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21264         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21265         (record_modified): Skip clobbers; add debug output.
21266         (param_change_prob): Use sreal frequencies.
21268 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21270         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21271         punt for user-aligned variables.
21273 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21275         * tree-chrec.c (chrec_contains_symbols): Return true for
21276         POLY_INT_CST.
21278 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21280         PR target/82439
21281         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21282         of (x|y) == x for BICS pattern.
21284 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21286         PR tree-optimization/83605
21287         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21288         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21289         can throw.
21291 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21293         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21294         * config/epiphany/rtems.h: New file.
21296 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21297             Uros Bizjak  <ubizjak@gmail.com>
21299         PR target/83554
21300         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21301         QIreg_operand instead of register_operand predicate.
21302         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21303         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21304         comments instead of -fmitigate[-_]rop.
21306 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21308         PR bootstrap/81926
21309         * cgraphunit.c (symbol_table::compile): Switch to text_section
21310         before calling assembly_start debug hook.
21311         * run-rtl-passes.c (run_rtl_passes): Likewise.
21312         Include output.h.
21314 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21316         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21317         range_int_cst_p rather than !symbolic_range_p before calling
21318         extract_range_from_multiplicative_op_1.
21320 2018-01-04  Jeff Law  <law@redhat.com>
21322         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21323         redundant test in assertion.
21325 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21327         * doc/rtl.texi: Document machine_mode wrapper classes.
21329 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21331         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21332         using tree_to_uhwi.
21334 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21336         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21337         the VEC_PERM_EXPR fold to fail.
21339 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21341         PR debug/83585
21342         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21343         to switched_sections.
21345 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21347         PR target/83680
21348         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21349         test for d.testing.
21351 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21353         PR target/83387
21354         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21355         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21357 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21359         PR debug/83666
21360         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21361         is BLKmode and bitpos not zero or mode change is needed.
21363 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21365         PR target/83675
21366         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21367         TARGET_VIS2.
21369 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21371         PR target/83628
21372         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21373         instead of MULT rtx.  Update all corresponding splitters.
21374         (*saddl_se): Ditto.
21375         (*ssub<modesuffix>): Ditto.
21376         (*ssubl_se): Ditto.
21377         (*cmp_sadd_di): Update split patterns.
21378         (*cmp_sadd_si): Ditto.
21379         (*cmp_sadd_sidi): Ditto.
21380         (*cmp_ssub_di): Ditto.
21381         (*cmp_ssub_si): Ditto.
21382         (*cmp_ssub_sidi): Ditto.
21383         * config/alpha/predicates.md (const23_operand): New predicate.
21384         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21385         Look for ASHIFT, not MULT inner operand.
21386         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21388 2018-01-04  Martin Liska  <mliska@suse.cz>
21390         PR gcov-profile/83669
21391         * gcov.c (output_intermediate_file): Add version to intermediate
21392         gcov file.
21393         * doc/gcov.texi: Document new field 'version' in intermediate
21394         file format. Fix location of '-k' option of gcov command.
21396 2018-01-04  Martin Liska  <mliska@suse.cz>
21398         PR ipa/82352
21399         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21401 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21403         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21405 2018-01-03  Martin Sebor  <msebor@redhat.com>
21407         PR tree-optimization/83655
21408         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21409         checking calls with invalid arguments.
21411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21413         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21414         (vectorizable_mask_load_store): Delete.
21415         (vectorizable_call): Return false for masked loads and stores.
21416         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21417         instead of gimple_assign_rhs1.
21418         (vectorizable_load): Handle IFN_MASK_LOAD.
21419         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21423         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21424         split out from..,
21425         (vectorizable_mask_load_store): ...here.
21426         (vectorizable_load): ...and here.
21428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21430         * tree-vect-stmts.c (vect_build_all_ones_mask)
21431         (vect_build_zero_merge_argument): New functions, split out from...
21432         (vectorizable_load): ...here.
21434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21436         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21437         split out from...
21438         (vectorizable_mask_load_store): ...here.
21439         (vectorizable_store): ...and here.
21441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21443         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21444         split out from...
21445         (vectorizable_mask_load_store): ...here.
21447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21449         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21450         (vect_model_store_cost): Take a vec_load_store_type instead of a
21451         vect_def_type.
21452         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21453         (vect_model_store_cost): Take a vec_load_store_type instead of a
21454         vect_def_type.
21455         (vectorizable_mask_load_store): Update accordingly.
21456         (vectorizable_store): Likewise.
21457         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21461         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21462         IFN_MASK_LOAD calls here rather than...
21463         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21465 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21466             Alan Hayward  <alan.hayward@arm.com>
21467             David Sherwood  <david.sherwood@arm.com>
21469         * expmed.c (extract_bit_field_1): For vector extracts,
21470         fall back to extract_bit_field_as_subreg if vec_extract
21471         isn't available.
21473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21474             Alan Hayward  <alan.hayward@arm.com>
21475             David Sherwood  <david.sherwood@arm.com>
21477         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21478         they are variable or constant sized.
21479         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21480         slots for constant-sized data.
21482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21483             Alan Hayward  <alan.hayward@arm.com>
21484             David Sherwood  <david.sherwood@arm.com>
21486         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21487         handling COND_EXPRs with boolean comparisons, try to find a better
21488         basis for the mask type than the boolean itself.
21490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21492         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21493         is calculated and how it can be overridden.
21494         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21495         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21496         if defined.
21497         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21498         if nonzero.
21500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21501             Alan Hayward  <alan.hayward@arm.com>
21502             David Sherwood  <david.sherwood@arm.com>
21504         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21505         Remove the mode argument.
21506         (aarch64_simd_valid_immediate): Remove the mode and inverse
21507         arguments.
21508         * config/aarch64/iterators.md (bitsize): New iterator.
21509         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21510         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21511         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21512         aarch64_simd_valid_immediate.
21513         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21514         (aarch64_reg_or_bic_imm): Likewise.
21515         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21516         with an insn_type enum and msl with a modifier_type enum.
21517         Replace element_width with a scalar_mode.  Change the shift
21518         to unsigned int.  Add constructors for scalar_float_mode and
21519         scalar_int_mode elements.
21520         (aarch64_vect_float_const_representable_p): Delete.
21521         (aarch64_can_const_movi_rtx_p)
21522         (aarch64_simd_scalar_immediate_valid_for_move)
21523         (aarch64_simd_make_constant): Update call to
21524         aarch64_simd_valid_immediate.
21525         (aarch64_advsimd_valid_immediate_hs): New function.
21526         (aarch64_advsimd_valid_immediate): Likewise.
21527         (aarch64_simd_valid_immediate): Remove mode and inverse
21528         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21529         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21530         and aarch64_float_const_representable_p on the result.
21531         (aarch64_output_simd_mov_immediate): Remove mode argument.
21532         Update call to aarch64_simd_valid_immediate and use of
21533         simd_immediate_info.
21534         (aarch64_output_scalar_simd_mov_immediate): Update call
21535         accordingly.
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         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21542         (mode_nunits): Likewise CONST_MODE_NUNITS.
21543         * machmode.def (ADJUST_NUNITS): Document.
21544         * genmodes.c (mode_data::need_nunits_adj): New field.
21545         (blank_mode): Update accordingly.
21546         (adj_nunits): New variable.
21547         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21548         parameter.
21549         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21550         listed in adj_nunits.
21551         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21552         listed in adj_nunits.  Don't emit case statements for such modes.
21553         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21554         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21555         nothing if adj_nunits is nonnull.
21556         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21557         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21558         (emit_mode_fbit): Update use of print_maybe_const_decl.
21559         (emit_move_size): Likewise.  Treat the array as non-const
21560         if adj_nunits.
21561         (emit_mode_adjustments): Handle adj_nunits.
21563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21565         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21566         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21567         (VECTOR_MODES): Use it.
21568         (make_vector_modes): Take the prefix as an argument.
21570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21571             Alan Hayward  <alan.hayward@arm.com>
21572             David Sherwood  <david.sherwood@arm.com>
21574         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21575         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21576         for MODE_VECTOR_BOOL.
21577         * machmode.def (VECTOR_BOOL_MODE): Document.
21578         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21579         (make_vector_bool_mode): New function.
21580         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21581         MODE_VECTOR_BOOL.
21582         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21583         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21584         Likewise.
21585         * stor-layout.c (int_mode_for_mode): Likewise.
21586         * tree.c (build_vector_type_for_mode): Likewise.
21587         * varasm.c (output_constant_pool_2): Likewise.
21588         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21589         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21590         for MODE_VECTOR_BOOL.
21591         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21592         of mode class checks.
21593         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21594         instead of a list of mode class checks.
21595         (expand_vector_scalar_condition): Likewise.
21596         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21599             Alan Hayward  <alan.hayward@arm.com>
21600             David Sherwood  <david.sherwood@arm.com>
21602         * machmode.h (mode_size): Change from unsigned short to
21603         poly_uint16_pod.
21604         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21605         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21606         or if measurement_type is not polynomial.
21607         (fixed_size_mode::includes_p): Check for constant-sized modes.
21608         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21609         return a poly_uint16 rather than an unsigned short.
21610         (emit_mode_size): Change the type of mode_size from unsigned short
21611         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21612         (emit_mode_adjustments): Cope with polynomial vector sizes.
21613         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21614         for GET_MODE_SIZE.
21615         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21616         for GET_MODE_SIZE.
21617         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21618         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21619         * caller-save.c (setup_save_areas): Likewise.
21620         (replace_reg_with_saved_mem): Likewise.
21621         * calls.c (emit_library_call_value_1): Likewise.
21622         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21623         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21624         (gen_lowpart_for_combine): Likewise.
21625         * convert.c (convert_to_integer_1): Likewise.
21626         * cse.c (equiv_constant, cse_insn): Likewise.
21627         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21628         (cselib_subst_to_values): Likewise.
21629         * dce.c (word_dce_process_block): Likewise.
21630         * df-problems.c (df_word_lr_mark_ref): Likewise.
21631         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21632         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21633         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21634         (rtl_for_decl_location): Likewise.
21635         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21636         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21637         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21638         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21639         (expand_expr_real_1): Likewise.
21640         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21641         (pad_below): Likewise.
21642         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21643         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21644         * ira.c (get_subreg_tracking_sizes): Likewise.
21645         * ira-build.c (ira_create_allocno_objects): Likewise.
21646         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21647         (ira_sort_regnos_for_alter_reg): Likewise.
21648         * ira-costs.c (record_operand_costs): Likewise.
21649         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21650         (resolve_simple_move): Likewise.
21651         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21652         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21653         (lra_constraints): Likewise.
21654         (CONST_POOL_OK_P): Reject variable-sized modes.
21655         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21656         (add_pseudo_to_slot, lra_spill): Likewise.
21657         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21658         * optabs-query.c (get_best_extraction_insn): Likewise.
21659         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21660         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21661         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21662         * recog.c (offsettable_address_addr_space_p): Likewise.
21663         * regcprop.c (maybe_mode_change): Likewise.
21664         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21665         * regrename.c (build_def_use): Likewise.
21666         * regstat.c (dump_reg_info): Likewise.
21667         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21668         (find_reloads, find_reloads_subreg_address): Likewise.
21669         * reload1.c (eliminate_regs_1): Likewise.
21670         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21671         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21672         (simplify_binary_operation_1, simplify_subreg): Likewise.
21673         * targhooks.c (default_function_arg_padding): Likewise.
21674         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21675         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21676         (verify_gimple_assign_ternary): Likewise.
21677         * tree-inline.c (estimate_move_cost): Likewise.
21678         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21679         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21680         (get_address_cost_ainc): Likewise.
21681         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21682         (vect_supportable_dr_alignment): Likewise.
21683         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21684         (vectorizable_reduction): Likewise.
21685         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21686         (vectorizable_operation, vectorizable_load): Likewise.
21687         * tree.c (build_same_sized_truth_vector_type): Likewise.
21688         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21689         * var-tracking.c (emit_note_insn_var_location): Likewise.
21690         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21691         (ADDR_VEC_ALIGN): Likewise.
21693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21694             Alan Hayward  <alan.hayward@arm.com>
21695             David Sherwood  <david.sherwood@arm.com>
21697         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21698         unsigned short.
21699         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21700         or if measurement_type is polynomial.
21701         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21702         * combine.c (make_extraction): Likewise.
21703         * dse.c (find_shift_sequence): Likewise.
21704         * dwarf2out.c (mem_loc_descriptor): Likewise.
21705         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21706         (extract_bit_field, extract_low_bits): Likewise.
21707         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21708         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21709         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21710         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21711         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21712         * reload.c (find_reloads): Likewise.
21713         * reload1.c (alter_reg): Likewise.
21714         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21715         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21716         * tree-if-conv.c (predicate_mem_writes): Likewise.
21717         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21718         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21719         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21720         * valtrack.c (dead_debug_insert_temp): Likewise.
21721         * varasm.c (mergeable_constant_section): Likewise.
21722         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21724 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21725             Alan Hayward  <alan.hayward@arm.com>
21726             David Sherwood  <david.sherwood@arm.com>
21728         * expr.c (expand_assignment): Cope with polynomial mode sizes
21729         when assigning to a CONCAT.
21731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21732             Alan Hayward  <alan.hayward@arm.com>
21733             David Sherwood  <david.sherwood@arm.com>
21735         * machmode.h (mode_precision): Change from unsigned short to
21736         poly_uint16_pod.
21737         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21738         short.
21739         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21740         or if measurement_type is not polynomial.
21741         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21742         in which the mode is already known to be a scalar_int_mode.
21743         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21744         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21745         initializer.
21746         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21747         for GET_MODE_PRECISION.
21748         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21749         for GET_MODE_PRECISION.
21750         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21751         as polynomial.
21752         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21753         (expand_field_assignment, make_extraction): Likewise.
21754         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21755         (get_last_value): Likewise.
21756         * convert.c (convert_to_integer_1): Likewise.
21757         * cse.c (cse_insn): Likewise.
21758         * expr.c (expand_expr_real_1): Likewise.
21759         * lra-constraints.c (simplify_operand_subreg): Likewise.
21760         * optabs-query.c (can_atomic_load_p): Likewise.
21761         * optabs.c (expand_atomic_load): Likewise.
21762         (expand_atomic_store): Likewise.
21763         * ree.c (combine_reaching_defs): Likewise.
21764         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21765         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21766         * tree.h (type_has_mode_precision_p): Likewise.
21767         * ubsan.c (instrument_si_overflow): Likewise.
21769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21770             Alan Hayward  <alan.hayward@arm.com>
21771             David Sherwood  <david.sherwood@arm.com>
21773         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21774         polynomial numbers of units.
21775         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21776         (valid_vector_subparts_p): New function.
21777         (build_vector_type): Remove temporary shim and take the number
21778         of units as a poly_uint64 rather than an int.
21779         (build_opaque_vector_type): Take the number of units as a
21780         poly_uint64 rather than an int.
21781         * tree.c (build_vector_from_ctor): Handle polynomial
21782         TYPE_VECTOR_SUBPARTS.
21783         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21784         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21785         (build_vector_from_val): If the number of units is variable,
21786         use build_vec_duplicate_cst for constant operands and
21787         VEC_DUPLICATE_EXPR otherwise.
21788         (make_vector_type): Remove temporary is_constant ().
21789         (build_vector_type, build_opaque_vector_type): Take the number of
21790         units as a poly_uint64 rather than an int.
21791         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21792         VECTOR_CST_NELTS.
21793         * cfgexpand.c (expand_debug_expr): Likewise.
21794         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21795         (store_constructor, expand_expr_real_1): Likewise.
21796         (const_scalar_mask_from_tree): Likewise.
21797         * fold-const-call.c (fold_const_reduction): Likewise.
21798         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21799         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21800         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21801         (fold_relational_const): Likewise.
21802         (native_interpret_vector): Likewise.  Change the size from an
21803         int to an unsigned int.
21804         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21805         TYPE_VECTOR_SUBPARTS.
21806         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21807         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21808         duplicating a non-constant operand into a variable-length vector.
21809         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21810         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21811         * ipa-icf.c (sem_variable::equals): Likewise.
21812         * match.pd: Likewise.
21813         * omp-simd-clone.c (simd_clone_subparts): Likewise.
21814         * print-tree.c (print_node): Likewise.
21815         * stor-layout.c (layout_type): Likewise.
21816         * targhooks.c (default_builtin_vectorization_cost): Likewise.
21817         * tree-cfg.c (verify_gimple_comparison): Likewise.
21818         (verify_gimple_assign_binary): Likewise.
21819         (verify_gimple_assign_ternary): Likewise.
21820         (verify_gimple_assign_single): Likewise.
21821         * tree-pretty-print.c (dump_generic_node): Likewise.
21822         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21823         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21824         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21825         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21826         (vect_shift_permute_load_chain): Likewise.
21827         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21828         (expand_vector_condition, optimize_vector_constructor): Likewise.
21829         (lower_vec_perm, get_compute_type): Likewise.
21830         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21831         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21832         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21833         (vect_recog_mask_conversion_pattern): Likewise.
21834         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21835         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21836         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21837         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21838         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21839         (vectorizable_shift, vectorizable_operation, vectorizable_store)
21840         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21841         (supportable_widening_operation): Likewise.
21842         (supportable_narrowing_operation): Likewise.
21843         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21844         Likewise.
21845         * varasm.c (output_constant): Likewise.
21847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21848             Alan Hayward  <alan.hayward@arm.com>
21849             David Sherwood  <david.sherwood@arm.com>
21851         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21852         so that both the length == 3 and length != 3 cases set up their
21853         own permute vectors.  Add comments explaining why we know the
21854         number of elements is constant.
21855         (vect_permute_load_chain): Likewise.
21857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21858             Alan Hayward  <alan.hayward@arm.com>
21859             David Sherwood  <david.sherwood@arm.com>
21861         * machmode.h (mode_nunits): Change from unsigned char to
21862         poly_uint16_pod.
21863         (ONLY_FIXED_SIZE_MODES): New macro.
21864         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21865         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21866         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21867         New typedefs.
21868         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21869         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21870         or if measurement_type is not polynomial.
21871         * genmodes.c (ZERO_COEFFS): New macro.
21872         (emit_mode_nunits_inline): Make mode_nunits_inline return a
21873         poly_uint16.
21874         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21875         Use ZERO_COEFFS when emitting initializers.
21876         * data-streamer.h (bp_pack_poly_value): New function.
21877         (bp_unpack_poly_value): Likewise.
21878         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21879         for GET_MODE_NUNITS.
21880         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21881         for GET_MODE_NUNITS.
21882         * tree.c (make_vector_type): Remove temporary shim and make
21883         the real function take the number of units as a poly_uint64
21884         rather than an int.
21885         (build_vector_type_for_mode): Handle polynomial nunits.
21886         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21887         * emit-rtl.c (const_vec_series_p_1): Likewise.
21888         (gen_rtx_CONST_VECTOR): Likewise.
21889         * fold-const.c (test_vec_duplicate_folding): Likewise.
21890         * genrecog.c (validate_pattern): Likewise.
21891         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21892         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21893         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21894         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21895         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21896         * rtlanal.c (subreg_get_info): Likewise.
21897         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21898         (vect_grouped_load_supported): Likewise.
21899         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21900         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21901         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21902         (simplify_const_unary_operation, simplify_binary_operation_1)
21903         (simplify_const_binary_operation, simplify_ternary_operation)
21904         (test_vector_ops_duplicate, test_vector_ops): Likewise.
21905         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21906         instead of CONST_VECTOR_NUNITS.
21907         * varasm.c (output_constant_pool_2): Likewise.
21908         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21909         explicit-encoded elements in the XVEC for variable-length vectors.
21911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21913         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21916             Alan Hayward  <alan.hayward@arm.com>
21917             David Sherwood  <david.sherwood@arm.com>
21919         * coretypes.h (fixed_size_mode): Declare.
21920         (fixed_size_mode_pod): New typedef.
21921         * builtins.h (target_builtins::x_apply_args_mode)
21922         (target_builtins::x_apply_result_mode): Change type to
21923         fixed_size_mode_pod.
21924         * builtins.c (apply_args_size, apply_result_size, result_vector)
21925         (expand_builtin_apply_args_1, expand_builtin_apply)
21926         (expand_builtin_return): Update accordingly.
21928 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21930         * cse.c (hash_rtx_cb): Hash only the encoded elements.
21931         * cselib.c (cselib_hash_rtx): Likewise.
21932         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21933         CONST_VECTOR encoding.
21935 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21936             Jeff Law  <law@redhat.com>
21938         PR target/83641
21939         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21940         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21941         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21942         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21944         PR target/83641
21945         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21946         explicitly probe *sp in a noreturn function if there were any callee
21947         register saves or frame pointer is needed.
21949 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21951         PR debug/83621
21952         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21953         BLKmode for ternary, binary or unary expressions.
21955         PR debug/83645
21956         * var-tracking.c (delete_vta_debug_insn): New inline function.
21957         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21958         insns from get_insns () to NULL instead of each bb separately.
21959         Use delete_vta_debug_insn.  No longer static.
21960         (vt_debug_insns_local, variable_tracking_main_1): Adjust
21961         delete_vta_debug_insns callers.
21962         * rtl.h (delete_vta_debug_insns): Declare.
21963         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21964         instead of variable_tracking_main.
21966 2018-01-03  Martin Sebor  <msebor@redhat.com>
21968         PR tree-optimization/83603
21969         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21970         arguments past the endof the argument list in functions declared
21971         without a prototype.
21972         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21973         Avoid checking when arguments are null.
21975 2018-01-03  Martin Sebor  <msebor@redhat.com>
21977         PR c/83559
21978         * doc/extend.texi (attribute const): Fix a typo.
21979         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21980         issuing -Wsuggest-attribute for void functions.
21982 2018-01-03  Martin Sebor  <msebor@redhat.com>
21984         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21985         offset_int::from instead of wide_int::to_shwi.
21986         (maybe_diag_overlap): Remove assertion.
21987         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21988         * gimple-ssa-sprintf.c (format_directive): Same.
21989         (parse_directive): Same.
21990         (sprintf_dom_walker::compute_format_length): Same.
21991         (try_substitute_return_value): Same.
21993 2018-01-03  Jeff Law  <law@redhat.com>
21995         PR middle-end/83654
21996         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21997         non-constant residual for zero at runtime and avoid probing in
21998         that case.  Reorganize code for trailing problem to mirror handling
21999         of the residual.
22001 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22003         PR tree-optimization/83501
22004         * tree-ssa-strlen.c (get_string_cst): New.
22005         (handle_char_store): Call get_string_cst.
22007 2018-01-03  Martin Liska  <mliska@suse.cz>
22009         PR tree-optimization/83593
22010         * tree-ssa-strlen.c: Include tree-cfg.h.
22011         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22012         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22013         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22014         to false.
22015         (strlen_dom_walker::before_dom_children): Call
22016         gimple_purge_dead_eh_edges. Dump tranformation with details
22017         dump flags.
22018         (strlen_dom_walker::before_dom_children): Update call by adding
22019         new argument cleanup_eh.
22020         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22022 2018-01-03  Martin Liska  <mliska@suse.cz>
22024         PR ipa/83549
22025         * cif-code.def (VARIADIC_THUNK): New enum value.
22026         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22027         thunks.
22029 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22031         * sse.md (mov<mode>_internal): Tighten condition for when to use
22032         vmovdqu<ssescalarsize> for TI and OI modes.
22034 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22036         Update copyright years.
22038 2018-01-03  Martin Liska  <mliska@suse.cz>
22040         PR ipa/83594
22041         * ipa-visibility.c (function_and_variable_visibility): Skip
22042         functions with noipa attribure.
22044 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22046         * gcc.c (process_command): Update copyright notice dates.
22047         * gcov-dump.c (print_version): Ditto.
22048         * gcov.c (print_version): Ditto.
22049         * gcov-tool.c (print_version): Ditto.
22050         * gengtype.c (create_file): Ditto.
22051         * doc/cpp.texi: Bump @copying's copyright year.
22052         * doc/cppinternals.texi: Ditto.
22053         * doc/gcc.texi: Ditto.
22054         * doc/gccint.texi: Ditto.
22055         * doc/gcov.texi: Ditto.
22056         * doc/install.texi: Ditto.
22057         * doc/invoke.texi: Ditto.
22059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22061         * vector-builder.h (vector_builder::m_full_nelts): Change from
22062         unsigned int to poly_uint64.
22063         (vector_builder::full_nelts): Update prototype accordingly.
22064         (vector_builder::new_vector): Likewise.
22065         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22066         (vector_builder::operator ==): Likewise.
22067         (vector_builder::finalize): Likewise.
22068         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22069         Take the number of elements as a poly_uint64 rather than an
22070         unsigned int.
22071         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22072         from unsigned int to poly_uint64.
22073         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22074         (vec_perm_indices::new_vector): Likewise.
22075         (vec_perm_indices::length): Likewise.
22076         (vec_perm_indices::nelts_per_input): Likewise.
22077         (vec_perm_indices::input_nelts): Likewise.
22078         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22079         number of elements per input as a poly_uint64 rather than an
22080         unsigned int.  Use the original encoding for variable-length
22081         vectors, rather than clamping each individual element.
22082         For the second and subsequent elements in each pattern,
22083         clamp the step and base before clamping their sum.
22084         (vec_perm_indices::series_p): Handle polynomial element counts.
22085         (vec_perm_indices::all_in_range_p): Likewise.
22086         (vec_perm_indices_to_tree): Likewise.
22087         (vec_perm_indices_to_rtx): Likewise.
22088         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22089         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22090         (tree_vector_builder::new_binary_operation): Handle polynomial
22091         element counts.  Return false if we need to know the number
22092         of elements at compile time.
22093         * fold-const.c (fold_vec_perm): Punt if the number of elements
22094         isn't known at compile time.
22096 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22098         * vec-perm-indices.h (vec_perm_builder): Change element type
22099         from HOST_WIDE_INT to poly_int64.
22100         (vec_perm_indices::element_type): Update accordingly.
22101         (vec_perm_indices::clamp): Handle polynomial element_types.
22102         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22103         (vec_perm_indices::all_in_range_p): Likewise.
22104         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22105         than shwi trees.
22106         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22107         polynomial vec_perm_indices element types.
22108         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22109         * fold-const.c (fold_vec_perm): Likewise.
22110         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22111         * tree-vect-generic.c (lower_vec_perm): Likewise.
22112         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22113         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22114         element type to HOST_WIDE_INT.
22116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22117             Alan Hayward  <alan.hayward@arm.com>
22118             David Sherwood  <david.sherwood@arm.com>
22120         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22121         rather than an int.  Use plus_constant.
22122         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22123         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22126             Alan Hayward  <alan.hayward@arm.com>
22127             David Sherwood  <david.sherwood@arm.com>
22129         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22130         a HOST_WIDE_INT to a poly_int64.
22132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22133             Alan Hayward  <alan.hayward@arm.com>
22134             David Sherwood  <david.sherwood@arm.com>
22136         * calls.c (load_register_parameters): Cope with polynomial
22137         mode sizes.  Require a constant size for BLKmode parameters
22138         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22139         forces a parameter to be padded at the lsb end in order to
22140         fill a complete number of words, require the parameter size
22141         to be ordered wrt UNITS_PER_WORD.
22143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22144             Alan Hayward  <alan.hayward@arm.com>
22145             David Sherwood  <david.sherwood@arm.com>
22147         * reload1.c (spill_stack_slot_width): Change element type
22148         from unsigned int to poly_uint64_pod.
22149         (alter_reg): Treat mode sizes as polynomial.
22151 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22152             Alan Hayward  <alan.hayward@arm.com>
22153             David Sherwood  <david.sherwood@arm.com>
22155         * reload.c (complex_word_subreg_p): New function.
22156         (reload_inner_reg_of_subreg, push_reload): Use it.
22158 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22159             Alan Hayward  <alan.hayward@arm.com>
22160             David Sherwood  <david.sherwood@arm.com>
22162         * lra-constraints.c (process_alt_operands): Reject matched
22163         operands whose sizes aren't ordered.
22164         (match_reload): Refer to this check here.
22166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22167             Alan Hayward  <alan.hayward@arm.com>
22168             David Sherwood  <david.sherwood@arm.com>
22170         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22171         that the mode size is in the set {1, 2, 4, 8, 16}.
22173 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22174             Alan Hayward  <alan.hayward@arm.com>
22175             David Sherwood  <david.sherwood@arm.com>
22177         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22178         Use plus_constant instead of gen_rtx_PLUS.
22180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22181             Alan Hayward  <alan.hayward@arm.com>
22182             David Sherwood  <david.sherwood@arm.com>
22184         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22185         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22186         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22187         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22188         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22189         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22190         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22191         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22192         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22193         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22194         a poly_int64.
22195         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22196         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22197         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22198         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22199         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22200         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22201         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22202         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22203         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22204         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22205         function.
22206         * expr.c (emit_move_resolve_push): Treat the input and result
22207         of PUSH_ROUNDING as a poly_int64.
22208         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22209         (emit_push_insn): Likewise.
22210         * lra-eliminations.c (mark_not_eliminable): Likewise.
22211         * recog.c (push_operand): Likewise.
22212         * reload1.c (elimination_effects): Likewise.
22213         * rtlanal.c (nonzero_bits1): Likewise.
22214         * calls.c (store_one_arg): Likewise.  Require the padding to be
22215         known at compile time.
22217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22218             Alan Hayward  <alan.hayward@arm.com>
22219             David Sherwood  <david.sherwood@arm.com>
22221         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22222         Use plus_constant instead of gen_rtx_PLUS.
22224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22225             Alan Hayward  <alan.hayward@arm.com>
22226             David Sherwood  <david.sherwood@arm.com>
22228         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22229         rather than an int.
22231 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22232             Alan Hayward  <alan.hayward@arm.com>
22233             David Sherwood  <david.sherwood@arm.com>
22235         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22236         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22237         via stack temporaries.  Treat the mode size as polynomial too.
22239 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22240             Alan Hayward  <alan.hayward@arm.com>
22241             David Sherwood  <david.sherwood@arm.com>
22243         * expr.c (expand_expr_real_2): When handling conversions involving
22244         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22245         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22246         as a poly_uint64 too.
22248 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22249             Alan Hayward  <alan.hayward@arm.com>
22250             David Sherwood  <david.sherwood@arm.com>
22252         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22254 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22255             Alan Hayward  <alan.hayward@arm.com>
22256             David Sherwood  <david.sherwood@arm.com>
22258         * combine.c (can_change_dest_mode): Handle polynomial
22259         REGMODE_NATURAL_SIZE.
22260         * expmed.c (store_bit_field_1): Likewise.
22261         * expr.c (store_constructor): Likewise.
22262         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22263         and polynomial REGMODE_NATURAL_SIZE.
22264         (gen_lowpart_common): Likewise.
22265         * reginfo.c (record_subregs_of_mode): Likewise.
22266         * rtlanal.c (read_modify_subreg_p): Likewise.
22268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22269             Alan Hayward  <alan.hayward@arm.com>
22270             David Sherwood  <david.sherwood@arm.com>
22272         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22273         numbers of elements.
22275 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22276             Alan Hayward  <alan.hayward@arm.com>
22277             David Sherwood  <david.sherwood@arm.com>
22279         * match.pd: Cope with polynomial numbers of vector elements.
22281 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22282             Alan Hayward  <alan.hayward@arm.com>
22283             David Sherwood  <david.sherwood@arm.com>
22285         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22286         in a POINTER_PLUS_EXPR.
22288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22289             Alan Hayward  <alan.hayward@arm.com>
22290             David Sherwood  <david.sherwood@arm.com>
22292         * omp-simd-clone.c (simd_clone_subparts): New function.
22293         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22294         (ipa_simd_modify_function_body): Likewise.
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         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22301         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22302         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22303         (expand_vector_condition, vector_element): Likewise.
22304         (subparts_gt): New function.
22305         (get_compute_type): Use subparts_gt.
22306         (count_type_subparts): Delete.
22307         (expand_vector_operations_1): Use subparts_gt instead of
22308         count_type_subparts.
22310 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22311             Alan Hayward  <alan.hayward@arm.com>
22312             David Sherwood  <david.sherwood@arm.com>
22314         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22315         (vect_compile_time_alias): ...this new function.  Do the calculation
22316         on poly_ints rather than trees.
22317         (vect_prune_runtime_alias_test_list): Update call accordingly.
22319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22320             Alan Hayward  <alan.hayward@arm.com>
22321             David Sherwood  <david.sherwood@arm.com>
22323         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22324         numbers of units.
22325         (vect_schedule_slp_instance): Likewise.
22327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22328             Alan Hayward  <alan.hayward@arm.com>
22329             David Sherwood  <david.sherwood@arm.com>
22331         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22332         constant and extern definitions for variable-length vectors.
22333         (vect_get_constant_vectors): Note that the number of units
22334         is known to be constant.
22336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22337             Alan Hayward  <alan.hayward@arm.com>
22338             David Sherwood  <david.sherwood@arm.com>
22340         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22341         of units as polynomial.  Choose between WIDE and NARROW based
22342         on multiple_p.
22344 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22345             Alan Hayward  <alan.hayward@arm.com>
22346             David Sherwood  <david.sherwood@arm.com>
22348         * tree-vect-stmts.c (simd_clone_subparts): New function.
22349         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22351 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22352             Alan Hayward  <alan.hayward@arm.com>
22353             David Sherwood  <david.sherwood@arm.com>
22355         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22356         vectors as polynomial.  Use build_index_vector for
22357         IFN_GOMP_SIMD_LANE.
22359 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22360             Alan Hayward  <alan.hayward@arm.com>
22361             David Sherwood  <david.sherwood@arm.com>
22363         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22364         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22365         for variable-length vectors.
22366         (vectorizable_mask_load_store): Treat the number of units as
22367         polynomial, asserting that it is constant if the condition has
22368         already been enforced.
22369         (vectorizable_store, vectorizable_load): Likewise.
22371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22372             Alan Hayward  <alan.hayward@arm.com>
22373             David Sherwood  <david.sherwood@arm.com>
22375         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22376         of units as polynomial.  Punt if we can't tell at compile time
22377         which vector contains the final result.
22379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22380             Alan Hayward  <alan.hayward@arm.com>
22381             David Sherwood  <david.sherwood@arm.com>
22383         * tree-vect-loop.c (vectorizable_induction): Treat the number
22384         of units as polynomial.  Punt on SLP inductions.  Use an integer
22385         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22386         cast of such a series for variable-length floating-point
22387         reductions.
22389 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22390             Alan Hayward  <alan.hayward@arm.com>
22391             David Sherwood  <david.sherwood@arm.com>
22393         * tree.h (build_index_vector): Declare.
22394         * tree.c (build_index_vector): New function.
22395         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22396         of units as polynomial, forcibly converting it to a constant if
22397         vectorizable_reduction has already enforced the condition.
22398         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22399         to create a {1,2,3,...} vector.
22400         (vectorizable_reduction): Treat the number of units as polynomial.
22401         Choose vectype_in based on the largest scalar element size rather
22402         than the smallest number of units.  Enforce the restrictions
22403         relied on above.
22405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22406             Alan Hayward  <alan.hayward@arm.com>
22407             David Sherwood  <david.sherwood@arm.com>
22409         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22410         number of units as polynomial.
22412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22413             Alan Hayward  <alan.hayward@arm.com>
22414             David Sherwood  <david.sherwood@arm.com>
22416         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22417         * target.def (autovectorize_vector_sizes): Return the vector sizes
22418         by pointer, using vector_sizes rather than a bitmask.
22419         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22420         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22421         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22422         Likewise.
22423         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22424         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22425         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22426         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22427         * omp-general.c (omp_max_vf): Likewise.
22428         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22429         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22430         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22431         * tree-vect-slp.c (vect_slp_bb): Likewise.
22432         * doc/tm.texi: Regenerate.
22433         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22434         to a poly_uint64.
22435         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22436         the vector size as a poly_uint64 rather than an unsigned int.
22437         (current_vector_size): Change from an unsigned int to a poly_uint64.
22438         (get_vectype_for_scalar_type): Update accordingly.
22439         * tree.h (build_truth_vector_type): Take the size and number of
22440         units as a poly_uint64 rather than an unsigned int.
22441         (build_vector_type): Add a temporary overload that takes
22442         the number of units as a poly_uint64 rather than an unsigned int.
22443         * tree.c (make_vector_type): Likewise.
22444         (build_truth_vector_type): Take the number of units as a poly_uint64
22445         rather than an unsigned int.
22447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22448             Alan Hayward  <alan.hayward@arm.com>
22449             David Sherwood  <david.sherwood@arm.com>
22451         * target.def (get_mask_mode): Take the number of units and length
22452         as poly_uint64s rather than unsigned ints.
22453         * targhooks.h (default_get_mask_mode): Update accordingly.
22454         * targhooks.c (default_get_mask_mode): Likewise.
22455         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22456         * doc/tm.texi: Regenerate.
22458 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22459             Alan Hayward  <alan.hayward@arm.com>
22460             David Sherwood  <david.sherwood@arm.com>
22462         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22463         * omp-general.c (omp_max_vf): Likewise.
22464         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22465         (expand_omp_simd): Handle polynomial safelen.
22466         * omp-low.c (omplow_simd_context): Add a default constructor.
22467         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22468         (lower_rec_simd_input_clauses): Update accordingly.
22469         (lower_rec_input_clauses): Likewise.
22471 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22472             Alan Hayward  <alan.hayward@arm.com>
22473             David Sherwood  <david.sherwood@arm.com>
22475         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22476         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22477         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22478         (vect_analyze_slp_cost): Likewise.
22479         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22480         (vect_model_load_cost): Likewise.
22482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22483             Alan Hayward  <alan.hayward@arm.com>
22484             David Sherwood  <david.sherwood@arm.com>
22486         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22487         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22488         from an unsigned int * to a poly_uint64_pod *.
22489         (calculate_unrolling_factor): New function.
22490         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22493             Alan Hayward  <alan.hayward@arm.com>
22494             David Sherwood  <david.sherwood@arm.com>
22496         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22497         from an unsigned int to a poly_uint64.
22498         (_loop_vec_info::slp_unrolling_factor): Likewise.
22499         (_loop_vec_info::vectorization_factor): Change from an int
22500         to a poly_uint64.
22501         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22502         (vect_get_num_vectors): New function.
22503         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22504         (vect_get_num_copies): Use vect_get_num_vectors.
22505         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22506         to an unsigned int *.
22507         (vect_analyze_data_refs): Change min_vf from an int * to a
22508         poly_uint64 *.
22509         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22510         than an unsigned HOST_WIDE_INT.
22511         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22512         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22513         to an unsigned int *.
22514         (vect_analyze_data_ref_dependences): Likewise.
22515         (vect_compute_data_ref_alignment): Handle polynomial vf.
22516         (vect_enhance_data_refs_alignment): Likewise.
22517         (vect_prune_runtime_alias_test_list): Likewise.
22518         (vect_shift_permute_load_chain): Likewise.
22519         (vect_supportable_dr_alignment): Likewise.
22520         (dependence_distance_ge_vf): Take the vectorization factor as a
22521         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22522         (vect_analyze_data_refs): Change min_vf from an int * to a
22523         poly_uint64 *.
22524         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22525         vfm1 as a poly_uint64 rather than an int.  Make the same change
22526         for the returned bound_scalar.
22527         (vect_gen_vector_loop_niters): Handle polynomial vf.
22528         (vect_do_peeling): Likewise.  Update call to
22529         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22530         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22531         be constant.
22532         * tree-vect-loop.c (vect_determine_vectorization_factor)
22533         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22534         (vect_get_known_peeling_cost): Likewise.
22535         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22536         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22537         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22538         updating the upper bounds of the loop.
22539         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22540         rather than an int.
22541         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22542         polynomial unroll factors.
22543         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22544         (vect_make_slp_decision): Likewise.
22545         (vect_supported_load_permutation_p): Likewise, and polynomial
22546         vf too.
22547         (vect_analyze_slp_cost): Handle polynomial vf.
22548         (vect_slp_analyze_node_operations): Likewise.
22549         (vect_slp_analyze_bb_1): Likewise.
22550         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22551         than an unsigned HOST_WIDE_INT.
22552         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22553         (vectorizable_load): Handle polynomial vf.
22554         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22555         a poly_uint64.
22556         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22558 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22559             Alan Hayward  <alan.hayward@arm.com>
22560             David Sherwood  <david.sherwood@arm.com>
22562         * match.pd: Handle bit operations involving three constants
22563         and try to fold one pair.
22565 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22567         * tree-vect-loop-manip.c: Include gimple-fold.h.
22568         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22569         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22570         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22571         Add a path that uses a step of VF instead of 1, but disable it
22572         for now.
22573         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22574         and niters_no_overflow parameters.  Update calls to
22575         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22576         Create a new SSA name if the latter choses to use a ste other
22577         than zero, and return it via niters_vector_mult_vf_var.
22578         * tree-vect-loop.c (vect_transform_loop): Update calls to
22579         vect_do_peeling, vect_gen_vector_loop_niters and
22580         slpeel_make_loop_iterate_ntimes.
22581         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22582         (vect_gen_vector_loop_niters): Update declarations after above changes.
22584 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22586         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22587         128-bit round to integer instructions.
22588         (ceil<mode>2): Likewise.
22589         (btrunc<mode>2): Likewise.
22590         (round<mode>2): Likewise.
22592 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22594         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22595         unaligned VSX load/store on P8/P9.
22596         (expand_block_clear): Allow the use of unaligned VSX
22597         load/store on P8/P9.
22599 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22601         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22602         New function.
22603         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22604         swap associated with both a load and a store.
22606 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22608         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22609         * config/riscv/riscv.md (clear_cache): Use it.
22611 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22613         * web.c: Remove out-of-date comment.
22615 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22617         * expr.c (fixup_args_size_notes): Check that any existing
22618         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22619         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22620         (emit_single_push_insn): ...here.
22622 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22624         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22625         (const_vector_encoded_nelts): New function.
22626         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22627         (const_vector_int_elt, const_vector_elt): Declare.
22628         * emit-rtl.c (const_vector_int_elt_1): New function.
22629         (const_vector_elt): Likewise.
22630         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22631         of CONST_VECTOR_ELT.
22633 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22635         * expr.c: Include rtx-vector-builder.h.
22636         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22637         directly on the tree encoding.
22638         (const_vector_from_tree): Likewise.
22639         * optabs.c: Include rtx-vector-builder.h.
22640         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22641         sequence of "u" values.
22642         * vec-perm-indices.c: Include rtx-vector-builder.h.
22643         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22644         directly on the vec_perm_indices encoding.
22646 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22648         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22649         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22650         * rtx-vector-builder.h: New file.
22651         * rtx-vector-builder.c: Likewise.
22652         * rtl.h (rtx_def::u2): Add a const_vector field.
22653         (CONST_VECTOR_NPATTERNS): New macro.
22654         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22655         (CONST_VECTOR_DUPLICATE_P): Likewise.
22656         (CONST_VECTOR_STEPPED_P): Likewise.
22657         (CONST_VECTOR_ENCODED_ELT): Likewise.
22658         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22659         (unwrap_const_vec_duplicate): Likewise.
22660         (const_vec_series_p): Check for a non-duplicated vector encoding.
22661         Say that the function only returns true for integer vectors.
22662         * emit-rtl.c: Include rtx-vector-builder.h.
22663         (gen_const_vec_duplicate_1): Delete.
22664         (gen_const_vector): Call gen_const_vec_duplicate instead of
22665         gen_const_vec_duplicate_1.
22666         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22667         (gen_const_vec_duplicate): Use rtx_vector_builder.
22668         (gen_const_vec_series): Likewise.
22669         (gen_rtx_CONST_VECTOR): Likewise.
22670         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22671         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22672         Build a new vector rather than modifying a CONST_VECTOR in-place.
22673         (handle_special_swappables): Update call accordingly.
22674         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22675         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22676         Build a new vector rather than modifying a CONST_VECTOR in-place.
22677         (handle_special_swappables): Update call accordingly.
22679 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22681         * simplify-rtx.c (simplify_const_binary_operation): Use
22682         CONST_VECTOR_ELT instead of XVECEXP.
22684 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22686         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22687         the selector elements to be different from the data elements
22688         if the selector is a VECTOR_CST.
22689         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22690         ssizetype for the selector.
22692 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22694         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22695         before testing each element individually.
22696         * tree-vect-generic.c (lower_vec_perm): Likewise.
22698 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22700         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22701         * selftest-run-tests.c (selftest::run_tests): Call it.
22702         * vector-builder.h (vector_builder::operator ==): New function.
22703         (vector_builder::operator !=): Likewise.
22704         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22705         (vec_perm_indices::all_from_input_p): New function.
22706         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22707         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22708         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22709         instead of reading the VECTOR_CST directly.  Detect whether both
22710         vector inputs are the same before constructing the vec_perm_indices,
22711         and update the number of inputs argument accordingly.  Use the
22712         utility functions added above.  Only construct sel2 if we need to.
22714 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22716         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22717         the broadcast of the low byte.
22718         (expand_mult_highpart): Use an explicit encoding for the permutes.
22719         * optabs-query.c (can_mult_highpart_p): Likewise.
22720         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22721         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22722         (vectorizable_bswap): Likewise.
22723         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22724         explicit encoding for the power-of-2 permutes.
22725         (vect_permute_store_chain): Likewise.
22726         (vect_grouped_load_supported): Likewise.
22727         (vect_permute_load_chain): Likewise.
22729 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22731         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22732         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22733         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22734         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22735         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22736         (vect_gen_perm_mask_any): Likewise.
22738 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22740         * int-vector-builder.h: New file.
22741         * vec-perm-indices.h: Include int-vector-builder.h.
22742         (vec_perm_indices): Redefine as an int_vector_builder.
22743         (auto_vec_perm_indices): Delete.
22744         (vec_perm_builder): Redefine as a stand-alone class.
22745         (vec_perm_indices::vec_perm_indices): New function.
22746         (vec_perm_indices::clamp): Likewise.
22747         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22748         (vec_perm_indices::new_vector): New function.
22749         (vec_perm_indices::new_expanded_vector): Update for new
22750         vec_perm_indices class.
22751         (vec_perm_indices::rotate_inputs): New function.
22752         (vec_perm_indices::all_in_range_p): Operate directly on the
22753         encoded form, without computing elided elements.
22754         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22755         encoding.  Update for new vec_perm_indices class.
22756         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22757         the given vec_perm_builder.
22758         (expand_vec_perm_var): Update vec_perm_builder constructor.
22759         (expand_mult_highpart): Use vec_perm_builder instead of
22760         auto_vec_perm_indices.
22761         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22762         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22763         or double series encoding as appropriate.
22764         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22765         vec_perm_indices instead of auto_vec_perm_indices.
22766         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22767         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22768         (vect_permute_store_chain): Likewise.
22769         (vect_grouped_load_supported): Likewise.
22770         (vect_permute_load_chain): Likewise.
22771         (vect_shift_permute_load_chain): Likewise.
22772         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22773         (vect_transform_slp_perm_load): Likewise.
22774         (vect_schedule_slp_instance): Likewise.
22775         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22776         (vectorizable_mask_load_store): Likewise.
22777         (vectorizable_bswap): Likewise.
22778         (vectorizable_store): Likewise.
22779         (vectorizable_load): Likewise.
22780         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22781         vec_perm_indices instead of auto_vec_perm_indices.  Use
22782         tree_to_vec_perm_builder to read the vector from a tree.
22783         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22784         vec_perm_builder instead of a vec_perm_indices.
22785         (have_whole_vector_shift): Use vec_perm_builder and
22786         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22787         truncation to calc_vec_perm_mask_for_shift.
22788         (vect_create_epilog_for_reduction): Likewise.
22789         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22790         from auto_vec_perm_indices to vec_perm_indices.
22791         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22792         instead of changing individual elements.
22793         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22794         the vector in d.perm.
22795         * config/arm/arm.c (expand_vec_perm_d::perm): Change
22796         from auto_vec_perm_indices to vec_perm_indices.
22797         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22798         instead of changing individual elements.
22799         (arm_vectorize_vec_perm_const): Use new_vector to install
22800         the vector in d.perm.
22801         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22802         Update vec_perm_builder constructor.
22803         (rs6000_expand_interleave): Likewise.
22804         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22805         (rs6000_expand_interleave): Likewise.
22807 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22809         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22810         to qimode could truncate the indices.
22811         * optabs.c (expand_vec_perm_var): Likewise.
22813 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22815         * Makefile.in (OBJS): Add vec-perm-indices.o.
22816         * vec-perm-indices.h: New file.
22817         * vec-perm-indices.c: Likewise.
22818         * target.h (vec_perm_indices): Replace with a forward class
22819         declaration.
22820         (auto_vec_perm_indices): Move to vec-perm-indices.h.
22821         * optabs.h: Include vec-perm-indices.h.
22822         (expand_vec_perm): Delete.
22823         (selector_fits_mode_p, expand_vec_perm_var): Declare.
22824         (expand_vec_perm_const): Declare.
22825         * target.def (vec_perm_const_ok): Replace with...
22826         (vec_perm_const): ...this new hook.
22827         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22828         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22829         * doc/tm.texi: Regenerate.
22830         * optabs.def (vec_perm_const): Delete.
22831         * doc/md.texi (vec_perm_const): Likewise.
22832         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22833         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22834         expand_vec_perm for constant permutation vectors.  Assert that
22835         the mode of variable permutation vectors is the integer equivalent
22836         of the mode that is being permuted.
22837         * optabs-query.h (selector_fits_mode_p): Declare.
22838         * optabs-query.c: Include vec-perm-indices.h.
22839         (selector_fits_mode_p): New function.
22840         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22841         is defined, instead of checking whether the vec_perm_const_optab
22842         exists.  Use targetm.vectorize.vec_perm_const instead of
22843         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
22844         fit in the vector mode before using a variable permute.
22845         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22846         vec_perm_indices instead of an rtx.
22847         (expand_vec_perm): Replace with...
22848         (expand_vec_perm_const): ...this new function.  Take the selector
22849         as a vec_perm_indices rather than an rtx.  Also take the mode of
22850         the selector.  Update call to shift_amt_for_vec_perm_mask.
22851         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22852         Use vec_perm_indices::new_expanded_vector to expand the original
22853         selector into bytes.  Check whether the indices fit in the vector
22854         mode before using a variable permute.
22855         (expand_vec_perm_var): Make global.
22856         (expand_mult_highpart): Use expand_vec_perm_const.
22857         * fold-const.c: Includes vec-perm-indices.h.
22858         * tree-ssa-forwprop.c: Likewise.
22859         * tree-vect-data-refs.c: Likewise.
22860         * tree-vect-generic.c: Likewise.
22861         * tree-vect-loop.c: Likewise.
22862         * tree-vect-slp.c: Likewise.
22863         * tree-vect-stmts.c: Likewise.
22864         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22865         Delete.
22866         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22867         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22868         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22869         (aarch64_vectorize_vec_perm_const): ...this new function.
22870         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22871         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22872         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22873         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22874         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22875         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22876         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22877         into...
22878         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
22879         check for NEON modes.
22880         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22881         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22882         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22883         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22884         into...
22885         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
22886         the old VEC_PERM_CONST conditions.
22887         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22888         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22889         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22890         (ia64_vectorize_vec_perm_const_ok): Merge into...
22891         (ia64_vectorize_vec_perm_const): ...this new function.
22892         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22893         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22894         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22895         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22896         * config/mips/mips.c (mips_expand_vec_perm_const)
22897         (mips_vectorize_vec_perm_const_ok): Merge into...
22898         (mips_vectorize_vec_perm_const): ...this new function.
22899         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22900         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22901         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22902         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22903         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22904         (rs6000_expand_vec_perm_const): Delete.
22905         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22906         Delete.
22907         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22908         (altivec_expand_vec_perm_const_le): Take each operand individually.
22909         Operate on constant selectors rather than rtxes.
22910         (altivec_expand_vec_perm_const): Likewise.  Update call to
22911         altivec_expand_vec_perm_const_le.
22912         (rs6000_expand_vec_perm_const): Delete.
22913         (rs6000_vectorize_vec_perm_const_ok): Delete.
22914         (rs6000_vectorize_vec_perm_const): New function.
22915         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22916         an element count and rtx array.
22917         (rs6000_expand_extract_even): Update call accordingly.
22918         (rs6000_expand_interleave): Likewise.
22919         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22920         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22921         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22922         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22923         (rs6000_expand_vec_perm_const): Delete.
22924         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22925         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22926         (altivec_expand_vec_perm_const_le): Take each operand individually.
22927         Operate on constant selectors rather than rtxes.
22928         (altivec_expand_vec_perm_const): Likewise.  Update call to
22929         altivec_expand_vec_perm_const_le.
22930         (rs6000_expand_vec_perm_const): Delete.
22931         (rs6000_vectorize_vec_perm_const_ok): Delete.
22932         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
22933         reference to the SPE evmerge intructions.
22934         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22935         an element count and rtx array.
22936         (rs6000_expand_extract_even): Update call accordingly.
22937         (rs6000_expand_interleave): Likewise.
22938         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22939         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22940         new function.
22941         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22943 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22945         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22946         vector mode and that that mode matches the mode of the data
22947         being permuted.
22948         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22949         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
22950         directly using expand_vec_perm_1 when forcing selectors into
22951         registers.
22952         (expand_vec_perm_var): New function, split out from expand_vec_perm.
22954 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22956         * optabs-query.h (can_vec_perm_p): Delete.
22957         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22958         * optabs-query.c (can_vec_perm_p): Split into...
22959         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22960         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22961         particular selector is valid.
22962         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22963         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22964         (vect_grouped_load_supported): Likewise.
22965         (vect_shift_permute_load_chain): Likewise.
22966         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22967         (vect_transform_slp_perm_load): Likewise.
22968         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22969         (vectorizable_bswap): Likewise.
22970         (vect_gen_perm_mask_checked): Likewise.
22971         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
22972         implementations of variable permutation vectors into account
22973         when deciding which selector to use.
22974         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22975         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22976         with a false third argument.
22977         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22978         to test whether the constant selector is valid and can_vec_perm_var_p
22979         to test whether a variable selector is valid.
22981 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22983         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22984         * optabs-query.c (can_vec_perm_p): Likewise.
22985         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22986         instead of vec_perm_indices.
22987         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22988         (vect_gen_perm_mask_checked): Likewise,
22989         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22990         (vect_gen_perm_mask_checked): Likewise,
22992 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22994         * optabs-query.h (qimode_for_vec_perm): Declare.
22995         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22996         (qimode_for_vec_perm): ...this new function.
22997         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22999 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23001         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23002         does not have a conditional at the top.
23004 2018-01-02  Richard Biener  <rguenther@suse.de>
23006         * ipa-inline.c (big_speedup_p): Fix expression.
23008 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23010         PR target/81616
23011         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23012         for generic 4->6.
23014 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23016         PR target/81616
23017         Generic tuning.
23018         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23019         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23020         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23021         cond_taken_branch_cost 3->4.
23023 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23025         PR tree-optimization/83581
23026         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23027         TODO_cleanup_cfg if any changes have been made.
23029         PR middle-end/83608
23030         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23031         convert_modes if target mode has the right side, but different mode
23032         class.
23034         PR middle-end/83609
23035         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23036         last argument when extracting from CONCAT.  If either from_real or
23037         from_imag is NULL, use expansion through memory.  If result is not
23038         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23039         the parts directly to inner mode, if even that fails, use expansion
23040         through memory.
23042         PR middle-end/83623
23043         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23044         check for bswap in mode rather than HImode and use that in expand_unop
23045         too.
23047 Copyright (C) 2018 Free Software Foundation, Inc.
23049 Copying and distribution of this file, with or without modification,
23050 are permitted in any medium without royalty provided the copyright
23051 notice and this notice are preserved.