PR tree-optimization/86231
[official-gcc.git] / gcc / ChangeLog
blob5d267eb1fac74b762043c6a919ce01af64028740
1 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3         PR tree-optimization/86231
4         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5         anti-range don't overwrite *vr0min before using it to compute *vr0max.
7 2018-06-20  Tom de Vries  <tdevries@suse.de>
9         PR tree-optimization/86097
10         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11         iv type if signedness of iv type is not the same as that of *nit.
13 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
15         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
16         EDGE_EH edges, verify they are all EDGE_EH.
18 2018-06-20  Maya Rashish  <coypu@sdf.org>
20         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
22 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
25         * config/aarch64/aarch64.c (xgene1_tunings): Add
26         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
27         (aarch64_mode_valid_for_sched_fusion_p):
28         Allow 16-byte modes.
29         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
30         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
31         128-bit modes.
32         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
33         New pattern.
34         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
35         * config/aarch64/iterators.md (VQ2): New mode iterator.
37 2018-06-20  Martin Liska  <mliska@suse.cz>
39         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
40         Change default ratio from 10 to 8.
42 2018-06-20  Martin Liska  <mliska@suse.cz>
44         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
45         New.
46         (bit_test_cluster::find_bit_tests): Likewise.
47         (switch_decision_tree::analyze_switch_statement): Find clusters.
48         * tree-switch-conversion.h (struct jump_table_cluster): Document
49         hierarchy.
51 2018-06-20  Martin Liska  <mliska@suse.cz>
53         * tree-switch-conversion.c (switch_conversion::collect):
54         Record m_uniq property.
55         (switch_conversion::expand): Bail out for special conditions.
56         (group_cluster::~group_cluster): New.
57         (group_cluster::group_cluster): Likewise.
58         (group_cluster::dump): Likewise.
59         (jump_table_cluster::emit): New.
60         (switch_decision_tree::fix_phi_operands_for_edges): New.
61         (struct case_node): Remove struct.
62         (jump_table_cluster::can_be_handled): New.
63         (case_values_threshold): Moved to header.
64         (reset_out_edges_aux): Likewise.
65         (jump_table_cluster::is_beneficial): New.
66         (bit_test_cluster::can_be_handled): Likewise.
67         (add_case_node): Remove.
68         (bit_test_cluster::is_beneficial): New.
69         (case_bit_test::cmp): New.
70         (bit_test_cluster::emit): New.
71         (expand_switch_as_decision_tree_p): Remove.
72         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
73         (fix_phi_operands_for_edge): Likewise.
74         (switch_decision_tree::analyze_switch_statement): New.
75         (compute_cases_per_edge): Move ...
76         (switch_decision_tree::compute_cases_per_edge): ... here.
77         (try_switch_expansion): Likewise.
78         (switch_decision_tree::try_switch_expansion): Likewise.
79         (record_phi_operand_mapping): Likewise.
80         (switch_decision_tree::record_phi_operand_mapping): Likewise.
81         (emit_case_decision_tree): Likewise.
82         (switch_decision_tree::emit): Likewise.
83         (balance_case_nodes): Likewise.
84         (switch_decision_tree::balance_case_nodes): Likewise.
85         (dump_case_nodes): Likewise.
86         (switch_decision_tree::dump_case_nodes): Likewise.
87         (emit_jump): Likewise.
88         (switch_decision_tree::emit_jump): Likewise.
89         (emit_cmp_and_jump_insns): Likewise.
90         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
91         (emit_case_nodes): Likewise.
92         (switch_decision_tree::emit_case_nodes): Likewise.
93         (conditional_probability): Remove.
94         * tree-switch-conversion.h (enum cluster_type): New.
95         (PRINT_CASE): New.
96         (struct cluster): Likewise.
97         (cluster::cluster): Likewise.
98         (struct simple_cluster): Likewise.
99         (simple_cluster::simple_cluster): Likewise.
100         (struct group_cluster): Likewise.
101         (struct jump_table_cluster): Likewise.
102         (struct bit_test_cluster): Likewise.
103         (struct min_cluster_item): Likewise.
104         (struct case_tree_node): Likewise.
105         (case_tree_node::case_tree_node): Likewise.
106         (jump_table_cluster::case_values_threshold): Likewise.
107         (struct case_bit_test): Likewise.
108         (struct switch_decision_tree): Likewise.
109         (struct switch_conversion): Likewise.
110         (switch_decision_tree::reset_out_edges_aux): Likewise.
112 2018-06-20  Martin Liska  <mliska@suse.cz>
114         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
115         (hoist_edge_and_branch_if_true): Likewise.
116         (expand_switch_using_bit_tests_p): Likewise.
117         (struct case_bit_test): Likewise.
118         (case_bit_test_cmp): Likewise.
119         (emit_case_bit_tests): Likewise.
120         (switch_conversion::switch_conversion): New class.
121         (struct switch_conv_info): Remove old struct.
122         (collect_switch_conv_info): More to ...
123         (switch_conversion::collect): ... this.
124         (check_range): Likewise.
125         (switch_conversion::check_range): Likewise.
126         (check_all_empty_except_final): Likewise.
127         (switch_conversion::check_all_empty_except_final): Likewise.
128         (check_final_bb): Likewise.
129         (switch_conversion::check_final_bb): Likewise.
130         (create_temp_arrays): Likewise.
131         (switch_conversion::create_temp_arrays): Likewise.
132         (free_temp_arrays): Likewise.
133         (gather_default_values): Likewise.
134         (switch_conversion::gather_default_values): Likewise.
135         (build_constructors): Likewise.
136         (switch_conversion::build_constructors): Likewise.
137         (constructor_contains_same_values_p): Likewise.
138         (switch_conversion::contains_same_values_p): Likewise.
139         (array_value_type): Likewise.
140         (switch_conversion::array_value_type): Likewise.
141         (build_one_array): Likewise.
142         (switch_conversion::build_one_array): Likewise.
143         (build_arrays): Likewise.
144         (switch_conversion::build_arrays): Likewise.
145         (gen_def_assigns): Likewise.
146         (switch_conversion::gen_def_assigns): Likewise.
147         (prune_bbs): Likewise.
148         (switch_conversion::prune_bbs): Likewise.
149         (fix_phi_nodes): Likewise.
150         (switch_conversion::fix_phi_nodes): Likewise.
151         (gen_inbound_check): Likewise.
152         (switch_conversion::gen_inbound_check): Likewise.
153         (process_switch): Use the newly created class.
154         (switch_conversion::expand): New.
155         (switch_conversion::~switch_conversion): New.
156         * tree-switch-conversion.h: New file.
158 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
160         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
161         tree-vect-patterns.c.
162         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
163         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
164         (vect_recog_sad_pattern): Likewise.
165         (vect_recog_widen_sum_pattern): Likewise.
166         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
167         (vect_recog_widen_shift_pattern): Remove the type_in argument.
168         (vect_recog_rotate_pattern): Likewise.
169         (vect_recog_mult_pattern): Likewise.
170         (vect_recog_vector_vector_shift_pattern): Likewise.
171         (vect_recog_divmod_pattern): Likewise.
172         (vect_recog_mixed_size_cond_pattern): Likewise.
173         (vect_recog_bool_pattern): Likewise.
174         (vect_recog_mask_conversion_pattern): Likewise.
175         (vect_try_gather_scatter_pattern): Likewise.
176         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
177         (vect_recog_over_widening_pattern): Likewise.
178         (vect_recog_gather_scatter_pattern): Likewise.
179         (vect_recog_func_ptr): Move from tree-vectorizer.h
180         (vect_vect_recog_func_ptrs): Move further down the file.
181         (vect_recog_func): Likewise.  Remove the third argument.
182         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
183         (vect_pattern_recog_1): Expect the pattern function to do any
184         necessary target tests.  Also expect it to provide a vector type.
185         Remove the type_in handling.
187 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
189         * tree-vect-patterns.c (vect_pattern_detected): New function.
190         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
191         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
192         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
193         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
194         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
195         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
196         (vect_recog_mask_conversion_pattern)
197         (vect_try_gather_scatter_pattern): Likewise.
199 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
201         * tree-vect-patterns.c (vect_get_internal_def): New function.
202         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
203         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
204         (search_type_for_mask_1): Use it.
206 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
208         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
209         redundant WIDEN_SUM_EXPR handling.
210         (vect_recog_sad_pattern): Likewise.
212 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
214         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
215         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
216         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
217         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
218         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
220 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
222         * tree-vect-stmts.c (vectorizable_call): Make sure that we
223         use the stmt_vec_info of the original bb statement for the
224         new zero assignment, even if the call is part of a pattern.
226 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
228         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
229         that the sequence is attached to the original statement rather
230         than the pattern statement.
231         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
232         PATTERN_DEF_SEQ from the original statement rather than
233         the main pattern statement.
234         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
235         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
236         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
238 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
240         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
241         definition statements before the early exit for statements that aren't
242         live or relevant.
243         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
244         split out from...
245         (vect_transform_loop): ...here.  Process pattern definition
246         statements without first checking whether the main pattern
247         statement is live or relevant.
249 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
251         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
252         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
253         
254 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
256         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
257         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
258         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
259         (expand_block_compare): Change select_block_compare_mode call.
260         (expand_strncmp_align_check): Use new functions, fix comment.
261         (emit_final_str_compare_gpr): New function.
262         (expand_strn_compare): Refactor and clean up code.
263         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
265 2018-06-19  Tony Reix  <tony.reix@atos.com>
266             Damien Bergamini  <damien.bergamini@atos.com>
267             David Edelsohn  <dje.gcc@gmail.com>
269         * collect2.c (static_obj): New variable.
270         (static_libs): New variable.
271         (is_in_list): Uncomment declaration.
272         (main): Track AIX libraries linked statically.
273         (is_in_list): Uncomment definition.
274         (scan_prog_file): Don't add AIX shared libraries initializer
275         to constructor list if linking statically.
277 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
279         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
280         constant.
281         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
283 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
285         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
286         blocks.
288 2018-06-19  Martin Liska  <mliska@suse.cz>
290         * config/i386/i386.c (ix86_can_inline_p): Do not use
291         ipa_fn_summaries::get_create.
292         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
293         get.
294         (devirtualization_time_bonus): Likewise.
295         (ipcp_propagate_stage): Likewise.
296         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
297         (edge_set_predicate): Likewise.
298         (evaluate_conditions_for_known_args): Likewise.
299         (evaluate_properties_for_edge): Likewise.
300         (ipa_call_summary::reset): Tranform to ...
301         (ipa_call_summary::~ipa_call_summary): ... this.
302         (ipa_fn_summary::reset): Transform to ...
303         (ipa_fn_summary::~ipa_fn_summary): ... this.
304         (ipa_fn_summary_t::remove): Rename to ...
305         (ipa_fn_summary_t::remove_callees): ... this.
306         (ipa_fn_summary_t::duplicate): Use placement new
307         instead of memory copy.
308         (ipa_call_summary_t::duplicate): Likewise.
309         (ipa_call_summary_t::remove): Remove.
310         (dump_ipa_call_summary): Change get_create to get.
311         (ipa_dump_fn_summary): Dump only when summary exists.
312         (analyze_function_body): Use symbol_summary::get instead
313         of get_create.
314         (compute_fn_summary): Likewise.
315         (estimate_edge_devirt_benefit): Likewise.
316         (estimate_edge_size_and_time): Likewise.
317         (inline_update_callee_summaries): Likewise.
318         (remap_edge_change_prob): Likewise.
319         (remap_edge_summaries): Likewise.
320         (ipa_merge_fn_summary_after_inlining): Likewise.
321         (write_ipa_call_summary): Likewise.
322         (ipa_fn_summary_write): Likewise.
323         (ipa_free_fn_summary): Likewise.
324         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
325         (struct ipa_call_summary): Likewise.
326         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
327         of get_create.
328         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
329         (estimate_size_after_inlining): Likewise.
330         (estimate_growth): Likewise.
331         (growth_likely_positive): Likewise.
332         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
333         (inline_call): Likewise.
334         * ipa-inline.c (caller_growth_limits): Likewise.
335         (can_inline_edge_p): Likewise.
336         (can_inline_edge_by_limits_p): Likewise.
337         (compute_uninlined_call_time): Likewise.
338         (compute_inlined_call_time): Likewise.
339         (want_inline_small_function_p): Likewise.
340         (edge_badness): Likewise.
341         (update_caller_keys): Likewise.
342         (update_callee_keys): Likewise.
343         (inline_small_functions): Likewise.
344         (inline_to_all_callers_1): Likewise.
345         (dump_overall_stats): Likewise.
346         (early_inline_small_functions): Likewise.
347         (early_inliner): Likewise.
348         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
349         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
350         * ipa-pure-const.c (malloc_candidate_p): Likewise.
351         * ipa-split.c (execute_split_functions): Likewise.
352         * symbol-summary.h: Likewise.
353         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
355 2018-06-19  Richard Biener  <rguenther@suse.de>
357         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
358         (vectorize_loops): ... here.  Fix dbgcnt handling.
359         (try_vectorize_loop): Wrap try_vectorize_loop_1.
361 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
363         PR target/86197
364         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
365         ieee128 argument takes up only one (vector) register, not two (floating
366         point) registers.
368 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
370         * gimplify.c (gimplify_init_constructor): Really never clear for an
371         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
373 2018-06-19  Richard Biener  <rguenther@suse.de>
375         PR tree-optimization/86179
376         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
377         after failed recognition.
379 2018-06-18  Martin Sebor  <msebor@redhat.com>
381         PR middle-end/85602
382         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
383         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
384         Handle integer subtraction.
385         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
386         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
388 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
390         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
391         param from rtx to rtx_insn *.
392         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
393         param.
394         (frv_ifcvt_modify_insn): Likwise.
395         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
396         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
397         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
398         as_a <rtx_insn *> cast to local "unprotected_region" once
399         it's been established that it's not NULL or pc_rtx.
400         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
401         param "sethi" from rtx to rtx_insn *.
402         (nds32_group_float_insns): Likewise for param "insn".
403         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
404         param.
405         (vax_output_int_subtract): Likewise.
406         * config/vax/vax.c (vax_output_int_add): Likewise for param
407         "insn".
408         (vax_output_int_subtract): Likewise.
409         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
410         (emit_pattern_after): Likewise for param "after".
411         (emit_insn_after): Likewise.
412         (emit_jump_insn_after): Likewise.
413         (emit_call_insn_after): Likewise.
414         (emit_debug_insn_after): Likewise.
415         (emit_pattern_before): Likewise for param "before".
416         (emit_insn_before): Likewise.
417         (emit_jump_insn_before): Likewise.
418         * final.c (get_insn_template): Likewise for param "insn", removing
419         a cast.
420         * output.h (get_insn_template): Likewise for 2nd param.
421         * rtl.h (emit_insn_before): Likewise.
422         (emit_jump_insn_before): Likewise.
423         (emit_debug_insn_before_noloc): Likewise.
424         (emit_insn_after): Likewise.
425         (emit_jump_insn_after): Likewise.
426         (emit_call_insn_after): Likewise.
427         (emit_debug_insn_after): Likewise.
428         (set_insn_deleted): Likewise for param.
430 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
432         PR target/85358
433         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
434         floating point modes, so that IFmode is numerically greater than
435         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
436         to declare the ordering.  This prevents IFmode from being
437         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
438         machine.  Include rs6000-modes.h to share the fractional values
439         between genmodes* and the rest of the compiler.
440         (IFmode): Likewise.
441         (KFmode): Likewise.
442         (TFmode): Likewise.
443         * config/rs6000/rs6000-modes.h: New file.
444         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
445         meaning of rs6000_long_double_size so that 126..128 selects an
446         appropriate 128-bit floating point type.
447         (rs6000_option_override_internal): Likewise.
448         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
449         (TARGET_LONG_DOUBLE_128): Change the meaning of
450         rs6000_long_double_size so that 126..128 selects an appropriate
451         128-bit floating point type.
452         (LONG_DOUBLE_TYPE_SIZE): Update comment.
453         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
454         source and destination to match the standard usage.
455         (truncifkf2): Likewise.
456         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
457         ISA 2.07 to use an explicit clobber, instead of passing in a
458         temporary.
459         (copysign<mode>3_soft): Likewise.
461 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
463         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
464         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
465         (vect_slp_analyze_instance_dependence): Likewise.
466         (vect_enhance_data_refs_alignment): Likewise.
467         (vect_analyze_data_refs_alignment): Likewise.
468         (vect_slp_analyze_and_verify_instance_alignment
469         (vect_analyze_data_ref_accesses): Likewise.
470         (vect_prune_runtime_alias_test_list): Likewise.
471         (vect_analyze_data_refs): Likewise.
472         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
473         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
474         (vect_analyze_scalar_cycles_1): Likewise.
475         (vect_get_loop_niters): Likewise.
476         (vect_analyze_loop_form_1): Likewise.
477         (vect_update_vf_for_slp): Likewise.
478         (vect_analyze_loop_operations): Likewise.
479         (vect_analyze_loop): Likewise.
480         (vectorizable_induction): Likewise.
481         (vect_transform_loop): Likewise.
482         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
483         * tree-vect-slp.c (vect_analyze_slp): Likewise.
484         (vect_make_slp_decision): Likewise.
485         (vect_detect_hybrid_slp): Likewise.
486         (vect_slp_analyze_operations): Likewise.
487         (vect_slp_bb): Likewise.
488         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
489         (vectorizable_bswap): Likewise.
490         (vectorizable_call): Likewise.
491         (vectorizable_simd_clone_call): Likewise.
492         (vectorizable_conversion): Likewise.
493         (vectorizable_assignment): Likewise.
494         (vectorizable_shift): Likewise.
495         (vectorizable_operation): Likewise.
496         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
498 2018-06-18  Martin Sebor  <msebor@redhat.com>
500         PR tree-optimization/81384
501         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
502         * builtins.c (expand_builtin_strnlen): New function.
503         (expand_builtin): Call it.
504         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
505         * builtins.def (BUILT_IN_STRNLEN): New.
506         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
507         Warn for bounds in excess of maximum object size.
508         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
509         single-value ranges.  Handle strnlen.
510         (handle_builtin_strlen): Handle strnlen.
511         (strlen_check_and_optimize_stmt): Same.
512         * doc/extend.texi (Other Builtins): Document strnlen.
514 2018-06-18  Maya Rashish  <coypu@sdf.org>
516         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
517         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
518         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
520         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
521         here to ...
522         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
524 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
526         * tree.c (escaped_string::escape): Replace cast to char * by
527         const_cast<char *> (unescaped).
529 2018-06-18  Nick Clifton  <nickc@redhat.com>
531         PR 84195
532         * tree.c (escaped_string): New class.  Converts an unescaped
533         string into its escaped equivalent.
534         (warn_deprecated_use): Use the new class to convert the
535         deprecation message, if present.
536         (test_escaped_strings): New self test.
537         (test_c_tests): Add test_escaped_strings.
538         * doc/extend.texi (deprecated): Add a note that the
539         deprecation message is affected by the -fmessage-length
540         option, and that control characters will be escaped.
541         (#pragma GCC error): Document this pragma.
542         (#pragma GCC warning): Likewise.
543         * doc/invoke.texi (-fmessage-length): Document this option's
544         effect on the #warning and #error preprocessor directives and
545         the deprecated attribute.
547 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
549         * tree.c (decl_value_expr_lookup): Revert latest change.
550         (decl_value_expr_insert): Likewise.
552 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
554         * gimplify.c (nonlocal_vlas): Delete.
555         (nonlocal_vla_vars): Likewise.
556         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
557         referenced VLAs.
558         (gimplify_body): Do not create and destroy nonlocal_vlas.
559         * tree-nested.c: Include diagnostic.h.
560         (use_pointer_in_frame): Tweak.
561         (lookup_field_for_decl): Add assertion and declare the transformation.
562         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
563         internal error when the reference is in a wrong context.  Do not
564         create a debug decl by default.
565         (note_nonlocal_block_vlas): Delete.
566         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
567         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
568         create a debug decl by default.
569         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
570         call is in a wrong context.
571         (fixup_vla_decls): New function.
572         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
573         debug variables were created.
574         * tree.c (decl_value_expr_lookup): Add checking assertion.
575         (decl_value_expr_insert): Likewise.
577 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
579         PR middle-end/82479
580         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
581         * tree-scalar-evolution.c (interpret_expr): Likewise.
582         (expression_expensive_p): Likewise.
583         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
584         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
585         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
586         (ssa_defined_by_minus_one_stmt_p): New.
588 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
590         PR middle-end/64946
591         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
592         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
593         * dojump.c (do_jump): Likewise.
594         * expr.c (expand_expr_real_2): Check operand type's sign.
595         * fold-const.c (const_unop): Handle ABSU_EXPR.
596         (fold_abs_const): Likewise.
597         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
598         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
599         (strip_sign_op_1): Likesise.
600         * match.pd: Add new pattern to generate ABSU_EXPR.
601         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
602         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
603         * tree-eh.c (operation_could_trap_helper_p): Likewise.
604         * tree-inline.c (estimate_operator_cost): Likewise.
605         * tree-pretty-print.c (dump_generic_node): Likewise.
606         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
607         * tree.def (ABSU_EXPR): New.
609 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
611         PR middle-end/86095
612         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
613         documented as preserved for backward compatibility only.
614         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
616         PR rtl-optimization/86108
617         * bb-reorder.c (create_forwarder_block): Renamed to ...
618         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
619         jump from new landing pad to the second part.
620         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
621         Adjust callers.
623 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
625         PR middle-end/85878
626         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
627         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
628         Only call store_expr for halves if the mode is the same.
630         PR middle-end/86123
631         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
632         Fix up comment formatting.
634 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
636         * typed-splay-tree.h (typed_splay_tree::remove): New function.
637         (typed_splay_tree::closure,
638         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
639         (typed_splay_tree::typed_splay_tree,
640         typed_splay_tree::operator =): Declared private.
641         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
642         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
643         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
644         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
645         typed_splay_tree::splay_tree_splay,
646         typed_splay_tree::splay_tree_foreach_helper,
647         typed_splay_tree::splay_tree_insert,
648         typed_splay_tree::splay_tree_remove,
649         typed_splay_tree::splay_tree_lookup,
650         typed_splay_tree::splay_tree_predecessor,
651         typed_splay_tree::splay_tree_successor,
652         typed_splay_tree::splay_tree_min,
653         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
654         (typed_splay_tree::root, typed_splay_tree::comp,
655         typed_splay_tree::delete_key,
656         typed_splay_tree::delete_value): New data members.
657         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
658         typed_splay_tree::remove.
660 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
662         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
663         -mginv and -mno-ginv to the assembler.
664         * config/mips/mips.opt (-mcrc): New option.
665         (-mginv): Likewise.
666         * doc/invoke.text (-mcrc): Document.
667         (-mginv): Likewise.
669 2018-06-15  Nick Clifton  <nickc@redhat.com>
671         PR 84195
672         * tree.c (escaped_string): New class.  Converts an unescaped
673         string into its escaped equivalent.
674         (warn_deprecated_use): Use the new class to convert the
675         deprecation message, if present.
676         (test_escaped_strings): New self test.
677         (test_c_tests): Add test_escaped_strings.
678         * doc/extend.texi (deprecated): Add a note that the
679         deprecation message is affected by the -fmessage-length
680         option, and that control characters will be escaped.
681         (#pragma GCC error): Document this pragma.
682         (#pragma GCC warning): Likewise.
683         * doc/invoke.texi (-fmessage-length): Document this option's
684         effect on the #warning and #error preprocessor directives and
685         the deprecated attribute.
687 2018-06-15  Richard Biener  <rguenther@suse.de>
689         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
690         here, also noting vector size used.
691         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
692         size used in MSG_OPTIMIZED_LOCATIONS dump.
693         (pass_slp_vectorize::execute): Adjust.
695 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
697         PR target/85968
698         * config/arc/arc.c (arc_return_address_register): Fix
699         if-condition.
701 2018-06-15  Richard Biener  <rguenther@suse.de>
703         PR middle-end/86159
704         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
705         leave useless conversion stripping to force_gimple_operand_gsi.
706         (gimplify_build2): Likewise.
707         (gimplify_build1): Likewise.
709 2018-06-15  Richard Biener  <rguenther@suse.de>
711         PR middle-end/86076
712         * tree-cfg.c (move_stmt_op): unshare invariant addresses
713         before adjusting their block.
715 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
717         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
718         multilibs for *-*-rtems*.
719         * config/riscv/t-rtems: New file.
721 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
723         PR middle-end/86122
724         * match.pd ((A +- CST1) +- CST2): Punt if last resort
725         unsigned_type_for returns NULL.
727         PR target/85945
728         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
729         subregs of multi-word pseudos unless the float mode has word size.
731 2018-06-14  Richard Biener  <rguenther@suse.de>
733         PR middle-end/86139
734         * tree-vect-generic.c (build_word_mode_vector_type): Remove
735         duplicate and harmful type_hash_canon.
736         * tree.c (type_hash_canon): Assert we didn't find ourselves.
738 2018-06-14  Richard Biener  <rguenther@suse.de>
740         PR ipa/86124
741         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
742         NULL cgraph_node.
744 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
746         * config/rtems.h (STDINT_LONG32): Define.
748 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
749             Prachi Godbole  <prachi.godbole@imgtec.com>
751         * config/mips/mips-cpus.def: Define P6600.
752         * config/mips/mips-tables.opt: Regenerate.
753         * config/mips/mips.c (mips_ucbranch_type): New enum.
754         (mips_rtx_cost_data): Add support for P6600.
755         (mips_issue_rate): Likewise.
756         (mips_multipass_dfa_lookahead): Likewise.
757         (mips_avoid_hazard): Likewise.
758         (mips_reorg_process_insns): Likewise.
759         (mips_classify_branch_p6600): New function.
760         * config/mips/mips.h (TUNE_P6600): New define.
761         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
762         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
763         * config/mips/mips.md: Include p6600.md.
764         (processor): Add p6600.
765         * config/mips/p6600.md: New file.
766         * doc/invoke.texi: Add p6600 to supported architectures.
768 2018-06-13  Martin Sebor  <msebor@redhat.com>
770         PR tree-optimization/86114
771         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
772         of integer types.
773         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
775 2018-06-13  Richard Biener  <rguenther@suse.de>
777         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
778         Properly set vector type of the intermediate stmt.
779         * tree-vect-stmts.c (vectorizable_operation): The destination
780         var always has vectype_out type.
782 2018-06-13  Jeff Law  <law@redhat.com>
784         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
785         integer 0 for argument to print_rtl_with_bb.
786         (rl78_reorg): Likewise.
788 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
790         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
791         from rtx to rtx_insn *.
792         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
793         "label".
794         (add_sched_insns_for_speculation): Likewise for local "target",
795         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
796         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
797         from rtx_insn ** to rtx_code_label **.
798         (reorg_emit_nops): Likewise.
799         (c6x_reorg): Likewise for local "call_labels".
800         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
801         rtx to rtx_insn *.
802         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
803         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
804         the loops over LABEL_REFS.
805         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
806         braf_label.
807         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
808         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
809         (split_branches): Strengthen local "olabel" from rtx to
810         rtx_insn *, adding a safe_as_a cast.
811         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
812         to "rtx_insn *".
813         (add_insn_after): Likewise for first two params.
814         (add_insn_before): Likewise.
815         (remove_insn): Likewise for param.
816         (emit_pattern_before_noloc): Likewise for second and third params.
817         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
818         (emit_call_insn_before_noloc): Likewise.
819         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
820         to "rtx_insn *".
821         (emit_barrier_before): Likewise.
822         (emit_label_before): Strengthen "label" param from "rtx" to
823         "rtx_code_label *".  Strengthen "before" param from "rtx" to
824         "rtx_insn *".
825         (emit_insn_after_1): Strengthen "after" param from "rtx" to
826         "rtx_insn *".
827         (emit_pattern_after_noloc): Likewise.
828         (emit_insn_after_noloc): Likewise.
829         (emit_jump_insn_after_noloc): Likewise.
830         (emit_call_insn_after_noloc): Likewise.
831         (emit_debug_insn_after_noloc): Likewise.
832         (emit_barrier_after): Likewise.
833         (emit_label_after): Likewise for both params.
834         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
835         "loc" param from "int" to "location_t".
836         (emit_insn_after_setloc): Likewise.
837         (emit_jump_insn_after_setloc): Likewise.
838         (emit_call_insn_after_setloc): Likewise.
839         (emit_debug_insn_after_setloc): Likewise.
840         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
841         "loc" param from "int" to "location_t".
842         (emit_pattern_before): Convert NULL_RTX to NULL.
843         (emit_insn_before_setloc): Convert "loc" param from "int" to
844         "location_t".
845         (emit_jump_insn_before_setloc): Likewise.
846         (emit_call_insn_before_setloc): Likewise.
847         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
848         rtx_insn *.  Convert "loc" param from "int" to "location_t".
849         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
850         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
851         Convert 3rd param from "int" to "location_t".
852         (emit_barrier_before, emit_barrier_after, next_real_insn):
853         Strengthen param from rtx to rtx_insn *.
854         (emit_label_before): Strengthen 1st param from "rtx" to
855         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
856         "rtx_insn *".
857         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
858         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
859         Strengthen 2nd param from "rtx" to "rtx_insn *".
860         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
861         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
862         Likewise. Convert 3rd param from "int" to "location_t".
863         (emit_label_after): Strengthen 1st param from "rtx" to
864         "rtx_code_label *".
865         (next_real_insn, remove_insn): Strengthen param from "rtx" to
866         "rtx_insn *".
867         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
868         from "rtx" to "rtx_insn *".
870 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
872         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
873         bodies streamed in with -Q.
874         * dumpfile.c (dump_files): Add lto-stream-out dump file.
875         * dumpfile.h (tree_dump_index): Add lto_stream_out.
876         * gimple-streamer-out.c: Include gimple-pretty-print.h
877         (output_bb): Dump stmts streamed.
878         * lto-section-out.c: Include print-tree.h
879         (lto_begin_section): Dump sections created.
880         (lto_output_decl_index): Dump decl encoded.
881         * lto-streamer-out.c: Include print-tree.h
882         (create_output_block): Dump output block created.
883         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
884         (output_function): Dump function output.
885         (output_constructor): Dump constructor streamed.
886         (write_global_stream): Output indexes encoded.
887         (produce_asm_for_decls): Dump streams encoded.
888         * lto-streamer.c (streamer_dump_file): New global var.
889         * lto-streamer.h (streamer_dump_file): Declare.
890         * passes.c (ipa_write_summaries): Initialize streamer dump.
891         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
892         in.
894 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
896         PR target/86048
897         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
898         offsets for register save directives.  Emit a second batch of save
899         directives, if need be, when the function accesses prior frames.
901 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
903         * config/arc/fpu.md (fmasf4): Force operand to register.
904         (fnmasf4): Likewise.
906 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
908         * config/arc/arc-protos.h (arc_pad_return): Remove.
909         * config/arc/arc.c (machine_function): Remove force_short_suffix
910         and size_reason.
911         (arc_print_operand): Adjust printing of '&'.
912         (arc_verify_short): Remove conditional printing of short suffix.
913         (arc_final_prescan_insn): Remove reference to size_reason.
914         (pad_return): New function.
915         (arc_reorg): Call pad_return.
916         (arc_pad_return): Remove.
917         (arc_init_machine_status): Remove reference to force_short_suffix.
918         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
919         (attr length): When attribute iscompact is true force to 2
920         regardless; in the case of maybe check if we want to force the
921         instruction to have 4 bytes length.
922         (nopv): Change it to generate 4 byte long nop as well.
923         (blockage): New pattern.
924         (simple_return): Remove call to arc_pad_return.
925         (p_return_i): Likewise.
927 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
929         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
931 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
933         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
934         ARC cores.
936 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
938         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
939         for ARC700 and ARCv2.
941 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
943         PR target/86076
944         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
945         operands[2] instead of operands[1].
948 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
950         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
951         case, check whether the outer register overlaps an unallocatable
952         register, not just whether it fits the required class.
954 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
956         * poly-int.h (can_div_trunc_p): Add new overload in which all values
957         are poly_ints.
958         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
959         (memrefs_conflict_p): Likewise.
960         (init_alias_analysis): Likewise.
961         * cfgexpand.c (expand_debug_expr): Likewise.
962         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
963         * cse.c (fold_rtx): Likewise.
964         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
965         * expr.c (emit_block_move_hints): Likewise.
966         (clear_storage_hints, push_block, emit_push_insn): Likewise.
967         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
968         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
969         (emit_group_store): Likewise.
970         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
971         to read the PRE/POST_MODIFY increment.
972         * calls.c (store_one_arg): Use strip_offset.
973         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
974         poly_int_rtx_p.
975         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
976         by a VEC_SELECT.
977         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
978         (simplify_binary_operation_1): Extend CONST_INT handling to
979         poly_int_rtx_p.
980         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
981         than a HOST_WIDE_INT.
982         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
983         poly_int64.
984         (adjust_mems, add_stores): Update accodingly.
985         (vt_canonicalize_addr): Track polynomial offsets.
986         (emit_note_insn_var_location): Likewise.
987         (vt_add_function_parameter): Likewise.
988         (vt_initialize): Likewise.
990 2018-06-12  Jeff Law  <law@redhat.com>
992         * config.gcc (alpha*-*-freebsd*): Remove.
993         * config/alpha/freebsd.h: Remove.
995 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
997         PR other/69968
998         * spellcheck-tree.c (levenshtein_distance): Rename to...
999         (get_edit_distance): ...this, and update for underlying renaming.
1000         * spellcheck-tree.h (levenshtein_distance): Rename to...
1001         (get_edit_distance): ...this.
1002         * spellcheck.c (levenshtein_distance): Rename to...
1003         (get_edit_distance): ...this.  Convert from Levenshtein distance
1004         to Damerau-Levenshtein distance by supporting transpositions of
1005         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1006         "v_one_ago".
1007         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1008         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1009         update for underlying renaming.
1010         (selftest::levenshtein_distance_unit_test): Rename to...
1011         (selftest::test_get_edit_distance_unit): ...this, and update for
1012         underlying renaming.
1013         (selftest::test_find_closest_string): Add example from PR 69968
1014         where transposition helps
1015         (selftest::test_metric_conditions): Update for renaming.
1016         (selftest::test_metric_conditions): Likewise.
1017         (selftest::spellcheck_c_tests): Likewise.
1018         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1019         (get_edit_distance): ...this.
1020         (best_match::consider): Update for renaming.
1022 2018-06-12  Martin Sebor  <msebor@redhat.com>
1024         PR tree-optimization/85259
1025         * builtins.c (compute_objsize): Handle constant offsets.
1026         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1027         true iff a warning has been issued.
1028         * gimple.h (gimple_nonartificial_location): New function.
1029         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1030         gimple_nonartificial_location and handle -Wno-system-headers.
1031         (handle_builtin_stxncpy): Same.
1033 2018-06-12  Martin Sebor  <msebor@redhat.com>
1035         PR c/85931
1036         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1038 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1040         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1041         BUILTIN_VEC_XST entries for pointer to double and long long.
1043 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1045         PR target/85990
1046         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1047         Update comments.
1048         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1049         Likewise.
1051 2018-06-12  Martin Liska  <mliska@suse.cz>
1053         * doc/options.texi: Document IntegerRange.
1055 2018-06-12  Martin Liska  <mliska@suse.cz>
1057         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1058         * opt-functions.awk: Handle Deprecated flag.
1059         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1060         and report error.
1061         (read_cmdline_option): Report warning for a deprecated option.
1062         * opts.h (struct cl_option): Add new field cl_deprecated.
1063         (CL_ERR_DEPRECATED): New.
1065 2018-06-12  Martin Liska  <mliska@suse.cz>
1067         * doc/options.texi: Document Deprecated option flag.
1069 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1071         * config/arc/arc-arch.h (arc_extras): New enum.
1072         (arc_cpu_t):Add field extra.
1073         (arc_cpu_types): Consider the extras.
1074         * config/arc/arc-cpus.def: Add extras info.
1075         * config/arc/arc-opts.h (processor_type): Consider extra field.
1076         * config/arc/arc.c (arc_override_options): Handle extra field.
1078 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1080         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1081         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1082         field.
1083         * config/arc/arc.c (arc_init): Update pic warning.
1084         (irq_range): Update irq range parsing warnings.
1085         (arc_override_options): Update various warning messages.
1086         (arc_handle_aux_attribute): Likewise.
1088 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1090         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1092 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1094         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1095         compiler messages directives.
1097 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1099         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1100         * config/mips/mips-tables.opt: Regenerate.
1101         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1102         mips64r6.
1103         * doc/invoke.texi: Document -march=i6500.
1105 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1107         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1108         (i6400_gpmul): Add cpu_unit.
1109         (i6400_gpdiv): Likewise.
1110         (i6400_msa_add_d): Update reservations.
1111         (i6400_msa_int_add) Likewise.
1112         (i6400_msa_short_logic3) Likewise.
1113         (i6400_msa_short_logic2) Likewise.
1114         (i6400_msa_short_logic) Likewise.
1115         (i6400_msa_move) Likewise.
1116         (i6400_msa_cmp) Likewise.
1117         (i6400_msa_short_float2) Likewise.
1118         (i6400_msa_div_d) Likewise.
1119         (i6400_msa_long_logic1) Likewise.
1120         (i6400_msa_long_logic2) Likewise.
1121         (i6400_msa_mult) Likewise.
1122         (i6400_msa_long_float2) Likewise.
1123         (i6400_msa_long_float4) Likewise.
1124         (i6400_msa_long_float5) Likewise.
1125         (i6400_msa_long_float8) Likewise.
1126         (i6400_fpu_fadd): Include frint type.
1127         (i6400_fpu_store): New define_insn_reservation.
1128         (i6400_fpu_load): Likewise.
1129         (i6400_fpu_move): Likewise.
1130         (i6400_fpu_fcmp): Likewise.
1131         (i6400_fpu_fmadd): Likewise.
1132         (i6400_int_mult): Include imul3nc type and update reservation.
1133         (i6400_int_div): Include idiv3 type and update reservation.
1134         (i6400_int_load): Update to check type not move_type.
1135         (i6400_int_store): Likewise.
1136         (i6400_int_prefetch): Set zero latency.
1138 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1140         * gcc.c: Document new %@{...} sequence.
1141         (LINK_COMMAND_SPEC): Use it for the -L switches.
1142         (cpp_unique_options): Use it for the -I switches.
1143         (at_file_argbuf): New global variable.
1144         (in_at_file): Likewise.
1145         (alloc_args): Create at_file_argbuf.
1146         (clear_args): Truncate at_file_argbuf.
1147         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1148         (open_at_file): New function.
1149         (close_at_file): Likewise.
1150         (create_at_file): Delete.
1151         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1152         <'o'>: Likewise.
1153         <'@'>: New case.
1154         (validate_switches_from_spec): Deal with %@{...} sequence.
1155         (validate_switches): Likewise.
1156         (driver::finalize): Call clear_args.
1158 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1160         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1162 2018-06-11  Martin Sebor  <msebor@redhat.com>
1164         * doc/invoke.texi (-Wall): List -Wc++17-compat.
1165         (Wno-class-memaccess): Add @opindex.
1166         (Wno-templates, Wno-multiple-inheritance): Same.
1167         (Wno-virtual-inheritance, Wno-namespaces): Same.
1168         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1169         (Wno-format-overflow, Wno-format-truncation): Same.
1170         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1171         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1172         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1173         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1174         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1175         (Wno-misspelled-isr): Same.
1177 2018-06-11  Martin Sebor  <msebor@redhat.com>
1179         * PR tree-optimization/86083
1180         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1182 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1184         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1186 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
1188         PR target/85755
1189         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1190         on the correct operand.
1191         (*movdi_internal64): Ditto.
1193 2018-06-11  Martin Liska  <mliska@suse.cz>
1195         PR tree-optimization/86089
1196         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1198 2018-06-11  Julia Koval  <julia.koval@intel.com>
1200         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1201         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1202         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
1204 2018-06-11  Olivier Hainque  <hainque@adacore.com>
1206         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1207         for Ada with strict dwarf2.
1209 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
1211         PR target/85755
1212         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1213         addresses.
1215 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
1217         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1219 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
1221         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1222         TARGET_ELF.
1224 2018-06-08  Martin Liska  <mliska@suse.cz>
1226         * tree-cfg.h (debug_function): Fix argument type to match
1227         implementation.
1229 2018-06-08  Martin Liska  <mliska@suse.cz>
1231         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1232         Remove usage of MPX-related (and removed) fields.
1233         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1235 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
1237         * cfg.c (debug): Use TDF_NONE rather than 0.
1238         * cfghooks.c (debug): Likewise.
1239         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1240         (struct dump_option_value_info): Convert to...
1241         (struct kv_pair): ...this template type.
1242         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1243         rather than 0.
1244         (optinfo_verbosity_options): Likewise.
1245         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1246         OPTGROUP_NONE.
1247         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1248         than int for "optgroup_flags" param.
1249         (dump_generic_expr_loc): Use dump_flags_t rather than int for
1250         "dump_kind" param.
1251         (dump_dec): Likewise.
1252         (dump_finish): Use TDF_NONE rather than 0.
1253         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1254         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
1255         than 0.  Update for change to option_ptr.
1256         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1257         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
1258         0.  Update for changes to optinfo_verbosity_options and
1259         optgroup_options.
1260         (opt_info_switch_p): Convert optgroup_flags from int to
1261         optgroup_flags_t.
1262         (dump_basic_block): Use dump_flags_t rather than int
1263         for "dump_kind" param.
1264         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1265         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1266         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1267         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1268         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1269         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1270         TDF_NONE): Convert from macros to...
1271         (enum dump_flag): ...this new enum.
1272         (dump_flags_t): Update to use enum.
1273         (operator|, operator&, operator~, operator|=, operator&=):
1274         Implement for dump_flags_t.
1275         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1276         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1277         Convert from macros to...
1278         (enum optgroup_flag): ...this new enum.
1279         (optgroup_flags_t): New typedef.
1280         (operator|, operator|=): Implement for optgroup_flags_t.
1281         (struct dump_file_info): Convert field "alt_flags" to
1282         dump_flags_t.  Convert field "optgroup_flags" to
1283         optgroup_flags_t.
1284         (dump_basic_block): Use dump_flags_t rather than int for param.
1285         (dump_generic_expr_loc): Likewise.
1286         (dump_dec): Likewise.
1287         (dump_register): Convert param "optgroup_flags" to
1288         optgroup_flags_t.
1289         (opt_info_enable_passes): Likewise.
1290         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1291         than 0.
1292         * gimple-pretty-print.c (debug): Likewise.
1293         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1294         (merged_store_group::apply_stores): Likewise.
1295         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1296         * gimple.c (verify_gimple_pp): Likewise.
1297         * graphite-poly.c (print_pbb_body): Likewise.
1298         * passes.c (pass_manager::register_one_dump_file): Convert
1299         local "optgroup_flags" to optgroup_flags_t.
1300         * print-tree.c (print_node): Use TDF_NONE rather than 0.
1301         (debug): Likewise.
1302         (debug_body): Likewise.
1303         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1304         to optgroup_flags_t.
1305         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1306         than 0.
1307         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1308         (convert_mult_to_fma): Likewise.
1309         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1310         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1311         * tree-vect-data-refs.c (dump_lower_bound): Convert param
1312         "dump_kind" to dump_flags_t.
1314 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1316         * config/rs6000/rs6000.c (min, max): Delete.
1318 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1320         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1321         -mabi=spe and -mabi=no-spe.
1323 2018-06-08  Martin Liska  <mliska@suse.cz>
1325         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1326         where we expect an existing summary.
1328 2018-06-08  Martin Liska  <mliska@suse.cz>
1330         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1331         * ipa-inline.h (estimate_edge_growth): Likewise.
1333 2018-06-08  Martin Liska  <mliska@suse.cz>
1335         * cgraph.c (function_version_hasher::hash): Use
1336         cgraph_node::get_uid ().
1337         (function_version_hasher::equal):
1338         * cgraph.h (cgraph_node::get_uid): New method.
1339         * ipa-inline.c (update_caller_keys): Use
1340         cgraph_node::get_uid ().
1341         (update_callee_keys): Likewise.
1342         * ipa-utils.c (searchc): Likewise.
1343         (ipa_reduced_postorder): Likewise.
1344         * lto-cgraph.c (input_node): Likewise.
1345         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1346         * symbol-summary.h (symtab_insertion): Likewise.
1347         (symtab_removal): Likewise.
1348         (symtab_duplication): Likewise.
1349         * tree-pretty-print.c (dump_function_header): Likewise.
1350         * tree-sra.c (convert_callers_for_node): Likewise.
1352 2018-06-08  Martin Liska  <mliska@suse.cz>
1354         * cgraph.c (symbol_table::create_edge): Always assign a new
1355         unique number.
1356         (symbol_table::free_edge): Do not recycle numbers.
1357         * cgraph.h (cgraph_edge::get): New method.
1358         * symbol-summary.h (symtab_removal): Use it.
1359         (symtab_duplication): Likewise.
1360         (call_summary::hashable_uid): Remove.
1362 2018-06-08  Martin Liska  <mliska@suse.cz>
1364         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1365         (initialize_growth_caches): Remove.
1366         (free_growth_caches): Likewise.
1367         (do_estimate_edge_time): Use edge_growth_cache.
1368         (do_estimate_edge_size): Likewise.
1369         (do_estimate_edge_hints): Likewise.
1370         * ipa-inline.c (reset_edge_caches): Likewise.
1371         (recursive_inlining): Likewise.
1372         (inline_small_functions): Likewise.
1373         * ipa-inline.h (initialize_growth_caches): Remove.
1374         (estimate_edge_size): Likewise.
1375         (estimate_edge_time): Likewise.
1376         (estimate_edge_hints): Likewise.
1377         (reset_edge_growth_cache): Likewise.
1378         * symbol-summary.h (call_summary::remove): New method.
1380 2018-06-08  Martin Liska  <mliska@suse.cz>
1382         * ipa-cp.c (class edge_clone_summary): New summary.
1383         (grow_edge_clone_vectors): Remove.
1384         (ipcp_edge_duplication_hook): Remove.
1385         (class edge_clone_summary_t): New call_summary class.
1386         (ipcp_edge_removal_hook): Remove.
1387         (edge_clone_summary_t::duplicate): New function.
1388         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1389         (create_specialized_node): Likewise.
1390         (ipcp_driver): Initialize edge_clone_summaries and do not
1391         register hooks.
1393 2018-06-08  Martin Liska  <mliska@suse.cz>
1395         * symbol-summary.h (get): New function.
1396         (call_summary::m_initialize_when_cloning): New class member.
1398 2018-06-08  Martin Liska  <mliska@suse.cz>
1400         * cgraph.c (cgraph_node::remove): Do not recycle uid.
1401         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1402         (symbol_table::allocate_cgraph_symbol): Do not set uid.
1403         * passes.c (uid_hash_t): Record removed_nodes by their uids.
1404         (remove_cgraph_node_from_order): Use the removed_nodes set.
1405         (do_per_function_toporder): Likwise.
1406         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1407         instead of summary_uid.
1408         (symtab_removal): Likewise.
1409         (symtab_duplication): Likewise.
1411 2018-06-08  Martin Liska  <mliska@suse.cz>
1413         * ipa-cp.c (ipcp_store_bits_results): Use
1414         ipcp_transformation_sum.
1415         (ipcp_store_vr_results): Likewise.
1416         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1417         to ...
1418         (ipcp_transformation_initialize): ... this.
1419         (ipa_set_node_agg_value_chain):
1420         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1421         (write_ipcp_transformation_info): Likewise.
1422         (read_ipcp_transformation_info): Likewise.
1423         (ipcp_update_bits): Likewise.
1424         (ipcp_update_vr): Likewise.
1425         (ipcp_transform_function): Likewise.
1426         * ipa-prop.h: Rename ipcp_transformation_summary to
1427         ipcp_transformation.
1428         (class ipcp_transformation_t): New function summary.
1429         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1430         (ipa_get_agg_replacements_for_node): Likewise.
1432 2018-06-08  Martin Liska  <mliska@suse.cz>
1434         * ipa-pure-const.c (struct funct_state_d): Do it class instead
1435         of struct.
1436         (class funct_state_summary_t): New function_summary class.
1437         (has_function_state): Remove.
1438         (get_function_state): Likewise.
1439         (set_function_state): Likewise.
1440         (add_new_function): Likewise.
1441         (funct_state_summary_t::insert): New function.
1442         (duplicate_node_data): Remove.
1443         (remove_node_data): Remove.
1444         (funct_state_summary_t::duplicate): New function.
1445         (register_hooks): Create new funct_state_summaries.
1446         (pure_const_generate_summary): Use it.
1447         (pure_const_write_summary): Likewise.
1448         (pure_const_read_summary): Likewise.
1449         (propagate_pure_const): Likewise.
1450         (propagate_nothrow): Likewise.
1451         (dump_malloc_lattice): Likewise.
1452         (propagate_malloc): Likewise.
1453         (execute): Do not register hooks, just remove summary
1454         instead.
1455         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1456         constructor.
1458 2018-06-08  Martin Liska  <mliska@suse.cz>
1460         * ipa-reference.c (remove_node_data): Remove.
1461         (duplicate_node_data): Likewise.
1462         (class ipa_ref_var_info_summary_t): New class.
1463         (class ipa_ref_opt_summary_t): Likewise.
1464         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1465         (get_reference_optimization_summary): Use
1466         ipa_ref_opt_sum_summaries.
1467         (set_reference_vars_info): Remove.
1468         (set_reference_optimization_summary): Likewise.
1469         (ipa_init): Create summaries.
1470         (init_function_info): Use function summary.
1471         (ipa_ref_opt_summary_t::duplicate): New function.
1472         (ipa_ref_opt_summary_t::remove): New function.
1473         (get_read_write_all_from_node): Fix GNU coding style.
1474         (propagate): Use function summary.
1475         (write_node_summary_p): Fix GNU coding style.
1476         (stream_out_bitmap): Likewise.
1477         (ipa_reference_read_optimization_summary): Use function summary.
1478         (ipa_reference_c_finalize): Do not release hooks.
1480 2018-06-08  Martin Liska  <mliska@suse.cz>
1482         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1483         (analyze_function_body): Extract multiple calls of get_create.
1484         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1485         * ipa-inline.c (recursive_inlining): Use ::get method.
1486         * ipa-inline.h (estimate_edge_growth): Likewise.
1488 2018-06-08  Martin Liska  <mliska@suse.cz>
1490         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1491         HSA_INVALID.
1492         (hsa_function_summary::hsa_function_summary): Use the new enum
1493         value.
1494         (hsa_gpu_implementation_p): Use hsa_summaries::get.
1495         * hsa-gen.c (hsa_get_host_function): Likewise.
1496         (get_brig_function_name): Likewise.
1497         * ipa-hsa.c (process_hsa_functions): Likewise.
1498         (ipa_hsa_write_summary): Likewise.
1499         * symbol-summary.h (symtab_duplication): Use ::get function/
1500         (get): New function.
1502 2018-06-08  Martin Liska  <mliska@suse.cz>
1504         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1505         of get.
1506         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1507         (hsa_register_kernel): Likewise.
1508         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1509         * hsa-gen.c (hsa_get_host_function): Likewise.
1510         (get_brig_function_name): Likewise.
1511         (generate_hsa): Likewise.
1512         (pass_gen_hsail::execute): Likewise.
1513         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1514         (devirtualization_time_bonus): Likewise.
1515         (ipcp_propagate_stage): Likewise.
1516         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1517         (edge_set_predicate): Likewise.
1518         (evaluate_conditions_for_known_args): Likewise.
1519         (evaluate_properties_for_edge): Likewise.
1520         (ipa_fn_summary::reset): Likewise.
1521         (ipa_fn_summary_t::duplicate): Likewise.
1522         (dump_ipa_call_summary): Likewise.
1523         (ipa_dump_fn_summary): Likewise.
1524         (analyze_function_body): Likewise.
1525         (compute_fn_summary): Likewise.
1526         (estimate_edge_devirt_benefit): Likewise.
1527         (estimate_edge_size_and_time): Likewise.
1528         (estimate_calls_size_and_time): Likewise.
1529         (estimate_node_size_and_time): Likewise.
1530         (inline_update_callee_summaries): Likewise.
1531         (remap_edge_change_prob): Likewise.
1532         (remap_edge_summaries): Likewise.
1533         (ipa_merge_fn_summary_after_inlining): Likewise.
1534         (ipa_update_overall_fn_summary): Likewise.
1535         (read_ipa_call_summary): Likewise.
1536         (inline_read_section): Likewise.
1537         (write_ipa_call_summary): Likewise.
1538         (ipa_fn_summary_write): Likewise.
1539         (ipa_free_fn_summary): Likewise.
1540         * ipa-hsa.c (process_hsa_functions): Likewise.
1541         (ipa_hsa_write_summary): Likewise.
1542         (ipa_hsa_read_section): Likewise.
1543         * ipa-icf.c (sem_function::merge): Likewise.
1544         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1545         (do_estimate_edge_time): Likewise.
1546         (estimate_size_after_inlining): Likewise.
1547         (estimate_growth): Likewise.
1548         (growth_likely_positive): Likewise.
1549         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1550         (inline_call): Likewise.
1551         * ipa-inline.c (caller_growth_limits): Likewise.
1552         (can_inline_edge_p): Likewise.
1553         (can_inline_edge_by_limits_p): Likewise.
1554         (compute_uninlined_call_time): Likewise.
1555         (compute_inlined_call_time): Likewise.
1556         (want_inline_small_function_p): Likewise.
1557         (edge_badness): Likewise.
1558         (update_caller_keys): Likewise.
1559         (update_callee_keys): Likewise.
1560         (recursive_inlining): Likewise.
1561         (inline_small_functions): Likewise.
1562         (inline_to_all_callers_1): Likewise.
1563         (dump_overall_stats): Likewise.
1564         (early_inline_small_functions): Likewise.
1565         (early_inliner): Likewise.
1566         * ipa-inline.h (estimate_edge_growth): Likewise.
1567         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1568         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1569         * ipa-prop.h (IPA_NODE_REF): Likewise.
1570         (IPA_EDGE_REF): Likewise.
1571         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1572         (propagate_malloc): Likewise.
1573         * ipa-split.c (execute_split_functions): Likewise.
1574         * symbol-summary.h: Rename get to get_create.
1575         (get): Likewise.
1576         (get_create): Likewise.
1577         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1579 2018-06-08  Martin Liska  <mliska@suse.cz>
1581         * symbol-summary.h (release): Move definition out of class
1582         declaration.
1583         (symtab_removal): Likewise.
1584         (symtab_duplication): Likewise.
1586 2018-06-08  Martin Liska  <mliska@suse.cz>
1588         * symbol-summary.h (function_summary): Move constructor
1589         implementation out of class declaration.
1590         (release): Likewise.
1591         (symtab_insertion): Likewise.
1592         (symtab_removal): Likewise.
1593         (symtab_duplication): Likewise.
1594         (get): Likewise.
1596 2018-06-08  Martin Liska  <mliska@suse.cz>
1598         * Makefile.in: Remove support for MPX (macros, related functions,
1599         fields in cgraph_node, ...).
1600         * builtin-types.def (BT_BND): Likewise.
1601         (BT_FN_BND_CONST_PTR): Likewise.
1602         (BT_FN_CONST_PTR_BND): Likewise.
1603         (BT_FN_VOID_PTR_BND): Likewise.
1604         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
1605         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
1606         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
1607         (expand_builtin_mempcpy_with_bounds): Likewise.
1608         (expand_builtin_memset_with_bounds): Likewise.
1609         (expand_builtin_memset_args): Likewise.
1610         (std_expand_builtin_va_start): Likewise.
1611         (expand_builtin): Likewise.
1612         (expand_builtin_with_bounds): Likewise.
1613         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
1614         (DEF_LIB_BUILTIN_CHKP): Likewise.
1615         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
1616         (DEF_CHKP_BUILTIN): Likewise.
1617         (BUILT_IN_MEMCPY): Likewise.
1618         (BUILT_IN_MEMMOVE): Likewise.
1619         (BUILT_IN_MEMPCPY): Likewise.
1620         (BUILT_IN_MEMSET): Likewise.
1621         (BUILT_IN_STPCPY): Likewise.
1622         (BUILT_IN_STRCAT): Likewise.
1623         (BUILT_IN_STRCHR): Likewise.
1624         (BUILT_IN_STRCPY): Likewise.
1625         (BUILT_IN_STRLEN): Likewise.
1626         (BUILT_IN_MEMCPY_CHK): Likewise.
1627         (BUILT_IN_MEMMOVE_CHK): Likewise.
1628         (BUILT_IN_MEMPCPY_CHK): Likewise.
1629         (BUILT_IN_MEMSET_CHK): Likewise.
1630         (BUILT_IN_STPCPY_CHK): Likewise.
1631         (BUILT_IN_STRCAT_CHK): Likewise.
1632         (BUILT_IN_STRCPY_CHK): Likewise.
1633         * calls.c (store_bounds): Likewise.
1634         (emit_call_1): Likewise.
1635         (special_function_p): Likewise.
1636         (maybe_warn_nonstring_arg): Likewise.
1637         (initialize_argument_information): Likewise.
1638         (finalize_must_preallocate): Likewise.
1639         (compute_argument_addresses): Likewise.
1640         (expand_call): Likewise.
1641         * cfgexpand.c (expand_call_stmt): Likewise.
1642         (expand_return): Likewise.
1643         (expand_gimple_stmt_1): Likewise.
1644         (pass_expand::execute): Likewise.
1645         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
1646         (cgraph_node::remove): Likewise.
1647         (cgraph_node::dump): Likewise.
1648         (cgraph_node::verify_node): Likewise.
1649         * cgraph.h (chkp_function_instrumented_p): Likewise.
1650         (symtab_node::get_alias_target): Likewise.
1651         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
1652         (cgraph_local_p): Likewise.
1653         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
1654         (cgraph_edge::rebuild_references): Likewise.
1655         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
1656         (walk_polymorphic_call_targets): Likewise.
1657         (cgraph_node::expand_thunk): Likewise.
1658         (symbol_table::output_weakrefs): Likewise.
1659         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
1660         (ix86_handle_option): Likewise.
1661         * config/i386/constraints.md: Likewise.
1662         * config/i386/i386-builtin-types.def (BND): Likewise.
1663         (VOID): Likewise.
1664         (PVOID): Likewise.
1665         (ULONG): Likewise.
1666         * config/i386/i386-builtin.def (BDESC_END): Likewise.
1667         (BDESC_FIRST): Likewise.
1668         (BDESC): Likewise.
1669         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
1670         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
1671         * config/i386/i386.c (enum reg_class): Likewise.
1672         (ix86_target_string): Likewise.
1673         (ix86_option_override_internal): Likewise.
1674         (ix86_conditional_register_usage): Likewise.
1675         (ix86_valid_target_attribute_inner_p): Likewise.
1676         (ix86_set_indirect_branch_type): Likewise.
1677         (ix86_set_current_function): Likewise.
1678         (ix86_function_arg_regno_p): Likewise.
1679         (init_cumulative_args): Likewise.
1680         (ix86_function_arg_advance): Likewise.
1681         (ix86_function_arg): Likewise.
1682         (ix86_pass_by_reference): Likewise.
1683         (ix86_function_value_regno_p): Likewise.
1684         (ix86_function_value_1): Likewise.
1685         (ix86_function_value_bounds): Likewise.
1686         (ix86_return_in_memory): Likewise.
1687         (ix86_setup_incoming_vararg_bounds): Likewise.
1688         (ix86_va_start): Likewise.
1689         (indirect_thunk_need_prefix): Likewise.
1690         (print_reg): Likewise.
1691         (ix86_print_operand): Likewise.
1692         (ix86_expand_call): Likewise.
1693         (ix86_output_function_return): Likewise.
1694         (reg_encoded_number): Likewise.
1695         (BDESC_VERIFYS): Likewise.
1696         (ix86_init_mpx_builtins): Likewise.
1697         (ix86_init_builtins): Likewise.
1698         (ix86_emit_cmove): Likewise.
1699         (ix86_emit_move_max): Likewise.
1700         (ix86_expand_builtin): Likewise.
1701         (ix86_builtin_mpx_function): Likewise.
1702         (ix86_get_arg_address_for_bt): Likewise.
1703         (ix86_load_bounds): Likewise.
1704         (ix86_store_bounds): Likewise.
1705         (ix86_load_returned_bounds): Likewise.
1706         (ix86_store_returned_bounds): Likewise.
1707         (ix86_class_likely_spilled_p): Likewise.
1708         (ix86_hard_regno_mode_ok): Likewise.
1709         (x86_order_regs_for_local_alloc): Likewise.
1710         (ix86_mitigate_rop): Likewise.
1711         (ix86_bnd_prefixed_insn_p): Likewise.
1712         (ix86_mpx_bound_mode): Likewise.
1713         (ix86_make_bounds_constant): Likewise.
1714         (ix86_initialize_bounds): Likewise.
1715         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
1716         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
1717         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
1718         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
1719         (TARGET_CHKP_BOUND_MODE): Likewise.
1720         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
1721         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
1722         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
1723         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
1724         * config/i386/i386.h (TARGET_MPX): Likewise.
1725         (TARGET_MPX_P): Likewise.
1726         (VALID_BND_REG_MODE): Likewise.
1727         (FIRST_BND_REG): Likewise.
1728         (LAST_BND_REG): Likewise.
1729         (enum reg_class): Likewise.
1730         (BND_REG_P): Likewise.
1731         (BND_REGNO_P): Likewise.
1732         (BNDmode): Likewise.
1733         (ADJUST_INSN_LENGTH): Likewise.
1734         * config/i386/i386.md: Likewise.
1735         * config/i386/i386.opt: Likewise.
1736         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
1737         (defined): Likewise.
1738         (LINK_MPX): Likewise.
1739         (MPX_SPEC): Likewise.
1740         (LIBMPX_SPEC): Likewise.
1741         (LIBMPXWRAPPERS_SPEC): Likewise.
1742         (CHKP_SPEC): Likewise.
1743         * config/i386/predicates.md: Likewise.
1744         * dbxout.c (dbxout_type): Likewise.
1745         * doc/extend.texi: Likewise.
1746         * doc/invoke.texi: Likewise.
1747         * doc/md.texi: Likewise.
1748         * doc/tm.texi: Likewise.
1749         * doc/tm.texi.in: Likewise.
1750         * dwarf2out.c (is_base_type): Likewise.
1751         (gen_formal_types_die): Likewise.
1752         (gen_subprogram_die): Likewise.
1753         (gen_type_die_with_usage): Likewise.
1754         (gen_decl_die): Likewise.
1755         (dwarf2out_late_global_decl): Likewise.
1756         * expr.c (expand_assignment): Likewise.
1757         (emit_storent_insn): Likewise.
1758         (store_expr_with_bounds): Likewise.
1759         (store_expr): Likewise.
1760         (expand_expr_real_1): Likewise.
1761         * expr.h (store_expr_with_bounds): Likewise.
1762         * function.c (use_register_for_decl): Likewise.
1763         (struct bounds_parm_data): Likewise.
1764         (assign_parms_augmented_arg_list): Likewise.
1765         (assign_parm_find_entry_rtl): Likewise.
1766         (assign_parm_is_stack_parm): Likewise.
1767         (assign_parm_load_bounds): Likewise.
1768         (assign_bounds): Likewise.
1769         (assign_parms): Likewise.
1770         (expand_function_start): Likewise.
1771         * gcc.c (CHKP_SPEC): Likewise.
1772         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
1773         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
1774         (wrestrict_dom_walker::check_call): Likewise.
1775         * gimple.c (gimple_build_call_from_tree): Likewise.
1776         * gimple.h (enum gf_mask): Likewise.
1777         (gimple_call_with_bounds_p): Likewise.
1778         (gimple_call_set_with_bounds): Likewise.
1779         * gimplify.c (gimplify_init_constructor): Likewise.
1780         * ipa-cp.c (initialize_node_lattices): Likewise.
1781         (propagate_constants_across_call): Likewise.
1782         (find_more_scalar_values_for_callers_subset): Likewise.
1783         * ipa-hsa.c (process_hsa_functions): Likewise.
1784         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
1785         * ipa-icf.c (sem_function::merge): Likewise.
1786         * ipa-inline.c (early_inliner): Likewise.
1787         * ipa-pure-const.c (warn_function_noreturn): Likewise.
1788         (warn_function_cold): Likewise.
1789         (propagate_pure_const): Likewise.
1790         * ipa-ref.h (enum GTY): Likewise.
1791         * ipa-split.c (find_retbnd): Likewise.
1792         (consider_split): Likewise.
1793         (split_function): Likewise.
1794         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1795         * ipa.c (walk_polymorphic_call_targets): Likewise.
1796         (symbol_table::remove_unreachable_nodes): Likewise.
1797         (process_references): Likewise.
1798         (cgraph_build_static_cdtor_1): Likewise.
1799         * lto-cgraph.c (lto_output_node): Likewise.
1800         (output_refs): Likewise.
1801         (compute_ltrans_boundary): Likewise.
1802         (input_overwrite_node): Likewise.
1803         (input_node): Likewise.
1804         (input_cgraph_1): Likewise.
1805         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
1806         * passes.c (pass_manager::execute_early_local_passes): Likewise.
1807         (class pass_chkp_instrumentation_passes): Likewise.
1808         (make_pass_chkp_instrumentation_passes): Likewise.
1809         * passes.def: Likewise.
1810         * rtl.h (struct GTY): Likewise.
1811         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
1812         * stor-layout.c (layout_type): Likewise.
1813         * symtab.c: Likewise.
1814         * target.def: Likewise.
1815         * targhooks.c (default_chkp_bound_type): Likewise.
1816         (default_chkp_bound_mode): Likewise.
1817         (default_builtin_chkp_function): Likewise.
1818         (default_chkp_function_value_bounds): Likewise.
1819         (default_chkp_make_bounds_constant): Likewise.
1820         (default_chkp_initialize_bounds): Likewise.
1821         * targhooks.h (default_chkp_bound_type): Likewise.
1822         (default_chkp_bound_mode): Likewise.
1823         (default_builtin_chkp_function): Likewise.
1824         (default_chkp_function_value_bounds): Likewise.
1825         (default_chkp_make_bounds_constant): Likewise.
1826         (default_chkp_initialize_bounds): Likewise.
1827         * toplev.c (compile_file): Likewise.
1828         (process_options): Likewise.
1829         * tree-core.h (DEF_BUILTIN): Likewise.
1830         (DEF_BUILTIN_CHKP): Likewise.
1831         * tree-inline.c (declare_return_variable): Likewise.
1832         (remap_gimple_stmt): Likewise.
1833         (copy_bb): Likewise.
1834         (initialize_inlined_parameters): Likewise.
1835         (expand_call_inline): Likewise.
1836         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
1837         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
1838         (make_pass_ipa_chkp_produce_thunks): Likewise.
1839         (make_pass_chkp): Likewise.
1840         (make_pass_chkp_opt): Likewise.
1841         (make_pass_chkp_instrumentation_passes): Likewise.
1842         * tree-pretty-print.c (dump_generic_node): Likewise.
1843         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
1844         * tree-ssa-dce.c (propagate_necessity): Likewise.
1845         (eliminate_unnecessary_stmts): Likewise.
1846         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
1847         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1848         * tree-ssa-sccvn.h: Likewise.
1849         * tree-ssa-strlen.c (get_string_length): Likewise.
1850         (valid_builtin_call): Likewise.
1851         (adjust_last_stmt): Likewise.
1852         (handle_builtin_strchr): Likewise.
1853         (handle_builtin_strcpy): Likewise.
1854         (handle_builtin_stxncpy): Likewise.
1855         (handle_builtin_memcpy): Likewise.
1856         (handle_builtin_strcat): Likewise.
1857         (strlen_check_and_optimize_stmt): Likewise.
1858         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
1859         * tree-streamer-in.c: Likewise.
1860         * tree-streamer.c (record_common_node): Likewise.
1861         * tree.c (tree_code_size): Likewise.
1862         (wide_int_to_tree_1): Likewise.
1863         (type_contains_placeholder_1): Likewise.
1864         (build_common_tree_nodes): Likewise.
1865         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
1866         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
1867         (POINTER_BOUNDS_P): Likewise.
1868         (BOUNDED_TYPE_P): Likewise.
1869         (BOUNDED_P): Likewise.
1870         (CALL_WITH_BOUNDS_P): Likewise.
1871         (pointer_bounds_type_node): Likewise.
1872         * value-prof.c (gimple_ic): Likewise.
1873         * var-tracking.c (vt_add_function_parameters): Likewise.
1874         * varasm.c (make_decl_rtl): Likewise.
1875         (assemble_start_function): Likewise.
1876         (output_constant): Likewise.
1877         (maybe_assemble_visibility): Likewise.
1878         * varpool.c (ctor_for_folding): Likewise.
1879         * chkp-builtins.def: Remove.
1880         * ipa-chkp.c: Remove.
1881         * ipa-chkp.h: Remove.
1882         * rtl-chkp.c: Remove.
1883         * rtl-chkp.h: Remove.
1884         * tree-chkp-opt.c: Remove.
1885         * tree-chkp.c: Remove.
1886         * tree-chkp.h: Remove.
1888 2018-06-07  Carl Love  <cel@us.ibm.com>
1890         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
1891         vextract_fp_from_shortl): Add BE support.
1893 2018-06-07  Paul Koning  <ni1d@arrl.net>
1895         * compare-elim.c (try_merge_compare): Don't merge compare if
1896         address contains a side effect.
1897         (try_eliminate_compare): Likewise.
1899 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
1901         * config.gcc: Support "tremont".
1902         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
1903         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1904         PROCESSOR_TREMONT.
1905         * config/i386/i386.c (m_TREMONT): Define.
1906         (processor_target_table): Add "tremont".
1907         (PTA_TREMONT): Define.
1908         (ix86_lea_outperforms): Add TARGET_TREMONT.
1909         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
1910         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
1911         and M_INTEL_GOLDMONT_PLUS.
1912         (fold_builtin_cpu): Add "tremont".
1913         (ix86_add_stmt_cost): Add TARGET_TREMONT.
1914         (ix86_option_override_internal): Add "tremont".
1915         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
1916         (processor_type): Add PROCESSOR_TREMONT.
1917         * config/i386/x86-tune.def: Add m_TREMONT.
1918         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
1920 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1922         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
1923         symbol defined for msp430i* devices to be lower case.
1925         gcc/testsuite/gcc.target/msp430/
1926         * msp430i-device-symbol.c: New test.
1927         * msp430f-device-symbol.c: New test.
1928         * msp430.h: New test header file.
1930 2018-06-07  Richard Biener  <rguenther@suse.de>
1932         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
1933         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
1934         Properly wrap signed arithmetic if overflow wraps.
1936 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
1938         PR tree-optimization/69615
1939         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
1940         of a cast from a same precision integral SSA_NAME in a bb dominated
1941         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
1942         cast to utype if rhs2 has already a compatible type.
1944 2018-06-07  Richard Biener  <rguenther@suse.de>
1946         PR tree-optimization/85935
1947         * graphite-scop-detection.c (find_params_in_bb): Analyze
1948         condition operands with respect to the correct loop.  Assert
1949         the analysis doesn't fail.
1951 2018-06-04  Carl Love  <cel@us.ibm.com>
1953         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
1954         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
1955         as it is slightly cheaper.
1956         (first_match_or_eos_index_<mode>):
1957         Calculate index using natural element order.
1958         (first_match_index_<mode>):
1959         Calculate index using natural element order.
1960         (first_match_or_eos_index_<mode>):
1961         Calculate index using natural order.
1962         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
1963         for BE and LE modes.
1964         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
1965         P9V_BUILTIN_VCLZLSBB_V16QI.
1966         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
1967         specific.
1969 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1971         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
1972         indentation and line wrap for many prototypes.  Add missing
1973         @smallexample directives around block of prototypes for vec_xl and
1974         vec_xst.
1976 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
1978         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
1979         track if we pass or return IEEE 128-bit floating point.
1980         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
1981         C++ mangling that is compatible with GCC 8.1.
1982         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
1983         (init_cumulative_args): Note if we pass or return IEEE 128-bit
1984         floating point types.
1985         (rs6000_function_arg_advance_1): Likewise.
1986         (rs6000_mangle_type): Optionally generate mangled names that match
1987         what GCC 8.1 generated for IEEE 128-bit floating point types.
1988         (rs6000_globalize_decl_name): If we have an external function that
1989         passes or returns IEEE 128-bit types, generate a weak reference
1990         from the mangled name used in GCC 8.1 to the current mangled
1991         name.
1992         (rs6000_init_builtins): Make __ibm128 use the long double type if
1993         long double is IBM extended double.  Make __float128 use the long
1994         double type if long double is IEEE 128-bit.
1996         PR target/85657
1997         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
1998         macro for __ibm128 built-in functions.
1999         (PACK_IF): Add __ibm128 pack/unpack functions.
2000         (UNPACK_IF): Likewise.
2001         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2002         enable long double built-in functions if long double is IEEE
2003         128-bit floating point.
2004         (rs6000_invalid_builtin): Update long double built-in function
2005         error message.
2006         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2007         functions, adjust the built-in function to use the long double
2008         built-in function if __ibm128 and long double are the same type.
2009         * doc/extend.texi (PowerPC builtins): Update documention for
2010         __builtin_{,un}pack_longdouble.  Add documentation for
2011         __builtin_{,un}pack_ibm128.
2013 2018-06-06  Jim Wilson  <jimw@sifive.com>
2015         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2016         (struct machine_function): New field interrupt_mode.
2017         (riscv_handle_type_attribute): New function.  Add forward declaration.
2018         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2019         (riscv_expand_epilogue): Check interrupt_mode field.
2020         (riscv_set_current_function): Check interrupt attribute args and
2021         set interrupt_mode field.
2022         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2023         (riscv_sret, riscv_uret): New.
2024         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2025         new arguments to interrupt attribute.
2027 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2029         PR target/63177
2030         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2031         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2033 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2035         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2036         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2037         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2038         several redundant entries.
2040 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2042         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2043         type from "rtx" to "rtx_insn *".
2044         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2045         for local "call_insn", removing cast.
2046         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2048 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2050         PR tree-optimization/86066
2051         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2052         for BIT_INSERT_EXPR stores.
2054 2018-06-06  Richard Biener  <rguenther@suse.de>
2056         PR tree-optimization/86062
2057         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2058         component refs ontop
2059         of to be offsetted base.
2061 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2063         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2064         to be static and remove check on interrupt attribute name.
2066         gcc/testsuite/gcc.target/msp430/
2067         * function-attributes-4.c: New test.
2068         * static-interrupts.c: New test.
2070 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2072         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2073         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2075 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2077         PR target/79924
2078         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2079         second argument.
2080         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2081         Remove second argument, change how error is called.
2082         (aarch64_layout_arg): Remove second argument from
2083         aarch64_err_no_fpadvsimd call.
2084         (aarch64_init_cumulative_args): Ditto.
2085         (aarch64_gimplify_va_arg_expr): Ditto.
2086         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2088 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2090         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2091         (*simple_return_indirect_internal<mode>): Rename from
2092         simple_return_indirect_internal.  Use W mode iterator.
2093         (rstorssp): New expander.
2094         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2095         (clrssbsy): New expander.
2096         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2098 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2100         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2101         __typeof__.
2102         (cmse_check_pointed_object): Likewise.
2104 2018-06-05  Martin Liska  <mliska@suse.cz>
2106         PR gcov-profile/47618
2107         * doc/invoke.texi: Document how -fprofile-dir format
2108         is extended.
2110 2018-06-05  Richard Biener  <rguenther@suse.de>
2112         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2113         removal pretend DOM info isn't available so we do not update
2114         it and only remove edges, not dominated blocks.  Actually free
2115         DOM info in case we removed something.  Remove unreachable blocks.
2116         (mfb_keep_latches): Work with either DOM info or marked backedges.
2117         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2118         first.  Mark backedges if DOM info isn't available.
2119         (Re-)compute DOM info after cleanup_control_flow_pre.
2121 2018-06-05  Richard Biener  <rguenther@suse.de>
2123         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2124         (locus_discrim_hasher::hash): Adjust.
2125         (locus_discrim_hasher::equal): Likewise.
2126         (next_discriminator_for_locus): Work on line directly.
2127         (same_line_p): Pass in expanded locus1 as well.
2128         (assign_discriminators): Avoid redundant location expansions.
2130 2018-06-05  Richard Biener  <rguenther@suse.de>
2132         PR tree-optimization/86046
2133         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2134         if required after clearing TREE_ADDRESSABLE.
2136 2018-06-05  Richard Biener  <rguenther@suse.de>
2138         PR tree-optimization/86047
2139         * tree-ssa-loop.c (for_each_index): Glob handling of all
2140         decls and constants and really handle all of them.
2142 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2144         PR target/81497
2145         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2146         qualifier_void_pointer and qualifier_const_void_pointer.
2147         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2148         (arm_init_builtins): Handle the above.
2149         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2150         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2151         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2152         void intrinsics.
2154 2018-06-05  Martin Liska  <mliska@suse.cz>
2156         * auto-profile.c (read_autofdo_file): Do not use
2157         gcov_ctr_summary struct.
2158         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2159         * coverage.c (struct counts_entry): Likewise.
2160         (read_counts_file): Read just single summary entry.
2161         (get_coverage_counts): Use gcov_summary struct.
2162         * coverage.h (get_coverage_counts): Likewise.
2163         * gcov-dump.c (dump_working_sets): Likewise.
2164         (tag_summary): Dump just single summary.
2165         * gcov-io.c (gcov_write_summary): Write just histogram
2166         summary.
2167         (gcov_read_summary): Read just single summary.
2168         (compute_working_sets): Use gcov_summary struct.
2169         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2170         of GCOV_COUNTERS_SUMMABLE.
2171         (GCOV_COUNTERS_SUMMABLE): Remove.
2172         (GCOV_FIRST_VALUE_COUNTER): Replace with
2173         GCOV_COUNTER_V_INTERVAL.
2174         (struct gcov_ctr_summary): Remove.
2175         (struct gcov_summary): Directly use fields of former
2176         gcov_ctr_summary.
2177         (compute_working_sets): Use gcov_summary struct.
2178         * gcov.c (read_count_file): Do not use ctrs fields.
2179         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2180         struct.
2181         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2182         struct.
2183         * profile.c: Likewise.
2184         * profile.h: Likewise.
2186 2018-06-05  Martin Liska  <mliska@suse.cz>
2188         PR gcov-profile/84846
2189         * gcov.c (output_lines): Print working directory only
2190         in intermediate format.
2192 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
2194         * config/s390/s390-builtin-types.def: Add void function type.
2195         * config/s390/s390-builtins.def: Use the function type for the
2196         tbeginc builtin.
2198 2018-06-04  Jim Wilson  <jimw@sifive.com>
2200         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2201         to int.
2202         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
2203         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
2204         handle EH_RETURN_DATA_REGNO registers properly.
2205         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2206         (riscv_expand_epilogue): Update comment.  Change argument name and
2207         type.  Update code to use new name and type.  Pass new args to
2208         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
2209         EXCEPTION_RETURN.
2210         * config/riscv/riscv.md (NORMAL_RETURN): New.
2211         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2212         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2213         (eh_return): Call gen_eh_return_internal and emit barrier.
2214         (eh_return_internal): Call riscv_expand_epilogue.
2216 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
2218         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2219         bit_insertion field and declare can_be_merged_into method.
2220         (merged_store_group::can_be_merged_into): New method.
2221         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2222         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
2223         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2225 2018-06-04  Richard Biener  <rguenther@suse.de>
2227         PR tree-optimization/85955
2228         * builtins.c (fold_builtin_sincos): Convert pointers to
2229         destination to appropriate type before dereferencing.
2231 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
2233         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2235 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
2237         * expr.c (expand_expr_real_1): Force the operand into memory if
2238         its TYPE_MODE is BLKmode and if there is no integer mode for
2239         the number of bits being extracted.
2241 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2243         PR target/85832
2244         PR target/86036
2245         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2246         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2248 2018-06-04  Richard Biener  <rguenther@suse.de>
2250         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2251         (cleanup_tree_cfg_noloop): ... single caller.  Do
2252         start_recording_case_labels later.
2254 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
2256         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2257         to _IMMINTRIN_H_INCLUDED.
2258         * config/i386/pconfigintrin.h: Ditto.
2259         * config/i386/waitpkgintrin.h: Ditto.
2260         * config/i386/immintrin.h: Add includes for sgxintrin.h,
2261         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2262         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2263         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2264         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2265         waitpkgintrin.h and cldemoteintrin.h.
2267 2018-06-04  Richard Biener  <rguenther@suse.de>
2269         PR tree-optimization/86038
2270         * tracer.c (find_best_successor): Check probability for
2271         being initialized, bail out if not.
2273 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
2275         PR target/86003
2276         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2277         of bits to ignore when comparing architectures.
2279 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2281         PR tree-optimization/69615
2282         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2283         maximum or minimum of the type, try to merge it also as if
2284         range1 is + [-, x - 1] or + [x + 1, -].
2286         PR c++/86025
2287         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2289 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2291         PR tree-optimization/86034
2292         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2293         the unsigned bitfield type in a bit insertion sequence if it does not
2294         have a larger precision than the bitfield size.
2295         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2297 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
2299         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2301 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2303         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2304         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2305         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2306         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2308 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2310         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2311         Disable -fdelete-null-pointer-checks for ELF toolchain.
2313 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2314             Kito Cheng  <kito.cheng@gmail.com>
2316         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2317         (nds32le-*-*, nds32be-*-*): Integrate checking process.
2318         (nds32*-*-*): Add glibc and uclibc conditions.
2319         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2320         (TARGET_EXCEPT_UNWIND_INFO): Define.
2321         * config/nds32/elf.h: New file.
2322         * config/nds32/linux.h: New file.
2323         * config/nds32/nds32-elf.opt: New file.
2324         * config/nds32/nds32-linux.opt: New file.
2325         * config/nds32/nds32-fp-as-gp.c
2326         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2327         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2328         TARGET_LINUX_ABI.
2329         (nds32_asm_file_end): Ditto.
2330         (nds32_print_operand): Ditto.
2331         (nds32_insert_attributes): Ditto.
2332         (nds32_init_libfuncs): New function.
2333         (TARGET_HAVE_TLS): Define.
2334         (TARGET_INIT_LIBFUNCS): Define.
2335         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2336         spec content.
2337         (TARGET_ELF): Apply different mcmodel setting.
2338         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2339         been migrated into elf.h and linux.h files.
2340         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2341         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2342         (mcmodel): The content has been migrated into nds32-elf.opt and
2343         nds32-linux.opt files.
2344         * config/nds32/t-elf: New file.
2345         * config/nds32/t-linux: New file.
2347 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2348             Shiva Chen  <shiva0217@gmail.com>
2350         * config/nds32/constants.md (unspec_volatile_element): Add
2351         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2352         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2353         optimization.
2354         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2355         (make_pass_nds32_fp_as_gp): Declare.
2356         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2357         optmization pass.
2358         (nds32_asm_function_end_prologue): Remove unused asm output.
2359         (nds32_asm_function_begin_epilogue): Remove unused asm output.
2360         (nds32_asm_file_start): Output necessary fp_as_gp information.
2361         (nds32_option_override): Adjust register usage.
2362         (nds32_expand_prologue): Consider fp_as_gp situation.
2363         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2364         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2365         (epilogue): Ditto.
2366         (return): Ditto.
2367         (simple_return): Ditto.
2368         (omit_fp_begin): Output special directive for fp_as_gp.
2369         (omit_fp_end): Output special directive for fp_as_gp.
2370         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2371         mforbid-fp-as-gp): New options.
2373 2018-06-01  Mark Wielaard  <mark@klomp.org>
2375         * dwarf2out.c (dwarf2out_finish): Remove generation of
2376         DW_AT_loclists_base.
2378 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2380         * gimple-ssa-store-merging.c: Include gimple-fold.h.
2381         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2382         (struct merged_store_group): Add bit_insertion field.
2383         (dump_char_array): Use standard hexadecimal format.
2384         (merged_store_group::merged_store_group): Set bit_insertion to false.
2385         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
2386         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
2387         also print the mask in the dump file.
2388         (pass_store_merging::gate): Minor tweak.
2389         (imm_store_chain_info::coalesce_immediate): Fix wrong association
2390         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
2391         stores with INTEGER_CST stores.
2392         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2393         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2394         and use it throughout.  Generate bit insertion sequences if need be.
2395         (pass_store_merging::process_store): Remove redundant condition.
2396         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2398 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
2400         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2401         the 128-bit floating point types.  Fix function comment.
2403 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2405         * config/aarch64/aarch64-simd.md
2406         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2407         mnemonics.
2408         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2409         mnemonics.
2411 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2413         PR tree-optimization/85989
2414         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2415         variable.
2416         (backprop::intersect_uses): Check it when deciding whether this
2417         is a backedge reference.
2418         (backprop::process_block): Add each phi to m_visited_phis
2419         after visiting it, then clear it at the end.
2421 2018-06-01  Richard Biener  <rguenther@suse.de>
2423         * tree-vectorizer.h (vect_dr_stmt): New function.
2424         (vect_get_load_cost): Adjust.
2425         (vect_get_store_cost): Likewise.
2426         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2427         Use vect_dr_stmt instead of DR_SMTT.
2428         (vect_record_base_alignments): Likewise.
2429         (vect_calculate_target_alignment): Likewise.
2430         (vect_compute_data_ref_alignment): Likewise and make static.
2431         (vect_update_misalignment_for_peel): Likewise.
2432         (vect_verify_datarefs_alignment): Likewise.
2433         (vector_alignment_reachable_p): Likewise.
2434         (vect_get_data_access_cost): Likewise.  Pass down
2435         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2436         (vect_get_peeling_costs_all_drs): Likewise.
2437         (vect_peeling_hash_get_lowest_cost): Likewise.
2438         (vect_enhance_data_refs_alignment): Likewise.
2439         (vect_find_same_alignment_drs): Likewise.
2440         (vect_analyze_data_refs_alignment): Likewise.
2441         (vect_analyze_group_access_1): Likewise.
2442         (vect_analyze_group_access): Likewise.
2443         (vect_analyze_data_ref_access): Likewise.
2444         (vect_analyze_data_ref_accesses): Likewise.
2445         (vect_vfa_segment_size): Likewise.
2446         (vect_small_gap_p): Likewise.
2447         (vectorizable_with_step_bound_p): Likewise.
2448         (vect_prune_runtime_alias_test_list): Likewise.
2449         (vect_analyze_data_refs): Likewise.
2450         (vect_supportable_dr_alignment): Likewise.
2451         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2452         (vect_gen_prolog_loop_niters): Likewise.
2453         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2454         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2455         modify DR_STMT.
2456         (vect_recog_mask_conversion_pattern): Likewise.
2457         (vect_try_gather_scatter_pattern): Likewise.
2458         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2459         to vect_get_store_cost.
2460         (vect_get_store_cost): Get stmt_info instead of DR.
2461         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2462         (vect_get_load_cost): Get stmt_info instead of DR.
2464 2018-06-01  Richard Biener  <rguenther@suse.de>
2466         PR middle-end/86017
2467         * gimple-fold.c (var_decl_component_p): Also allow offsetted
2468         vars wrapped in MEM_REFs.
2470 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2472         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2473         Fix subreg tests so that we only return a choice between
2474         GENERAL_REGS and FP_REGS if the original classes included both.
2476 2018-06-01  Richard Biener  <rguenther@suse.de>
2478         PR ipa/85960
2479         * tree-ssa-structalias.c (get_function_part_constraint):
2480         Handle NULL fi->decl.
2481         (find_func_aliases_for_call): Properly handle indirect
2482         fi from direct call.
2483         (find_func_clobbers): Likewise.
2484         (ipa_pta_execute): Likewise.
2485         (create_variable_info_for): For functions that are ifunc_resolver
2486         resolve to a varinfo that contains the result of the resolver call.
2487         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2488         aliases.
2490 2018-05-31  Michael Collison  <michael.collison@arm.com>
2492         * config/aarch64/aarch64.md:
2493         (*fix_to_zero_extenddfdi2): New pattern.
2494         * gcc.target/aarch64/fix_extend1.c: New testcase.
2496 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
2498         PR middle-end/78809
2499         PR middle-end/83026
2500         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2501         and BUILT_IN_STRNCMP_EQ.
2502         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2503         BUILT_IN_STRNCMP_EQ.
2504         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2505         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2506         (gimple_fold_builtin): Likewise.
2507         * tree-ssa-strlen.c (compute_string_length): New function.
2508         (determine_min_obsize): New function.
2509         (handle_builtin_string_cmp): New function to handle calls to
2510         string compare functions.
2511         (strlen_optimize_stmt): Add handling to builtin string compare
2512         calls.
2513         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2514         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2515         * tree.c (build_common_builtin_nodes): Add new defines of
2516         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2518 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
2520         PR target/85984
2521         * bb-reorder.c (pass_partition_blocks::gate): Return false for
2522         functions with naked attribute.
2524 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
2526         * config/i386/sse.md (avx_vec_concat<mode>):
2527         Substitute concat_tg_mode mode attribute with xtg_mode.
2528         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2529         (concat_tg_mode): Remove mode attribute.
2531 2018-05-31  Martin Sebor  <msebor@redhat.com>
2533         PR c/82063
2534         * calls.c (alloc_max_size): Correct a logic error/typo.
2535         Treat excessive arguments as infinite.  Warn for invalid arguments.
2536         * doc/invoke.texi (-Walloc-size-larger-than): Update.
2538 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
2540         PR target/85829
2541         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2542         and movx for Haswell.
2544 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
2545             Cesar Philippidis  <cesar@codesourcery.com>
2547         PR middle-end/85879
2548         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2549         when emitting error on private/firstprivate reductions.
2550         * omp-low.c (lower_omp_target): Avoid reference-type processing
2551         on pointers for firstprivate clause.
2553 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2555         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2556         (st1x2): Likewise.
2557         (st1x3): Likewise.
2558         * config/aarch64/aarch64-simd.md
2559         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2560         (aarch64_ld1_x3_<mode>): Likewise
2561         (aarch64_st1x2<VALLDIF:mode>): Likewise
2562         (aarch64_st1_x2_<mode>): Likewise
2563         (aarch64_st1x3<VALLDIF:mode>): Likewise
2564         (aarch64_st1_x3_<mode>): Likewise
2565         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2566         (vld1_s8_x3): Likewise.
2567         (vld1_u16_x3): Likewise.
2568         (vld1_s16_x3): Likewise.
2569         (vld1_u32_x3): Likewise.
2570         (vld1_s32_x3): Likewise.
2571         (vld1_u64_x3): Likewise.
2572         (vld1_s64_x3): Likewise.
2573         (vld1_f16_x3): Likewise.
2574         (vld1_f32_x3): Likewise.
2575         (vld1_f64_x3): Likewise.
2576         (vld1_p8_x3): Likewise.
2577         (vld1_p16_x3): Likewise.
2578         (vld1_p64_x3): Likewise.
2579         (vld1q_u8_x3): Likewise.
2580         (vld1q_s8_x3): Likewise.
2581         (vld1q_u16_x3): Likewise.
2582         (vld1q_s16_x3): Likewise.
2583         (vld1q_u32_x3): Likewise.
2584         (vld1q_s32_x3): Likewise.
2585         (vld1q_u64_x3): Likewise.
2586         (vld1q_s64_x3): Likewise.
2587         (vld1q_f16_x3): Likewise.
2588         (vld1q_f32_x3): Likewise.
2589         (vld1q_f64_x3): Likewise.
2590         (vld1q_p8_x3): Likewise.
2591         (vld1q_p16_x3): Likewise.
2592         (vld1q_p64_x3): Likewise.
2593         (vst1_s64_x2): Likewise.
2594         (vst1_u64_x2): Likewise.
2595         (vst1_f64_x2): Likewise.
2596         (vst1_s8_x2): Likewise.
2597         (vst1_p8_x2): Likewise.
2598         (vst1_s16_x2): Likewise.
2599         (vst1_p16_x2): Likewise.
2600         (vst1_s32_x2): Likewise.
2601         (vst1_u8_x2): Likewise.
2602         (vst1_u16_x2): Likewise.
2603         (vst1_u32_x2): Likewise.
2604         (vst1_f16_x2): Likewise.
2605         (vst1_f32_x2): Likewise.
2606         (vst1_p64_x2): Likewise.
2607         (vst1q_s8_x2): Likewise.
2608         (vst1q_p8_x2): Likewise.
2609         (vst1q_s16_x2): Likewise.
2610         (vst1q_p16_x2): Likewise.
2611         (vst1q_s32_x2): Likewise.
2612         (vst1q_s64_x2): Likewise.
2613         (vst1q_u8_x2): Likewise.
2614         (vst1q_u16_x2): Likewise.
2615         (vst1q_u32_x2): Likewise.
2616         (vst1q_u64_x2): Likewise.
2617         (vst1q_f16_x2): Likewise.
2618         (vst1q_f32_x2): Likewise.
2619         (vst1q_f64_x2): Likewise.
2620         (vst1q_p64_x2): Likewise.
2621         (vst1_s64_x3): Likewise.
2622         (vst1_u64_x3): Likewise.
2623         (vst1_f64_x3): Likewise.
2624         (vst1_s8_x3): Likewise.
2625         (vst1_p8_x3): Likewise.
2626         (vst1_s16_x3): Likewise.
2627         (vst1_p16_x3): Likewise.
2628         (vst1_s32_x3): Likewise.
2629         (vst1_u8_x3): Likewise.
2630         (vst1_u16_x3): Likewise.
2631         (vst1_u32_x3): Likewise.
2632         (vst1_f16_x3): Likewise.
2633         (vst1_f32_x3): Likewise.
2634         (vst1_p64_x3): Likewise.
2635         (vst1q_s8_x3): Likewise.
2636         (vst1q_p8_x3): Likewise.
2637         (vst1q_s16_x3): Likewise.
2638         (vst1q_p16_x3): Likewise.
2639         (vst1q_s32_x3): Likewise.
2640         (vst1q_s64_x3): Likewise.
2641         (vst1q_u8_x3): Likewise.
2642         (vst1q_u16_x3): Likewise.
2643         (vst1q_u32_x3): Likewise.
2644         (vst1q_u64_x3): Likewise.
2645         (vst1q_f16_x3): Likewise.
2646         (vst1q_f32_x3): Likewise.
2647         (vst1q_f64_x3): Likewise.
2648         (vst1q_p64_x3): Likewise.
2650 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2652         * config/msp430/msp430.c (msp430_output_labelref): Prepend
2653         user_label_prefix to name.
2655         * tree-core.h: Update comment about the format of NAME string
2656         passed to handler in attribute_spec.
2658         * config/msp430/msp430.md: Remove erroneous subreg expression from
2659         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
2660         zero_extend{q,h}isi2.
2662 2018-05-30  Borislav Petkov  <bp@suse.de>
2664         * doc/extend.texi: Document some architecture specific
2665         constraints and sort entries.
2667 2018-05-30  Martin Sebor  <msebor@redhat.com>
2669         PR middle-end/85369
2670         * builtins.c (expand_builtin_stpcpy_1): New function.
2671         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
2672         only if the former succeeds.
2674 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2676         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
2677         in saphira.
2679 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2681         * doc/invoke.texi (-flinker-output): Document
2683 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2685         * passes.c (ipa_write_summaries): Only modify statements if body
2686         is in memory.
2687         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
2688         incrementally linking.
2689         (ipa_passes): Likewise.
2690         * lto-cgraph.c (lto_output_node): When incrementally linking do not
2691         pass down resolution info.
2692         * common.opt (flag_incremental_link): Update info.
2693         * gcc.c (plugin specs): Turn flinker-output=* to
2694         -plugin-opt=-linker-output-known
2695         * toplev.c (compile_file): Also cut compilation when doing incremental
2696         link.
2697         * flag-types. (enum lto_partition_model): Add
2698         LTO_LINKER_OUTPUT_NOLTOREL.
2699         (invoke.texi): Add -flinker-output docs.
2700         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
2701         link same way as WPA; do not stream in dead initializers.
2703         * dwarf2out.c (dwarf2out_die_ref_for_decl,
2704         darf2out_register_external_decl): Support incremental link.
2706 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2708         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
2710 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2712         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
2713         it down to simple_object_copy_lto_debug_sections.
2714         (run_gcc): Determine incremental LTO link time and configure
2715         lto1 into non-wpa mode, disable renaming of debug sections.
2717 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2719         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2720         descriptions of various incorrectly documented functions.
2722 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2724         Revert:
2725         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2726         address check not strict.
2728 2018-05-30  Richard Biener  <rguenther@suse.de>
2730         PR tree-optimization/85964
2731         * tracer.c (better_p): Drop initialized count check, we only
2732         call the function with initialized counts now.
2733         (find_best_successor): Do find a best edge if one
2734         has uninitialized count.
2735         (find_best_predecessor): Likewise.  Do BB frequency check only
2736         if count is initialized.
2738 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
2740         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
2741         (aarch64_ldrstr_offset_compare): New.
2742         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
2743         load/store orderings.
2744         (aarch64_gen_adjusted_ldpstp): Likewise.
2746 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
2748         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2749         Check for subset of GENERAL_REGS and FP_REGS.
2750         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
2751         r=w alternative.
2753 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
2755         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
2756         and wi::to_poly_offset.  Add the current offset and then check
2757         whether the sum fits, rather than using an unchecked addition of
2758         a checked term.  Check for a shwi rather than a uhwi.
2759         * expr.c (get_bit_range): Use tree_to_poly_uint64.
2760         (store_constructor): Use poly_int_tree_p.
2761         (expand_expr_real_1): Likewise.
2762         * function.c (assign_temp): Likewise.
2763         * fold-const.c (const_binop): Use poly_int_tree_p and
2764         wi::to_poly_offset.
2765         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
2766         division.
2767         * ipa-icf-gimple.c (func_checker::compare_operand): Use
2768         to_poly_offset for MEM offsets.
2769         * ipa-icf.c (sem_variable::equals): Likewise.
2770         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
2771         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
2772         wi::to_poly_offset for BIT_FIELD_REF offsets.
2773         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
2774         wi::to_poly_offset.
2775         * var-tracking.c (emit_note_insn_var_location): Use
2776         tree_to_poly_uint64.
2778 2018-05-29  Jim Wilson  <jimw@sifive.com>
2780         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
2782 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
2784         PR target/85950
2785         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
2786         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
2787         sequence.
2788         (sse4_1_round<mode>2): Use nonimmediate_operand
2789         for operand 1 predicate.
2791 2018-05-29  Martin Sebor  <msebor@redhat.com>
2792             Richard Biener  <rguenther@suse.de>
2794         PR testsuite/85888
2795         * calls.c (get_size_range): Call determine_value_range instead
2796         of get_value_range..
2797         * tree-vrp.h (determine_value_range): Declared new function.
2798         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
2800 2018-05-29  Richard Biener  <rguenther@suse.de>
2802         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
2803         sure to use non-pattern stmts for get_earlier_stmt arguments.
2804         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
2805         called on pattern stmts.
2806         (get_later_stmt): Likewise.
2808 2018-05-29  Martin Liska  <mliska@suse.cz>
2810         PR gcov-profile/85759
2811         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
2812         env variables.
2814 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
2816         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
2817         VEC_UNPACK_*_EXPR.
2818         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
2819         VEC_PACK_*_EXPR.
2821         PR target/85918
2822         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
2823         VEC_PACK_FLOAT_EXPR): New tree codes.
2824         * tree-pretty-print.c (op_code_prio): Handle
2825         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
2826         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
2827         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
2828         * tree-inline.c (estimate_operator_cost): Likewise.
2829         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
2830         * fold-const.c (const_binop): Likewise.
2831         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
2832         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
2833         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2834         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
2835         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
2836         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
2837         * expr.c (expand_expr_real_2): Likewise.
2838         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
2839         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
2840         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
2841         optabs.
2842         * optabs.c (expand_widen_pattern_expr): For
2843         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
2844         sign from result type rather than operand's type.
2845         (expand_binop_directly): For vec_packu_float_optab and
2846         vec_packs_float_optab allow result type to be different from operand's
2847         type.
2848         * optabs-tree.c (optab_for_tree_code): Handle
2849         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
2850         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
2851         * tree-vect-generic.c (expand_vector_operations_1):  Handle
2852         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
2853         VEC_PACK_FLOAT_EXPR.
2854         * tree-vect-stmts.c (supportable_widening_operation): Handle
2855         FIX_TRUNC_EXPR.
2856         (supportable_narrowing_operation): Handle FLOAT_EXPR.
2857         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
2858         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
2859         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
2860         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
2861         mode attributes.
2862         (vec_pack<floatprefix>_float_<mode>): New expander.
2863         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
2864         attributes.
2865         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
2866         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
2867         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
2868         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
2869         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
2870         Document.
2871         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
2872         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
2873         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
2874         VEC_PACK_FLOAT_EXPR): Document.
2876 2018-05-29  Richard Biener  <rguenther@suse.de>
2878         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
2879         member.
2880         (stmt_vec_info_vec): Make pointer.
2881         (init_stmt_vec_info_vec): Remove.
2882         (free_stmt_vec_info_vec): Likewise.
2883         (set_stmt_vec_info_vec): New function.
2884         (free_stmt_vec_infos): Likewise.
2885         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
2886         (set_vinfo_for_stmt): Likewise.
2887         (get_earlier_stmt): Likewise.
2888         (get_later_stmt): Likewise.
2889         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
2890         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
2891         (vec_info::~vec_info): Free stmt_vec_infos.
2892         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
2893         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
2894         (pass_slp_vectorize::execute): Likewise.
2895         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
2896         (free_stmt_vec_info_vec): Likewise.
2897         (set_stmt_vec_info_vec): New function.
2898         (free_stmt_vec_infos): Likewise.
2899         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
2900         the global stmt_vec_info_vec.
2901         * tree-parloops.c (gather_scalar_reductions): Use
2902         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
2903         vector.
2905 2018-05-29  Richard Biener  <rguenther@suse.de>
2907         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
2909 2018-05-29  Martin Liska  <mliska@suse.cz>
2910             David Malcolm  <dmalcolm@redhat.com>
2912         * vec.c (test_reverse): New.
2913         (vec_c_tests): Add new test.
2914         * vec.h (vl_ptr>::reverse): New function.
2916 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
2918         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
2920         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
2921         and later.
2923 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2925         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
2927 2018-05-28  Richard Biener  <rguenther@suse.de>
2929         PR tree-optimization/85933
2930         * tree-vect-data-refs.c (vect_record_base_alignments): Only
2931         look at stmts marked as vectorizable.
2933 2018-05-28  Richard Biener  <rguenther@suse.de>
2935         PR tree-optimization/85934
2936         * tree-vect-generic.c (expand_vector_operations_1): Hoist
2937         vector boolean check before scalar optimization.
2939 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
2941         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
2942         for armv5te.
2944 2018-05-28  Mark Wielaard  <mark@klomp.org>
2946         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
2947         if it is an expression containing a minus sign.
2949 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
2951         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
2953 2018-05-27  Paul Koning  <ni1d@arrl.net>
2955         * config/pdp11/pdp11.md (truncsihi2): Remove.
2957 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
2958             Chung-Ju Wu  <jasonwucj@gmail.com>
2960         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
2961         implementation.
2962         (unaligned_store_dw): Ditto.
2963         * config/nds32/nds32-memory-manipulation.c
2964         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
2965         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
2966         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
2967         (emit_setmem_word_loop): Rename to ...
2968         (emit_setmem_doubleword_loop): ... this.
2969         (nds32_gen_dup_4_byte_to_word_value): New function.
2970         (nds32_gen_dup_8_byte_to_double_word_value): New function.
2971         (nds32_expand_setmem_loop): Refine implementation.
2972         (nds32_expand_setmem_loop_v3m): Ditto.
2973         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
2974         pattern.
2976 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
2978         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
2980 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
2982         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
2983         (nds32_init_machine_status): Initialize machine->attr_naked_p and
2984         machine->attr_no_prologue_p.
2985         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
2986         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
2987         (nds32_expand_epilogue): Consider attr_naked_p.
2988         (nds32_expand_epilogue_v3pop): Likewise.
2989         (nds32_can_use_return_insn): Likewise.
2990         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
2991         attr_no_prologue_p fields.
2992         * config/nds32/nds32.opt (mret-in-naked-func): New option.
2994 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
2996         PR target/85918
2997         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
2998         attributes.
2999         * config/i386/sse.md
3000         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3001         Rename to ...
3002         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3003         ... this.
3004         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3005         Rename to ...
3006         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3007         ... this.
3008         (*<floatsuffix>floatv2div2sf2): Rename to ...
3009         (*float<floatunssuffix>v2div2sf2): ... this.
3010         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3011         (float<floatunssuffix>v2div2sf2_mask): ... this.
3012         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3013         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3014         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3015         to ...
3016         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3017         ... this.
3018         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3019         Rename to ...
3020         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3021         ... this.
3022         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3023         Rename to ...
3024         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3025         ... this.
3026         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3027         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3028         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3029         gen_ufix_truncv8dfv8si2.
3030         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3031         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3032         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3033         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3034         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3035         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3036         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3037         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3039 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3041         PR target/85900
3042         PR target/85345
3043         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3045 2018-05-25  Jim Wilson  <jimw@sifive.com>
3047         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3048         * config/riscv/riscv.c (struct machine_function): Add
3049         interrupt_handler_p and attribute_checked_p fields.
3050         (riscv_attribute_table): Add interrupt.
3051         (riscv_interrupt_type_p): New.
3052         (riscv_save_reg_p): Save extra regs for interrupt handler.
3053         (riscv_use_save_libcall): Return false  for interrupt handler.
3054         (riscv_first_stack_step): Add forward declaration.
3055         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3056         for interrupt handler with large frame.  Use it for saved reg list.
3057         (riscv_expand_prologue): Move flag_stack_usage_info support to
3058         eliminate duplication.
3059         (riscv_expand_epilogue): Generate mret for interrupt handler.
3060         (riscv_epilogue_uses): New.
3061         (riscv_can_use_return_insn): Return false for interrupt handler.
3062         (riscv_function_ok_for_sibcall): Likewise.
3063         (riscv_set_current_function): Add interrupt handler support.
3064         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3065         * config/riscv/riscv.md (UNSPECV_MRET): New.
3066         (GP_REGNUM): New.
3067         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3068         (riscv_mret): New.
3069         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3071 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3073         PR tree-optimization/85712
3074         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3075         this candidate has already been replaced in-situ by a copy.
3077 2018-05-25  Jason Merrill  <jason@redhat.com>
3079         PR c++/80485 - inline function non-zero address.
3080         * symtab.c (nonzero_address): Check DECL_COMDAT.
3082 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3084         PR target/83628
3085         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3086         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3087         extension of SImode operation.  Use const123_operand predicate.
3088         (*saddsi_1): Remove.
3089         (*saddl_se_1): Ditto.
3090         (*ssubsi_1): Ditto.
3091         (*ssubl_se_1): Ditto.
3092         * config/alpha/predicates.md (const123_operand): New predicate.
3093         * config/alpha/constraints.md (P): Use IN_RANGE.
3095 2018-05-25  Richard Biener  <rguenther@suse.de>
3097         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3098         defaulted to true.
3099         (ref_maybe_used_by_stmt_p): Likewise.
3100         (stmt_may_clobber_ref_p): Likewise.
3101         (stmt_may_clobber_ref_p_1): Likewise.
3102         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3103         and pass it along.
3104         (ref_maybe_used_by_stmt_p): Likewise.
3105         (stmt_may_clobber_ref_p): Likewise.
3106         (stmt_may_clobber_ref_p_1): Likewise.
3107         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3108         the alias oracle to disambiguate DRs with stmts DR analysis
3109         couldn't handle.
3110         (vect_analyze_data_refs): Do not give up on not analyzable
3111         DRs for BB vectorization.  Remove code truncating the dataref
3112         vector.
3114 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3116         PR target/85832
3117         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3118         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3119         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3121 2018-05-25  Richard Biener  <rguenther@suse.de>
3123         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3124         function, combining stmt data ref gathering and fatal analysis
3125         parts.
3126         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3127         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3128         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3129         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3130         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3132 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3134         PR tree-optimization/85720
3135         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3136         SCC if all partitions are builtins.
3137         (version_loop_by_alias_check): New parameter.  Generate cancelable
3138         runtime alias check if all partitions are builtins.
3139         (distribute_loop): Update call to above function.
3141 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3143         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3144         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3145         (parm_default_def_partition_arg): Ditto.
3146         (set_parm_default_def_partition): Ditto.
3147         (get_parm_default_def_partitions): Ditto and make it static.
3148         (get_undefined_value_partitions): Ditto and make it static.
3149         (remove_ssa_form): Refactor call to init_var_map here.
3150         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3151         computation for loop region.
3152         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3153         (register_default_def): Delete.
3154         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3155         (parm_default_def_partition_arg): Ditto.
3156         (set_parm_default_def_partition): Ditto.
3157         (get_parm_default_def_partitions): Ditto and make it static.
3158         (get_undefined_value_partitions): Ditto and make it static.
3159         (coalesce_with_default, coalesce_with_default): Update comment.
3160         (create_coalesce_list_for_region): New func factored out from
3161         create_outofssa_var_map.
3162         (populate_coalesce_list_for_outofssa): New func factored out from
3163         create_outofssa_var_map and coalesce_ssa_name.
3164         (create_outofssa_var_map): Delete.
3165         (coalesce_ssa_name): Refactor to support live range computation.
3166         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3167         (get_parm_default_def_partitions): Delete.
3168         (get_undefined_value_partitions): Ditto.
3169         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3170         computation for loop region.
3171         (new_tree_live_info, loe_visit_block): Ditto.
3172         (live_worklist, set_var_live_on_entry): Ditto.
3173         (calculate_live_on_exit, verify_live_on_entry): Ditto.
3174         * tree-ssa-live.h (struct _var_map): New fields.
3175         (init_var_map): Change decl.
3176         (region_contains_p): New.
3178 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3180         * tree-ssa-live.h (live_merge_and_clear): Delete.
3182 2018-05-25  Richard Biener  <rguenther@suse.de>
3184         PR c++/85912
3185         * tree-dump.c (dequeue_and_dump): Remove access to removed
3186         operand 2 of a SWITCH_EXPR.
3188 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3190         * doc/sourcebuild.texi (vect_double_cond_arith): Include
3191         multiplication and division.
3192         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3193         (cond_udiv@var{m}, cond_umod@var{m}): Document.
3194         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3195         (cond_udiv_optab, cond_umod_optab): New optabs.
3196         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3197         (IFN_COND_RDIV): New internal functions.
3198         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3199         TRUNC_MOD_EXPR and RDIV_EXPR.
3200         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3201         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3202         New unspecs.
3203         (SVE_INT_BINARY): Include mult.
3204         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3205         (optab, sve_int_op): Handle mult.
3206         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3207         UNSPEC_COND_DIV.
3208         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3209         for SVE_INT_BINARY_SD.
3211 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3213         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3214         (optab, sve_int_op): Handle div and udiv.
3215         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3216         for SVE_INT_BINARY_SD.
3217         (*<optab><mode>3): New insn for the same.
3219 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3221         * tree-vect-patterns.c: Include predict.h.
3222         (vect_recog_divmod_pattern): Restrict check for division support
3223         to when optimizing for size.
3225 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3227         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3228         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3229         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3230         (gimple_match_op::set_op): Likewise.
3231         (gimple_resimplify4): Declare.
3232         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3233         (expr::gen_transform): Likewise.
3234         (decision_tree::gen): Generate a simplification routine for 4 operands.
3235         * gimple-match-head.c (gimple_simplify): Add an overload for
3236         4 operands.  In the top-level function, handle up to 4 call
3237         arguments and call gimple_resimplify4.
3238         (gimple_resimplify4): New function.
3239         (build_call_internal): Pass a fourth operand.
3240         (maybe_push_to_seq): Likewise.
3241         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3242         Fold VEC_COND_EXPRs of an operation and a default value into
3243         an IFN_COND_* function if possible.
3244         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3245         New unspecs.
3246         (SVE_COND_FP_BINARY): Include them.
3247         (optab, sve_fp_op): Handle them.
3248         (SVE_INT_BINARY_REV): New code iterator.
3249         (SVE_COND_FP_BINARY_REV): New int iterator.
3250         (commutative): New int attribute.
3251         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3252         Declare.
3253         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3254         function.
3255         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3256         (*cond_<optab><mode>): New patterns for reversed operands.
3258 2018-05-25  Richard Biener  <rguenther@suse.de>
3260         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3261         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3262         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3263         (STMT_VINFO_GROUPED_ACCESS): Adjust.
3264         * tree-vect-data-refs.c (everywhere): Adjust users.
3265         * tree-vect-loop.c (everywhere): Likewise.
3266         * tree-vect-slp.c (everywhere): Likewise.
3267         * tree-vect-stmts.c (everywhere): Likewise.
3268         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3270 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3272         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3273         Rename to...
3274         (gcc_cv_as_section_exclude): ... this.
3275         Try Solaris as #exclude syntax.
3276         * configure: Regenerate.
3277         * config.in: Regenerate.
3278         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3279         SECTION_EXCLUDE.
3280         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3281         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3283         * varasm.c (default_elf_asm_named_section): Don't check if
3284         HAVE_GAS_SECTION_EXCLUDE is defined.
3286 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3288         * doc/md.texi: Update the documentation of the cond_* optabs
3289         to mention the new final operand.  Fix GET_MODE_NUNITS call.
3290         Describe the scalar case too.
3291         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3292         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3293         instead of 2.
3294         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3295         (get_conditional_internal_fn): Update comment.
3296         * tree-vect-loop.c (vectorizable_reduction): Pass the original
3297         accumulator value as a final argument to conditional functions.
3298         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3299         a define_expand and add an "else" operand.  Assert for now that
3300         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
3301         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3302         (*cond_<optab><mode>): New patterns.
3303         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3304         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3305         (UNSPEC_COND_EOR): Delete.
3306         (optab): Remove associated mappings.
3307         (SVE_INT_BINARY): New code iterator.
3308         (sve_int_op): Remove int attribute and add "minus" to the code
3309         attribute.
3310         (SVE_COND_INT_OP): Delete.
3311         (SVE_COND_FP_OP): Rename to...
3312         (SVE_COND_FP_BINARY): ...this.
3314 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3316         * optabs.c (can_reuse_operands_p): New function.
3317         (maybe_legitimize_operands): Try to reuse the results for
3318         earlier operands.
3320 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3322         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3323         Add {q} suffix to insn mnemonic.
3325 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3327         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3328         (msp430_warn_func_return): New.
3330 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
3332         * fold-const.c (tree_nonzero_bits): New function.
3333         * fold-const.h (tree_nonzero_bits): Likewise.
3334         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3335         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3337 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3339         PR target/85900
3340         PR target/85345
3341         * varasm.c (assemble_alias): Check ifunc_resolver only on
3342         FUNCTION_DECL.
3344 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3346         PR target/85903
3347         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3348         when memory input operand is handled.
3350 2018-05-24  Luis Machado  <luis.machado@linaro.org>
3352         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3353         global.
3354         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3356 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3358         * match.pd: Delay FMA folds until after vectorization.
3360 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3362         PR target/83009
3363         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3364         address check not strict.
3366 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3368         * gimple-match.h (gimple_match_op): New class.
3369         (mprts_hook): Replace parameters with a gimple_match_op *.
3370         (maybe_build_generic_op): Likewise.
3371         (gimple_simplified_result_is_gimple_val): Replace parameters with
3372         a const gimple_match_op *.
3373         (gimple_simplify): Replace code_helper * and tree * parameters with
3374         a gimple_match_op * parameter.
3375         (gimple_resimplify1): Replace code_helper *, tree and tree *
3376         parameters with a gimple_match_op * parameter.
3377         (gimple_resimplify2): Likewise.
3378         (gimple_resimplify3): Likewise.
3379         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3380         parameters with a gimple_match_op * parameter.
3381         * gimple-match-head.c (gimple_simplify): Change prototypes of
3382         auto-generated functions to take a gimple_match_op * instead of
3383         separate code_helper * and tree * parameters.  Make the same
3384         change in the top-level overload and update calls to the
3385         gimple_resimplify routines.  Update calls to the auto-generated
3386         functions and to maybe_push_res_to_seq in the publicly-facing
3387         operation-specific gimple_simplify overloads.
3388         (gimple_match_op::MAX_NUM_OPS): Define.
3389         (gimple_resimplify1): Replace rcode and ops with a single res_op
3390         parameter.  Update call to gimple_simplify.
3391         (gimple_resimplify2): Likewise.
3392         (gimple_resimplify3): Likewise.
3393         (mprts_hook): Replace parameters with a gimple_match_op *.
3394         (maybe_build_generic_op): Likewise.
3395         (build_call_internal): Replace type, nargs and ops with
3396         a gimple_match_op *.
3397         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3398         with a single gimple_match_op *.  Update calls to mprts_hook,
3399         build_call_internal and gimple_simplified_result_is_gimple_val.
3400         Factor out code that is common to the tree_code and combined_fn cases.
3401         * genmatch.c (expr::gen_transform): Replace tem_code and
3402         tem_ops with a gimple_match_op called tem_op.  Update calls
3403         to the gimple_resimplify functions and maybe_push_res_to_seq.
3404         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3405         res_ops.  Update call to the gimple_resimplify functions.
3406         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3407         (decision_tree::gen): Make the functions take a gimple_match_op *
3408         called res_op instead of separate res_code and res_ops parameters.
3409         Update call accordingly.
3410         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3411         and ops with a single res_op parameter.  Update calls to
3412         maybe_build_generic_op and maybe_push_res_to_seq.
3413         (fold_stmt_1): Update calls to gimple_simplify and
3414         replace_stmt_with_simplification.
3415         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3416         and gimple_simplified_result_is_gimple_val.
3417         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3418         gimple_simplify.
3419         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3420         with a gimple_match_op *.
3421         (vn_nary_build_or_lookup): Likewise.  Update call to
3422         vn_nary_build_or_lookup_1.
3423         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3424         gimple_match_op *.  Update calls to the gimple_resimplify routines
3425         and to gimple_simplified_result_is_gimple_val.
3426         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3427         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3428         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3429         (visit_nary_op): Likewise.
3430         (visit_reference_op_load): Likewise.
3432 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3434         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3435         modifier for printing the step amount.
3437 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
3439         PR target/78849
3440         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3441         types.
3443 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
3445         * doc/sourcebuild.texi (Endianness): New subsubsection.
3447 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3449         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3450         <prefetch_dynamic_strides>: New const bool field.
3451         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3452         prefetch_dynamic_strides.
3453         (exynosm1_prefetch_tune): Likewise.
3454         (thunderxt88_prefetch_tune): Likewise.
3455         (thunderx_prefetch_tune): Likewise.
3456         (thunderx2t99_prefetch_tune): Likewise.
3457         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3458         false.
3459         (aarch64_override_options_internal): Update to set
3460         PARAM_PREFETCH_DYNAMIC_STRIDES.
3461         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3462         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3463         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3464         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3465         prefetch-dynamic-strides setting.
3467 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3469         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3470         <minimum_stride>: New const int field.
3471         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3472         minimum_stride field defaulting to -1.
3473         (exynosm1_prefetch_tune): Likewise.
3474         (thunderxt88_prefetch_tune): Likewise.
3475         (thunderx_prefetch_tune): Likewise.
3476         (thunderx2t99_prefetch_tune): Likewise.
3477         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3478         <default_opt_level>: Set to 3.
3479         (aarch64_override_options_internal): Update to set
3480         PARAM_PREFETCH_MINIMUM_STRIDE.
3481         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3482         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3483         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3484         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3485         stride is constant and is below the minimum stride threshold.
3487 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3489         * config/arm/arm-cpus.in (mode26): Delete.
3490         (armv4): Delete mode26 reference.
3491         * config/arm/arm.c (arm_configure_build_target): Delete use of
3492         isa_bit_mode26.
3494 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3496         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3497         New insn pattern.
3498         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3499         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
3500         for non-SSE modes.
3501         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
3502         (floatunsdidf2): Ditto.
3504 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3506         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3507         (fixuns_trunc<mode>si2_avx512f): Ditto.
3508         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3509         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3510         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3512 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3514         PR rtl-optimization/79985
3515         * df-scan.c (df_insn_refs_collect): Remove special case for
3516         global registers and asm statements.
3518 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3520         * extend.texi (Global Register Variables): Rewrite the bullet list.
3521         Note that the register is available for allocation. Note that access
3522         via inline asm must use constraints. Add note about async-signal
3523         handlers. Remove paragraph about automagic register selection.
3525 2018-05-23  Richard Biener  <rguenther@suse.de>
3527         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3528         of fixed offset from memset VN.
3530 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
3532         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3533         first_interp field.
3534         (alloc_cand_and_find_basis): Initialize first_interp field.
3535         (slsr_process_mul): Modify first_interp field.
3536         (slsr_process_add): Likewise.
3537         (slsr_process_cast): Modify first_interp field for each new
3538         interpretation.
3539         (slsr_process_copy): Likewise.
3540         (dump_candidate): Dump first_interp field.
3541         (replace_mult_candidate): Process all interpretations, not just
3542         subsequent ones.
3543         (replace_rhs_if_not_dup): Likewise.
3544         (replace_one_candidate): Likewise.
3546 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
3548         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3549         Add new boolean.
3550         (aarch64_needs_frame_chain): New function.
3551         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3553 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
3555         PR target/84882
3556         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3557         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3558         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3559         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3560         as true for strict-align.
3561         (aarch64_can_inline_p): Perform checks even when callee has no
3562         attributes to check for strict alignment.
3563         * doc/extend.texi (AArch64 Function Attributes): Document
3564         no-strict-align.
3565         * doc/invoke.texi: (AArch64 Options): Likewise.
3567 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
3569         PR tree-optimization/85853
3570         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3571         the handling of the root of the node to...
3572         (vect_slp_analyze_node_operations_1): ...this new function,
3573         and run the whole thing with the child nodes' def types
3574         set according to their SLP node's def type.
3576 2018-05-23  Richard Biener  <rguenther@suse.de>
3578         PR middle-end/85874
3579         * tree-data-ref.c (create_runtime_alias_checks): Defer
3580         and ignore overflow warnings.
3582 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
3584         PR tree-optimization/85822
3585         * tree-vrp.c (is_masked_range_test): Fix handling of negative
3586         constants.
3588 2018-05-23  Richard Biener  <rguenther@suse.de>
3590         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3591         memset constants via native_interpret_expr.
3593 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
3595         PR target/85345
3596         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
3597         attribute.
3598         (cgraph_node::create_alias): Likewise.
3599         (cgraph_node::get_availability): Check ifunc_resolver instead
3600         of looking up ifunc attribute.
3601         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3602         * varasm.c (do_assemble_alias): Likewise.
3603         (assemble_alias): Likewise.
3604         (default_binds_local_p_3): Likewise.
3605         * cgraph.h (cgraph_node): Add ifunc_resolver.
3606         (cgraph_node::only_called_directly_or_aliased_p): Return false
3607         for IFUNC resolver.
3608         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
3609         attribute.
3610         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
3611         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
3612         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
3613         instead of looking up ifunc attribute.
3615 2018-05-22  Luis Machado  <luis.machado@linaro.org>
3617         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
3619 2018-05-22  Martin Sebor  <msebor@redhat.com>
3621         PR middle-end/85359
3622         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
3623         only when expasion succeeds.
3624         (expand_builtin_strcmp): Same.
3625         (expand_builtin_strncmp): Same.
3627 2018-05-22  Martin Sebor  <msebor@redhat.com>
3629         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
3631 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3632             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3634         * config/aarch64/aarch64-ldpstp.md: Replace uses of
3635         aarch64_mem_pair_operand with memory_operand and delete operand swapping
3636         code.
3637         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3638         Add check for legitimate_address.
3639         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
3640         (aarch64_swap_ldrstr_operands): New.
3641         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
3642         Define prototype.
3644 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3645             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3647         * config/aarch64/aarch64.md: New patterns to generate stp
3648         and ldp.
3649         (store_pair_sw, store_pair_dw): New patterns to generate stp for
3650         single words and double words.
3651         (load_pair_sw, load_pair_dw): Likewise.
3652         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
3653         Delete.
3654         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
3655         Delete.
3656         * config/aarch64/aarch64-ldpstp.md: Modify peephole
3657         for different mode ldpstp and add peephole for merged zero stores.
3658         Likewise for loads.
3659         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3660         Add size check.
3661         (aarch64_gen_store_pair): Rename calls to match new patterns.
3662         (aarch64_gen_load_pair): Rename calls to match new patterns.
3663         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
3664         (load_pair<DREG:mode><DREG2:mode>): ... This.
3665         (store_pair<mode>): Rename to...
3666         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
3667         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
3668         New mode iterators.
3669         (V_INT_EQUIV): Handle SImode.
3670         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
3671         New predicate.
3673 2018-05-22  Martin Sebor  <msebor@redhat.com>
3675         PR c/85623
3676         * calls.c (maybe_warn_nonstring_arg): Use string length to set
3677         or ajust the presumed bound on an operation to avoid unnecessary
3678         warnings.
3680 2018-05-22  Martin Sebor  <msebor@redhat.com>
3682         PR tree-optimization/85826
3683         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
3684         assuming that a DECL necesarily has a constant size.
3686 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
3688         PR middle-end/85862
3689         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
3691 2018-05-22  Richard Biener  <rguenther@suse.de>
3693         PR tree-optimization/85834
3694         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
3695         non-constant and non-zero memset arguments.
3697 2018-05-22  Martin Liska  <mliska@suse.cz>
3699         PR ipa/85607
3700         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
3702 2018-05-22  Richard Biener  <rguenther@suse.de>
3704         PR tree-optimization/85863
3705         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
3706         comparisons when vectype is specified.
3707         (vectorizable_condition): Do not specify vectype for
3708         vect_is_simple_cond when SLP vectorizing.
3710 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
3712         PR target/85657
3713         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
3714         define __ibm128 as long double.
3715         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
3716         as a distinct type when IEEE 128-bit support is enabled.
3717         (init_float128_ieee): Fix up conversions between IFmode and IEEE
3718         128-bit types to use the correct functions.
3719         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
3720         convert between 128-bit floating point types that have different
3721         modes but the same representation, instead of using gen_lowpart to
3722         makean alias.
3723         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
3724         KFmode.
3725         (IFKF_reg): New attributes to give the register constraints for
3726         IFmode and KFmode.
3727         (extend<mode>tf2_internal): New insns to mark an explicit
3728         conversion between 128-bit floating point types that have a
3729         different mode but share the same representation.
3731 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
3733         PR tree-optimization/85814
3734         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
3735         a null return from get_strinfo when unsharing the next
3736         strinfo in the chain.
3738 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
3740         PR gcc/84923
3741         * varasm.c (weak_finish): Clean up weak_decls.
3743 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3745         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
3746         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
3747         UNSPEC_UADALP values.
3748         * config/aarch64/iterators.md (ABAL): New int iterator.
3749         (ABDL2): Likewise.
3750         (ADALP): Likewise.
3751         (sur): Add mappings for the above.
3752         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
3753         New define_insn.
3754         (aarch64_<sur>abal<mode>_4): Likewise.
3755         (aarch64_<sur>adalp<mode>_3): Likewise.
3756         (<sur>sadv16qi): New define_expand.
3758 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
3760         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
3761         (*movdf_internal): Ditto.
3762         (*rcpsf2_sse): Ditto.
3763         (*rsqrtsf2_sse): Ditto.
3764         (*sqrt<mode>2_sse): Ditto.
3766 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
3768         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
3769         eor3q<mode>4.
3770         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
3771         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
3772         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
3773         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
3774         vbcaxq_s64): New.
3775         * config/aarch64/arm_neon.h: Likewise.
3776         * config/aarch64/iterators.md (VQ_I): New.
3778 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
3780         * config.gcc: Add arc/t-multilib-linux to tmake_file for
3781         arc*-*-linux*.
3782         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
3783         MULTILIB_DIRNAMES
3785 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
3787         * config/nds32/constraints.md (S): New constraint.
3788         * config/nds32/nds32.md (call_internal): Use constraint S.
3789         (call_value_internal): Likewise.
3790         (sibcall_internal): Likewise.
3791         (sibcall_value_internal): Likewise.
3793 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
3794             Chung-Ju Wu  <jasonwucj@gmail.com>
3796         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
3797         into consideration.
3799 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
3800             Chung-Ju Wu  <jasonwucj@gmail.com>
3802         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
3803         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
3804         (nds32_rtx_costs_impl): Simplify.
3805         (nds32_address_cost_impl): Simplify.
3806         (nds32_init_rtx_costs): New function.
3807         (nds32_rtx_costs_speed_prefer): Likewise.
3808         (nds32_rtx_costs_size_prefer): Likewise.
3809         (nds32_address_cost_speed_prefer): Likewise.
3810         (nds32_address_cost_speed_fwprop): Likewise.
3811         (nds32_address_cost_size_prefer): Likewise.
3812         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
3813         * config/nds32/nds32.c (nds32_option_override): Use
3814         nds32_init_rtx_costs function.
3816 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
3818         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
3819         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
3820         (TARGET_PIPELINE_N8): Likewise.
3821         (TARGET_PIPELINE_N10): Likewise.
3822         (TARGET_PIPELINE_N13): Likewise.
3823         (TARGET_PIPELINE_GRAYWOLF): Likewise.
3825 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
3827         * config/nds32/nds32-fpu.md: Update copyright year.
3829 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3831         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
3833 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3835         * config/nds32/nds32.c
3836         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
3837         * config/nds32/nds32.opt (minline-asm-r15): New option.
3839 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3841         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
3842         MASK_HW_ABS.
3843         * config/nds32/nds32.md (abssi2): New pattern.
3845 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
3847         * config/i386/i386.md (rex64namesuffix): New mode attribute.
3848         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
3849         Merge insn pattern from sse_cvtsi2ss<round_name> and
3850         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
3851         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
3852         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
3853         using SWI48 mode iterator.
3854         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
3855         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
3856         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
3857         pattern from sse_cvttss2si<round_saeonly_name>
3858         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
3859         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
3860         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
3861         using SWI48 mode iterator.
3862         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
3863         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
3864         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
3865         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
3866         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
3867         using SWI48 mode iterator.
3868         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
3869         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
3870         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
3871         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
3872         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
3873         SWI48 mode iterator.
3874         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
3875         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
3876         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
3877         pattern from sse_cvttsd2si<round_saeonly_name>
3878         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
3880 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3882         * config/nds32/nds32-md-auxiliary.c
3883         (nds32_valid_smw_lwm_base_p): Refine.
3884         (nds32_output_smw_single_word): Refine.
3885         (nds32_output_smw_double_word): New.
3886         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
3888 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3890         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
3891         (nds32_output_stack_pop): Refine.
3892         (nds32_expand_unaligned_load): Refine.
3893         (nds32_expand_unaligned_store): Refine.
3895 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
3896             Chung-Ju Wu  <jasonwucj@gmail.com>
3898         * config/nds32/constants.md: Add TP_REGNUM constant.
3899         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
3900         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
3901         UNSPEC_ADD32.
3902         * config/nds32/nds32-doubleword.md: Consider flag_pic.
3903         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
3904         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
3905         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
3906         and PIC code generation.
3907         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
3908         code generation.
3909         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
3910         optimization.
3911         * config/nds32/nds32.md: Support TLS and PIC.
3912         * config/nds32/nds32.c: Support TLS and PIC.
3913         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
3914         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
3915         predicate.
3917 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
3919         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
3920         mode with E_ prefix.
3922 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
3923             Chung-Ju Wu  <jasonwucj@gmail.com>
3925         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
3926         * config/nds32/nds32-md-auxiliary.c
3927         (symbolic_reference_mentioned_p): New.
3928         (nds32_legitimize_ict_address): New.
3929         (nds32_expand_ict_move): New.
3930         (nds32_indirect_call_referenced_p): New.
3931         (nds32_symbol_binds_local_p): Delete.
3932         (nds32_long_call_p): Modify.
3933         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
3934         * config/nds32/nds32-protos.h
3935         (symbolic_reference_mentioned_p): Declare.
3936         (nds32_legitimize_ict_address): Declare.
3937         (nds32_expand_ict_move): Declare.
3938         (nds32_indirect_call_referenced_p): Declare.
3939         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
3940         (nds32_relax_group): Use nds32_ict_const_p as condition.
3941         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
3942         (nds32_asm_file_start): Output ict_model directive in asm code.
3943         (nds32_legitimate_address_p): Consider indirect call.
3944         (nds32_print_operand): Consider indirect call.
3945         (nds32_print_operand_address): Consider indirect call.
3946         (nds32_insert_attributes): Handle "indirect_call" attribute.
3947         (TARGET_LEGITIMATE_ADDRESS_P): Define.
3948         (TARGET_LEGITIMATE_CONSTANT_P): Define.
3949         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
3950         (TARGET_DELEGITIMIZE_ADDRESS): Define.
3951         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
3952         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
3953         (TARGET_ICT_MODEL_SMALL): Define.
3954         (TARGET_ICT_MODEL_LARGE): Define.
3955         * config/nds32/nds32.md (movsi): Consider ict model.
3956         (call, call_value): Consider ict model.
3957         (sibcall, sibcall_value): Consider ict model.
3958         * config/nds32/nds32.opt (mict-model): New option.
3959         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
3960         model.
3962 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
3963             Monk Chiang  <sh.chiang04@gmail.com>
3964             Jim Wilson <jimw@sifive.com>
3966         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
3967         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
3968         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
3969         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
3970         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
3971         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
3972         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
3973         compute save_libcall_adjustment properly.
3974         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
3975         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
3976         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
3977         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
3978         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
3979         (ABI_SPEC): Handle mabi=ilp32e.
3980         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
3981         (RVE): Add RVE mask.
3982         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
3983         <-march>: Add rv32e as an example.
3985 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
3987         PR c++/82899
3988         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
3989         (intra_create_variable_infos): Handle C++ constructors.
3991 2018-05-18  Martin Liska  <mliska@suse.cz>
3993         * passes.def: Remove a redundant pass.
3995 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
3997         PR bootstrap/85838
3998         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4000 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4002         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4003         (ARMv4): Update.
4004         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4005         (ARMv6m): Update.
4006         (armv2, armv2a, armv3, armv3m): Delete architectures.
4007         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4008         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4009         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4010         Delete cpus.
4011         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4012         (*mulsidi3adddi): Likewise.
4013         (mulsidi3): Likewise.
4014         (*mulsidi3_nov6): Likewise.
4015         (umulsidi3): Likewise.
4016         (umulsidi3_nov6): Likewise.
4017         (umaddsidi4): Likewise.
4018         (*umulsidi3adddi): Likewise.
4019         (smulsi3_highpart): Likewise.
4020         (*smulsi3_highpart_nov6): Likewise.
4021         (umulsi3_highpart): Likewise.
4022         (*umulsi3_highpart_nov6): Likewise.
4023         * config/arm/arm.h (arm_arch3m): Delete.
4024         * config/arm/arm.c (arm_arch3m): Delete.
4025         (arm_option_override_internal): Update armv3-related comment.
4026         (arm_configure_build_target): Delete use of isa_bit_mode32.
4027         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4028         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4029         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4030         (mulsa3): Likewise.
4031         (mulusa3): Likewise.
4032         * config/arm/arm-protos.h (arm_arch3m): Delete.
4033         * config/arm/arm-tables.opt: Regenerate.
4034         * config/arm/arm-tune.md: Likewise.
4035         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4036         deleted architectures.
4038 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4040         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4041         (armv5t, armv5te): New features.
4042         (ARMv5, ARMv5e): Delete fgroups.
4043         (ARMv5t, ARMv5te): Adjust for above changes.
4044         (ARMv6m): Likewise.
4045         (armv5, armv5e): Delete arches.
4046         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4047         arm_arch5.
4048         (*call_reg_arm): Likewise.
4049         (*call_value_reg_armv5): Likewise.
4050         (*call_value_reg_arm): Likewise.
4051         (*call_symbol): Likewise.
4052         (*call_value_symbol): Likewise.
4053         (*sibcall_insn): Likewise.
4054         (*sibcall_value_insn): Likewise.
4055         (clzsi2): Likewise.
4056         (prefetch): Likewise.
4057         (define_split and define_peephole2 dependent on arm_arch5):
4058         Likewise.
4059         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4060         arm_arch5e.
4061         (TARGET_ARM_QBIT): Likewise.
4062         (TARGET_DSP_MULTIPLY): Likewise.
4063         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4064         (arm_arch5, arm_arch5e): Delete.
4065         (arm_arch5t, arm_arch5te): Declare.
4066         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4067         (arm_arch5t): Declare.
4068         (arm_option_reconfigure_globals): Update for the above.
4069         (arm_options_perform_arch_sanity_checks): Update comment, replace
4070         use of arm_arch5 with arm_arch5t.
4071         (use_return_insn): Likewise.
4072         (arm_emit_call_insn): Likewise.
4073         (output_return_instruction): Likewise.
4074         (arm_final_prescan_insn): Likewise.
4075         (arm_coproc_builtin_available): Likewise.
4076         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4077         arm_arch5e with arm_arch5t and arm_arch5te.
4078         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4079         (arm_arch5t, arm_arch5te): Declare.
4080         * config/arm/arm-tables.opt: Regenerate.
4081         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4082         * config/arm/t-multilib: Likewise.
4083         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4084         instead of arm_arch5.
4085         (*call_reg_thumb1): Likewise.
4086         (*call_value_reg_thumb1_v5): Likewise.
4087         (*call_value_reg_thumb1): Likewise.
4088         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4089         unreachable path.
4090         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4092 2018-05-18  Martin Liska  <mliska@suse.cz>
4094         PR gcov-profile/84846
4095         * doc/gcov.texi: Document -t option of gcov tool.
4097 2018-05-18  Martin Liska  <mliska@suse.cz>
4099         PR gcov-profile/84846
4100         * gcov.c (print_usage): Add new -t option.
4101         (process_args): Handle the option.
4102         (generate_results): Use stdout as output when requested by
4103         the option.
4105 2018-05-18  Martin Liska  <mliska@suse.cz>
4107         PR gcov-profile/84846
4108         * coverage.c (coverage_init): Write PWD to .gcno file.
4109         * doc/gcov.texi: Document how working directory is printed.
4110         * gcov-dump.c (dump_gcov_file): Print PWD.
4111         * gcov.c (output_intermediate_file): Likewise.
4112         (read_graph_file): Read PWD string.
4113         (output_lines): Print PWD.
4115 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4117         PR middle-end/85817
4118         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4119         for retval and return false if all args to phi are zero.
4121 2018-05-18  Richard Biener  <rguenther@suse.de>
4123         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4124         method.
4125         (evrp_dom_walker::before_dom_children): Call it.
4127 2018-05-18  Richard Biener  <rguenther@suse.de>
4129         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4130         results when processing array refs with variable index.
4132 2018-05-18  Toon Moene  <toon@moene.org>
4134         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4135         directly after that of -floop-interchange. Indicate that both
4136         options are enabled by default when specifying -O3.
4138 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4140         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4141         iterator.  Delete separate integer-mode vec_set<mode> expander.
4142         (aarch64_simd_vec_setv2di): Delete.
4143         (vec_setv2di): Delete.
4144         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4145         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4146         the "w, r" alternative.
4148 2018-05-18  Martin Liska  <mliska@suse.cz>
4150         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4151         * tree-pass.h (make_pass_lower_switch_O0): New function.
4152         * tree-switch-conversion.c (node_has_low_bound): Remove.
4153         (node_has_high_bound): Likewise.
4154         (node_is_bounded): Likewise.
4155         (class pass_lower_switch): Make it a template type and create
4156         two instances.
4157         (pass_lower_switch::execute): Add template argument.
4158         (make_pass_lower_switch): New function.
4159         (make_pass_lower_switch_O0): New function.
4160         (do_jump_if_equal): Remove.
4161         (emit_case_nodes): Simplify to just handle all 3 cases and leave
4162         all the hard work to tree optimization passes.
4164 2018-05-18  Martin Liska  <mliska@suse.cz>
4166         * dbgcnt.c (limit_low): Renamed from limit.
4167         (limit_high): New variable.
4168         (dbg_cnt_is_enabled): Check for upper limit.
4169         (dbg_cnt): Adjust dumping.
4170         (dbg_cnt_set_limit_by_index): Add new argument for high
4171         value.
4172         (dbg_cnt_set_limit_by_name): Likewise.
4173         (dbg_cnt_process_single_pair): Parse new format.
4174         (dbg_cnt_process_opt): Use strtok.
4175         (dbg_cnt_list_all_counters): Remove 'value' and add
4176         'limit_high'.
4177         * doc/invoke.texi: Document changes.
4179 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4181         * doc/sourcebuild.texi (scalar_all_fma): Document.
4182         * tree.def (FMA_EXPR): Delete.
4183         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4184         * internal-fn.c (ternary_direct): New macro.
4185         (expand_ternary_optab_fn): Likewise.
4186         (direct_ternary_optab_supported_p): Likewise.
4187         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4188         * builtins.c (fold_builtin_fma): Delete.
4189         (fold_builtin_3): Don't call it.
4190         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4191         * expr.c (expand_expr_real_2): Likewise.
4192         * fold-const.c (operand_equal_p): Likewise.
4193         (fold_ternary_loc): Likewise.
4194         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4195         * gimple.c (DEFTREECODE): Likewise.
4196         * gimplify.c (gimplify_expr): Likewise.
4197         * optabs-tree.c (optab_for_tree_code): Likewise.
4198         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4199         * tree-eh.c (operation_could_trap_p): Likewise.
4200         (stmt_could_throw_1_p): Likewise.
4201         * tree-inline.c (estimate_operator_cost): Likewise.
4202         * tree-pretty-print.c (dump_generic_node): Likewise.
4203         (op_code_prio): Likewise.
4204         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4205         * tree-ssa-operands.c (get_expr_operands): Likewise.
4206         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4207         * fold-const-call.h (fold_fma): Delete.
4208         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4209         CFN_FNMA and CFN_FNMS.
4210         (fold_fma): Delete.
4211         * genmatch.c (combined_fn): New enum.
4212         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4213         (commutative_op): New function.
4214         (commutate): Use it.  Handle more than 2 operands.
4215         (dt_operand::gen_gimple_expr): Use commutative_op.
4216         (parser::parse_expr): Allow :c to be used with non-binary
4217         operators if the commutative operand is known.
4218         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4219         CFN_FMS, CFN_FNMA and CFN_FNMS.
4220         (backprop::process_assign_use): Remove FMA_EXPR handling.
4221         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4222         (gen_hsa_fma): New function.
4223         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4224         IFN_FNMA and IFN_FNMS.
4225         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4226         * gimple-fold.h (follow_all_ssa_edges): Declare.
4227         * gimple-fold.c (follow_all_ssa_edges): New function.
4228         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4229         gimple_build interface and use follow_all_ssa_edges to fold the result.
4230         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4231         instead of checking for optabs directly.
4232         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4233         rather than FMA_EXPRs.
4234         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4235         call to IFN_FMA instead of an FMA_EXPR.
4237 2018-05-17  Jim Wilson  <jimw@sifive.com>
4239         * expr.c (do_tablejump): When converting index to Pmode, if we have a
4240         sign extended promoted subreg, and the range does not have the sign bit
4241         set, then do a sign extend.
4243         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4244         test, check for sign extended subreg and/or constant operands, and
4245         do a sign extend in that case.
4247 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
4249         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4250         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4251         Add untyped.
4252         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4253         Change logics_shift_reg to logics_shift_imm.
4254         (thunderx2t99_fp_loadpair_basic): Delete.
4255         (thunderx2t99_fp_storepair_basic): Delete.
4256         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4257         (thunderx2t99_asimd_polynomial): Delete.
4258         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4259         and neon_fp_mul_d_scalar_q.
4260         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4261         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4262         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4263         (thunderx2t99_asimd_lut): Add missing tbl types.
4264         (thunderx2t99_asimd_ext): Delete.
4265         (thunderx2t99_asimd_load1_1_mult): Delete.
4266         (thunderx2t99_asimd_load1_2_mult): Delete.
4267         (thunderx2t99_asimd_load1_ldp): New.
4268         (thunderx2t99_asimd_load1): New.
4269         (thunderx2t99_asimd_load2): Add missing *load2* types.
4270         (thunderx2t99_asimd_load3): New.
4271         (thunderx2t99_asimd_load4): New.
4272         (thunderx2t99_asimd_store1_1_mult): Delete.
4273         (thunderx2t99_asimd_store1_2_mult): Delete.
4274         (thunderx2t99_asimd_store2_mult): Delete.
4275         (thunderx2t99_asimd_store2_onelane): Delete.
4276         (thunderx2t99_asimd_store_stp): New.
4277         (thunderx2t99_asimd_store1): New.
4278         (thunderx2t99_asimd_store2): New.
4279         (thunderx2t99_asimd_store3): New.
4280         (thunderx2t99_asimd_store4): New.
4282 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
4284         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4285         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
4287 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
4288             Segher Boessenkool  <segher@kernel.crashing.org>
4290         PR target/85698
4291         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4292         operand.
4294 2018-05-17  Richard Biener  <rguenther@suse.de>
4296         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4297         for pruning loop and prune defs feeding only already visited PHIs.
4299 2018-05-17  Richard Biener  <rguenther@suse.de>
4301         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4303 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
4304             Richard Biener  <rguenther@suse.de>
4306         PR tree-optimization/85793
4307         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4308         for VMAT_ELEMENTWISE.
4310 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4312         * internal-fn.h (lookup_internal_fn): Declare
4313         * internal-fn.c (lookup_internal_fn): New function.
4314         * gimple.c (gimple_build_call_from_tree): Handle calls to
4315         internal functions.
4316         * gimple-pretty-print.c (dump_gimple_call): Print "." before
4317         internal function names.
4318         * tree-pretty-print.c (dump_generic_node): Likewise.
4319         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4321 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4323         * gimple-fold.h (gimple_build): Make the function forms take
4324         combined_fn rather than built_in_function.
4325         (gimple_simplify): Likewise.
4326         * gimple-match-head.c (gimple_simplify): Likewise.
4327         * gimple-fold.c (gimple_build): Likewise.
4328         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4329         rather than gimple_build_call_internal.
4330         (get_initial_defs_for_reduction): Likewise.
4331         (vect_create_epilog_for_reduction): Likewise.
4332         (vectorizable_live_operation): Likewise.
4334 2018-05-17  Martin Liska  <mliska@suse.cz>
4336         * gimple-ssa-sprintf.c (format_directive): Do not use
4337         space in between 'G_' and '('.
4339 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
4341         PR target/85323
4342         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4343         even if the mask is not all ones.
4345         PR target/85323
4346         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4347         vector.
4348         (ix86_gimple_fold_builtin): Likewise.
4350         PR target/85323
4351         * config/i386/i386.c: Include tree-vector-builder.h.
4352         (ix86_vector_shift_count): New function.
4353         (ix86_fold_builtin): Fold shift builtins by scalar count.
4354         (ix86_gimple_fold_builtin): Likewise.
4356         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4357         _mm512_setzero): New intrinsics.
4359 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4360             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4362         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4363         code generation for cases where splatting a value is not useful.
4364         * simplify-rtx.c (simplify_ternary_operation): Simplify
4365         vec_merge across a vec_duplicate and a paradoxical subreg forming
4366         a vector mode to a vec_concat.
4368 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
4370         * config.gcc: Support "goldmont-plus".
4371         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4372         "goldmont-plus".
4373         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4374         PROCESSOR_GOLDMONT_PLUS.
4375         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4376         (processor_target_table): Add "goldmont-plus".
4377         (PTA_GOLDMONT_PLUS): Define.
4378         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4379         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4380         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4381         (fold_builtin_cpu): Add "goldmont-plus".
4382         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4383         (ix86_option_override_internal): Add "goldmont-plus".
4384         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4385         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4386         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4387         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4389 2018-05-17  Richard Biener  <rguenther@suse.de>
4391         PR tree-optimization/85757
4392         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4393         remove defs that only feed that PHI from further processing.
4395 2018-05-16  Jim Wilson  <jimw@sifive.com>
4397         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4398         asterisk to name.
4399         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4401 2018-05-16  Mark Wielaard  <mark@klomp.org>
4403         * dwarf2out.c (count_index_strings): New function.
4404         (output_indirect_strings): Call count_index_strings and generate
4405         header for dwarf_version >= 5.
4407 2018-05-16  Mark Wielaard  <mark@klomp.org>
4409         * dwarf2out.c (dwarf_FORM): New function.
4410         (set_indirect_string): Use dwarf_FORM.
4411         (reset_indirect_string): Likewise.
4412         (size_of_die): Likewise.
4413         (value_format): Likewise.
4414         (output_die): Likewise.
4415         (add_skeleton_AT_string): Likewise.
4416         (output_macinfo_op): Likewise.
4417         (index_string): Likewise.
4418         (output_index_string_offset): Likewise.
4419         (output_index_string): Likewise.
4420         (count_index_strings): Likewise.
4422 2018-05-16  Carl Love  <cel@us.ibm.com>
4424         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4425         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4427 2018-05-16  Martin Jambor  <mjambor@suse.cz>
4429         * ipa-prop.c (ipa_free_all_edge_args): Remove.
4430         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4432 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
4434         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4435         (fnma<mode>4): Likewise.
4436         (fms<mode>4): Likewise.
4437         (fnms<mode>4): Likewise.
4438         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4439         (aarch64_fnma<mode>4): Likewise.
4440         (aarch64_fms<mode>4): Likewise.
4441         (aarch64_fnms<mode>4): Likewise.
4442         (aarch64_fnmadd<mode>4): Likewise.
4444 2018-05-16  Jason Merrill  <jason@redhat.com>
4446         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
4448 2018-05-16  Richard Biener  <rguenther@suse.de>
4450         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4451         (dump_stmt_cost): Declare.
4452         (add_stmt_cost): Dump cost we add.
4453         (add_stmt_costs): New function.
4454         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4455         No longer exported.
4456         (vect_analyze_stmt): Adjust prototype.
4457         (vectorizable_condition): Likewise.
4458         (vectorizable_live_operation): Likewise.
4459         (vectorizable_reduction): Likewise.
4460         (vectorizable_induction): Likewise.
4461         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4462         cost vector to pass to vectorizable_ and record afterwards.
4463         (vect_model_reduction_cost): Take cost vector argument and adjust.
4464         (vect_model_induction_cost): Likewise.
4465         (vectorizable_reduction): Likewise.
4466         (vectorizable_induction): Likewise.
4467         (vectorizable_live_operation): Likewise.
4468         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4469         SLP_TREE_NUMBER_OF_VEC_STMTS.
4470         (vect_analyze_slp_cost_1): Remove.
4471         (vect_analyze_slp_cost): Likewise.
4472         (vect_slp_analyze_node_operations): Take visited args and
4473         a target cost vector.  Avoid processing already visited stmt sets.
4474         (vect_slp_analyze_operations): Use a local cost vector to gather
4475         costs and register those of non-discarded instances.
4476         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4477         (vect_schedule_slp_instance): Remove copying of
4478         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
4479         zero.
4480         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4481         adding cost.  Record cost entry location.
4482         (vect_prologue_cost_for_slp_op): Function to compute cost of
4483         a constant or invariant generated for SLP vect in the prologue,
4484         split out from vect_analyze_slp_cost_1.
4485         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
4486         (vect_model_promotion_demotion_cost): Likewise.
4487         (vect_model_store_cost): Likewise, make static.
4488         (vect_model_load_cost): Likewise.
4489         (vectorizable_bswap): Add cost vector arg and adjust.
4490         (vectorizable_call): Likewise.
4491         (vectorizable_simd_clone_call): Likewise.
4492         (vectorizable_conversion): Likewise.
4493         (vectorizable_assignment): Likewise.
4494         (vectorizable_shift): Likewise.
4495         (vectorizable_operation): Likewise.
4496         (vectorizable_store): Likewise.
4497         (vectorizable_load): Likewise.
4498         (vectorizable_condition): Likewise.
4499         (vectorizable_comparison): Likewise.
4500         (can_vectorize_live_stmts): Likewise.
4501         (vect_analyze_stmt): Likewise.
4502         (vect_transform_stmt): Adjust calls to vectorizable_*.
4503         * tree-vectorizer.c: Include gimple-pretty-print.h.
4504         (dump_stmt_cost): New function.
4506 2018-05-16  Richard Biener  <rguenther@suse.de>
4508         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4509         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4510         * tree-ssa-dse.c: Include tree-ssa-loop.h.
4511         (check_name): New callback.
4512         (dse_classify_store): Track cycles via a visited bitmap of PHI
4513         defs and simplify handling of in-loop and across loop dead stores
4514         and properly fail for loop-variant refs.  Handle byte-tracking with
4515         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4516         limiting the walk.
4518 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
4520         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4521         (vect_get_mask_type_for_stmt): Likewise.
4522         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4523         split out from...
4524         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
4525         to determine the statement's vector type and the vector type that
4526         should be used for calculating nunits.  Deal with cases in which
4527         the type has to be deferred.
4528         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4529         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4530         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4531         (vect_determine_vf_for_stmt): New functions, split out from...
4532         (vect_determine_vectorization_factor): ...here.
4533         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4534         (vect_get_mask_type_for_stmt): New functions, split out from
4535         vect_determine_vectorization_factor.
4537 2018-05-16  Richard Biener  <rguenther@suse.de>
4539         * tree-cfg.c (verify_gimple_assign_ternary): Properly
4540         verify the [VEC_]COND_EXPR embedded comparison.
4542 2018-05-15  Martin Sebor  <msebor@redhat.com>
4544         PR tree-optimization/85753
4545         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4546         RECORD_TYPE in addition to ARRAY_TYPE.
4548 2018-05-15  Martin Sebor  <msebor@redhat.com>
4550         PR middle-end/85643
4551         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4553 2018-05-15  Richard Biener  <rguenther@suse.de>
4555         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4556         add by_clobber_p one.  Change algorithm to collect all defs
4557         representing uses we need to walk and try reducing them to
4558         a single one before failing.
4559         (dse_dom_walker::dse_optimize_stmt): Adjust.
4561 2018-05-13  Mark Wielaard  <mark@klomp.org>
4563         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4564         (size_of_loc_descr): Likewise.
4565         (output_loc_operands): Likewise.
4566         (output_loc_operands_raw): Likewise.
4567         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4568         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4569         (hash_loc_operands): Likewise.
4570         (compare_loc_operands): Likewise.
4572 2018-05-14  Mark Wielaard  <mark@klomp.org>
4574         * dwarf2out.c (count_index_addrs): New function.
4575         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4577 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4579         PR tree-optimization/83648
4580         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4581         return value as malloc candidate.
4583 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4585         PR ipa/85734
4586         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4587         param as true in call to suggest_attribute.
4589 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
4591         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
4592         -mreadonly-in-sdata.
4594 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4596         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
4597         New pattern.
4598         (aarch64_crypto_aesd_fused): Likewise.
4600 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
4602         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
4603         (movsi_aarch64): Likewise.
4604         (load_pairsi): Likewise.
4605         (load_pairdi): Likewise.
4606         (store_pairsi): Likewise.
4607         (store_pairdi): Likewise.
4608         (load_pairsf): Likewise.
4609         (load_pairdf): Likewise.
4610         (store_pairsf): Likewise.
4611         (store_pairdf): Likewise.
4612         (zero_extend): Likewise.
4613         (trunc): Swap alternatives.
4614         (fcvt_target): Add '?' to prefer w over r.
4616 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
4618         PR target/85756
4619         * config/i386/i386.md: Disallow non-commutative arithmetics in
4620         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4621         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
4622         in the peephole2 before it.
4624 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
4626         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
4627         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
4628         (ix86_handle_option): Handle -mcldemote.
4629         * config.gcc: New header.
4630         * config/i386/cldemoteintrin.h: New file.
4631         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
4632         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4633         -mcldemote.
4634         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4635         OPTION_MASK_ISA_CLDEMOTE.
4636         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
4637         (ix86_valid_target_attribute_inner_p): Ditto.
4638         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
4639         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
4640         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
4641         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
4642         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
4643         (cldemote): New.
4644         * config/i386/i386.opt: Add -mcldemote.
4645         * config/i386/x86intrin.h: New header.
4646         * doc/invoke.texi: Add -mcldemote.
4648 2018-05-14  Richard Biener  <rguenther@suse.de>
4650         * doc/match-and-simplify.texi: Adjust :s documentation.
4652 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
4654         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
4655         intended memcpy size.
4656         (REORDER_45): Likewise.
4658 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
4660         * sort.cc: New file.
4661         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
4662         * vec.c (qsort_chk): Use gcc_qsort.
4663         * Makefile.in (OBJS-libcommon): Add sort.o.
4664         (build/sort.o): New target.  Use it...
4665         (BUILD_RTL): ... here, and...
4666         (build/gencfn-macros): ... here, and...
4667         (build/genmatch): ... here.
4669 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4670             Chung-Ju Wu  <jasonwucj@gmail.com>
4672         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
4673         * config/nds32/nds32-graywolf.md: New file.
4674         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
4675         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
4676         pipeline.
4677         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
4678         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
4679         * config/nds32/nds32.md (pipeline_model): Add graywolf.
4680         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
4681         * config/nds32/pipelines.md: Include n15 settings.
4683 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4684             Chung-Ju Wu  <jasonwucj@gmail.com>
4686         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
4687         * config/nds32/nds32-n13.md: New file.
4688         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
4689         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
4690         pipeline.
4691         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
4692         * config/nds32/nds32.md (pipeline_model): Add n13.
4693         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
4694         * config/nds32/pipelines.md: Include n13 settings.
4696 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4697             Chung-Ju Wu  <jasonwucj@gmail.com>
4699         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
4700         * config/nds32/nds32-n10.md: New file.
4701         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
4702         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
4703         pipeline.
4704         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
4705         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
4706         * config/nds32/nds32.md (pipeline_model): Add n10.
4707         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
4708         * config/nds32/pipelines.md: Include n10 settings.
4710 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
4711             Kito Cheng  <kito.cheng@gmail.com>
4712             Chung-Ju Wu  <jasonwucj@gmail.com>
4714         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
4715         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4716         Add enum values for DSP extension instructions.
4717         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
4718         New constraints.
4719         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
4720         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
4721         New code iterators.
4722         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
4723         * config/nds32/nds32-dspext.md: New file for DSP implementation.
4724         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
4725         * config/nds32/nds32-intrinsic.md: Likewise.
4726         * config/nds32/nds32_intrinsic.h: Likewise.
4727         * config/nds32/nds32-md-auxiliary.c: Likewise.
4728         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
4729         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
4730         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
4731         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
4732         * config/nds32/nds32-protos.h: New declarations for DSP extension.
4733         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
4734         TYPE_DMAC in switch statement.
4735         * config/nds32/nds32.c: New checking and implementation for DSP
4736         extension instructions.
4737         * config/nds32/nds32.h: Likewise.
4738         * config/nds32/nds32.md: Likewise.
4739         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
4740         * config/nds32/predicates.md: Implement new predicates for DSP
4741         extension.
4743 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
4745         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
4746         Reformat alternatives and attributes so it is easier to identify
4747         which constraints/attributes go with which instruction.
4748         (mov<mode>_hardfloat32, FMOVE64): Likewise.
4749         (mov<mode>_softfloat32, FMOVE64): Likewise.
4750         (mov<mode>_hardfloat64, FMOVE64): Likewise.
4751         (mov<mode>_softfloat64, FMOVE64): Likewise.
4753 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4755         * doc/extend.texi (PowerPC Built-in Functions): Rename this
4756         subsection.
4757         (Basic PowerPC Built-in Functions): The new name of the
4758         subsection previously known as "PowerPC Built-in Functions".
4759         (Basic PowerPC Built-in Functions Available on all Configurations):
4760         New subsubsection.
4761         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
4762         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
4763         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
4764         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
4766 2018-05-11  Martin Jambor  <mjambor@suse.cz>
4768         PR ipa/85655
4769         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
4770         single const.
4772 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
4774         PR target/85733
4775         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
4777 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
4779         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
4780         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
4781         (ix86_handle_option): Handle -mwaitpkg.
4782         * config.gcc: New header.
4783         * config/i386/cpuid.h (bit_WAITPKG): New bit.
4784         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
4785         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
4786         function type.
4787         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4788         OPTION_MASK_ISA_WAITPKG.
4789         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
4790         (ix86_option_override_internal): Add PTA_WAITPKG.
4791         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
4792         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
4793         IX86_BUILTIN_TPAUSE.
4794         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
4795         __builtin_ia32_umwait and __builtin_ia32_tpause.
4796         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
4797         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
4798         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
4799         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
4800         UNSPECV_TPAUSE): New.
4801         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
4802         * config/i386/i386.opt: Add -mwaitpkg.
4803         * config/i386/waitpkgintrin.h: New file.
4804         * config/i386/x86intrin.h: New header.
4805         * doc/invoke.texi: Add -mwaitpkg.
4807 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
4809         PR target/85606
4810         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
4811         equivalent.
4812         (cortex-m0): Use armv6s-m isa.
4813         (cortex-m0plus): Likewise.
4814         (cortex-m1): Likewise.
4815         (cortex-m0.small-multiply): Likewise.
4816         (cortex-m0plus.small-multiply): Likewise.
4817         (cortex-m1.small-multiply): Likewise.
4819 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
4820             Jakub Jelinek  <jakub@redhat.com>
4822         PR tree-optimization/85692
4823         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
4824         source permute as well.
4826 2018-05-11  Martin Liska  <mliska@suse.cz>
4828         PR sanitizer/85556
4829         * doc/extend.texi: Document LLVM style format for no_sanitize
4830         attribute.
4832 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
4834         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
4835         mode_supports_vsx_dform_quad to mode_supports_dq_form.
4836         (mode_supports_vsx_dform_quad): Likewise.
4837         (mode_supports_vmx_dform): Move these functions to be next to the
4838         other mode_supports functions.
4839         (mode_supports_dq_form): Likewise.
4840         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
4841         mode_supports_dq_form.
4842         (reg_offset_addressing_ok_p): Likewise.
4843         (offsettable_ok_by_alignment): Likewise.
4844         (rs6000_legitimate_offset_address_p): Likewise.
4845         (legitimate_lo_sum_address_p): Likewise.
4846         (rs6000_legitimize_address): Likewise.
4847         (rs6000_legitimize_reload_address): Likewise.
4848         (rs6000_secondary_reload_inner): Likewise.
4849         (rs6000_preferred_reload_class): Likewise.
4850         (rs6000_output_move_128bit): Likewise.
4852 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
4854         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
4855         Generate SImode target register for null target.
4856         <case IX86_BUILTIN_XGETBV>: Ditto.
4857         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
4858         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
4860 2018-05-10  Carl Love  <cel@us.ibm.com>
4862         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4863         dcbtt and dcbtstt if operands[2] is 0.
4865 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
4867         PR target/85693
4868         * config/i386/sse.md (usadv64qi): New expander.
4870 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
4872         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
4873         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
4874         -maltivec=be support.
4875         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
4876         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
4877         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
4878         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
4879         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
4880         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
4881         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
4882         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
4883         altivec_vsumsws): Adjust.
4884         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
4885         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
4886         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
4887         support.
4888         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
4889         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
4890         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
4891         (altivec_lve<VI_char>x): Delete expand.
4892         (*altivec_lve<VI_char>x_internal): Rename to...
4893         (altivec_lve<VI_char>x): ... this.
4894         (altivec_lvxl_<mode>): Delete expand.
4895         (*altivec_lvxl_<mode>_internal): Rename to ...
4896         (altivec_lvxl_<mode>): ... this.
4897         (altivec_stvxl_<mode>): Delete expand.
4898         (*altivec_stvxl_<mode>_internal): Rename to ...
4899         (altivec_stvxl_<mode>): ... this.
4900         (altivec_stve<VI_char>x): Delete expand.
4901         (*altivec_stve<VI_char>x_internal): Rename to ...
4902         (altivec_stve<VI_char>x): ... this.
4903         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
4904         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
4905         reduc_plus_scal_<mode>): Adjust.
4906         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
4907         comment.
4908         (rs6000_cpu_cpp_builtins): Adjust.
4909         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
4910         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
4911         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
4912         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
4913         -maltivec=be support.
4914         (rs6000_split_vec_extract_var): Adjust.
4915         (rs6000_split_v4si_init): Adjust.
4916         (swap_selector_for_mode): Delete.
4917         (altivec_expand_lvx_be, altivec_expand_stvx_be,
4918         altivec_expand_stvex_be): Delete.
4919         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
4920         -maltivec=be support.
4921         (rs6000_gimple_fold_builtin): Ditto.
4922         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
4923         Adjust.
4924         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
4925         (TARGET_DIRECT_MOVE_64BIT): Adjust.
4926         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
4927         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
4928         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
4929         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
4930         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
4931         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
4932         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
4933         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
4934         anonymous split): Adjust.
4935         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
4936         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
4938 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
4940         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
4941         when --with-gxx-include-dir is also specified.
4942         * configure: Regenerate.
4944 2018-05-09  Jim Wilson  <jimw@sifive.com>
4946         PR target/84797
4947         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
4948         * config/riscv/t-withmultilib: New.
4949         * config/riscv/withmultilib.h: New.
4950         * doc/install.texi: Document RISC-V --with-multilib-list support.
4952 2018-05-09  Richard Biener  <rguenther@suse.de>
4954         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
4955         vector.
4956         (vect_bb_vectorization_profitable_p): Adjust.  Compute
4957         actual scalar cost using the cost vector and the add_stmt_cost
4958         machinery.
4960 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
4962         PR rtl-optimization/85645
4963         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
4964         in the REG_CFA_REGISTER note for LR, don't leave it empty.
4966 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
4968         PR rtl-optimization/85645
4969         * shrink-wrap.c (spread_components): Return a boolean saying if
4970         anything was changed.
4971         (try_shrink_wrapping_separate): Iterate spread_components until
4972         nothing changes anymore.
4974 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
4976         PR rtl-optimization/85645
4977         * regrename.c (build_def_use): Also kill the chains that include the
4978         destination of a REG_CFA_REGISTER note.
4980 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
4982         PR rtl-optimization/85645
4983         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
4984         insn that has a REG_CFA_REGISTER note.
4986 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
4988         * cfgexpand.c (expand_clobber): New function.
4989         (expand_gimple_stmt_1): Use it.
4990         * tree-vect-stmts.c (vect_clobber_variable): New function,
4991         split out from...
4992         (vectorizable_simd_clone_call): ...here.
4993         (vectorizable_store): Emit a clobber either side of an
4994         IFN_STORE_LANES sequence.
4995         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
4997 2018-05-09  Tom de Vries  <tom@codesourcery.com>
4999         PR target/85626
5000         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5001         (define_insn "trap_if_false"): Add exit after trap.
5003 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5005         PR rtl-optimization/85638
5006         * bb-reorder.c: Include common/common-target.h.
5007         (create_forwarder_block): New function extracted from...
5008         (fix_up_crossing_landing_pad): ...here.  Rename into...
5009         (dw2_fix_up_crossing_landing_pad): ...this.
5010         (sjlj_fix_up_crossing_landing_pad): New function.
5011         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5012         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5013         from both partitions and exit the loop after one iteration.
5015 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5017         Revert:
5018         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5019         subsection.
5020         (Basic PowerPC Built-in Functions): The new name of the
5021         subsection previously known as "PowerPC Built-in Functions".
5022         (Basic PowerPC Built-in Functions Available on all Configurations):
5023         New subsubsection.
5024         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5025         subsubsection.
5026         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5027         subsubsection.
5028         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5029         subsubsection.
5030         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5031         subsubsection.
5033 2018-05-08  Jim Wilson  <jimw@sifive.com>
5035         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5036         (LD_EMUL_SUFFIX): New.
5037         (LINK_SPEC): Use it.
5039 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5041         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5042         subsection.
5043         (Basic PowerPC Built-in Functions): The new name of the
5044         subsection previously known as "PowerPC Built-in Functions".
5045         (Basic PowerPC Built-in Functions Available on all Configurations):
5046         New subsubsection.
5047         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5048         subsubsection.
5049         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5050         subsubsection.
5051         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5052         subsubsection.
5053         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5054         subsubsection.
5056 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5058         PR target/85683
5059         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5060         after cmpelim optimization.
5062 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5064         * config.gcc: Support "goldmont".
5065         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5066         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5067         PROCESSOR_GOLDMONT.
5068         * config/i386/i386.c (m_GOLDMONT): Define.
5069         (processor_target_table): Add "goldmont".
5070         (PTA_GOLDMONT): Define.
5071         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5072         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5073         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5074         (fold_builtin_cpu): Add "goldmont".
5075         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5076         (ix86_option_override_internal): Add "goldmont".
5077         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5078         (processor_type): Add PROCESSOR_GOLDMONT.
5079         * config/i386/i386.md: Add CPU "glm".
5080         * config/i386/glm.md: New file.
5081         * config/i386/x86-tune.def: Add m_GOLDMONT.
5082         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5084 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5086         PR target/85572
5087         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5088         E_V4DImode.
5089         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5090         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5091         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5093         PR target/85317
5094         * config/i386/i386.c (ix86_fold_builtin): Handle
5095         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5097         PR target/85480
5098         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5099         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5101 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5103         PR target/85658
5104         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5105         (check_arch): Likewise.
5106         (check_fpu): Return the result rather than printing it.
5107         (end arch): Fix operator precedence.
5108         (end cpu): Likewise.
5109         (END): Print the result from check_fpu.
5111 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5112             Alan Hayward  <alan.hayward@arm.com>
5113             David Sherwood  <david.sherwood@arm.com>
5115         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5116         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5117         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5118         (*fcmuo<mode>_and): New patterns.
5120 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5122         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5123         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5124         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5125         (cmp_op, sve_imm_con): New code attributes.
5126         (SVE_COND_INT_CMP, imm_con): Delete.
5127         (cmp_op): Remove above unspecs from int attribute.
5128         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5129         to...
5130         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5131         comparison-specific unspecs.
5132         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5133         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5134         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5135         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5136         (*vec_fcm<cmp_op><mode>): Rename to...
5137         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5138         (*vec_fcmuo<mode>): Rename to...
5139         (*fcmuo<mode>): ...this and adjust likewise.
5140         (*pred_fcm<cmp_op><mode>): New pattern.
5141         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5142         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5143         functions.
5144         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5145         and UNORDERED.
5146         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5147         (aarch64_emit_sve_predicated_cond): New function.
5148         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5149         (aarch64_emit_unspec_cond_or): Replace with...
5150         (aarch64_emit_sve_or_conds): ...this new function.  Use
5151         aarch64_emit_sve_ptrue_op for the individual comparisons and
5152         aarch64_emit_binop to OR them together.
5153         (aarch64_emit_inverted_unspec_cond): Replace with...
5154         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5155         aarch64_emit_sve_ptrue_op for the comparison and
5156         aarch64_emit_unop to invert the result.
5157         (aarch64_expand_sve_vec_cmp_float): Update after the above
5158         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5160 2018-05-07  Nathan Sidwell  <nathan@acm.org>
5162         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5163         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5164         (Backwards Compatibility): Likewise.
5166 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5168         PR bootstrap/85681
5169         Revert:
5170         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5172         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5173         <prefetch_dynamic_strides>: New const bool field.
5174         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5175         prefetch_dynamic_strides.
5176         (exynosm1_prefetch_tune): Likewise.
5177         (thunderxt88_prefetch_tune): Likewise.
5178         (thunderx_prefetch_tune): Likewise.
5179         (thunderx2t99_prefetch_tune): Likewise.
5180         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5181         to false.
5182         (aarch64_override_options_internal): Update to set
5183         PARAM_PREFETCH_DYNAMIC_STRIDES.
5184         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5185         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5186         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5187         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5188         prefetch-dynamic-strides setting.
5190         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5192         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5193         <minimum_stride>: New const int field.
5194         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5195         minimum_stride field.
5196         (exynosm1_prefetch_tune): Likewise.
5197         (thunderxt88_prefetch_tune): Likewise.
5198         (thunderx_prefetch_tune): Likewise.
5199         (thunderx2t99_prefetch_tune): Likewise.
5200         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5201         (aarch64_override_options_internal): Update to set
5202         PARAM_PREFETCH_MINIMUM_STRIDE.
5203         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5204         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5205         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5206         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5207         stride is constant and is below the minimum stride threshold.
5209 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5211         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5212         to 512.
5214 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5216         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5217         <prefetch_dynamic_strides>: New const bool field.
5218         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5219         prefetch_dynamic_strides.
5220         (exynosm1_prefetch_tune): Likewise.
5221         (thunderxt88_prefetch_tune): Likewise.
5222         (thunderx_prefetch_tune): Likewise.
5223         (thunderx2t99_prefetch_tune): Likewise.
5224         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5225         to false.
5226         (aarch64_override_options_internal): Update to set
5227         PARAM_PREFETCH_DYNAMIC_STRIDES.
5228         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5229         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5230         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5231         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5232         prefetch-dynamic-strides setting.
5234 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5236         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5237         <minimum_stride>: New const int field.
5238         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5239         minimum_stride field.
5240         (exynosm1_prefetch_tune): Likewise.
5241         (thunderxt88_prefetch_tune): Likewise.
5242         (thunderx_prefetch_tune): Likewise.
5243         (thunderx2t99_prefetch_tune): Likewise.
5244         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5245         (aarch64_override_options_internal): Update to set
5246         PARAM_PREFETCH_MINIMUM_STRIDE.
5247         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5248         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5249         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5250         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5251         stride is constant and is below the minimum stride threshold.
5253 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
5255         PR c++/85659
5256         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5257         the type is addressable.  Don't force op into register if it has
5258         BLKmode.
5260 2018-05-05  Roland McGrath  <mcgrathr@google.com>
5262         PR other/77609
5263         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5264         any section for which we don't know a specific type it should have,
5265         regardless of name.  Previously this was done only for the exact
5266         names ".init_array", ".fini_array", and ".preinit_array".
5267         (default_elf_asm_named_section): Add comment about
5268         relationship with default_section_type_flags and SECTION_NOTYPE.
5269         (get_section): Don't consider it a type conflict if one side has
5270         SECTION_NOTYPE and the other doesn't, as long as neither has the
5271         SECTION_BSS et al used in the default_section_type_flags logic.
5273 2018-05-05  Tom de Vries  <tom@codesourcery.com>
5275         PR target/85653
5276         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5277         (workaround_barsyncs): New function.
5278         (nvptx_reorg): Use workaround_barsyncs.
5279         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5280         (define_expand "nvptx_membar_cta"): New define_expand.
5281         (define_insn "*nvptx_membar_cta"): New insn.
5283 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
5285         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5286         To improve optimization opportunities.
5287         * builtin-types.def: The new needed builtin types for the above.
5289 2018-05-04  Richard Biener  <rguenther@suse.de>
5291         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5292         * gimple-ssa-store-merging.c
5293         (imm_store_chain_info::output_merged_store): Remove redundant create,
5294         release split_store vector contents on failure.
5295         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5296         scalar stmt vector on cache hit.
5298 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
5300         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5301         Xilinx FP support.
5302         * config.gcc (powerpc-xilinx-eabi*): Remove.
5303         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5304         support.
5305         (fusion_addis_mem_combo_load): Ditto.
5306         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5307         FP support.
5308         (rs6000_cpu_cpp_builtins): Ditto.
5309         * config/rs6000/rs6000-linux.c
5310         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5311         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5312         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5313         support.
5314         (rs6000_setup_reg_addr_masks): Ditto.
5315         (rs6000_init_hard_regno_mode_ok): Ditto.
5316         (rs6000_option_override_internal): Ditto.
5317         (legitimate_lo_sum_address_p): Ditto.
5318         (rs6000_legitimize_address): Ditto.
5319         (rs6000_legitimize_reload_address): Ditto.
5320         (rs6000_legitimate_address_p): Ditto.
5321         (abi_v4_pass_in_fpr): Ditto.
5322         (setup_incoming_varargs): Ditto.
5323         (rs6000_gimplify_va_arg): Ditto.
5324         (rs6000_split_multireg_move): Ditto.
5325         (rs6000_savres_strategy): Ditto.
5326         (rs6000_emit_prologue_components): Ditto.
5327         (rs6000_emit_epilogue_components): Ditto.
5328         (rs6000_emit_prologue): Ditto.
5329         (rs6000_emit_epilogue): Ditto.
5330         (rs6000_elf_file_end): Ditto.
5331         (rs6000_function_value): Ditto.
5332         (rs6000_libcall_value): Ditto.
5333         * config/rs6000/rs6000.h: Ditto.
5334         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5335         (TARGET_MINMAX): ... this.  New.
5336         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5337         * config/rs6000/rs6000.md: Remove Xilinx FP support.
5338         (*movsi_internal1_single): Delete.
5339         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5340         mfpu=, mxilinx-fpu): Delete.
5341         * config/rs6000/singlefp.h: Delete.
5342         * config/rs6000/sysv4.h: Remove Xilinx FP support.
5343         * config/rs6000/t-rs6000: Ditto.
5344         * config/rs6000/t-xilinx: Delete.
5345         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5346         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5347         (VStype_simple): Delete.
5348         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5349         * config/rs6000/xfpu.h: Delete.
5350         * config/rs6000/xfpu.md: Delete.
5351         * config/rs6000/xilinx.h: Delete.
5352         * config/rs6000/xilinx.opt: Delete.
5353         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5354         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5356 2018-05-04  Tom de Vries  <tom@codesourcery.com>
5358         PR libgomp/85639
5359         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5360         if ignore == 0.
5362 2018-05-04  Richard Biener  <rguenther@suse.de>
5364         PR middle-end/85627
5365         * tree-complex.c (update_complex_assignment): We are always in SSA form.
5366         (expand_complex_div_wide): Likewise.
5367         (expand_complex_operations_1): Likewise.
5368         (expand_complex_libcall): Preserve EH info of the original stmt.
5369         (tree_lower_complex): Handle removed blocks.
5370         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5371         on complex multiplication and division libcall builtins.
5373 2018-05-04  Richard Biener  <rguenther@suse.de>
5375         PR middle-end/85574
5376         * fold-const.c (negate_expr_p): Restrict negation of operand
5377         zero of a division to when we know that can happen without
5378         overflow.
5379         (fold_negate_expr_1): Likewise.
5381 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
5383         PR libstdc++/85466
5384         * real.h (real_nextafter): Declare.
5385         * real.c (real_nextafter): New function.
5386         * fold-const-call.c (fold_const_nextafter): New function.
5387         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5388         CASE_CFN_NEXTTOWARD.
5389         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5390         even when arg1_mode is different from arg0_mode.
5392 2018-05-03  Nathan Sidwell  <nathan@acm.org>
5394         * doc/extend.texi (Deprecated Features): Remove
5395         -ffriend-injection.
5396         (Backwards Compatibility): Likewise.
5397         * doc/invoke.texi (C++ Language Options): Likewise.
5398         (C++ Dialect Options): Likewise.
5400 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
5402         PR target/85530
5403         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5404         _mm512_mask_mullox_epi64): New intrinsics.
5406 2018-05-03  Tom de Vries  <tom@codesourcery.com>
5408         PR testsuite/85106
5409         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5410         dump files): Add offload-tree.
5412 2018-05-03  Richard Biener  <rguenther@suse.de>
5414         PR tree-optimization/85615
5415         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5416         to loops not nested in BBs loop father to avoid creating multi-entry
5417         loops.
5419 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5421         PR tree-optimization/70291
5422         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5423         arguments.  Change return type to tree.  Emit libcall as a new
5424         statement rather than replacing existing one when inplace_p is true.
5425         (expand_complex_multiplication_components): New function.
5426         (expand_complex_multiplication): Expand floating-point complex
5427         multiplication using the above.
5428         (expand_complex_division): Rename inner_type parameter to type.
5429         Update expand_complex_libcall call-site.
5430         (expand_complex_operations_1): Update expand_complex_multiplication
5431         and expand_complex_division call-sites.
5433 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5435         PR target/85582
5436         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5437         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5438         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5439         the highest significant bit of the shift count mask is clear.  In
5440         check whether and[sq]i3 is needed verify that all significant bits
5441         of the shift count other than the highest are set.
5443 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5445         PR libgomp/82428
5446         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5447         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5448         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5449         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5450         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5451         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5452         __builtin_goacc_parlevel_size.
5454 2018-05-02  Richard Biener  <rguenther@suse.de>
5456         PR tree-optimization/85597
5457         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5458         do not use split vect_get_vec_defs call but call vect_get_slp_defs
5459         directly.
5461 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5463         PR testsuite/85106
5464         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5465         dump files): Add ltrans-tree.
5467 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5469         PR testsuite/85106
5470         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5471         dump files): Add wpa-ipa.
5473 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
5475         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
5476         powerpc*-*-linux*paired* target.
5477         * config/rs6000/750cl.h: Delete.
5478         * config/rs6000/paired.h: Delete.
5479         * config/rs6000/paired.md: Delete.
5480         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5481         float support.
5482         * config/rs6000/rs6000-builtin.def: Remove paired float support.
5483         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5484         comment.  Remove paired float support.
5485         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5486         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5487         VECTOR_PAIRED.
5488         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5489         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5490         declarations.
5491         * config/rs6000/rs6000.c: Remove paired float support.
5492         (paired_expand_vector_init, paired_expand_vector_move,
5493         paired_emit_vector_compare, paired_emit_vector_cond_expr,
5494         (paired_expand_lv_builtin, paired_expand_stv_builtin,
5495         paired_expand_builtin, paired_expand_predicate_builtin,
5496         paired_init_builtins): Delete.
5497         * config/rs6000/rs6000.h: Remove paired float support.
5498         * config/rs6000/rs6000.md: Remove paired float support.
5499         (move_from_CR_ov_bit): Delete.
5500         * config/rs6000/rs6000.opt (mpaired): Delete.
5501         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5502         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5504 2018-05-02  Richard Biener  <rguenther@suse.de>
5506         PR middle-end/85567
5507         * gimplify.c (gimplify_save_expr): When in SSA form allow
5508         SAVE_EXPRs to compute to SSA vars.
5510 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5512         PR target/85582
5513         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5514         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5515         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5516         clobber operands[2], instead use a new pseudo.  Formatting fixes.
5518 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
5520         PR tree-optimization/85586
5521         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5522         exit early for statements in the same group if the accesses are
5523         not strided.
5525 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5527         PR lto/85451
5528         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5529         error message.
5531 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
5533         PR tree-optimization/85143
5534         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5536 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5538         PR lto/85451
5539         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5540         not found" error message.
5542 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5544         PR other/83786
5545         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5546         * vec.c (test_ordered_remove_if): New function.
5547         (vec_c_tests): Call test_ordered_remove_if.
5548         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5549         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5550         * tree-vect-patterns.c (vect_pattern_recog_1): Use
5551         VEC_ORDERED_REMOVE_IF.
5553 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5555         PR tree-optimization/82665
5556         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5557         pointer subtraction where arguments come from a memchr call.
5559 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
5561         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5562         --push-state --as-needed and --pop-state instead of --as-needed and
5563         --no-as-needed if ld supports it.
5564         * configure: Regenerated.
5566         PR web/85578
5567         * doc/install.texi2html: Replace _002d with - and _002a with * in
5568         generated html files using sed.
5570 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5572         PR c++/85523
5573         * gcc-rich-location.c (blank_line_before_p): New function.
5574         (use_new_line): New function.
5575         (gcc_rich_location::add_fixit_insert_formatted): New function.
5576         * gcc-rich-location.h
5577         (gcc_rich_location::add_fixit_insert_formatted): New function.
5579 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5581         * selftest.c (assert_streq): Rename "expected" and "actual" to
5582         "val1" and "val2".  Extend NULL-handling to cover both inputs
5583         symmetrically, while still requiring both to be non-NULL for a pass.
5584         * selftest.h (assert_streq): Rename "expected" and "actual" to
5585         "val1" and "val2".
5586         (ASSERT_EQ): Likewise.
5587         (ASSERT_EQ_AT): Likewise.
5588         (ASSERT_KNOWN_EQ): Likewise.
5589         (ASSERT_KNOWN_EQ_AT): Likewise.
5590         (ASSERT_NE): Likewise.
5591         (ASSERT_MAYBE_NE): Likewise.
5592         (ASSERT_MAYBE_NE_AT): Likewise.
5593         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
5594         the assertion to pass.
5595         (ASSERT_STREQ_AT): Likewise.
5597 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
5599         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
5600         interaction with -pie.
5602 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5604         * selftest.h: Fix alphabetization of per-source-file selftest
5605         declarations.
5607 2018-04-30  Jason Merrill  <jason@redhat.com>
5609         PR c++/61982 - dead stores to destroyed objects.
5610         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
5611         of clobber.
5613 2018-04-30  Jason Merrill  <jason@redhat.com>
5615         * tree.c (build_clobber): New.
5616         * tree.h: Declare it.
5617         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
5619 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5621         * diagnostic-show-locus.c (layout::layout): Update for
5622         location_get_source_line returning a char_span.
5623         (struct char_span): Move to input.h.
5624         (struct correction): Update for fields in char_span becoming
5625         private.
5626         (struct source_line): Update for location_get_source_line
5627         returning a char_span.
5628         (layout::print_line): Likewise.
5629         * edit-context.c (edited_file::print_content): Likewise.
5630         (edited_file::print_diff_hunk): Likewise.
5631         (edited_file::print_run_of_changed_lines): Likewise.
5632         (edited_file::get_num_lines): Likewise.
5633         (edited_line::edited_line): Likewise.
5634         * final.c (asm_show_source): Likewise.
5635         * input.c (location_get_source_line): Convert return type
5636         from const char * to char_span, losing the final "line_len"
5637         param.
5638         (dump_location_info): Update for the above.
5639         (get_substring_ranges_for_loc): Likewise.  Use a char_span
5640         when handling the literal within the line.
5641         (test_reading_source_line): Update for location_get_source_line
5642         returning a char_span.
5643         * input.h (class char_span): Move here from
5644         diagnostic-show-locus.c, converting from a struct to a class.
5645         Make data members private.
5646         (char_span::operator bool): New.
5647         (char_span::length): New.
5648         (char_span::get_buffer): New.
5649         (char_span::operator[]): New.
5650         (char_span::subspan): Make const.
5651         (char_span::xstrdup): New.
5652         (location_get_source_line): Convert return type from const char *
5653         to char_span, losing the final "line_size" param.
5655 2018-04-30  Jan Hubicka  <jh@suse.cz>
5657         * lto-wrapper.c (ltrans_priorities): New static var.
5658         (cmp_priority): New.
5659         (run_gcc): Read priorities and if doing parallel build order
5660         the Makefile by them.
5662 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5664         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
5666 2018-04-30  Richard Biener  <rguenther@suse.de>
5668         * tree-cfg.c (verify_address): Remove base argument, add
5669         flag whether to check TREE_ADDRESSABLE and do that.
5670         (verify_expr): Remove.
5671         (verify_types_in_gimple_reference): Add pieces from verify_expr.
5672         (verify_gimple_assign_single): Likewise.
5673         (verify_gimple_switch): Likewise.
5674         (verify_expr_location_1): Dereference tp once.  Add (disabled)
5675         piece from verify_expr.
5676         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
5678 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5680         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
5682 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5684         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
5685         (small_data_pattern): Likewise.
5686         (arc_rewrite_small_data): Likewise.
5687         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
5688         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
5689         (get_symbol_alignment): New function.
5690         (legitimate_small_data_address_p): Likewise.
5691         (legitimate_scaled_address): Update, call
5692         legitimate_small_data_address_p.
5693         (output_sdata): New static variable.
5694         (arc_print_operand): Update how we handle small data operands.
5695         (arc_print_operand_address): Likewise.
5696         (arc_legitimate_address_p): Update, use
5697         legitimate_small_data_address_p.
5698         (arc_rewrite_small_data_p): Remove.
5699         (arc_rewrite_small_data_1): Likewise.
5700         (arc_rewrite_small_data): Likewise.
5701         (small_data_pattern): Likewise.
5702         (compact_sda_memory_operand): Update to use
5703         legitimate_small_data_address_p and get_symbol_alignment.
5704         (prepare_move_operands): Don't rewite sdata pattern.
5705         (prepare_extend_operands): Remove.
5706         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
5707         pattern.
5708         (zero_extendqisi2): Likewise.
5709         (zero_extendhisi2): Likewise.
5710         (extendqihi2): Likewise.
5711         (extendqisi2): Likewise.
5712         (extendhisi2): Likewise.
5713         (addsi3): Likewise.
5714         (subsi3): Likewise.
5715         (andsi3): Likewise.
5716         * config/arc/constraints.md (Usd): Change it to memory constraint.
5718 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5720         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
5721         as source of std instructions.
5722         * config/arc/arc.md (movsi_insn): Update pattern predicate to
5723         allow 6-bit constants as source for store instructions.
5724         (movdi_insn): Update instruction pattern to allow 6-bit constants
5725         as source for store instructions.
5727 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
5729         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
5731 2018-04-30  Nathan Sidwell  <nathan@acm.org>
5732             Sandra Loosemore <sandra@codesourcery.com>
5734         * dumpfile.c (dump_open): Allow '-' for stdout.
5735         * doc/invoke.texi (Developer Options): Document dump filename
5736         determination early.  Document stdin/stdout selection.
5738 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
5740         Microblaze Target: PIC data text relative
5742         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
5743         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
5744         Add declaration.
5745         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
5746         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
5747         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
5748         New addressing mode for data-text relative position indepenedent code.
5749         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
5750         'ADDRESS_SYMBOLIC_TXT_REL'.
5751         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
5752         (microblaze_legitimate_pic_operand): Exclude function calls from
5753         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
5754         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
5755         addresses cases.
5756         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
5757         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
5758         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
5759         for 'address + offset'.
5760         (microblaze_expand_prologue): Add new function prologue call for
5761         'r20' assignation.
5762         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
5763         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
5764         table in case of TARGET_PIC_DATA_TEXT_REL.
5765         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
5766         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
5767         Add new macros 'UNSPEC_TEXT',
5768         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
5769         + exclude function calls from 'UNSPEC_PLT' in case of data text
5770         relative mode.
5771         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
5772         new target hook for generating address diff vector tables in case of
5773         flag_pic.
5774         * doc/tm.texi : Regenerate.
5775         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
5776         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
5777         of addr diff vector generation.
5778         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
5779         target hook definition.
5780         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
5781         Add default function for generate_pic_addr_diff_vec -> flag_pic.
5782         * doc/invoke.texi (Add new pic option): Add new microblaze pic
5783         option for data text relative.
5785 2018-04-30  Richard Biener  <rguenther@suse.de>
5787         * tree-chrec.h (evolution_function_is_constant_p): Remove
5788         redundant check.
5789         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
5791 2018-04-30  Richard Biener  <rguenther@suse.de>
5793         PR bootstrap/85571
5794         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
5796 2018-04-30  Richard Biener  <rguenther@suse.de>
5798         PR tree-optimization/28364
5799         PR tree-optimization/85275
5800         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
5801         copying first exit test.
5803 2018-04-28  Mark Wielaard  <mark@klomp.org>
5805         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
5806         dwarf_version >= 5.
5807         (dwarf_AT): Handle DW_AT_addr_base.
5808         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
5810 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
5812         PR target/84431
5813         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
5814         (*ashl<dwi>3_doubleword_mask_1): Ditto.
5815         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
5816         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
5818 2018-04-28  Richard Biener  <rguenther@suse.de>
5820         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
5821         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
5822         to reflect use.  Only add interesting stmts.
5824 2018-04-27  Martin Jambor  <mjambor@suse.cz>
5826         PR ipa/85549
5827         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
5828         the jump function allows for passing through aggregate values.
5830 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
5832         * input.h (in_system_header_at): Convert from macro to inline
5833         function.
5834         (from_macro_expansion_at): Likewise.
5835         (from_macro_definition_at): Likewise.
5837 2018-04-27  Jeff Law  <law@redhat.com>
5839         * config.gcc: Mark tile* targets as deprecated/obsolete.
5841 2018-04-27  Richard Biener  <rguenther@suse.de>
5843         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
5844         fix for ILP32.
5846 2018-04-27  Richard Biener  <rguenther@suse.de>
5848         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
5850 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
5852         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
5853         with Yd constraint. Set "preferred_for_speed" attribute from
5854         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
5855         with Yd constraint.
5856         (*movdi_internal): Ditto.
5857         (movti_interunit splitters): Remove
5858         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
5859         (movdi_interunit splitters): Ditto.
5860         * config/i386/constraints.md (Ye): Remove.
5861         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
5863 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5865         PR target/85512
5866         * config/aarch64/constraints.md (Usg): Limit to 31.
5867         (Usj): Limit to 63.
5869 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
5871         PR tree-optimization/85529
5872         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
5873         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
5874         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
5875         zero extension or masking of the MSB bit.
5876         (optimize_range_tests): Add FIRST_BB argument, pass it through
5877         to optimize_range_tests_var_bound.
5878         (maybe_optimize_range_tests, reassociate_bb): Adjust
5879         optimize_range_tests callers.
5881 2018-04-26  Richard Biener  <rguenther@suse.de>
5882             Jakub Jelinek  <jakub@redhat.com>
5884         * cgraph.h (symbol_table): Just declare debug method here.
5885         * symtab.c (symbol_table::debug): Define.
5887 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
5889         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
5891 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
5893         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
5894         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
5895         (*movdi_internal): Substitute Yi and Yj constraint with x
5896         and Ym and Yn constraint with y constraint.  Update "isa"
5897         attribute and set "preferred_for_speed" attribute from
5898         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
5899         (*movsi_internal): Ditto.
5900         (*movdf_internal): Ditto.
5901         (*movsf_internal): Ditto.
5902         (*zero_extendsidi2): Ditto.
5903         * config/i386/sse.md (vec_set<mode>_0): Ditto.
5904         (sse2_loadld): Ditto.
5905         (*vec_extract<ssevecmodelower>_0): Ditto.
5906         (*vec_extractv4si_0_zext_sse4): Ditto.
5907         (vec_concatv2di): Ditto.
5908         (*vec_dup<mode>): Ditto.
5909         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
5910         * config/i386/constraints.md (Yi): Remove.
5911         (Yj): Remove.
5912         (Ym): Remove.
5913         (Yn): Remove.
5915 2018-04-26  Nathan Sidwell  <nathan@acm.org>
5917         * dumpfile.c (dump_open): New.
5918         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
5919         (dump_finish): Detect stdio/stderr by value not name.
5921 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
5923         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
5925 2018-04-26  Tom de Vries  <tom@codesourcery.com>
5927         PR target/84952
5928         * config/nvptx/nvptx.c (verify_neutering_jumps)
5929         (verify_neutering_labels): New function
5930         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
5932 2018-04-26  Tom de Vries  <tom@codesourcery.com>
5934         PR target/84025
5935         * config/nvptx/nvptx.c (needs_neutering_p): New function.
5936         (nvptx_single): Use needs_neutering_p to skip over insns that do not
5937         need neutering.
5939 2018-04-26  Richard Biener <rguenther@suse.de>
5940             Tom de Vries  <tom@codesourcery.com>
5942         PR lto/85422
5943         * lto-streamer-out.c (output_function): Fixup loops if required to match
5944         discovery done in the reader.
5946 2018-04-26  Richard Biener  <rguenther@suse.de>
5948         PR tree-optimization/85116
5949         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
5950         have a loop exit from the single latch predecessor.  Remove
5951         case of header with just condition.
5952         (ch_base::copy_headers): Exclude infinite loops from any
5953         processing.
5954         (pass_ch::execute): Record exits.
5956 2018-04-26  Richard Biener  <rguenther@suse.de>
5958         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
5959         prologue cost vector and pass it to vect_get_load_cost.
5960         (vect_get_peeling_costs_all_drs): Likewise.
5961         (vect_peeling_hash_get_lowest_cost): Likewise.
5962         (vect_enhance_data_refs_alignment): Likewise.
5964 2018-04-26  Richard Biener  <rguenther@suse.de>
5966         PR middle-end/85450
5967         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
5968         checking of integer<->pointer conversions.
5969         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
5970         sign-/zero-extending pointer types.
5971         (expand_omp_for_static_chunk): Likewise.
5973 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
5974             Jean Lee  <xiaoyur347@gmail.com>
5976         * config/mips/mips.c (mips_asan_shadow_offset): New function.
5977         (TARGET_ASAN_SHADOW_OFFSET): Define.
5978         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
5979         true for -fsanitize=address.
5981 2018-04-25  Mark Wielaard  <mark@klomp.org>
5983         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
5984         shorter ones.
5986 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
5988         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
5989         than "alu", remove explicit "memory" and "imm_disp" attributes.
5990         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
5992         PR middle-end/85414
5993         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
5994         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
5995         gen_lowpart_no_emit.
5997 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
5999         PR target/85473
6000         * config/i386/i386.c (ix86_expand_builtin): Change memory
6001         operand to XI, extend p0 to Pmode.
6002         * config/i386/i386.md: Change unspec volatile and operand
6003         1 mode to XI, change operand 0 mode to P.
6005 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6007         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6008         GET_MODE_MASK before any checking.
6009         (nds32_can_use_bset_p): Likewise.
6010         (nds32_can_use_btgl_p): Likewise.
6012 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6014         * config/nds32/nds32-doubleword.md: New define_split pattern for
6015         illegal register number.
6017 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6019         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6021 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6023         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6025 2018-04-25  Richard Biener  <rguenther@suse.de>
6027         * lto-streamer.h (LTO_major_version): Bump to 8.
6029 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6031         * BASE-VER: Set to 9.0.0.
6033 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6035         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6036         in __abskf2 and __powikf2.
6038 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6040         PR target/85512
6041         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6042         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6043         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6044         Use the above on operand 2.  Reindent.
6045         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6047 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6049         PR target/85485
6050         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6051         handle OPT_mcet.
6052         * config/i386/i386.opt (mcet): Removed.
6053         * doc/install.texi: Remove -mcet documentation.
6054         * doc/invoke.texi: Likewise.
6056 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6058         PR target/85485
6059         * doc/install.texi: Remove -mcet from bootstrap-cet.
6061 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6063         PR target/85511
6064         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6065         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6066         if TARGET_64BIT.
6068         PR target/85503
6069         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6070         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6071         containing a CONST_VECTOR.
6073 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6075         * doc/install.texi: Update newlib dependency for nvptx.
6077 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6079         PR target/85508
6080         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6081         instead of INTVAL when shifting x left.
6083 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6085         PR tree-optimization/85478
6086         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6087         vect_grouped_store_supported for single element vectors.
6089 2018-04-24  Richard Biener  <rguenther@suse.de>
6091         PR target/85491
6092         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6093         load cost increase to the case of non-constant step.
6095 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6097         PR target/84828
6098         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6099         destination if any_malformed_asm.
6101 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6103         PR middle-end/85496
6104         * expr.c (store_field): In the bitfield case, if the value comes from
6105         a function call and is returned in registers by means of a PARALLEL,
6106         do not change the mode of the temporary unless BLKmode and VOIDmode.
6108 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6110         PR rtl-optimization/85423
6111         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6112         dependencies to debug insns when the previous insn is non-debug.
6114 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6116         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6117         enums into a single definition.
6118         (fls): Fix predicates and printing.
6119         (seti): Likewise.
6121 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6123         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6124         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6125         and short u6 immediate.
6126         (check_if_valid_sleep_operand): Remove.
6127         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6129 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6131         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6132         flag_always_save_lp condition.
6133         * config/nds32/nds32.opt (malways-save-lp): New option.
6135 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6137         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6138         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6139         * config/nds32/nds32.h
6140         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6141         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6143 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6145         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6146         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6148 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6149             Chung-Ju Wu  <jasonwucj@gmail.com>
6151         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6152         Declare.
6153         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6154         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6156 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6158         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6160 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6162         * config/nds32/nds32-protos.h (nds32_data_alignment,
6163         nds32_local_alignment): Declare.
6164         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6165         nds32_local_alignment): New functions.
6166         (TARGET_CONSTANT_ALIGNMENT): Define.
6167         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6169 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6171         * config/nds32/nds32.c
6172         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6173         (TARGET_MODES_TIEABLE_P): Likewise.
6175 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6177         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6178         level Ofast and Og.
6180 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
6181             Chung-Ju Wu  <jasonwucj@gmail.com>
6183         * config/nds32/constants.md (unspec_volatile_element): Add enum values
6184         for unaligned access.
6185         * config/nds32/nds32-intrinsic.c: Implementation of expanding
6186         unaligned access.
6187         * config/nds32/nds32-intrinsic.md: Likewise.
6188         * config/nds32/nds32_intrinsic.h: Likewise.
6189         * config/nds32/nds32.h (nds32_builtins): Likewise.
6190         * config/nds32/nds32.opt (munaligned-access): New option.
6191         * config/nds32/nds32.c (nds32_asm_file_start): Display
6192         flag_unaligned_access status.
6194 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6196         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6197         -mno-relax is present.
6198         * config/riscv/linux.h (LINK_SPEC): Ditto.
6200 2018-04-20  Martin Sebor  <msebor@redhat.com>
6202         PR c/85365
6203         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6204         for null pointers.
6205         (gimple_fold_builtin_stxcpy_chk): Same.
6206         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6208 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
6210         PR target/85456
6211         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6212         __powikf2 when long double is IEEE 128-bit.
6214 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6216         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6217         step to make sure stack always aligned.
6219 2018-04-20  Carl Love  <cel@us.ibm.com>
6221         PR target/83402
6222         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6223         size check for arg0.
6225 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6226             Tom de Vries  <tom@codesourcery.com>
6228         PR target/85445
6229         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6230         Emit insns for calls too.
6231         (nvptx_find_par): Always look for worker-level predecessor insn.
6232         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
6233         calls.
6234         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6235         (nvptx_process_pars): Propagate frames for calls.
6237 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
6239         PR target/85469
6240         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6241         Removed.
6242         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6243         (ix86_handle_option): Don't handle OPT_mibt.
6244         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6245         __SHSTK__.
6246         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6247         has_ibt and ibt.
6248         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6249         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6250         (ix86_target_macros): Define __CET__ with flag_cf_protection
6251         for -fcf-protection.
6252         * config/i386/i386.c (isa2_opts): Remove -mibt.
6253         * config/i386/i386.h (TARGET_IBT): Removed.
6254         (TARGET_IBT_P): Likewise.
6255         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6256         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6257         * config/i386/i386.opt (mcet): Update help message.
6258         (mshstk): Likewise.
6259         (mibt): Removed.
6260         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
6261         -mcet as an alias for -mshstk.
6263 2018-04-20  Richard Biener <rguenther@suse.de>
6265         PR middle-end/85475
6266         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6267         complexity by forcing a single use of the multiply operand.
6269 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6271         ipa/85449
6272         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6273         recursion dependency to only apply to non-clones.
6275 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6277         ipa/85447
6278         * ipa-cp.c (create_specialized_node): Check that clones of
6279         self-recursive edges exist during IPA-CP.
6281 2018-04-19  Toon Moene  <toon@moene.org>
6283         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6284         by -O3.
6286 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6288         PR tree-optimization/85467
6289         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6290         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
6291         VECTOR_CST element to type.
6293 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6295         PR target/85397
6296         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6297         * config/i386/i386.md (builtin_setjmp_setup): Removed.
6298         (builtin_longjmp): Likewise.
6299         (save_stack_nonlocal): New pattern.
6300         (restore_stack_nonlocal): Likewise.
6302 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6304         PR target/85404
6305         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6306         Replace ASM_OUTPUT_LABEL with fprintf.
6308 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6310         PR target/85417
6311         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6312         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6313         * config/i386/i386-c.c (ix86_target_macros_internal): Also
6314         define __IBT__ and __SHSTK__ for -fcf-protection.
6315         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6316         TARGET_IBT.
6317         (ix86_trampoline_init): Likewise.
6318         (x86_output_mi_thunk): Likewise.
6319         (ix86_notrack_prefixed_insn_p): Likewise.
6320         (ix86_option_override_internal): Don't disallow -fcf-protection.
6321         * config/i386/i386.md (rdssp<mode>): Also enable for
6322         -fcf-protection.
6323         (incssp<mode>): Likewise.
6324         (nop_endbr): Likewise.
6325         * config/i386/i386.opt (mcet): Change help message to built-in
6326         functions only.
6327         (mibt): Likewise.
6328         (mshstk): Likewise.
6329         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6330         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
6331         enable CET built-in functions.
6333 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
6335         * common/config/i386/i386-common.c
6336         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6337         OPTION_MASK_ISA_MOVDIRI_UNSET,
6338         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6339         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6340         * config.gcc (movdirintrin.h): New header.
6341         * config/i386/cpuid.h (bit_MOVDIRI,
6342         bit_MOVDIR64B): New bits.
6343         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6344         and -mmvodir64b.
6345         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6346         (VOID, PVOID, PCVOID)): New function types.
6347         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6348         __builtin_ia32_directstoreu_u64,
6349         __builtin_ia32_movdir64b): New builtins.
6350         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6351         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6352         and -mmovdiri.
6353         (ix86_valid_target_attribute_inner_p): Ditto.
6354         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6355         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6356         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6357         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6358         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6359         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6360         (movdiri<mode>, movdir64b_<mode>): New.
6361         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6362         * config/i386/immintrin.h: Include movdirintrin.h.
6363         * config/i386/movdirintrin.h: New file.
6364         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6366 2018-04-19  Richard Biener  <rguenther@suse.de>
6368         PR middle-end/85455
6369         * cfg.c (clear_bb_flags): When loop state says we have
6370         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6372 2018-04-19  Richard Biener  <rguenther@suse.de>
6374         PR tree-optimization/84737
6375         * tree-vect-data-refs.c (vect_copy_ref_info): New function
6376         copying restrict info.
6377         (vect_setup_realignment): Use it.
6378         * tree-vectorizer.h (vect_copy_ref_info): Declare.
6379         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6380         the first DR to all generated stores.
6381         (vectorizable_load): Likewise for loads.
6383 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6385         PR tree-optimization/85446
6386         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6387         the integral and pointer types to have the same precision.
6389         * doc/install.texi: Document --disable-cet being the default and
6390         --enable-cet=auto.
6392 2018-04-18  Martin Liska  <mliska@suse.cz>
6394         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6395         style.
6397 2018-04-18  Martin Liska  <mliska@suse.cz>
6399         Revert
6400         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6402         PR ipa/83983
6403         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6404         arguments if they are comparable.
6406 2018-04-18  Martin Liska  <mliska@suse.cz>
6408         Revert
6409         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6411         PR lto/84805
6412         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6413         incomplete types.
6415 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
6417         PR target/85388
6418         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6419         ENDBR after calling __morestack.
6421 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
6423         PR jit/85384
6424         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6425         by using gcc_base_ver to generate a gcc_driver_version, and use
6426         it when generating GCC_DRIVER_NAME.
6427         * configure: Regenerate.
6429 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
6431         PR target/81084
6432         * config.gcc: Obsolete powerpc*-*-*spe*.
6434 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6436         PR debug/84637
6437         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6438         (stabstr_D): Change type of unum from unsigned int to
6439         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
6440         type.
6442 2018-04-17  Jim Wilson  <jimw@sifive.com>
6444         PR 84856
6445         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6446         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6447         Set arg_pointer_offset after using pretend_args_size.
6449 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6451         PR rtl-optimization/85431
6452         * dse.c (record_store): Ignore zero width stores.
6454         PR sanitizer/85230
6455         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
6456         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6457         __builtin_stack_restore rather than after it.
6458         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6459         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6460         argument instead of virtual_dynamic_stack_rtx.
6462 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6464         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6465         New prototype.
6466         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6467         Add note to error message to explain internal mapping of overloaded
6468         built-in function name to non-overloaded built-in function name.
6469         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6470         function.
6472 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
6474         PR target/85424
6475         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6476         where the inputs overlap with the output.
6478 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6480         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6481         (=v, v) alternative and explicit "memory" attribute.
6482         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
6483         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6484         attributes.
6485         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6486         "sselog1" type instead of "sselog".
6487         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6488         "sselog".  Remove explicit "memory" attribute.
6489         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6490         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6491         attributes.
6492         (vec_extract_hi_v32hi): Merge all alternatives into one, use
6493         "sselog1" type instead of "sselog".  Remove explicit "memory"
6494         attribute.
6495         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6496         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6497         attribute.
6498         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6499         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6500         attributes.
6501         (vec_extract_hi_v64qi): Merge all alternatives into one, use
6502         "sselog1" type instead of "sselog".  Remove explicit "memory"
6503         attribute.
6504         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6505         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6506         attribute.
6508         PR target/85430
6509         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6511         PR middle-end/85414
6512         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6513         on a SUBREG.
6515 2018-04-17  Martin Jambor  <mjambor@suse.cz>
6517         PR ipa/85421
6518         * ipa-cp.c (create_specialized_node): Call
6519         expand_all_artificial_thunks if necessary.
6521 2018-04-17  Martin Liska  <mliska@suse.cz>
6523         PR lto/85405
6524         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6525         in message, remote space in between '_G' and '('.
6527 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6529         PR target/85281
6530         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6531         avx512f_vmcmp<mode>3<round_saeonly_name>,
6532         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6533         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6534         avx512f_rndscale<mode><round_saeonly_name>,
6535         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6536         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6537         Use %<iptr>2 instead of %2 for -masm=intel.
6538         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6539         avx512f_vcvttss2usi<round_saeonly_name>,
6540         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6541         -masm=intel.
6542         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6543         avx512f_vcvttsd2usi<round_saeonly_name>,
6544         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6545         Use %q1 instead of %1 for -masm=intel.
6546         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6547         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6548         of %3 for -masm=intel.
6549         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6550         -masm=intel.
6551         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6552         -masm=intel.
6553         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6554         -masm=intel.
6555         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6556         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6557         %g1.
6558         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6559         -masm=intel.
6560         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6561         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6562         %g1 and one with %0 and %1.
6563         (avx512er_vmrcp28<mode><round_saeonly_name>,
6564         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6565         %1 for -masm=intel.
6566         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6567         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6568         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6569         of %0 and %{%4%} for -masm=intel.
6570         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6571         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6572         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6573         order of %0 and %{%5%}%{z%} for -masm=intel.
6575 2018-04-17  Jan Hubicka  <jh@suse.cz>
6577         PR lto/85405
6578         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6580 2018-04-17  Martin Liska  <mliska@suse.cz>
6582         PR ipa/85329
6583         * multiple_target.c (create_dispatcher_calls): Set apostrophes
6584         for target_clone error message.  Make default implementation
6585         clone to be a local declaration.
6586         (separate_attrs): Add new argument and check for an empty
6587         string.
6588         (expand_target_clones): Handle it.
6589         (ipa_target_clone): Make redirection just for target_clones
6590         functions.
6592 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
6593             Tom de Vries  <tom@codesourcery.com>
6595         PR middle-end/84955
6596         * omp-expand.c (expand_oacc_for): Add dummy false branch for
6597         tiled basic blocks without omp continue statements.
6599 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
6601         PR target/83660
6602         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
6603         vec_extract expression as having side effects to make sure it gets
6604         a cleanup point.
6606 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
6608         PR target/85403
6609         * config/i386/i386.c (get_builtin_code_for_version): Check
6610         error_mark_node.
6612 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
6614         PR target/84331
6615         * gcc/config.gcc: Support "skylake".
6616         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
6617         PROCESSOR_SKYLAKE.
6618         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
6619         (processor_target_table): Add "skylake".
6620         (ix86_option_override_internal): Add "skylake".
6621         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
6622         PROCESSOR_CANNONLAKE.
6623         (get_builtin_code_for_version): Fix priority for
6624         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
6625         PROCESSOR_SKYLAKE-AVX512.
6626         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
6627         (processor_type): Add PROCESSOR_SKYLAKE.
6629 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
6630             Jason Merrill  <jason@redhat.com>
6632         PR c++/85112
6633         * convert.c (convert_to_integer_1): Use direct recursion for
6634         enumeral types and types with a precision less than the number
6635         of bits in their mode.
6637 2018-04-16  Julia Koval  <julia.koval@intel.com>
6639         PR target/84413
6640         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
6641         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
6643 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
6645         PR target/85293
6646         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
6647         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
6648         and -mno-direct-move.
6650 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
6652         PR target/83402
6653         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
6654         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
6655         Ensure negative shifts result in {0}.
6657 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
6659         PR rtl-optimization/79916
6660         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
6661         regs (if any) to define how to gnerate SD moves when LRA is in
6662         progress.
6664 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
6666         PR rtl-optimization/85393
6667         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
6668         * except.c (expand_dw2_landing_pad_for_region): Make static.
6669         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
6670         a label and unconditional jump to old_bb, rather than
6671         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
6672         basic block.
6674         PR rtl-optimization/85376
6675         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
6676         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
6677         instead of a specific value.
6679 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
6680             Bin Cheng  <bin.cheng@arm.com>
6682         PR tree-optimization/82965
6683         PR tree-optimization/83991
6684         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
6685         by_profile_only parameter.
6686         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
6687         information if the loop was predicted to iterate too many times.
6688         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
6690 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
6692         PR lto/71991
6693         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
6694         always inline.
6696 2018-04-13  Martin Liska  <mliska@suse.cz>
6697             Jakub Jelinek  <jakub@redhat.com>
6699         PR middle-end/81657
6700         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
6701         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
6702         * builtins.c (expand_builtin_memory_copy_args): Use
6703         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
6704         handle dest_addr == pc_rtx.
6706 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
6708         PR target/85291
6709         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
6710         asked to not generate direct moves.
6711         (fix_trunc<mode>si2_stfiwx): Similar.
6712         (fix_trunc<mode>si2_internal): Similar.
6714 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
6716         PR debug/83157
6717         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
6718         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
6719         lookup if dest in some wider mode is known to be const0_rtx and
6720         if so, record permanent equivalence for it to be ZERO_EXTEND of
6721         the narrower mode destination.
6723 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
6725         * lto-streamer-out.c (output_function): Revert 259346.
6726         * omp-expand.c (expand_oacc_for): Likewise.
6728 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
6730         PR rtl-optimization/85354
6731         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
6732         * sel-sched.c (sel_global_init): ... here.
6734 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
6736         PR target/85238
6737         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
6738         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6739         mode for PE-COFF targets.
6740         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
6741         (i386_pe_asm_lto_end): Likewise.
6742         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
6743         (TARGET_ASM_LTO_END): Likewise.
6744         * config/i386/winnt.c (saved_debug_info_level): New static variable.
6745         (i386_pe_asm_lto_start): New function.
6746         (i386_pe_asm_lto_end): Likewise.
6748 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
6749             Richard Biener  <rguenther@suse.de>
6751         PR middle-end/84955
6752         * lto-streamer-out.c (output_function): Fix CFG loop state before
6753         streaming out.
6754         * omp-expand.c (expand_oacc_for): Handle calls to internal
6755         functions like regular functions.
6757 2018-04-12  Richard Biener  <rguenther@suse.de>
6759         PR lto/85371
6760         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
6761         for the early LTO debug to properly generate references to it
6762         during DIE emission.  Do not re-use that for the skeleton for
6763         split-dwarf.
6764         (dwarf2out_early_finish): Likewise.
6766 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
6768         PR target/85328
6769         * config/i386/sse.md
6770         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
6771         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
6772         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
6773         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
6774         and output is a reg, avoid creating invalid lowpart subreg, but
6775         instead split into a 512-bit move.  Don't split if not AVX512VL,
6776         input is xmm16+ reg and output is a mem.
6777         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
6778         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
6779         xmm16+ reg and output is a mem.
6781 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6783         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
6784         also for flag_dwarf2_cfi_asm.
6786 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
6788         PR rtl-optimization/85342
6789         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
6790         a bool scalar var inside of the loop instead.  Don't try to update
6791         recog_data.operand after failed apply_change_group.
6793 2018-04-12  Tom de Vries  <tom@codesourcery.com>
6795         PR target/85296
6796         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
6797         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
6798         array with flexible array member as array without given dimension.
6799         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
6800         argument for undefined param to true.
6802 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
6804         PR target/85321
6805         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
6806         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
6807         from PowerPC section.
6808         * config/rs6000/sysv4.opt (mcall-): Improve help text.
6809         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
6810         help text that is too long.
6811         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
6812         help text that is too long.
6813         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
6814         help text that is too long.
6816 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
6818         * config/alpha/alpha.md (stack_probe_internal): Rename
6819         from "probe_stack".  Update all callers.
6821 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
6823         PR rtl-optimization/84566
6824         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
6825         sched_macro_fuse_insns.
6827 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
6829         PR target/84301
6830         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
6831         (compute_block_dependences): ... from here.
6833 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
6835         PR tree-optimization/85331
6836         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
6837         from int to HOST_WIDE_INT.
6839 2018-04-11  Martin Jambor  <mjambor@suse.cz>
6841         PR ipa/84149
6842         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
6843         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
6844         not the same as the source val.
6845         (cgraph_edge_brings_value_p): New parameter.
6846         (gather_edges_for_value): Pass destination value to
6847         cgraph_edge_brings_value_p.
6848         (perhaps_add_new_callers): Likewise.
6849         (get_info_about_necessary_edges): Likewise and exclude values brought
6850         only by self-recursive edges.
6851         (create_specialized_node): Redirect only clones of self-calling edges.
6852         (+self_recursive_pass_through_p): New function.
6853         (find_more_scalar_values_for_callers_subset): Use it.
6854         (find_aggregate_values_for_callers_subset): Likewise.
6855         (known_aggs_to_agg_replacement_list): Removed.
6856         (decide_whether_version_node): Re-calculate known constants for all
6857         remaining context clones.
6859 2018-04-11  Richard Biener  <rguenther@suse.de>
6861         PR lto/85339
6862         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
6863         from early DWARF output.
6864         (dwarf2out_early_finish): Output line info unconditionally into
6865         early DWARF and add reference to it.
6867 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
6869         PR target/85281
6870         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
6871         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
6872         other than V2DFmode using iptr mode attribute.
6873         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
6875 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
6877         PR rtl-optimization/84659
6878         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
6880 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
6882         PR debug/85302
6883         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
6884         SIZEP is NULL.
6885         (output_loc_list): Pass address of a dummy size variable even in the
6886         locview handling loop.
6887         (index_location_lists): Add comment on why skip_loc_list_entry can't
6888         call size_of_locs.
6890 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6892         PR target/85261
6893         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
6894         into register.
6896 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
6898         PR target/85321
6899         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
6900         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
6901         and -mstring-compare-inline-limit.
6903 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
6905         PR target/85287
6906         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
6907         for stack clash protection in a register whenever we need it to be in
6908         a register.
6910 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
6912         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
6913         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
6915 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
6917         PR target/85321
6918         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
6919         the help text.
6920         (mlong-double-): Ditto.
6921         * config/rs6000/sysv4.opt (msdata=): Ditto.
6922         (mtls-size=): Ditto.
6924 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6926         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6927         erroneous entries for
6928         "vector int vec_ldl (int, long int *)", and
6929         "vector unsigned int vec_ldl (int, unsigned long int *)".
6930         Add comments and entries for
6931         "vector bool char vec_ldl (int, bool char *)",
6932         "vector bool short vec_ldl (int, bool short *)",
6933         "vector bool int vec_ldl (int, bool int *)",
6934         "vector bool long long vec_ldl (int, bool long long *)",
6935         "vector pixel vec_ldl (int, pixel *)",
6936         "vector long long vec_ldl (int, long long *)",
6937         "vector unsigned long long vec_ldl (int, unsigned long long *)".
6938         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
6939         type tree bool_long_long_type_node and correct definition of
6940         bool_V2DI_type_node to make reference to this new type tree.
6941         (rs6000_mangle_type): Replace erroneous reference to
6942         bool_long_type_node with bool_long_long_type_node.
6943         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
6944         comments to emphasize sign distinctions for char and int types and
6945         replace RS6000_BTI_bool_long constant with
6946         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
6947         use of RS6000_BTI_pixel.
6948         (bool_long_type_node): Remove this macro definition.
6949         (bool_long_long_type_node): New macro definition
6951 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
6953         PR rtl-optimization/85300
6954         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
6955         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
6956         simplify_unary_operation fails.
6958 2018-04-10  Martin Liska  <mliska@suse.cz>
6960         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
6961         cgraph_edge and ipa_ref.
6963 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
6965         PR target/85177
6966         PR target/85255
6967         * config/i386/sse.md
6968         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
6969         computation of the VEC_MERGE selector from mask.
6970         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
6971         Fix decoding of the VEC_MERGE selector into mask.
6973 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
6975         PR tree-optimization/85286
6976         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
6978 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
6980         * final.c (final_1): Set insn_last_address as well as
6981         insn_current_address.
6983 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6985         PR target/85173
6986         * explow.c (emit_stack_probe): Call validize_mem on memory location
6987         before passing it to gen_probe_stack.  Create address operand and
6988         legitimize it for the probe_stack_address case.
6990 2018-04-09  Jan Hubicka  <jh@suse.cz>
6992         PR lto/85078
6993         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
6994         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
6995         * tree.c (free_lang_data_in_type): Fix handling of binfos;
6996         walk basetypes.
6997         (free_lang_data): Rebuild type inheritance graph.
6999 2018-04-09  Martin Sebor  <msebor@redhat.com>
7001         * invoke.texi (-finline-small-functions): Mention other optimization
7002         options.
7003         (-findirect-inlining, -fpartial-inlining): Same.
7004         (-finline-functions-called-once): Same.
7005         (-freorder-blocks-and-partition): Same.
7007 2018-04-09  Jan Hubicka  <jh@suse.cz>
7009         PR rtl/84058
7010         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7011         jumps; choose last target that matches the criteria (i.e.
7012         no partition changes for non-crossing jumps).
7013         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7014         support for redirecting crossing jumps to non-crossing.
7016 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7018         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7019         also for naked functions.
7021 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7023         * config/arc/arc.md (add_shift): New pattern.
7024         (add_shift2): Likewise.
7025         (sub_shift): Likewise.
7026         (sub_shift_cmp0_noout): Likewise.
7027         (compare_si_ashiftsi): Likewise.
7028         (xbfu_cmp0_noout): New combine pattern.
7029         (xbfu_cmp0"): Likewise.
7030         (movsi_set_cc_insn): Place the predicable variant first.
7031         (commutative_binary_cmp0_noout): Remove clobber.
7032         (commutative_binary_cmp0): New pattern.
7033         (noncommutative_binary_cmp0): Likewise.
7034         (noncommutative_binary_cmp0_noout): Likewise.
7035         (noncommutative_binary_comparison_result_used): Removed.
7036         (rsub_cmp0): New pattern.
7037         (rsub_cmp0_noout): Likewise.
7038         (extzvsi): Changed, keep only meaningful variants.
7039         (SQH, SEZ): New iterators.
7040         (SQH_postfix): New mode attribute.
7041         (SEZ_prefix): New code attribute.
7042         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7043         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7044         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7045         of numerical value.
7046         (noncommutative_operator): Check the availability of barrel
7047         shifter option.
7049 2018-04-09  Richard Biener  <rguenther@suse.de>
7051         PR tree-optimization/85284
7052         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7053         Only use the niter constraining form of simple_iv when the exit
7054         is always executed.
7056 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7058         PR target/84041
7059         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7060         (define_expand "*memory_barrier"): New define_expand.
7061         (define_insn "memory_barrier"): New insn.
7063 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7065         PR rtl-optimization/80463
7066         PR rtl-optimization/83972
7067         PR rtl-optimization/83480
7069         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7070         correct producer for the insn.
7071         (tidy_control_flow): Fixup seqnos in case of debug insns.
7073 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7075         PR rtl-optimization/83913
7077         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7078         different sched-times when merging exprs.
7080 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7082         PR rtl-optimization/83962
7084         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7085         tidy_fallthru_edge and tidy_control_flow.
7087 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7089         PR rtl-optimization/83530
7091         * sel-sched.c (force_next_insn): New global variable.
7092         (remove_insn_for_debug): When force_next_insn is true, also leave only
7093         next insn in the ready list.
7094         (sel_sched_region): When the region wasn't scheduled, make another pass
7095         over it with force_next_insn set to 1.
7097 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7099         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7100         into tm_file.
7101         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7102         for interrupt control.
7103         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7104         functions for interrupt control.
7105         * config/nds32/nds32-intrinsic.md: Likewise.
7106         * config/nds32/nds32_intrinsic.h: Likewise.
7107         * config/nds32/nds32.h (nds32_builtins): Likewise.
7109 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7111         * config/nds32/nds32.c (nds32_init_machine_status,
7112         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7113         strict_aligned_p field.
7114         (nds32_expand_to_rtl_hook): New function.
7115         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7116         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7118 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7119             Chung-Ju Wu  <jasonwucj@gmail.com>
7121         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7122         * config/nds32/nds32-n7.md: New file.
7123         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7124         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7125         pipeline.
7126         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7127         * config/nds32/nds32.md (pipeline_model): Add n7.
7128         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7129         * config/nds32/pipelines.md: Include n7 settings.
7131 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7132             Chung-Ju Wu  <jasonwucj@gmail.com>
7134         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7135         * config/nds32/nds32-e8.md: New file.
7136         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7137         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7138         pipeline.
7139         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7140         * config/nds32/nds32.md (pipeline_model): Add e8.
7141         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7142         * config/nds32/pipelines.md: Include e8 settings.
7144 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7145             Chung-Ju Wu  <jasonwucj@gmail.com>
7147         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7148         * config/nds32/nds32-n8.md: New file.
7149         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7150         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7151         pipeline.
7152         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7153         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7154         * config/nds32/nds32.md (pipeline_model): Add n8.
7155         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7156         * config/nds32/pipelines.md: Include n8 settings.
7158 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7159             Chung-Ju Wu  <jasonwucj@gmail.com>
7161         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7162         * config/nds32/nds32-n9-2r1w.md: New file.
7163         * config/nds32/nds32-n9-3r2w.md: New file.
7164         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7165         nds32_register_ports): New or modify for cpu n9.
7166         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7167         pipeline.
7168         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7169         * config/nds32/nds32-utils.c: New file.
7170         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7171         TARGET_MUL_SLOW): Define.
7172         * config/nds32/nds32.md (pipeline_model): New attribute.
7173         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7174         New options that support cpu n9.
7175         * config/nds32/pipelines.md: Include n9 settings.
7176         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7178 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7180         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7181         information if necessary.
7182         (output_cond_branch_compare_zero): Likewise.
7183         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7184         (nds32_target_alignment): Refine for alignment.
7185         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7186         (FUNCTION_BOUNDARY): Modify.
7187         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7188         align case.
7189         * config/nds32/nds32.opt (malways-align, malign-functions): New.
7191 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7193         * config/nds32/constants.md (unspec_volatile_element): Add values for
7194         TLB operation and data prefetch.
7195         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7196         functions for TLB operation and data prefetch.
7197         * config/nds32/nds32-intrinsic.md: Likewise.
7198         * config/nds32/nds32_intrinsic.h: Likewise.
7199         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7200         (nds32_print_operand): Likewise.
7201         * config/nds32/nds32.h (nds32_builtins): Likewise.
7203 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
7204         Andrew Pinski <pinsika@gcc.gnu.org>
7206         PR middle-end/82976
7207         * match.pd: Use constant_boolean_node of correct type instead of
7208         boolean_true_node or boolean_false_node for simplifying
7209         pointer comparisons to zero.
7211 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7213         PR tree-optimization/80021
7214         * tree.c (verify_type_variant): Make error call in verify_variant_match
7215         translatable and remove final full stop.
7217 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7219         * config/nds32/constants.md (unspec_volatile_element): Add
7220         UNSPEC_VOLATILE_EH_RETURN.
7221         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7222         nds32_output_stack_pop): Support dwarf exception handling process.
7223         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7224         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7225         exception handling process.
7226         (nds32_compute_stack_frame): Likewise.
7227         (nds32_return_addr_rtx): Likewise.
7228         (nds32_initial_elimination_offset): Likewise.
7229         (nds32_expand_prologue): Likewise.
7230         (nds32_expand_epilogue): Likewise.
7231         (nds32_dynamic_chain_address): New function.
7232         * config/nds32/nds32.h (machine_function): Add fields for dwarf
7233         exception handling.
7234         (DYNAMIC_CHAIN_ADDRESS): Define.
7235         (EH_RETURN_DATA_REGNO): Define.
7236         (EH_RETURN_STACKADJ_RTX): Define.
7237         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7238         patterns for dwarf exception handling.
7240 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7242         * config/nds32/nds32.h: Clean up obsolete macros.
7244 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7246         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7247         Add enum values for particular instructions.
7248         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7249         particular intrinsic functions.
7250         * config/nds32/nds32-intrinsic.md: Likewise.
7251         * config/nds32/nds32_intrinsic.h: Likewise.
7252         * config/nds32/nds32.h (nds32_builtins): Likewise.
7253         * config/nds32/nds32.md (type): Add pbsad and pbsada.
7254         (btst, ave): New patterns for particular instructions.
7256 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7258         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7259         Add enum values for atomic load/store and memory sync.
7260         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7261         and memory sync.
7262         * config/nds32/nds32-intrinsic.md: Likewise.
7263         * config/nds32/nds32_intrinsic.h: Likewise.
7264         * config/nds32/nds32.h (nds32_builtins): Likewise.
7266 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7268         PR tree-optimization/85257
7269         * fold-const.c (native_encode_vector): If not all elts could fit
7270         and off is -1, return 0 rather than offset.
7271         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7272         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7273         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
7274         adjust buffer in native_interpret_expr call.
7276 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7278         * config/nds32/constants.md (unspec_volatile_element): Add cache
7279         control enum values.
7280         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7281         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7282         * config/nds32/nds32.c (nds32_cctl_names): New.
7283         (nds32_print_operand): Handle cache control register names.
7284         * config/nds32/nds32.h (nds32_builtins): New enum values.
7285         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7286         macros.
7287         * config/nds32/nds32.md (type): Add mmu.
7288         * config/nds32/pipelines.md (simple_insn): Add mmu.
7290 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7292         * config/nds32/nds32.md (type): Remove call.
7293         * config/nds32/pipelines.md (simple_insn): Likewise.
7295 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7297         * config/nds32/constants.md (unspec_volatile_element): Add
7298         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7299         UNSPEC_VOLATILE_FMFCFG.
7300         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7301         description for fmfcfg and fmfcsr.
7302         (bdesc_1arg): Add fmtcsr.
7303         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7304         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7305         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7306         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7307         unspec_fmfcfg): New patterns.
7308         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7309         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7310         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7311         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7312         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7313         __nds32__fmfcfg): Define.
7315 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7317         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7318         intrinsic register names.
7319         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7320         intrinsic register enum values and macros.
7322 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7324         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7325         for load/store addressing form.
7326         (nds32_print_operand_address): Likewise.
7328 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
7330         PR target/85196
7331         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7332         based on LABEL_REF.  Remove useless assertion.
7333         (pic_address_needs_scratch): Fix formatting.
7334         (sparc_legitimize_pic_address): Minor tweaks.
7335         (sparc_delegitimize_address): Adjust assertion accordingly.
7336         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7337         into symbolic_operand.
7338         (movsi_high_pic_label_ref): Likewise.
7339         (movsi_lo_sum_pic_label_ref): Likewise.
7340         (movdi_pic_label_ref): Likewise.
7341         (movdi_high_pic_label_ref): Likewise.
7342         (movdi_lo_sum_pic_label_ref): Likewise.
7344 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
7346         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7347         custom LIB_SPEC setup.
7349 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
7350             Kito Cheng  <kito.cheng@gmail.com>
7352         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7353         * config/riscv/freebsd.h: New.
7355 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7357         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7358         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7359         file.
7361 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7362             Kito Cheng  <kito.cheng@gmail.com>
7364         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7365         nds32_output_call, nds32_symbol_binds_local_p): New functions.
7366         * config/nds32/nds32-protos.h (nds32_output_call,
7367         nds32_output_return): Declare.
7368         * config/nds32/nds32.md: Refine all the call and return patterns.
7370 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7372         PR debug/85252
7373         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7374         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7376         PR rtl-optimization/84872
7377         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7378         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7379         EDGE_CROSSING edge.
7381 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
7383         * expr.c (copy_blkmode_to_reg): Revert 254862.
7384         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7386 2018-04-06  Richard Biener  <rguenther@suse.de>
7388         PR middle-end/85244
7389         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7390         after seeing a component reference with an adjacent field.  Treat
7391         refs to arrays at struct end of external decls similar to
7392         refs to unconstrained commons.
7394 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7396         PR sanitizer/85213
7397         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7398         look through SAVE_EXPRs with non-side-effects argument.  Adjust
7399         recursive calls.
7400         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7401         save_p here.
7403 2018-04-06  Richard Biener  <rguenther@suse.de>
7405         PR middle-end/85180
7406         * alias.c (find_base_term): New wrapper around find_base_term
7407         unwinding CSELIB_VAL_PTR changes.
7408         (find_base_term): Do not restore CSELIB_VAL_PTR during the
7409         recursion.
7411 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7413         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7414         instructions.
7415         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7416         constant definitions.
7417         ("nop"): lr 0,0 -> nopr r0
7418         ("nop_lr0", "nop_lr1"): New insn definitions.
7420 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7422         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7423         NDS32_V3PUSH_AVAILABLE_P macro.
7425 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
7426             Chung-Ju Wu  <jasonwucj@gmail.com>
7428         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7429         (nds32*-*-*): Add float and fpu_config into supported_defaults.
7430         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7431         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7432         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7433         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7434         * config/nds32/constraints.md: New constraints and checking for hard
7435         float configuration.
7436         * config/nds32/iterators.md: New mode iterator and attribute for hard
7437         float configuration.
7438         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7439         patterns.
7440         * config/nds32/nds32-fpu.md: New file.
7441         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7442         deal with hard float code generation.
7443         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7444         ARCH_V3S.
7445         (abi_type, float_reg_number): New enum type.
7446         * config/nds32/nds32-predicates.c: New predicates for hard float.
7447         * config/nds32/nds32-protos.h: Declare functions for hard float.
7448         * config/nds32/nds32.c: Implementation for hard float configuration.
7449         * config/nds32/nds32.h: Definitions for hard float configuration.
7450         * config/nds32/nds32.md: Include hard float machine description and
7451         modify patterns for hard float configuration.
7452         * config/nds32/nds32.opt: New options for hard float configuration.
7453         * config/nds32/predicates.md: New predicates for hard float
7454         configuration.
7456 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
7458         * common/config/nds32/nds32-common.c
7459         (nds32_option_optimization_table): Enable -mreleax-hint by default.
7461 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
7463         PR middle-end/85195
7464         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7465         CONSTRUCTOR_ELT (ctor, ...)->value.
7467 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
7469         PR target/85193
7470         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7472 2018-04-05  Tom de Vries  <tom@codesourcery.com>
7474         PR target/85204
7475         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7476         cond jump.
7478 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7479             Kito Cheng  <kito.cheng@gmail.com>
7481         * config/nds32/constraints.md (U33): Fine-tune checking condition.
7482         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7483         * config/nds32/nds32.h (nds32_16bit_address_type): Add
7484         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7486 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7487             Kito Cheng  <kito.cheng@gmail.com>
7489         * config/nds32/constraints.md (Ufe): New memory constraint.
7490         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7491         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7492         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7493         operands.
7494         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7495         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7497 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7499         * config/nds32/nds32.md: Use optimize_size in the condition for
7500         alu-shift instructions.
7502 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7504         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7506 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7508         * config/nds32/nds32.md (negsi2): Refine pattern.
7510 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7511             Chung-Ju Wu  <jasonwucj@gmail.com>
7513         * config/nds32/iterators.md (shift_rotate): New code iterator.
7514         (shift): New code attribute.
7515         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7516         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7517         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7518         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7519         bit-wise operations.
7520         (andsi3, *andsi3): Ditto.
7521         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7522         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7523         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7524         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7525         nds32_ior_operand, nds32_xor_operand): New predicates.
7527 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7529         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7530         (addsi3, subsi3): ... this.
7532 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7534         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7536 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7538         * config/nds32/nds32.md: Adjust indention.
7540 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7542         * config/nds32/nds32.md (feature): New attribute.
7544 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7546         * config/nds32/nds32.md (subtype): New attribute.
7548 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7550         PR target/85203
7551         * config/arm/arm-builtins.c (arm_expand_builtin): Change
7552         expansion to perform a bitwise AND of the argument followed by a
7553         boolean negation of the result.
7555 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
7557         PR rtl-optimization/84878
7558         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7559         the basic block.  Assert the use reference is not artificial and that
7560         it has an associated insn.
7562 2018-04-04  Michael Matz  <matz@suse.de>
7564         * builtins.c (compute_objsize): Pass correct operand
7565         to array_at_struct_end_p.
7567 2018-04-04  Richard Biener  <rguenther@suse.de>
7569         PR lto/85176
7570         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7571         from contexts for DINFO_LEVEL_TERSE and below.
7573 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7575         * config/nds32/nds32-doubleword.md (move_<mode>): Require
7576         resiter_operand condition.
7577         * config/nds32/nds32.md (*move<mode>): Ditto.
7579 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7580             Monk Chiang  <sh.chiang04@gmail.com>
7582         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7584 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7586         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
7588 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7589             Kito Cheng  <kito.cheng@gmail.com>
7591         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
7592         nds32_cond_code_str, output_cond_branch,
7593         output_cond_branch_compare_zero, nds32_expand_cbranch,
7594         nds32_expand_cstore, nds32_expand_movcc,
7595         nds32_output_cbranchsi4_equality_zero,
7596         nds32_output_cbranchsi4_equality_reg,
7597         nds32_output_cbranchsi4_equality_reg_or_const_int,
7598         nds32_output_cbranchsi4_greater_less_zero: New functions.
7599         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
7600         nds32_expand_cstore, nds32_expand_movcc,
7601         nds32_output_cbranchsi4_equality_zero,
7602         nds32_output_cbranchsi4_equality_reg,
7603         nds32_output_cbranchsi4_equality_reg_or_const_int,
7604         nds32_output_cbranchsi4_greater_less_zero): Declare.
7605         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
7606         nds32_rimm11s_operand): New predicates.
7607         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
7608         * config/nds32/nds32.md: Rewrite all the branch and conditional move
7609         patterns.
7611 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7613         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
7614         * config/nds32/nds32.md: Ditto.
7615         * config/nds32/pipelines.md: Ditto.
7617 2018-04-04  Richard Biener  <rguenther@suse.de>
7619         PR tree-optimization/85168
7620         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
7621         propagating abnormals.
7623 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7625         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
7627 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7628             Kito Cheng  <kito.cheng@gmail.com>
7630         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
7631         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
7632         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
7633         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
7634         * config/nds32/nds32.md (sibcall_internal): New.
7635         (sibcall_register): Remove.
7636         (sibcall_immediate): Remove.
7637         (sibcall_value_internal): New.
7638         (sibcall_value_register): Remove.
7639         (sibcall_value_immediate): Remove.
7640         * config/nds32/predicates.md (nds32_general_register_operand): New.
7641         (nds32_call_address_operand): New.
7643 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7645         PR rtl-optimization/85167
7646         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
7647         bb_defs if *split_p, instead preinitialize it to NULL.
7649         PR tree-optimization/85156
7650         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
7651         evaluating the argument multiple times.
7653 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
7655         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
7656         than vector.
7657         (_mm_cvtpd_ps): Likewise.
7658         (_mm_cvttpd_epi32): Likewise.
7659         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
7660         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
7661         vector, pixel, and bool following altivec.h include.
7663 2018-04-03  Martin Sebor  <msebor@redhat.com>
7665         * doc/extend.texi (Common Function Attributes): Clarify.
7666         (const attribute): Likewise.
7667         (pure attribute): Likewise.
7669 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7671         PR target/85169
7672         * config/i386/i386.c (ix86_expand_vector_set): Use
7673         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
7675 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
7677         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
7678         instructions when changing rounding bits to preserve precision bits
7679         in the x87 control word.
7681 2018-04-03  Martin Liska  <mliska@suse.cz>
7683         PR tree-optimization/82491
7684         * rtl.h (strip_offset_and_add): Replace += suboffset with
7685         poly_uint64 () + suboffset.
7687 2018-03-29  Martin Liska  <mliska@suse.cz>
7688             Martin Jambor  <mjambor@suse.cz>
7690         PR ipa/84947
7691         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
7692         param_type is not an integral or pointer type.
7694 2018-04-03  Richard Biener  <rguenther@suse.de>
7696         * sese.h (recompute_all_dominators): Remove.
7698 2018-04-02  Martin Sebor  <msebor@redhat.com>
7700         * doc/invoke.texi (-Wrestrict): Fix typos.
7702 2018-04-02  Jim Wilson  <jimw@sifive.com>
7704         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
7705         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
7706         (<optab>di3, <optab>si3_extend): Likewise.
7707         (<optab>si3_mask, <optab>si3_mask_1): New.
7708         (<optab>di3_mask, <optab>di3_mask_1): New.
7709         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
7710         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
7711         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
7713 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
7715         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
7716         example.
7718 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7720         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
7721         (nds32_canonicalize_comparison): New function.
7723 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
7724             Kito Cheng  <kito.cheng@gmail.com>
7725             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
7727         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
7728         * config/nds32/constants.md (unspec_volatile_element): Add
7729         UNSPEC_VOLATILE_RELAX_GROUP.
7730         * config/nds32/nds32-relax-opt.c: New file.
7731         * config/nds32/nds32-predicates.c
7732         (nds32_symbol_load_store_p): New function.
7733         * config/nds32/nds32-protos.h
7734         (nds32_symbol_load_store_p): Declare function.
7735         (make_pass_nds32_relax_opt): Declare new rtl pass function.
7736         * config/nds32/nds32.c
7737         (nds32_register_pass): New function to register pass.
7738         (nds32_register_passes): New function to register passes.
7739         * config/nds32/nds32.md (relax_group): New pattern.
7740         * config/nds32/nds32.opt (mrelax-hint): New option.
7741         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
7743 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
7745         * config/nds32/t-nds32: Modify files dependency.
7747 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
7749         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
7750         (PROFILE_HOOK): Define its implementation.
7752 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
7754         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
7755         type and 32-bit size.
7757 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
7759         PR middle-end/85090
7760         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
7761         (V_128_256): New mode iterator.
7762         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
7763         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
7764         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
7765         of V.
7766         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
7767         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
7769 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
7771         PR target/83315
7772         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
7773         NaN inputs correctly.
7775 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
7777         PR target/80546
7778         * config/rs6000/vsx.md (??r): New mode attribute.
7779         (*vsx_mov<mode>_64bit): Use it.
7780         (*vsx_mov<mode>_32bit): Likewise.
7782 2018-03-30  Martin Sebor  <msebor@redhat.com>
7784         PR tree-optimization/84818
7785         * builtins.c (check_access): Use warning_n.
7787 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
7789         PR target/83822
7790         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
7791         condition.
7792         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
7793         condition.
7795 2018-03-30  Julia Koval  <julia.koval@intel.com>
7797         PR target/84413
7798         * x86-tune.def (movx, partial_reg_dependency): Enable for
7799         m_SKYLAKE_AVX512.
7801 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
7803         PR inline-asm/84985
7804         * lra-constraints.c (process_alt_operands): Move setting
7805         this_alternative_matches below.
7807 2018-03-29  Martin Liska  <mliska@suse.cz>
7809         PR lto/84995.
7810         * doc/invoke.texi: Document how LTO works with debug info.
7811         Describe auto-load support of binutils.  Mention 'x86-64'
7812         as valid option value of -march option.
7814 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
7816         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
7818         PR c/85094
7819         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
7820         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
7821         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
7822         checking.
7824 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
7826         PR target/84912
7827         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
7828         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
7829         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
7830         for RS6000_BTM_POWERPC64.
7831         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
7832         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
7833         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
7834         definition.
7835         (DIVDE): Use it.
7836         (DIVDEU): Likewise.
7838 2018-03-28 Carl Love  <cel@us.ibm.com>
7840         Revert
7841         2017-09-27  Carl Love  <cel@us.ibm.com>
7843         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
7844         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
7845         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
7846         fctiw instruction.
7848 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7850         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
7851         instead of __vector bool.
7852         (_mm_max_pu8): Likewise.
7853         (_mm_min_pi16): Likewise.
7855 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
7857         PR target/84912
7858         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
7859         (DIVWEUO): Likewise.
7860         (DIVDEO): Likewise.
7861         (DIVDEUO): Likewise.
7862         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
7863         DIVWEUO and DIVDEUO.
7864         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
7865         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
7866         (div_extend): Likewise.
7867         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
7868         builtin function.
7869         (__builtin_divweuo): Likewise.
7870         (__builtin_divdeo): Likewise.
7871         (__builtin_divdeuo): Likewise.
7873 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
7875         PR target/85095
7876         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
7877         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
7879         PR tree-optimization/82004
7880         * gimple-match-head.c (optimize_pow_to_exp): New function.
7881         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
7882         Don't fold to exp if optimize_pow_to_exp is false.
7884 2018-03-28  Martin Liska  <mliska@suse.cz>
7886         PR other/84819
7887         * calls.c (initialize_argument_information): Fix trailing space.
7888         * common.opt: Fix typo and provide better explanation for
7889         -fsanitize-coverage option.
7890         * config/i386/i386.opt: Fix typo.
7892 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
7893             Martin Liska  <mliska@suse.cz>
7895         PR sanitizer/85081
7896         * gimplify.c (asan_poison_variable): Don't do the check for
7897         gimplify_omp_ctxp here.
7898         (gimplify_decl_expr): Do it here.
7899         (gimplify_target_expr): Likewise.
7901 2018-03-28  Martin Liska  <mliska@suse.cz>
7903         PR target/84988
7904         * config/i386/i386.c (ix86_function_arg_advance): Do not call
7905         chkp_type_bounds_count if MPX is not enabled.
7907 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7909         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
7911 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
7913         PR target/84914
7914         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
7915         function to create the function decl for complex long double
7916         multiply and divide for -mabi=ieeelongdouble.
7917         (init_float128_ieee): Call it.
7919 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
7921         PR target/85044
7922         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
7923         -fcf-protection=branch -mibt.
7924         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
7926 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7928         PR target/81863
7929         * config/arm/arm.c (arm_valid_symbolic_address): Handle
7930         arm_word_relocations.
7932 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
7934         PR target/85056
7935         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
7936         extern array declarations.
7938 2018-03-27  Richard Biener  <rguenther@suse.de>
7940         PR middle-end/84067
7941         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
7942         explicit single_use checks.
7944 2018-03-27  Richard Biener  <rguenther@suse.de>
7946         PR tree-optimization/85082
7947         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
7948         Valueize the VUSE.
7950 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7952         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
7953         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
7954         Turn on fasynchronous-unwind-tables and funwind-tables.
7956 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
7958         PR target/85073
7959         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
7960         (*bmi_blsr_<mode>_ccz): Ditto.
7962 2018-03-26  Tom de Vries  <tom@codesourcery.com>
7964         PR tree-optimization/85063
7965         * omp-general.c (offloading_function_p): New function.  Factor out
7966         of ...
7967         * omp-offload.c (pass_omp_target_link::gate): ... here.
7968         * omp-general.h (offloading_function_p): Declare.
7969         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
7970         with attribute omp declare target for offloading functions.
7972 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
7974         PR tree-optimization/84005
7975         * tree-data-ref.h (get_base_for_alignment): Declare.
7976         * tree-data-ref.c (get_base_for_alignment_1): New function.
7977         (get_base_for_alignment): Likewise.
7978         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
7979         get_base_for_alignment to find a suitable base object, instead
7980         of always using drb->base_address.
7982 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
7984         PR inline-asm/85022
7985         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
7986         known size by default.
7988 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
7990         PR inline-asm/85030
7991         * lra-constraints.c (process_alt_operands): Don't match BLKmode
7992         and non BLKmode operands.
7994 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7996         PR target/85026
7997         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
7998         Clean up attributes.
8000 2018-03-23  Richard Biener  <rguenther@suse.de>
8002         PR debug/85020
8003         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8004         we are going to emit early debug for LTO.
8006 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8008         PR inline-asm/85034
8009         * function.c (match_asm_constraints_1): Don't optimize if input
8010         doesn't satisfy general_operand predicate for output's mode.
8012         PR inline-asm/85022
8013         * alias.c (write_dependence_p): Don't require for x_canonicalized
8014         non-VOIDmode if x has VOIDmode.
8016         PR sanitizer/85029
8017         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8018         just don't try to optimize it rather than assert it never happens.
8020 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8022         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8023         macro expansions for definition of ST_INTERNAL_<mode> and
8024         LD_INTERNAL_<mode> builtins.
8025         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8026         Remove prototype.
8027         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8028         function.
8029         (altivec_expand_st_builtin): Likewise.
8030         (altivec_expand_builtin): Remove calls to deleted functions.
8031         (rs6000_address_for_altivec): Delete this function.
8032         * config/rs6000/vector.md: Remove expands for
8033         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8035 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8037         PR target/84826
8038         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8039         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8040         re-computing once computed.
8041         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8042         (arm_init_machine_status): Initialize
8043         machine->static_chain_stack_bytes.
8045 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8047         PR target/84760
8048         * doc/extend.texi: Add four new prototypes for vec_ld.
8049         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8050         definitions for more logical presentation.
8051         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8052         entries for V1TI variants of __builtin_altivec_ld builtin.
8053         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8054         handling of V1TI variant of LVX icode pattern.
8055         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8056         (rs6000_gimple_fold_builtin): Likewise.
8057         (altivec_init_builtins): Add code to define
8058         __builtin_altivec_lvx_v1ti function.
8060 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8062         PR inline-asm/84941
8063         * function.c (match_asm_constraints_1): Don't do the optimization
8064         if input isn't a REG, SUBREG, MEM or constant.
8066 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8068         PR tree-optimization/84956
8069         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8070         bb_has_abnormal_pred.
8072 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8074         PR sanitizer/85018
8075         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8076         DECL_INITIAL (decl) to decl at the end.
8077         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8078         adjust the comment.
8080 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8082         * doc/extend.texi (__builtin_tgmath): Document when complex
8083         integer types are treated as _Complex _Float64.
8085 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8087         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8089 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8091         PR tree-optimization/84960
8092         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8093         if it is ENTRY block, move them into single succ of ENTRY in that case.
8095 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8097         PR tree-optimization/84811
8098         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8099         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8100         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8101         (known_subrange_p): Update accordingly.  Cast each value involved
8102         in the size comparison, rather than casting the result of the
8103         subtraction.
8105 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8107         PR tree-optimization/84982
8108         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8109         by flipping the least significant bit rather than all bits from
8110         bitpos to bitpos + bitsize - 1.
8112 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8114         * doc/extend.texi (Deprecated Features): Remove mention of
8115         long-deleted deprecations.
8117 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8119         PR jit/84288
8120         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8121         * configure: Regenerate.
8123 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8125         PR tree-optimization/83126
8126         * tree-parloops.c (num_phis): New function.
8127         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8129 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8131         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8132         mention anon-struct/union members and trailing attributes.
8134 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8136         PR tree-optimization/84969
8137         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8138         builtin memset partitions if they set different rhs values.
8140 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8142         PR rtl-optimization/84989
8143         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8144         VEC_DUPLICATE with scalar result mode.
8146 2018-03-21  Martin Liska  <mliska@suse.cz>
8148         PR ipa/84963
8149         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8150         not intended return statement.
8152 2018-03-21  Martin Liska  <mliska@suse.cz>
8154         PR target/84988
8155         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8156         (chkp_find_bound_slots_1): Limit number of iterations.
8158 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8160         PR target/84838
8161         * Minor grammar fixes for x86 options.
8163 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8165         PR debug/84875
8166         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8167         holding REG_CFA_RESTORE notes, instead turn them into a USE.
8169 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
8171         PR target/83789
8172         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8173         (altivec_lvx_<mode>_1op): Likewise.
8174         (altivec_stvx_<mode>_2op): Likewise.
8175         (altivec_stvx_<mode>_1op): Likewise.
8176         (altivec_lvx_<VM2:mode>): New define_expand.
8177         (altivec_stvx_<VM2:mode>): Likewise.
8178         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8179         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8180         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8181         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8182         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8183         (rs6000_gen_lvx): Likewise.
8184         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8185         (altivec_expand_stv_builtin): Likewise.
8186         (altivec_expand_builtin): Likewise.
8187         * config/rs6000/vector.md: Likewise.
8189 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8191         PR target/82518
8192         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8193         BYTES_BIG_ENDIAN.
8195 2018-03-20  Richard Biener  <rguenther@suse.de>
8197         PR target/84986
8198         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8199         sign-conversions as zero, fall back to standard scalar_stmt
8200         cost for the rest.
8202 2018-03-20  Martin Liska  <mliska@suse.cz>
8204         PR ipa/84825
8205         * predict.c (rebuild_frequencies): Handle case when we have
8206         PROFILE_ABSENT, but flag_guess_branch_prob is false.
8208 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8210         PR target/84990
8211         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8212         flag_section_anchors.
8213         * varasm.c (use_blocks_for_decl_p): Remove hack for
8214         dw2_force_const_mem.
8216         PR target/84845
8217         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8218         to ...
8219         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
8220         be created, use lowpart_subreg of operands[0] rather than operands[0]
8221         itself.
8222         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8223         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8224         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8225         and n constraint instead of aarch64_shift_imm_di and Usd.
8226         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8227         (*aarch64_<optab>_reg_minus<mode>3): ... this.
8229 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
8231         PR target/82989
8232         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8233         to favor GPR over NEON registers.
8234         (<shift>di3_neon): Likewise.
8236 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8238         PR target/84952
8239         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8240         (nvptx_process_pars): Emit bar.sync asap and alap.
8242 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8244         PR target/84954
8245         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8246         seen_label if seen_label is already set.
8248 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8250         PR target/84945
8251         * config/i386/i386.c (fold_builtin_cpu): For features above 31
8252         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8253         Use 1U instead of 1.  Formatting fixes.
8255         PR c/84953
8256         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8257         instead of TREE_TYPE (s1) for the return value.
8259 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
8261         PR tree-optimization/84946
8262         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8263         bitsize + bitsize in poly_uint64 rather than poly_int64.
8265         PR sanitizer/78651
8266         * dwarf2asm.c: Include fold-const.c.
8267         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8268         of decl rather than decl itself.
8270         PR rtl-optimization/84643
8271         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8273 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
8275         PR sanitizer/78651
8276         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8277         calling assemble_variable.
8279 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
8281         PR target/81647
8282         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8283         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8285 2018-03-19  Jim Wilson  <jimw@sifive.com>
8287         PR bootstrap/84856
8288         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8289         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8290         (riscv_first_stack_step): Likewise.
8291         (riscv_option_override): Use STACK_BOUNDARY instead of
8292         MIN_STACK_BOUNDARY.
8293         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8294         MIN_STACK_BOUNDARY.
8295         (BIGGEST_ALIGNMENT): Set to 128.
8296         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8297         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8298         STACK_BOUNDARY.
8300 2018-03-19  Richard Biener  <rguenther@suse.de>
8302         PR tree-optimization/84933
8303         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8304         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8306 2018-03-19  Richard Biener  <rguenther@suse.de>
8308         PR tree-optimization/84859
8309         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8310         (cond_if_else_store_replacement): Perform sinking operation on
8311         single-store BBs regardless of MAX_STORES_TO_SINK setting.
8312         Generalize what a BB with a single eligible store is.
8314 2018-03-19  Richard Biener  <rguenther@suse.de>
8316         PR tree-optimization/84929
8317         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8318         chrec_is_positive against non-chrec arg.
8320 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
8322         PR target/84711
8323         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8325 2018-03-18  Martin Liska  <mliska@suse.cz>
8327         PR rtl-optimization/84635
8328         * regrename.c (build_def_use): Use matches_mode only when
8329         matches >= 0.
8331 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
8333         PR tree-optimization/84913
8334         * tree-vect-loop.c (vectorizable_reduction): Don't try to
8335         vectorize chains of COND_EXPRs.
8337 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8339         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8341 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8343         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8345 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8347         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8349 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8350             Kito Cheng  <kito.cheng@gmail.com>
8352         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8353         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8354         (nds32_adjust_reg_alloc_order): New function.
8355         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8357 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
8359         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8360         nds32_print_operand, nds32_print_operand_address): Use
8361         HOST_WIDE_INT_PRINT_DEC instead.
8363 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8365         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8367 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
8369         PR target/84902
8370         * config/i386/i386.c (initial_ix86_tune_features,
8371         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8372         unsigned long long.
8373         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8374         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8375         rather than 1u << ix86_tune.  Formatting fix.
8376         (ix86_option_override_internal): Change ix86_arch_mask from
8377         unsigned int to unsigned HOST_WIDE_INT, initialize to
8378         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8379         (ix86_function_specific_restore): Likewise.
8381 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8383         PR target/84899
8384         * postreload.c (reload_combine_recognize_pattern): Perform
8385         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8386         truncate_int_for_mode the result for the destination's mode.
8388         PR c/84909
8389         * hsa-gen.c (mem_type_for_type): Fix comment typo.
8390         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8391         Likewise.
8392         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8393         Likewise.
8395 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
8397         PR target/84876
8398         * lra-assigns.c (lra_split_hard_reg_for): Don't use
8399         regno_allocno_class_array and sorted_pseudos.
8400         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8401         insns where regno is used.
8403 2018-03-16  Martin Liska  <mliska@suse.cz>
8405         PR ipa/84833
8406         * multiple_target.c (create_dispatcher_calls): Redirect
8407         reference in the symbol table.
8409 2018-03-16  Martin Liska  <mliska@suse.cz>
8411         PR ipa/84722
8412         * multiple_target.c (create_dispatcher_calls): Redirect also
8413         an alias.
8415 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8417         PR c++/79937
8418         PR c++/82410
8419         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8420         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8421         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8423 2018-03-16  Julia Koval  <julia.koval@intel.com>
8425         * doc/invoke.texi (Skylake Server): Add CLWB.
8426         Cannonlake): Remove CLWB.
8428 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8430         PR tree-optimization/84841
8431         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8432         1 << 3.
8433         (FLOAT_ONE_CONST_TYPE): Define.
8434         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8435         (sort_by_operand_rank): Put entries with higher constant_type last
8436         rather than first to match comments.
8438 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
8440         * config/nios2/nios2.md (movsi_internal): Fix thinko in
8441         split predicate.
8443 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8445         PR c++/79085
8446         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8447         check and use address of target always.
8449 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
8451         PR target/84574
8452         * config/i386/i386.c (indirect_thunk_needed): Update comments.
8453         (indirect_thunk_bnd_needed): Likewise.
8454         (indirect_thunks_used): Likewise.
8455         (indirect_thunks_bnd_used): Likewise.
8456         (indirect_return_needed): New.
8457         (indirect_return_bnd_needed): Likewise.
8458         (output_indirect_thunk_function): Add a bool argument for
8459         function return.
8460         (output_indirect_thunk_function): Don't generate alias for
8461         function return thunk.
8462         (ix86_code_end): Call output_indirect_thunk_function to generate
8463         function return thunks.
8464         (ix86_output_function_return): Set indirect_return_bnd_needed
8465         and indirect_return_needed instead of indirect_thunk_bnd_needed
8466         and indirect_thunk_needed.
8468 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
8470         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8471         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8472         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8474 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
8475             Paul Hua <paul.hua.gm@gmail.com>
8477         PR c/84852
8478         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8480 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
8482         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8483         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8484         resp. SFmode cases.
8486 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
8488         PR target/84711
8489         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8490         instead of GET_MODE_SIZE when comparing Units.
8492 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8494         PR target/68256
8495         * varasm.c (hash_section): Return an unchangeble hash value
8496         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8497         Return !aarch64_can_use_per_function_literal_pools_p ().
8499 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8501         PR target/84860
8502         * optabs.c (emit_conditional_move): Pass address of cmode's copy
8503         rather than address of cmode as last argument to prepare_cmp_insn.
8505 2018-03-15  Julia Koval  <julia.koval@intel.com>
8507         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8508         F_AVX512VNNI, F_AVX512BITALG): New.
8510 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
8512         PR target/83451
8513         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
8514         insn for floating-point loads and stores.
8516 2018-03-14  Carl Love  <cel@us.ibm.com>
8518         * config/rs6000/rs6000-c.c: Add macro definitions for
8519         ALTIVEC_BUILTIN_VEC_PERMXOR.
8520         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8521         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8522         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8523         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8524         UNSPEC_VPERMXOR.
8525         * config/doc/extend.texi: Add prototypes for vec_permxor.
8527 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
8529         PR c/84852
8530         * diagnostic-show-locus.c (class layout_point): Convert m_line
8531         from int to linenum_type.
8532         (line_span::comparator): Use linenum "compare" function when
8533         comparing line numbers.
8534         (test_line_span): New function.
8535         (layout_range::contains_point): Convert param "row" from int to
8536         linenum_type.
8537         (layout_range::intersects_line_p): Likewise.
8538         (layout::will_show_line_p): Likewise.
8539         (layout::print_source_line): Likewise.
8540         (layout::should_print_annotation_line_p): Likewise.
8541         (layout::print_annotation_line): Likewise.
8542         (layout::print_leading_fixits): Likewise.
8543         (layout::annotation_line_showed_range_p): Likewise.
8544         (struct line_corrections): Likewise for field m_row.
8545         (line_corrections::line_corrections): Likewise for param "row".
8546         (layout::print_trailing_fixits): Likewise.
8547         (layout::get_state_at_point): Likewise.
8548         (layout::get_x_bound_for_row): Likewise.
8549         (layout::print_line): Likewise.
8550         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8551         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8552         * input.c (selftest::test_linenum_comparisons): New function.
8553         (selftest::input_c_tests): Call it.
8554         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8555         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8556         * selftest.h (ASSERT_GT): New macro.
8557         (ASSERT_GT_AT): New macro.
8558         (ASSERT_LT): New macro.
8559         (ASSERT_LT_AT): New macro.
8561 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
8563         PR rtl-optimization/84780
8564         * combine.c (distribute_links): Don't make a link based on pc_rtx.
8566 2018-03-14  Martin Liska  <mliska@suse.cz>
8568         * tree.c (record_node_allocation_statistics): Use
8569         get_stats_node_kind.
8570         (get_stats_node_kind): New function extracted from
8571         record_node_allocation_statistics.
8572         (free_node): Use get_stats_node_kind.
8574 2018-03-14  Richard Biener  <rguenther@suse.de>
8576         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8577         that the value-set of ANTIC_IN doesn't grow.
8579         Revert
8580         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8581         member.
8582         (BB_VISITED_WITH_VISITED_SUCCS): New define.
8583         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8585 2018-03-14  Julia Koval  <julia.koval@intel.com>
8587         * config.gcc (icelake-client, icelake-server): New.
8588         (icelake): Remove.
8589         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8590         (initial_ix86_arch_features): Ditto.
8591         (PTA_SKYLAKE): Add SGX.
8592         (PTA_ICELAKE): Remove.
8593         (PTA_ICELAKE_CLIENT): New.
8594         (PTA_ICELAKE_SERVER): New.
8595         (ix86_option_override_internal): Split up icelake on icelake client and
8596         icelake server.
8597         (get_builtin_code_for_version): Ditto.
8598         (fold_builtin_cpu): Ditto.
8599         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
8600         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
8601         * config/i386/i386.h (processor_type): Ditto.
8602         * doc/invoke.texi: Ditto.
8604 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
8606         PR sanitizer/83392
8607         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
8608         INTEGER_CST offset, add it together with bitpos / 8 and
8609         sign extend based on POINTER_SIZE.
8611         PR target/84844
8612         Revert
8613         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
8615         PR target/78090
8616         * config/i386/constraints.md (Yc): New register constraint.
8617         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
8618         Use Yc constraint for alternative 2 of operand 0.  Remove
8619         preferred_for_speed attribute.
8621 2018-03-14  Richard Biener  <rguenther@suse.de>
8623         PR tree-optimization/84830
8624         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
8625         with the old one to avoid oscillations.
8627 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
8629         PR target/83712
8630         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
8631         pseudos.
8632         (assign_by_spills): Return a flag of reload assignment failure.
8633         Do not process the reload assignment failures.  Do not spill other
8634         reload pseudos if they has the same reg class.  Update n if
8635         necessary.
8636         (lra_assign): Add a return arg.  Set up from the result of
8637         assign_by_spills call.
8638         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8639         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8640         usage_insns if it is not NULL.
8641         (spill_hard_reg_in_range): New function.
8642         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8643         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8644         function prototypes.
8645         (lra_assign): Change prototype.
8646         * lra.c (lra): Add code to deal with fails by splitting hard reg
8647         live ranges.
8649 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
8651         * config/riscv/riscv.opt (mrelax): New option.
8652         * config/riscv/riscv.c (riscv_file_start): Emit ".option
8653         "norelax" when riscv_mrelax is disabled.
8654         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
8656 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8658         PR target/84743
8659         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
8660         reassociation for int modes.
8662 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8664         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
8665         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
8666         for big-endian.
8667         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
8668         * config/aarch64/aarch64-sve.md
8669         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
8670         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
8671         (*extend<mode><Vwide>2): Rename to...
8672         (aarch64_sve_extend<mode><Vwide>2): ...this.
8673         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
8674         renaming the old pattern to...
8675         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
8676         unsigned packs.
8677         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
8678         define_expand, renaming the old pattern to...
8679         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
8680         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
8681         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
8682         account when deciding which SVE instruction the optab should use.
8683         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
8685 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8687         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
8688         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
8689         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
8690         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
8691         (tlsdesc_small_<mode>): Turn a define_expand and use
8692         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
8693         (tlsdesc_small_advsimd_<mode>): ...this.
8694         (tlsdesc_small_sve_<mode>): New pattern.
8696 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8698         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
8699         (UNSPEC_UMUL_HIGHPART): New constants.
8700         (MUL_HIGHPART): New int iteraor.
8701         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
8702         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
8703         define_expand.
8704         (*<su>mul<mode>3_highpart): New define_insn.
8706 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8708         PR lto/84805
8709         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8710         incomplete types.
8712 2018-03-13  Martin Liska  <mliska@suse.cz>
8714         PR ipa/84658.
8715         * (sem_item_optimizer::sem_item_optimizer): Initialize new
8716         vector.
8717         (sem_item_optimizer::~sem_item_optimizer): Release it.
8718         (sem_item_optimizer::merge_classes): Register variable aliases.
8719         (sem_item_optimizer::fixup_pt_set): New function.
8720         (sem_item_optimizer::fixup_points_to_sets): Likewise.
8721         * ipa-icf.h: Declare new variables and functions.
8723 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
8725         PR middle-end/84834
8726         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
8727         integer_pow2p@2 and test integer_pow2p in condition.
8728         (A < 0 ? C : 0): Similarly for @1.
8730         PR middle-end/84831
8731         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
8732         characters starting at p contain '\0' character, don't look beyond
8733         that.
8735         PR target/84827
8736         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
8737         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
8739         PR target/84828
8740         * reg-stack.c (change_stack): Change update_end var from int to
8741         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
8742         also call set_block_for_insn on the newly added insns and rescan.
8744         PR target/84786
8745         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
8746         on the last operand.
8748         PR c++/84704
8749         * tree.c (stabilize_reference_1): Return save_expr (e) for
8750         STATEMENT_LIST even if it doesn't have side-effects.
8752 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
8754         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
8756 2018-03-12  Renlin Li  <renlin.li@arm.com>
8758         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
8759         aarch64_output_scalar_simd_mov_immediate.
8761 2018-03-12  Martin Sebor  <msebor@redhat.com>
8763         PR tree-optimization/83456
8764         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
8765         for perfectly overlapping calls to memcpy.
8766         (gimple_fold_builtin_memory_chk): Same.
8767         (gimple_fold_builtin_strcpy): Handle no-warning.
8768         (gimple_fold_builtin_stxcpy_chk): Same.
8769         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
8771 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
8773         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
8774         parameter.  Use it for SFmode.
8775         (rs6000_function_arg_advance_1): Adjust.
8776         (rs6000_function_arg): Adjust.
8777         (rs6000_gimplify_va_arg): Pass false for that new parameter.
8779 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
8781         PR rtl-optimization/84169
8782         PR rtl-optimization/84780
8783         * combine.c (can_combine_p): Check for a 2-insn combination whether
8784         the destination register is used between the two insns, too.
8786 2018-03-12  Richard Biener  <rguenther@suse.de>
8788         PR tree-optimization/84803
8789         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
8790         for refs DR analysis didn't process.
8792 2018-03-12  Richard Biener  <rguenther@suse.de>
8794         PR tree-optimization/84777
8795         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
8796         force-vectorize loops ignore whether we are optimizing for size.
8798 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8800         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
8801         (TARGET_MD_ASM_ADJUST): Define.
8803 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
8804             Kito Cheng  <kito.cheng@gmail.com>
8805             Chung-Ju Wu  <jasonwucj@gmail.com>
8807         * config/nds32/nds32.c (nds32_compute_stack_frame,
8808         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
8809         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
8810         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
8811         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
8812         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
8813         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
8814         * config/nds32/nds32.md (prologue, epilogue): Use macro
8815         NDS32_V3PUSH_AVAILABLE_P to do checking.
8817 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
8819         PR debug/58150
8820         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
8821         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
8822         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
8823         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
8824         addition of most attributes on !orig_type_die or the attribute not
8825         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
8827 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
8828             Chung-Ju Wu  <jasonwucj@gmail.com>
8830         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
8831         __NDS32_VH__ macro.
8832         * config/nds32/nds32.opt (mvh): New option.
8834 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
8835             Chung-Ju Wu  <jasonwucj@gmail.com>
8837         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
8838         function.
8839         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
8840         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
8841         definition.
8843 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
8844             Chung-Ju Wu  <jasonwucj@gmail.com>
8846         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
8847         function.
8848         * config/nds32/nds32-multiple.md (strlensi): New pattern.
8849         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
8851 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
8852             Kito Cheng  <kito.cheng@gmail.com>
8853             Chung-Ju Wu  <jasonwucj@gmail.com>
8855         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
8856         UNSPEC_FFMISM and UNSPEC_FLMISM.
8857         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
8858         for ffb, ffmism and flmism.
8859         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
8860         (unspec_ffmism): Ditto.
8861         (unspec_flmism): Ditto.
8862         (nds32_expand_builtin_impl): Check if string extension is available.
8863         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
8864         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
8866 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
8868         Reverting patch:
8869         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
8871         PR target/83712
8872         * lra-assigns.c (assign_by_spills): Return a flag of reload
8873         assignment failure.  Do not process the reload assignment
8874         failures.  Do not spill other reload pseudos if they has the same
8875         reg class.
8876         (lra_assign): Add a return arg.  Set up from the result of
8877         assign_by_spills call.
8878         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8879         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8880         usage_insns if it is not NULL.
8881         (spill_hard_reg_in_range): New function.
8882         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8883         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8884         function prototypes.
8885         (lra_assign): Change prototype.
8886         * lra.c (lra): Add code to deal with fails by splitting hard reg
8887         live ranges.
8889 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
8891         PR target/84807
8892         * config/i386/i386.opt: Replace Enforcment with Enforcement.
8894 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
8896         PR debug/84620
8897         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
8898         (dw_val_node): Add val_symbolic_view.
8899         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
8900         (symview_upper_bound): New.
8901         (new_line_info_table): Initialize symviews_since_reset.
8902         (dwarf2out_source_line): Count symviews_since_reset and set
8903         symview_upper_bound.
8904         (dw_val_equal_p): Handle symview.
8905         (add_AT_symview): New.
8906         (print_dw_val): Handle symview.
8907         (attr_checksum, attr_checksum_ordered): Likewise.
8908         (same_dw_val_p, size_of_die): Likewise.
8909         (value_format, output_die): Likewise.
8910         (add_high_low_attributes): Use add_AT_symview for entry_view.
8911         (dwarf2out_finish): Reset symview_upper_bound, clear
8912         zero_view_p.
8914 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
8916         PR target/83969
8917         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
8918         Add strict argument and use it.
8919         (rs6000_split_multireg_move): Update for new strict argument.
8920         (mem_operand_gpr): Disallow all non-offsettable addresses.
8921         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
8923 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
8925         PR target/84772
8926         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
8927         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
8928         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
8930         PR c++/84767
8931         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
8932         decl, use remap_type if we want to use the type.
8934 2018-03-09  Martin Sebor  <msebor@redhat.com>
8936         PR tree-optimization/84526
8937         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8938         Remove dead code.
8939         (builtin_access::generic_overlap): Be prepared to handle non-array
8940         base objects.
8942 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
8944         PR rtl-optimization/84682
8945         * lra-constraints.c (process_address_1): Check is_address flag
8946         for address constraints.
8947         (process_alt_operands): Likewise.
8948         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
8949         preprocess_constraints.
8950         * recog.h (preprocess_constraints): Add oploc parameter.
8951         Adjust callers.
8952         * recog.c (preprocess_constraints): Test address_operand for
8953         CT_ADDRESS constraints.
8955 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
8957         PR target/83712
8958         * lra-assigns.c (assign_by_spills): Return a flag of reload
8959         assignment failure.  Do not process the reload assignment
8960         failures.  Do not spill other reload pseudos if they has the same
8961         reg class.
8962         (lra_assign): Add a return arg.  Set up from the result of
8963         assign_by_spills call.
8964         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8965         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8966         usage_insns if it is not NULL.
8967         (spill_hard_reg_in_range): New function.
8968         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8969         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8970         function prototypes.
8971         (lra_assign): Change prototype.
8972         * lra.c (lra): Add code to deal with fails by splitting hard reg
8973         live ranges.
8975 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8977         PR target/83193
8978         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
8979         Accept complain bool parameter.  Only emit errors if it is true.
8980         (arm_parse_cpu_option_name): Likewise.
8981         (arm_target_thumb_only): Adjust callers of the above.
8982         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
8983         prototype to take a default true bool parameter.
8984         (arm_parse_arch_option_name): Likewise.
8986 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
8987             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
8989         PR jit/64089
8990         PR jit/84288
8991         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
8992         * configure: Regenerate.
8993         * configure.ac ("linker --version-script option"): New.
8994         ("linker soname option"): New.
8996 2018-03-09  Richard Biener  <rguenther@suse.de>
8998         PR tree-optimization/84775
8999         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9000         immediate uses of predicate stmts and mark them modified.
9002         Revert
9003         PR tree-optimization/84178
9004         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9005         to caller.
9006         (version_loop_for_if_conversion): Delay update_ssa call.
9007         (tree_if_conversion): Delay update_ssa until after predicate
9008         insertion.
9010 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9012         PR target/84763
9013         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9014         when the function accesses prior frames.
9016 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9018         PR debug/84456
9019         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9020         gen_llsym, otherwise call maybe_gen_llsym.
9022         PR inline-asm/84742
9023         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9024         has ',' character inside of it.
9026 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9028         PR target/84748
9029         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9030         as clobbering CC_REGNUM.
9032 2018-03-08  Richard Biener  <rguenther@suse.de>
9034         PR middle-end/84552
9035         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9036         (follow_copies_to_constant): Do not follow SSA names registered
9037         for update.
9039 2018-03-08  Richard Biener  <rguenther@suse.de>
9041         PR tree-optimization/84178
9042         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9043         to caller.
9044         (version_loop_for_if_conversion): Delay update_ssa call.
9045         (tree_if_conversion): Delay update_ssa until after predicate
9046         insertion.
9048 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9050         PR tree-optimization/84178
9051         * tree-if-conv.c (release_bb_predicate): Remove the
9052         the assertion that the stmts have NULL use_ops.
9053         Discard the statements, asserting that they haven't
9054         yet been added to a BB.
9056 2018-03-08  Richard Biener  <rguenther@suse.de>
9058         PR tree-optimization/84746
9059         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9060         (phi_translate): Pass in destination ANTIC_OUT set.
9061         (phi_translate_1): Likewise.  For a simplified result lookup
9062         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9063         (phi_translate_set): Adjust.
9064         (do_pre_regular_insertion): Likewise.
9065         (do_pre_partial_partial_insertion): Likewise.
9067 2018-03-08  Martin Liska  <mliska@suse.cz>
9069         PR gcov-profile/84735
9070         * doc/gcov.texi: Document usage of profile files.
9071         * gcov-io.h: Document changes in the format.
9073 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9075         PR debug/84404
9076         PR debug/84408
9077         * dwarf2out.c (struct dw_line_info_table): Update comments for
9078         view == -1.
9079         (FORCE_RESET_NEXT_VIEW): New.
9080         (FORCE_RESETTING_VIEW_P): New.
9081         (RESETTING_VIEW_P): Check for -1 too.
9082         (ZERO_VIEW_P): Likewise.
9083         (new_line_info_table): Force-reset next view.
9084         (dwarf2out_begin_function): Likewise.
9085         (dwarf2out_source_line): Simplify zero_view_p initialization.
9086         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9087         view directly.  Omit view when omitting .loc at line 0.
9089 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9091         PR tree-optimization/84740
9092         * tree-switch-conversion.c (process_switch): Call build_constructors
9093         only if info.phi_count is non-zero.
9095         PR tree-optimization/84739
9096         * tree-tailcall.c (find_tail_calls): Check call arguments against
9097         DECL_ARGUMENTS (current_function_decl) rather than
9098         DECL_ARGUMENTS (func) when checking for tail recursion.
9100 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9102         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9103         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9104         Volker Reichelt's entry and add entries for people that perform
9105         GCC fuzzy testing and report numerous bugs.
9107 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9109         PR target/82411
9110         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9111         readonly data in sdata, if that is disabled.
9112         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9113         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9114         -mreadonly-in-sdata option.
9116 2018-03-07  Martin Sebor  <msebor@redhat.com>
9118         PR tree-optimization/84468
9119         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9120         basic block when looking for nul assignment.
9122 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9124         PR target/84277
9125         * except.h (output_function_exception_table): Adjust prototype.
9126         * except.c (output_function_exception_table): Remove FNNAME parameter
9127         and add SECTION parameter.  Ouput one part of the table at a time.
9128         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9129         the first part of the exception table and emit unwind directives.
9130         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9131         (i386_pe_seh_cold_init): Likewise.
9132         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9133         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9134         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9135         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9136         * config/i386/winnt.c: Include except.h.
9137         (struct seh_frame_state): Add reg_offset, after_prologue and
9138         in_cold_section fields.
9139         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9140         (i386_pe_seh_cold_init): New function.
9141         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9142         to seh->in_cold_section.
9143         (seh_emit_push): Record the offset of the push.
9144         (seh_emit_save): Record the offet of the save.
9145         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9146         Test seh->after_prologue to disregard the epilogue.
9147         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9148         (i386_pe_end_cold_function): New function.
9150 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9152         PR fortran/84565
9153         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9154         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9156         PR c++/84704
9157         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9158         on tmp_var.
9159         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9160         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9162         PR middle-end/84723
9163         * multiple_target.c: Include tree-inline.h and intl.h.
9164         (expand_target_clones): Diagnose and fail if node->definition and
9165         !tree_versionable_function_p (node->decl).
9167 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
9169         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9170         sprint_ul.
9171         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9172         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9173         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9175 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9177         PR target/84710
9178         * combine.c (try_combine): Use reg_or_subregno instead of handling
9179         just paradoxical SUBREGs and REGs.
9181 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
9183         * config/arc/arc.c (arc_finalize_pic): Remove function.
9184         (arc_must_save_register): We use single base PIC register, remove
9185         checks to save/restore the PIC register.
9186         (arc_expand_prologue): Likewise.
9187         * config/arc/arc-protos.h (arc_set_default_type_attributes):
9188         Remove.
9189         (arc_verify_short): Likewise.
9190         (arc_attr_type): Likewise.
9191         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9192         (walk_stores): Likewise.
9193         (arc_address_cost): Make it static.
9194         (arc_verify_short): Likewise.
9195         (branch_dest): Likewise.
9196         (arc_attr_type): Likewise.
9197         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9198         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9199         (arc_final_prescan_insn): Remove inserting the nops due to
9200         hardware hazards.  It is done in reorg step.
9201         (insn_length_variant_t): Remove.
9202         (insn_length_parameters_t): Likewise.
9203         (arc_insn_length_parameters): Likewise.
9204         (arc_get_insn_variants): Likewise.
9205         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9207 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9209         PR inline-asm/84683
9210         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9211         assertion failure.
9213         PR tree-optimization/84687
9214         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9215         on new_node->decl.
9216         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9218 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9220         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9221         Rename to ppc_speculation_barrier.
9222         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9223         __builtin_ppc_speculation_barrier.
9225 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9227         PR target/84700
9228         * combine.c (combine_simplify_rtx): Don't try to simplify if
9229         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9230         are equal to x.
9232 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
9234         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9235         to 32 bytes when compiling for POWER9.
9237 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9239         PR target/84564
9240         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9241         regparm >= 3 with no arg reg available also for calls with
9242         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
9244         PR target/84524
9245         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9246         orig,vex.
9247         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
9249 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
9251         PR target/84264
9252         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9254 2018-03-05  Richard Biener  <rguenther@suse.de>
9256         PR tree-optimization/84486
9257         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9258         When inserting a __builtin_assume_aligned call set the LHS
9259         SSA name alignment info accordingly.
9261 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
9263         PR tree-optimization/84114
9264         * config/aarch64/aarch64.c (aarch64_reassociation_width)
9265         Avoid reassociation of FLOAT_MODE addition.
9267 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
9269         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9270         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9271         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9272         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9273         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9274         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9275         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9276         and -mwbnoinvd.
9277         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9278         __builtin_ia32_wbinvd): New builtins.
9279         (SPECIAL_ARGS2): New.
9280         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9281         (SPECIAL_ARGS2): New.
9282         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9283         (ix86_valid_target_attribute_inner_p): Ditto.
9284         (ix86_init_mmx_sse_builtins): Add special_args2.
9285         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9286         TARGET_WBNOINVD_P): New.
9287         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9288         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9289         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9290         * config/i386/immintrin.h (_wbinvd): New intrinsic.
9291         * config/i386/pconfigintrin.h: New file.
9292         * config/i386/wbnoinvdintrin.h: Ditto.
9293         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9294         wbnoinvdintrin.h.
9295         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9297 2018-03-05  Richard Biener  <rguenther@suse.de>
9299         PR tree-optimization/84670
9300         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9301         member.
9302         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9303         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9304         (compute_antic_aux): Only assert the number of values in ANTIC_IN
9305         doesn't grow if all successors (recursively) were visited at least
9306         once.
9308 2018-03-05  Richard Biener  <rguenther@suse.de>
9310         PR tree-optimization/84650
9311         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9312         if executed in the loop pipeline.
9314 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
9316         * doc/configfiles.texi (Configuration Files): Move info about
9317         conditionalizing $target-protos.h to...
9318         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
9319         differs from $target-protos.h.
9321 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
9322             Chung-Ju Wu  <jasonwucj@gmail.com>
9324         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9325         * config/nds32/nds32-multiple.md (setmemsi): Define.
9326         * config/nds32/nds32-memory-manipulation.c
9327         (nds32_gen_dup_4_byte_to_word_value): New.
9328         (emit_setmem_word_loop): New.
9329         (emit_setmem_byte_loop): New.
9330         (nds32_expand_setmem_loop): New.
9331         (nds32_expand_setmem_loop_v3m): New.
9332         (nds32_expand_setmem_unroll): New.
9333         (nds32_expand_setmem): New.
9335 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9336             Chung-Ju Wu  <jasonwucj@gmail.com>
9338         * config/nds32/nds32-memory-manipulation.c
9339         (nds32_emit_load_store): New.
9340         (nds32_emit_post_inc_load_store): New.
9341         (nds32_emit_mem_move): New.
9342         (nds32_emit_mem_move_block): New.
9343         (nds32_expand_movmemsi_loop_unknown_size): New.
9344         (nds32_expand_movmemsi_loop_known_size): New.
9345         (nds32_expand_movmemsi_loop): New.
9346         (nds32_expand_movmemsi_unroll): New.
9347         (nds32_expand_movmemqi): Rename ...
9348         (nds32_expand_movmemsi): ... to this.
9349         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9350         (movmemsi): ... to this.
9351         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9352         (nds32_expand_movmemsi): ... to this.
9354 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9355             Monk Chiang  <sh.chiang04@gmail.com>
9356             Chung-Ju Wu  <jasonwucj@gmail.com>
9358         * config/nds32/nds32-protos.h
9359         (nds32_expand_load_multiple): New arguments.
9360         (nds32_expand_store_multiple): Ditto.
9361         (nds32_valid_multiple_load_store): Rename ...
9362         (nds32_valid_multiple_load_store_p): ... to this.
9363         * config/nds32/nds32-memory-manipulation.c
9364         (nds32_expand_load_multiple): Refine implementation.
9365         (nds32_expand_store_multiple): Ditto.
9366         * config/nds32/nds32-multiple.md
9367         (load_multiple): Update nds32_expand_load_multiple interface.
9368         (store_multiple): Update nds32_expand_store_multiple interface.
9369         * config/nds32/nds32-predicates.c
9370         (nds32_valid_multiple_load_store): Rename ...
9371         (nds32_valid_multiple_load_store_p): ... to this and refine
9372         implementation.
9373         * config/nds32/predicates.md
9374         (nds32_load_multiple_and_update_address_operation): New predicate.
9375         (nds32_store_multiple_and_update_address_operation): New predicate.
9377 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9378             Chung-Ju Wu  <jasonwucj@gmail.com>
9380         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9381         (combo): New attribute.
9382         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9384 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9386         * config/nds32/nds32.opt: Change -mcmodel= default value.
9388 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
9389             Monk Chiang  <sh.chiang04@gmail.com>
9390             Chung-Ju Wu  <jasonwucj@gmail.com>
9392         * config/nds32/constants.md (unspec_element): New enum.
9393         * config/nds32/constraints.md (Umw): New constraint.
9394         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9395         * config/nds32/nds32-intrinsic.md: Likewise.
9396         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9397         (nds32_valid_smw_lwm_base_p): New.
9398         (nds32_output_smw_single_word): New.
9399         (nds32_output_lmw_single_word): New.
9400         (nds32_expand_unaligned_load): New.
9401         (nds32_expand_unaligned_store): New.
9402         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9403         (nds32_output_smw_single_word): Declare.
9404         (nds32_output_lmw_single_word): Declare.
9405         (nds32_expand_unaligned_load): Declare.
9406         (nds32_expand_unaligned_store): Declare.
9407         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9408         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9409         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9410         NDS32_BUILTIN_UASTORE_DW.
9411         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9412         predicate.
9414 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
9415             Kito Cheng  <kito.cheng@gmail.com>
9416             Chung-Ju Wu  <jasonwucj@gmail.com>
9418         * config/nds32/nds32-intrinsic.c
9419         (nds32_expand_builtin_null_ftype_reg): Delete.
9420         (nds32_expand_builtin_reg_ftype_imm): Ditto.
9421         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9422         (nds32_read_argument): New.
9423         (nds32_legitimize_target): Ditto.
9424         (nds32_legitimize_argument): Ditto.
9425         (nds32_check_constant_argument): Ditto.
9426         (nds32_expand_unop_builtin): Ditto.
9427         (nds32_expand_unopimm_builtin): Ditto.
9428         (nds32_expand_binop_builtin): Ditto.
9429         (nds32_builtin_decl_impl): Ditto.
9430         (builtin_description): Ditto.
9431         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9432         (nds32_init_builtins_impl): Ditto.
9433         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9434         (nds32_builtin_decl): New.
9435         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9436         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9438 2018-03-02  Jeff Law  <law@redhat.com>
9440         * reorg.c (stop_search_p): Handle DEBUG_INSN.
9441         (redundant_insn, fill_simple_delay_slots): Likewise.
9442         (fill_slots_from_thread): Likewise.
9443         * resource.c (mark_referenced_resources): Likewise.
9444         (mark_set_resources, find_dead_or_set_registers): Likewise.
9446 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9448         * substring-locations.h (format_warning_va): Formatting fix for
9449         ATTRIBUTE_GCC_DIAG.
9450         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9451         argument.
9452         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9453         * substring-locations.c: Include intl.h.
9454         (format_warning_va): Turned into small wrapper around
9455         format_warning_n_va, renamed to ...
9456         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9457         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9458         use ngettext.
9459         (format_warning_at_substring_n): New function.
9460         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9461         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
9462         format_warning_at_substring with just a shorter name instead of
9463         const function pointer.
9464         (fmtwarn_n): New function.
9465         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9466         appropriate, get rid of all the fmtstr temporaries, move conditionals
9467         with G_() wrapped string literals directly into fmtwarn arguments,
9468         cast dir.len to (int), formatting fixes.
9470 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
9472         * doc/invoke.texi: Remove "Cilk Plus" references.
9474 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9475             Richard Biener  <rguenther@suse.de>
9477         PR ipa/84628
9478         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9479         for error or warning attributes if CALL_FROM_THUNK_P is set.
9480         Formatting fixes.
9482 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9484         PR target/56540
9485         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9486         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9488         PR target/56540
9489         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9490         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9492         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9493         instead of -1U in last predictors element's probability member.
9495 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9497         PR ipa/83983
9498         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9499         arguments if they are comparable.
9501 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9503         PR tree-optimization/84634
9504         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9505         masks and masked_loop_p with a single loop_masks, making sure it's
9506         null for bb vectorization.
9508 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9510         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9511         (vect_analyze_data_ref_access): Use loop->safe_len rather than
9512         loop->force_vectorize to check whether there is no alias.
9514 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9516         PR target/84614
9517         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9518         prototypes.
9519         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9520         comments.
9521         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9522         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9523         instead of a loop around prev_real_insn.
9524         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9525         prev_real_insn.
9527         PR inline-asm/84625
9528         * config/i386/i386.c (ix86_print_operand): Use conditional
9529         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9530         zero vector.
9532 2018-03-02  Richard Biener  <rguenther@suse.de>
9534         PR tree-optimization/84427
9535         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9536         (bitmap_set_subtract_values): Rewrite to handle multiple
9537         exprs per value.
9538         (clean): Likewise.
9539         (prune_clobbered_mems): Likewise.
9540         (phi_translate): Take edge instead of pred/phiblock.
9541         (phi_translate_1): Likewise.
9542         (phi_translate_set): Likewise.  Insert all translated
9543         exprs for a value into the set, keeping possibly multiple
9544         expressions per value.
9545         (compute_antic_aux): Adjust for phi_translate changes.
9546         When intersecting union the expressions and prune those
9547         not in the final value set, keeping possibly multiple
9548         expressions per value.  Do not use value-insertion
9549         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9550         all expressions.  Add verification that the value-sets
9551         only shrink during iteration.
9552         (compute_partial_antic_aux): Adjust for the phi_translate changes.
9553         (do_pre_regular_insertion): Likewise.
9554         (do_pre_partial_partial_insertion): Likewise.
9556 2018-03-02  Richard Biener  <rguenther@suse.de>
9558         PR target/82005
9559         * config/darwin.c (saved_debug_info_level): New static global.
9560         (darwin_asm_lto_start): Disable debug info generation for LTO out.
9561         (darwin_asm_lto_end): Restore debug info generation settings.
9563 2018-03-01  Martin Liska  <mliska@suse.cz>
9565         PR sanitizer/82484
9566         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9567         volatile arguments.
9569 2018-03-01  Richard Biener  <rguenther@suse.de>
9571         PR debug/84645
9572         * dwarf2out.c (gen_variable_die): Properly handle late VLA
9573         type annotation with LTO when debug was disabled at compile-time.
9575 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
9577         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9578         XINT with INTVAL.
9579         (mips_final_postscan_insn): Likewise.
9581 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
9583         PR rtl-optimization/84528
9584         * alias.c (init_alias_target): Add commentary.
9585         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9586         a unique base value if the frame pointer is not eliminated
9587         to the stack pointer.
9589 2018-03-01  Tom de Vries  <tom@codesourcery.com>
9591         PR rtl-optimization/83327
9592         * lra-int.h (hard_regs_spilled_into): Declare.
9593         * lra.c (hard_regs_spilled_into): Define.
9594         (init_reg_info): Init hard_regs_spilled_into.
9595         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
9596         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
9597         (process_bb_lives): Handle hard_regs_spilled_into.
9598         (lra_create_live_ranges_1): Before doing liveness propagation, clear
9599         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
9601 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
9603         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
9604         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
9605         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
9606         * config/rs6000/aix72.h: New file.
9608 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
9610         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
9611         instead of warning_at with conditional singular and plural messages
9612         where possible.
9614         PR target/52991
9615         * stor-layout.c (update_alignment_for_field): For
9616         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
9617         && !DECL_PACKED (field), do the alignment update, just use
9618         only desired_align instead of MAX (type_align, desired_align)
9619         as the alignment.
9620         (place_field): Don't do known_align < desired_align handling
9621         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
9622         is non-NULL, instead do it after rli->prev_field handling and
9623         only if not within a bitfield word.  For DECL_PACKED (field)
9624         use type_align of BITS_PER_UNIT.
9626 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
9628         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
9629         superfluous parentheses and trailing spaces.
9631 2018-02-28  Richard Biener  <rguenther@suse.de>
9633         PR tree-optimization/84584
9634         * graphite-scop-detection.c (scop_detection::add_scop): Discard
9635         SCoPs with fake exit edge.
9637 2018-02-28  Martin Liska  <mliska@suse.cz>
9639         PR testsuite/84597
9640         * timevar.c (timer::print): Fix format to properly print 100%
9641         values.
9643 2018-02-28  Richard Biener  <rguenther@suse.de>
9645         PR middle-end/84607
9646         * genmatch.c (capture_info::walk_match): Do not mark
9647         captured expressions without operands as expr_p given
9648         they act more like predicates and should be subject to
9649         "lost tail" side-effect preserving.
9651 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
9653         PR rtl-optimization/81611
9654         * auto-inc-dec.c (attempt_change): Move dead note from
9655         mem_insn if it's the next use of regno
9656         (find_address): Take address use of reg holding
9657         non-incremented value.  Add parm to limit search to the named
9658         reg only.
9659         (merge_in_block): Attempt to use a mem insn that is the next
9660         use of the original regno.
9662 2018-02-27  Martin Sebor  <msebor@redhat.com>
9664         PR c++/83871
9665         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
9666         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
9668 2018-02-27  Martin Sebor  <msebor@redhat.com>
9670         PR translation/84207
9671         * diagnostic-core.h (warning_n, error_n, inform_n): Change
9672         n argument to unsigned HOST_WIDE_INT.
9673         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
9674         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
9675         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
9676         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
9678 2018-02-27  Richard Biener  <rguenther@suse.de>
9680         PR tree-optimization/84512
9681         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
9682         Do not use the estimate returned from record_stmt_cost for
9683         the scalar iteration cost but sum properly using add_stmt_cost.
9685 2018-02-27  Richard Biener  <rguenther@suse.de>
9687         PR tree-optimization/84466
9688         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
9689         Adjust last change to less strictly validate use operands.
9691 2018-02-27  Martin Liska  <mliska@suse.cz>
9693         PR gcov-profile/84548
9694         * gcov.c (process_file): Allow partial overlap and consider it
9695         also as group functions.
9696         (output_lines): Properly calculate range of lines for a group.
9698 2018-02-27  Martin Liska  <mliska@suse.cz>
9700         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
9701         'ggc' suffixes.  Change first column width.
9702         (timer::print): Fix formatting of the column.
9704 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
9706         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
9707         preserve inline entry blocks for the sake of debug inline
9708         entry point markers alone.
9709         (remove_unused_locals): Suggest in comments a better place to
9710         force the preservation of inline entry blocks that are
9711         otherwise unused, but do not preserve them.
9713 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
9715         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
9717 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
9719         PR target/84039
9720         * config/i386/constraints.md (Bs): Replace
9721         ix86_indirect_branch_register with
9722         TARGET_INDIRECT_BRANCH_REGISTER.
9723         (Bw): Likewise.
9724         * config/i386/i386.md (indirect_jump): Likewise.
9725         (tablejump): Likewise.
9726         (*sibcall_memory): Likewise.
9727         (*sibcall_value_memory): Likewise.
9728         Peepholes of indirect call and jump via memory: Likewise.
9729         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
9730         (*sibcall_value_GOT_32): Likewise.
9731         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9732         (GOT_memory_operand): Likewise.
9733         (call_insn_operand): Likewise.
9734         (sibcall_insn_operand): Likewise.
9735         (GOT32_symbol_operand): Likewise.
9736         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
9738 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
9740         PR rtl-optimization/83496
9741         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
9742         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
9743         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
9744         redundant insn, if any.
9745         (relax_delay_slots): Likewise.
9746         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
9748 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
9750         PR tree-optimization/83965
9751         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
9752         that grouped statements are part of a reduction chain.  Return
9753         true if the statement is not marked as a reduction itself but
9754         is part of a group.
9755         (vect_recog_dot_prod_pattern): Don't check whether the statement
9756         is part of a group here.
9757         (vect_recog_sad_pattern): Likewise.
9758         (vect_recog_widen_sum_pattern): Likewise.
9760 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
9762         PR debug/84545
9763         * final.c (rest_of_clean_state): Also look for calls inside sequences.
9765 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
9767         PR target/84530
9768         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
9769         the bool argument.
9770         (ix86_output_indirect_function_return): New prototype.
9771         (ix86_split_simple_return_pop_internal): Likewise.
9772         * config/i386/i386.c (indirect_return_via_cx): New.
9773         (indirect_return_via_cx_bnd): Likewise.
9774         (indirect_thunk_name): Handle return va CX_REG.
9775         (output_indirect_thunk_function): Create alias for
9776         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
9777         (ix86_output_indirect_jmp): Remove the bool argument.
9778         (ix86_output_indirect_function_return): New function.
9779         (ix86_split_simple_return_pop_internal): Likewise.
9780         * config/i386/i386.md (*indirect_jump): Don't pass false
9781         to ix86_output_indirect_jmp.
9782         (*tablejump_1): Likewise.
9783         (simple_return_pop_internal): Change it to define_insn_and_split.
9784         Call ix86_split_simple_return_pop_internal to split it for
9785         -mfunction-return=.
9786         (simple_return_indirect_internal): Call
9787         ix86_output_indirect_function_return instead of
9788         ix86_output_indirect_jmp.
9790 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
9792         PR bootstrap/84405
9793         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
9794         memset and value initialization afterwards.
9796 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
9798         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
9800 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9802         PR target/84521
9803         * common/config/aarch64/aarch64-common.c
9804         (aarch_option_optimization_table[]): Switch
9805         off fomit-frame-pointer
9807 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
9808             Chung-Ju Wu  <jasonwucj@gmail.com>
9810         * config/nds32/nds32-multiple.md (load_multiple): Disallow
9811         volatile memory.
9812         (store_multiple): Ditto.
9814 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
9816         * config.gcc: Add --with-cpu support for nds32 target.
9817         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
9818         * config/nds32/nds32.opt: Add -mcpu= option.
9820 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
9822         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
9823         isel=yes): Warn for these deprecated options.
9825 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
9827         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
9828         ISA_2_5_MASKS_EMBEDDED.
9830 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
9832         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
9833         p->max as pointers rather than using iterative_hash_expr.
9835 2018-02-23  Carl Love  <cel@us.ibm.com>
9837         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
9838         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
9839         BU_P8V_OVERLOAD_2.
9840         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
9841         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
9842         P8V_BUILTIN_VEC_VUNSIGNED2.
9844 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
9846         PR target/81572
9847         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
9848         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
9849         LRA_UNKNOWN_ALT.
9850         * lra-constraints.c (curr_insn_transform): Set up
9851         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
9852         LRA_UNKNOWN_ALT.
9853         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
9854         * lra-eliminations.c (spill_pseudos): Ditto.
9855         (process_insn_for_elimination): Ditto.
9856         * lra-lives.c (reg_early_clobber_p): Use the new macros.
9857         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
9858         LRA_NON_CLOBBERED_ALT.
9860 2018-02-22  Martin Sebor  <msebor@redhat.com>
9862         PR tree-optimization/84480
9863         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
9864         to maybe_diag_stxncpy_trunc.  Call it.
9865         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
9866         from gimple_fold_builtin_strcpy.  Print inlining stack.
9867         (handle_builtin_stxncpy): Print inlining stack.
9868         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
9870 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
9872         PR target/84176
9873         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
9874         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
9875         and -fcheck-pointer-bounds are used together.
9876         (indirect_thunk_prefix): New enum.
9877         (indirect_thunk_need_prefix): New function.
9878         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
9879         "_nt" instead of "_bnd" for NOTRACK prefix.
9880         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
9881         (output_indirect_thunk_function): Likewise.
9882         (): Likewise.
9883         (ix86_code_end): Update output_indirect_thunk_function calls.
9884         (ix86_output_indirect_branch_via_reg): Replace
9885         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
9886         (ix86_output_indirect_branch_via_push): Likewise.
9887         (ix86_output_function_return): Likewise.
9888         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
9889         incompatible with -fcf-protection=branch and
9890         -fcheck-pointer-bounds.
9892 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
9894         PR target/83335
9895         * config/aarch64/aarch64.c (aarch64_print_address_internal):
9896         Change gcc_assert call to output_operand_lossage.
9898 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
9900         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
9902 2018-02-22  DJ Delorie  <dj@redhat.com>
9903             Sebastian Perta  <sebastian.perta@renesas.com>
9904             Oleg Endo  <olegendo@gcc.gnu.org>
9906         * config/rx/rx.c (rx_rtx_costs): New function.
9907         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
9909 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9911         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
9913 2018-02-22  Martin Liska  <mliska@suse.cz>
9915         PR driver/83193
9916         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
9917         Add "native" as a possible value.
9919 2018-02-22  Martin Liska  <mliska@suse.cz>
9921         PR driver/83193
9922         * config/i386/i386.c (ix86_option_override_internal):
9923         Add "native" as a possible value for -march and -mtune.
9925 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
9927         PR target/84502
9928         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
9929         to all type variants.
9931         PR tree-optimization/84503
9932         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
9933         width as info->bitpos + info->bitsize - start.
9934         (merged_store_group::merge_overlapping): Simplify width computation.
9935         (check_no_overlap): New function.
9936         (imm_store_chain_info::try_coalesce_bswap): Compute expected
9937         start + width and last_order of the group, fail if check_no_overlap
9938         fails.
9939         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
9940         to group if check_no_overlap fails.
9942 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
9944         * config/rs6000/altivec.md: Delete contraint arguments to
9945         define_expand, define_split, and define_peephole2, and in
9946         define_insn_and_split if always unused.
9947         * config/rs6000/darwin.md: Ditto.
9948         * config/rs6000/dfp.md: Ditto.
9949         * config/rs6000/rs6000.md: Ditto.
9950         * config/rs6000/sync.md: Ditto.
9951         * config/rs6000/vector.md: Ditto.
9952         * config/rs6000/vsx.md: Ditto.
9954 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
9956         * config/rs6000/altivec.md: Write output control strings as braced
9957         blocks instead of double-quoted strings.
9958         * config/rs6000/darwin.md: Ditto.
9959         * config/rs6000/rs6000.md: Ditto.
9960         * config/rs6000/vector.md: Ditto.
9961         * config/rs6000/vsx.md: Ditto.
9963 2018-02-21  Jason Merrill  <jason@redhat.com>
9965         PR c++/84314 - ICE with templates and fastcall attribute.
9966         * attribs.c (build_type_attribute_qual_variant): Remove assert.
9968 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
9970         * ipa-cp.c (determine_versionability): Fix comment typos.
9972 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
9974         PR c/84229
9975         * ipa-cp.c (determine_versionability): Do not version functions caling
9976         va_arg_pack.
9978 2018-02-21  Martin Liska  <mliska@suse.cz>
9980         PR driver/83193
9981         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
9982         Add "native" as a possible value.
9983         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
9984         the macro when native cpu detection is available.
9986 2018-02-21  Martin Liska  <mliska@suse.cz>
9988         PR driver/83193
9989         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
9990         Add "native" as a possible value.
9991         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
9992         when native cpu detection is available.
9994 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
9995             Martin Sebor  <msebor@redhat.com>
9997         PR tree-optimization/84478
9998         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
9999         false.
10000         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10001         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10002         support which is conservatively correct, for 2 only stay conservative
10003         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10004         argument to the 2 argument get_range_strlen, adjust 6 arg
10005         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10006         false.
10007         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10008         (gimple_fold_builtin_strlen): Pass true as last argument to
10009         get_range_strlen.
10011 2018-02-20  Martin Sebor  <msebor@redhat.com>
10013         PR middle-end/84095
10014         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10015         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10016         (builtin_memref::builtin_memref): Factor out parts into
10017         set_base_and_offset and call it.
10019 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10021         PR middle-end/84406
10022         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10023         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10024         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10025         search at the associated MODE_INT.
10027 2018-02-20  Jeff Law  <law@redhat.com>
10029         PR middle-end/82123
10030         PR tree-optimization/81592
10031         PR middle-end/79257
10032         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10033         for range data rather than using global data.
10034         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10035         range data rather than using global data.
10036         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10037         pass it to children as needed.
10038         (struct directive::fmtresult): Similarly.
10039         (struct directive::set_width): Similarly.
10040         (struct directive::set_precision): Similarly.
10041         (format_integer, format_directive, parse_directive): Similarly.
10042         (format_none): Accept unnamed vr_values parameter.
10043         (format_percent, format_floating, format_character): Similarly.
10044         (format_string, format_plain): Similarly.
10045         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10046         the EVRP range analyzer for range data rather than using global data.
10047         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10048         gimple-ssa-evrp-analyze.h
10049         (class sprintf_dom_walker): Add after_dom_children member function.
10050         Add evrp_range_analyzer member.
10051         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10052         range analyzer as needed.
10053         (sprintf_dom_walker::after_dom_children): New member function.
10054         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10055         if not optimizing.
10056         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10057         (evrp_range_analyzer::pop_to_marker): Likewise.
10059 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10061         PR tree-optimization/84419
10062         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10063         with the required type if its current type is compatible but
10064         different.
10066 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10068         PR middle-end/82004
10069         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10070         after vectorization.
10072 2018-02-20  Martin Liska  <mliska@suse.cz>
10074         PR driver/83193
10075         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10076         possible values if we don't have a hint.
10078 2018-02-20  Martin Liska  <mliska@suse.cz>
10080         PR c/84310
10081         PR target/79747
10082         * final.c (shorten_branches): Build align_tab array with one
10083         more element.
10084         * opts.c (finish_options): Add alignment option limit check.
10085         (MAX_CODE_ALIGN): Likewise.
10086         (MAX_CODE_ALIGN_VALUE): Likewise.
10087         * doc/invoke.texi: Document maximum allowed option value for
10088         all -falign-* options.
10090 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10092         PR target/84146
10093         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10094         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10095         * var-tracking.c (emit_note_insn_var_location): Remove all references
10096         to NOTE_INSN_CALL_ARG_LOCATION.
10097         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10098         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10099         Use copy_rtx_if_shared.
10100         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10101         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10102         (dwarf2out_var_location): Remove handling of
10103         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10104         on call_insn.
10105         * final.c (final_scan_insn): Remove all references to
10106         NOTE_INSN_CALL_ARG_LOCATION.
10107         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10108         before dumping final insns.
10109         * except.c (emit_note_eh_region_end): Remove all references to
10110         NOTE_INSN_CALL_ARG_LOCATION.
10111         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10112         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10113         * config/arc/arc.c (hwloop_optimize): Likewise.
10114         * config/arm/arm.c (create_fix_barrier): Likewise.
10115         * config/s390/s390.c (s390_chunkify_start): Likewise.
10116         * config/sh/sh.c (find_barrier): Likewise.
10117         * config/i386/i386.c (rest_of_insert_endbranch,
10118         ix86_seh_fixup_eh_fallthru): Likewise.
10119         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10120         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10121         * config/frv/frv.c (frv_function_prologue): Likewise.
10122         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10123         reg note.
10124         (note_outside_basic_block_p): Remove all references to
10125         NOTE_INSN_CALL_ARG_LOCATION.
10126         * gengtype.c (adjust_field_rtx_def): Likewise.
10127         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10128         Likewise.
10129         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10130         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10132         PR c++/84444
10133         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10134         is ADDR_EXPR.
10136         PR tree-optimization/84452
10137         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10138         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10139         is NULL.
10141 2018-02-19  Martin Liska  <mliska@suse.cz>
10143         PR sanitizer/82183
10144         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10146 2018-02-19  Martin Liska  <mliska@suse.cz>
10147             Richard Sandiford  <richard.sandiford@linaro.org>
10149         PR tree-optimization/82491
10150         * gimple-fold.c (get_base_constructor): Make earlier bail out
10151         to prevent ubsan.
10153 2018-02-19  Carl Love  <cel@us.ibm.com>
10155         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10156         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10157         BU_P8V_OVERLOAD_1.
10158         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10159         P8V_BUILTIN_VEC_NEG.
10161 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
10163         * config/rl78/rl78.md (movdf): New define expand.
10165 2018-02-19  Martin Liska  <mliska@suse.cz>
10167         PR other/80589
10168         * doc/invoke.texi: Fix typo.
10169         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10171 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
10173         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10174         handle rs6000_single_float and rs6000_double_float specially for
10175         e500 family CPUs.
10177 2018-02-16  Jeff Law  <law@redhat.com>
10179         * config/rx/rx.c (add_pop_cfi_notes): New function.;
10180         (pop_regs): Use it.
10182 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10184         PR ipa/84425
10185         * ipa-inline.c (inline_small_functions): Fix a typo.
10187 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10189         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10191 2018-02-16  Carl Love  <cel@us.ibm.com>
10193         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10194         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10195         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10196         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10197         expansion to P8V_BUILTIN_VEC_FLOAT2.
10199 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
10201         PR rtl-optimization/70023
10202         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
10203         src_regno into account.
10205 2018-02-16  Carl Love  <cel@us.ibm.com>
10207         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10208         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10209         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10210         * config/rs6000/rs6000.c: Remove case statements for
10211         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10212         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10213         and P9V_BUILTIN_VEC_VINSERT4B.
10214         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10215         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10216         * config/rs6000/vsx.md:
10217         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10218         vec_insert4b.
10220 2018-02-16  Carl Love  <cel@us.ibm.com>
10222         * config/rs6000/altivec.h: Add builtin names vec_extract4b
10223         vec_insert4b.
10224         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10225         definitions.
10226         * config/rs6000/rs6000-c.c: Add the definitions for
10227         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10228         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10229         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10230         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
10231         definition for insert4b and define insn *insert3b_internal.
10232         * doc/extend.texi: Add documentation for vec_extract4b.
10234 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10236         * doc/extend.texi (Backwards Compatibility): Mention friend
10237         injection.  Note for-scope is deprecated.
10238         * doc/invoke.texi (-ffriend-injection): Deprecate.
10240 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
10242         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10243         that moved to I2, also allow destinations that are a paradoxical
10244         subreg (instead of a normal reg).
10246 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
10248         PR target/83831
10249         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10250         to QImode.
10252 2018-02-16  Richard Biener  <rguenther@suse.de>
10254         PR tree-optimization/84037
10255         PR tree-optimization/84016
10256         PR target/82862
10257         * config/i386/i386.c (ix86_builtin_vectorization_cost):
10258         Adjust vec_construct for the fact we need additional higher latency
10259         128bit inserts for AVX256 and AVX512 vector builds.
10260         (ix86_add_stmt_cost): Scale vector construction cost for
10261         elementwise loads.
10263 2018-02-16  Richard Biener  <rguenther@suse.de>
10265         PR tree-optimization/84417
10266         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10267         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10268         (non_rewritable_lvalue_p): Likewise, use poly-ints.
10270 2018-02-16  Martin Liska  <mliska@suse.cz>
10272         PR sanitizer/84307
10273         * internal-fn.def (ASAN_CHECK): Set proper flags.
10274         (ASAN_MARK): Likewise.
10276 2018-02-16  Julia Koval  <julia.koval@intel.com>
10278         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10279         from PTA_CANNONLAKE.
10281 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10283         PR target/84272
10284         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10285         Use ++iter rather than iter++ for std::list iterators.
10286         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
10287         defer deleting them until all nodes in the forest are processed.  Do
10288         free even leaf nodes.  Change to_process into auto_vec.
10290         PR bootstrap/84405
10291         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10292         * vec.h (vec_default_construct): Use memset instead of placement new
10293         if BROKEN_VALUE_INITIALIZATION is defined.
10294         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10295         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10296         is defined.
10298         PR rtl-optimization/83723
10299         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10300         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
10301         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
10302         recursive calls.
10303         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10304         callers.
10305         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10307 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
10309         PR rtl-optimization/81443
10310         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10311         from inner REGs to paradoxical SUBREGs.
10313 2018-02-16  Richard Biener  <rguenther@suse.de>
10315         PR tree-optimization/84399
10316         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10317         For operands we can analyze at their definition make sure we can
10318         analyze them at each use as well.
10320 2018-02-16  Richard Biener  <rguenther@suse.de>
10322         PR tree-optimization/84190
10323         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10324         volatile accesses if the decl isn't volatile.
10326 2018-02-15  Jason Merrill  <jason@redhat.com>
10328         PR c++/84314 - ICE with templates and fastcall attribute.
10329         * attribs.c (build_type_attribute_qual_variant): Don't clobber
10330         TYPE_CANONICAL on an existing type.
10332 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
10334         PR tree-optimization/84383
10335         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10336         dstoff nor call operand_equal_p if dstbase is NULL.
10338         PR tree-optimization/84334
10339         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10340         also a CONSTANT_CLASS_P, punt.
10342 2018-02-14  Jim Wilson  <jimw@sifive.com>
10344         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10345         first SMALL_OPERAND check.  New local min_second_step.  Move assert
10346         to where locals are set.  Add TARGET_RVC support.
10347         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10349 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
10351         * doc/invoke.texi: Correct -Wformat-overflow code sample.
10353 2018-02-14  Martin Sebor  <msebor@redhat.com>
10355         PR tree-optimization/83698
10356         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10357         arrays constrain the offset range to their bounds.
10358         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10359         (builtin_access::overlap): Avoid setting the size of overlap if it's
10360         already been set.
10361         (maybe_diag_overlap): Also consider arrays when deciding what values
10362         of offsets to include in diagnostics.
10364 2018-02-14  Martin Sebor  <msebor@redhat.com>
10366         PR c/84108
10367         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10368         that correspond to the kind of a declaration.
10370 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
10372         PR target/83984
10373         * config/pa/pa.md: Load address of PIC label using the linkage table
10374         if the label is nonlocal.
10376 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10378         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10379         warning message if user requests -maltivec=be.
10380         * doc/invoke.texi: Document deprecation of -maltivec=be.
10382 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
10384         PR target/84220
10385         * config/rs6000/rs6000-c.c: Update definitions for
10386         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10387         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10389 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10391         PR target/84239
10392         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10393         add _get_ssp intrinsics. Remove argument from
10394         __builtin_ia32_rdssp[d|q].
10395         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10396         * config/i386/i386-builtin.def: Remove argument from
10397         __builtin_ia32_rdssp[d|q].
10398         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10399         ix86_expand_special_args_builtin for _rdssp[d|q].
10400         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10401         Clear register before usage.
10402         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10403         Add documentation for new _get_ssp and _inc_ssp intrinsics.
10405 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
10407         PR tree-optimization/84357
10408         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10409         operand 1 of an ARRAY_REF too.
10411 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
10413         PR target/83831
10414         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10415         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10416         declarations.
10417         (set_of_reg): New struct.
10418         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10419         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10420         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10421         functions.
10422         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10423         Split into bitclr, bitset, bitinvert patterns if appropriate.
10424         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10425         use rx_fuse_in_memory_bitop.
10426         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10427         to named insn, correct maximum insn length.
10429 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
10431         PR target/79242
10432         * machmode.def: Define a complex mode for PARTIAL_INT.
10433         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10434         MODE_PARTIAL_INT.
10435         * doc/rtl.texi: Document CSPImode.
10436         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10437         handling.
10438         (msp430_hard_regno_nregs_with_padding): Likewise.
10440 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
10442         PR target/84279
10443         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10445 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
10447         PR rtl-optimization/84169
10448         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
10449         we generated a parallel as new i3 and we split that to new i2 and i3
10450         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
10451         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
10452         those to i2, not i1.  Partially rewrite this scan code.
10454 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10456         PR c/82210
10457         * stor-layout.c (place_field): For variable length fields, adjust
10458         offset_align afterwards not just based on the field's alignment,
10459         but also on the size.
10461         PR middle-end/84309
10462         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10463         of exps and logs in the use_exp2 case.
10465 2018-02-13  Jeff Law  <law@redhat.com>
10467         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10468         entry for "vector".
10470         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10471         ARGS as unused.
10473 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
10475         PR debug/84342
10476         PR debug/84319
10477         * common.opt (gas-loc-support, gas-locview-support): New.
10478         (ginline-points, ginternal-reset-location-views): New.
10479         * doc/invoke.texi: Document them.  Use @itemx where intended.
10480         (gvariable-location-views): Adjust.
10481         * target.def (reset_location_view): New.
10482         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10483         (TARGET_RESET_LOCATION_VIEW): New.
10484         * doc/tm.texi: Rebuilt.
10485         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10486         (dwarf2out_default_as_locview_support): New.
10487         (output_asm_line_debug_info): Use option variables.
10488         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10489         (output_loc_list): Likewise.
10490         (add_high_low_attributes): Check option variables.
10491         Don't output entry view attribute in strict mode.
10492         (gen_inlined_subroutine_die): Check option variables.
10493         (dwarf2out_inline_entry): Likewise.
10494         (init_sections_and_labels): Likewise.
10495         (dwarf2out_early_finish): Likewise.
10496         (maybe_reset_location_view): New, from...
10497         (dwarf2out_var_location): ... here.  Call it.
10498         * debug.h (dwarf2out_default_as_loc_support): Declare.
10499         (dwarf2out_default_as_locview_support): Declare.
10500         * hooks.c (hook_int_rtx_insn_0): New.
10501         * hooks.h (hook_int_rtx_insn_0): Declare.
10502         * toplev.c (process_options): Take -gas-loc-support and
10503         -gas-locview-support from dwarf2out.  Enable
10504         -gvariable-location-views by default only with locview
10505         assembler support.  Enable -ginternal-reset-location-views by
10506         default only if the target defines the corresponding hook.
10507         Enable -ginline-points by default if location views are
10508         enabled; force it disabled if statement frontiers are
10509         disabled.
10510         * tree-inline.c (expand_call_inline): Check option variables.
10511         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10513 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
10515         PR tree-optimization/84321
10516         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10517         handling.  Also check whether the anti-range contains any values
10518         that satisfy the mask; switch to a VR_RANGE if not.
10520 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
10522         PR sanitizer/84340
10523         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10525 2018-02-13  Martin Jambor  <mjambor@suse.cz>
10527         PR c++/83990
10528         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10529         of call statements, also set location of a load to a temporary.
10531 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
10533         * config/rl78/rl78.c (add_vector_labels): New function.
10534         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10535         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10536         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10537         which checks that no arguments are passed.
10538         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10539         * doc/extend.texi: Documentation for the new attribute.
10541 2018-02-13  Andreas Schwab  <schwab@suse.de>
10543         * config/riscv/linux.h (CPP_SPEC): Define.
10545 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10547         PR target/84335
10548         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10549         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10550         OPTION_MASK_ISA_AES as first argument to def_builtin_const
10551         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10552         instead of OPTION_MASK_ISA_PCLMUL as first argument to
10553         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10554         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10555         temporarily for AES and PCLMUL builtins.
10557         PR tree-optimization/84339
10558         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10559         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10560         Formatting fixes.
10562         PR middle-end/84309
10563         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10564         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10565         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10566         inline function.
10567         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10568         inline function.
10569         * omp-simd-clone.h: New file.
10570         * omp-simd-clone.c: Include omp-simd-clone.h.
10571         (expand_simd_clones): No longer static.
10572         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10573         cgraph.h and omp-simd-clone.h.
10574         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10575         (vect_recog_widen_shift_pattern): Formatting fix.
10576         (vect_pattern_recog_1): Don't check optab for calls.
10578         PR target/84336
10579         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10580         operands[2] into a REG before using gen_lowpart on it.
10582 2018-02-12  Jeff Law  <law@redhat.com>
10584         PR target/83760
10585         * config/sh/sh.c (find_barrier): Consider a sibling call
10586         a barrier as well.
10588         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10589         successfully back substituting a reg.
10591 2018-02-12  Richard Biener  <rguenther@suse.de>
10593         PR tree-optimization/84037
10594         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
10595         parameter, move visited init to caller.
10596         (vect_slp_analyze_operations): Separate cost from validity
10597         check, initialize visited once for all instances.
10598         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
10599         for all instances.
10600         * tree-vect-stmts.c (vect_model_simple_cost): Make early
10601         out an assert.
10602         (vect_model_promotion_demotion_cost): Likewise.
10603         (vectorizable_bswap): Guard cost modeling with !slp_node
10604         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
10605         SLP stmts.
10606         (vectorizable_call): Likewise.
10607         (vectorizable_conversion): Likewise.
10608         (vectorizable_assignment): Likewise.
10609         (vectorizable_shift): Likewise.
10610         (vectorizable_operation): Likewise.
10611         (vectorizable_store): Likewise.
10612         (vectorizable_load): Likewise.
10613         (vectorizable_condition): Likewise.
10614         (vectorizable_comparison): Likewise.
10616 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
10618         PR sanitizer/84307
10619         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
10620         (ASAN_MARK): Fix fnspec to account for return value, change pointer
10621         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
10623 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
10625         PR middle-end/83665
10626         * params.def (inline-min-speedup): Increase from 8 to 15.
10627         (max-inline-insns-auto): Decrease from 40 to 30.
10628         * ipa-split.c (consider_split): Add some buffer for function to
10629         be considered inlining candidate.
10630         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
10631         default values.
10633 2018-02-12  Richard Biener  <rguenther@suse.de>
10635         PR tree-optimization/84037
10636         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
10637         matched stmts if we cannot swap the non-matched ones.
10639 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10641         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
10642         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
10643         _mm_maskz_scalef_round_ss): New intrinsics.
10644         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
10645         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
10646         __builtin_ia32_scalefss_round): Remove.
10647         (__builtin_ia32_scalefsd_mask_round,
10648         __builtin_ia32_scalefss_mask_round): New intrinsics.
10649         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
10650         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
10651         ((match_operand:VF_128 2 "<round_nimm_predicate>"
10652         "<round_constraint>")): Changed to ...
10653         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
10654         "<round_scalar_constraint>")): ... this.
10655         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
10656         %0, %1, %2<round_op3>}"): Changed to ...
10657         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
10658         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
10659         %2<round_scalar_mask_op3>}"): ... this.
10660         * config/i386/subst.md (round_scalar_nimm_predicate): New.
10662 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10664         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
10665         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
10666         (_mm_maskz_sqrt_round_ss): New intrinsics.
10667         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
10668         (__builtin_ia32_sqrtsd_mask_round)
10669         (__builtin_ia32_sqrtss_mask_round): New builtins.
10670         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
10671         (__builtin_ia32_sqrtss_round): Remove.
10672         (__builtin_ia32_sqrtsd_mask_round)
10673         (__builtin_ia32_sqrtss_mask_round): New builtins.
10674         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
10675         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
10676         ((match_operand:VF_128 1 "vector_operand"
10677         "xBm,<round_constraint>")): Changed to ...
10678         ((match_operand:VF_128 1 "vector_operand"
10679         "xBm,<round_scalar_constraint>")): ... this.
10680         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
10681         %0, %2, %<iptr>1<round_op3>}): Changed to ...
10682         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
10683         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
10684         %<iptr>1<round_scalar_mask_op3>}): ... this.
10685         ((set_attr "prefix" "<round_prefix>")): Changed to ...
10686         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
10688 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
10690         PR target/84266
10691         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
10692         Cast vec_cmpeq result to correct type.
10693         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
10694         Cast vec_cmpgt result to correct type.
10696 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
10698         * final.c (final_scan_insn_1): Renamed from...
10699         (final_scan_insn): ... this.  New wrapper, to recover
10700         seen from the outermost call in recursive ones.
10701         * config/sparc/sparc.c (output_return): Drop seen from call.
10702         (output_sibcall): Likewise.
10703         * config/visium/visium.c (output_branch): Likewise.
10705 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
10707         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
10708         function label.
10710 2018-02-10  Alan Modra  <amodra@gmail.com>
10712         PR target/84300
10713         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
10714         Specify LR as an input.
10716 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
10718         PR sanitizer/83987
10719         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
10720         remove_member_access_dummy_vars): New functions.
10721         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
10722         lower_omp_1, execute_lower_omp): Use them.
10724         PR rtl-optimization/84308
10725         * shrink-wrap.c (spread_components): Release todo vector.
10727 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
10729         PR rtl-optimization/57193
10730         * ira-color.c (struct allocno_color_data): Add member
10731         conflict_allocno_hard_prefs.
10732         (update_conflict_allocno_hard_prefs): New.
10733         (bucket_allocno_compare_func): Add a preference based on
10734         conflict_allocno_hard_prefs.
10735         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
10736         (color_allocnos): Remove a dead code.  Initiate
10737         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
10739 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
10741         PR target/84226
10742         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
10743         constraint from =wa to wa.  Avoid a subreg on the output operand,
10744         instead use a pseudo and subreg it in a move.
10745         (p9_xxbrd_<mode>): Changed to ...
10746         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
10747         (p9_xxbrd_v2df): New expander.
10748         (p9_xxbrw_<mode>): Changed to ...
10749         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
10750         (p9_xxbrw_v4sf): New expander.
10752 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
10754         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
10756 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
10758         PR target/83926
10759         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
10760         multiply in 32-bit mode.
10761         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
10762         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
10763         mode.
10765 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
10767         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
10768         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
10769         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
10770         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
10772 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
10774         PR lto/84213
10775         * dwarf2out.c (is_trivial_indirect_ref): New function.
10776         (dwarf2out_late_global_decl): Do not generate a location
10777         attribute for variables that have a non-trivial DECL_VALUE_EXPR
10778         and that are not defined in the current unit.
10780 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
10782         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
10783         instead of a libcall for UNORDERED.
10785 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
10787         PR target/82641
10788         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
10789         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
10791 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10793         PR target/PR84295
10794         * config/s390/s390.c (s390_set_current_function): Invoke
10795         s390_indirect_branch_settings also if fndecl didn't change.
10797 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
10799         * config/rs6000/rs6000.md (blockage): Set length to zero.
10801 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
10803         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
10805 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
10807         PR sanitizer/84285
10808         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
10809         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
10810         -static-lib*san.
10812         PR debug/84252
10813         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
10814         PARALLEL incoming that failed vt_get_decl_and_offset check.
10816         PR middle-end/84237
10817         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
10818         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
10819         TREE_READONLY bit.
10820         (get_variable_section): For decls in named .bss* sections pass true as
10821         second argument to bss_initializer_p.
10823 2018-02-09  Marek Polacek  <polacek@redhat.com>
10824             Jakub Jelinek  <jakub@redhat.com>
10826         PR c++/83659
10827         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
10828         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
10829         Sync some changes from cxx_fold_indirect_ref.
10831 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
10833         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
10834         markers.
10835         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
10836         (BLOCK_INLINE_ENTRY_LABEL): New.
10837         (dwarf2out_var_location): Disregard inline entry markers.
10838         (inline_entry_data): New struct.
10839         (inline_entry_data_hasher): New hashtable type.
10840         (inline_entry_data_hasher::hash): New.
10841         (inline_entry_data_hasher::equal): New.
10842         (inline_entry_data_table): New variable.
10843         (add_high_low_attributes): Add DW_AT_entry_pc and
10844         DW_AT_GNU_entry_view attributes if a pending entry is found
10845         in inline_entry_data_table.  Add old entry_pc attribute only
10846         if debug nonbinding markers are disabled.
10847         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
10848         markers are enabled.
10849         (block_within_block_p, dwarf2out_inline_entry): New.
10850         (dwarf2out_finish): Check that no entries remained in
10851         inline_entry_data_table.
10852         * final.c (reemit_insn_block_notes): Handle inline entry notes.
10853         (final_scan_insn, notice_source_line): Likewise.
10854         (rest_of_clean_state): Skip inline entry markers.
10855         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
10856         markers.
10857         * gimple.c (gimple_build_debug_inline_entry): New.
10858         * gimple.h (enum gimple_debug_subcode): Add
10859         GIMPLE_DEBUG_INLINE_ENTRY.
10860         (gimple_build_debug_inline_entry): Declare.
10861         (gimple_debug_inline_entry_p): New.
10862         (gimple_debug_nonbind_marker_p): Adjust.
10863         * insn-notes.def (INLINE_ENTRY): New.
10864         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
10865         inline entry marker notes.
10866         (print_insn): Likewise.
10867         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
10868         (INSN_DEBUG_MARKER_KIND): Likewise.
10869         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
10870         * tree-inline.c (expand_call_inline): Build and insert
10871         debug_inline_entry stmt.
10872         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
10873         inline entry blocks early, if nonbind markers are enabled.
10874         (dump_scope_block): Dump fragment info.
10875         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
10876         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
10877         (gimple_build_debug_inline_entry): New.
10878         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
10879         Enable/disable inline entry points too.
10880         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
10881         (DEBUG_INSN): Describe inline entry markers.
10883         * common.opt (gvariable-location-views): New.
10884         (gvariable-location-views=incompat5): New.
10885         * config.in: Rebuilt.
10886         * configure: Rebuilt.
10887         * configure.ac: Test assembler for view support.
10888         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
10889         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
10890         * dwarf2out.c (var_loc_view): New typedef.
10891         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
10892         (dwarf2out_locviews_in_attribute): New.
10893         (dwarf2out_locviews_in_loclist): New.
10894         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
10895         (enum dw_line_info_opcode): Add LI_adv_address.
10896         (struct dw_line_info_table): Add view.
10897         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
10898         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
10899         (zero_view_p): New variable.
10900         (ZERO_VIEW_P): New macro.
10901         (output_asm_line_debug_info): New.
10902         (struct var_loc_node): Add view.
10903         (add_AT_view_list, AT_loc_list): New.
10904         (add_var_loc_to_decl): Add view param.  Test it against last.
10905         (new_loc_list): Add view params.  Record them.
10906         (AT_loc_list_ptr): Handle loc and view lists.
10907         (view_list_to_loc_list_val_node): New.
10908         (print_dw_val): Handle dw_val_class_view_list.
10909         (size_of_die): Likewise.
10910         (value_format): Likewise.
10911         (loc_list_has_views): New.
10912         (gen_llsym): Set vl_symbol too.
10913         (maybe_gen_llsym, skip_loc_list_entry): New.
10914         (dwarf2out_maybe_output_loclist_view_pair): New.
10915         (output_loc_list): Output view list or entries too.
10916         (output_view_list_offset): New.
10917         (output_die): Handle dw_val_class_view_list.
10918         (output_dwarf_version): New.
10919         (output_compilation_unit_header): Use it.
10920         (output_skeleton_debug_sections): Likewise.
10921         (output_rnglists, output_line_info): Likewise.
10922         (output_pubnames, output_aranges): Update version comments.
10923         (output_one_line_info_table): Output view numbers in asm comments.
10924         (dw_loc_list): Determine current endview, pass it to new_loc_list.
10925         Call maybe_gen_llsym.
10926         (loc_list_from_tree_1): Adjust.
10927         (add_AT_location_description): Create view list attribute if
10928         needed, check it's absent otherwise.
10929         (convert_cfa_to_fb_loc_list): Adjust.
10930         (maybe_emit_file): Call output_asm_line_debug_info for test.
10931         (dwarf2out_var_location): Reset views as needed.  Precompute
10932         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
10933         attribute.  Set view.
10934         (new_line_info_table): Reset next view.
10935         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
10936         (dwarf2out_source_line): Likewise.  Output view resets and labels to
10937         the assembler, or select appropriate line info opcodes.
10938         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
10939         (optimize_string_length): Catch it.  Adjust.
10940         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
10941         dw_val_class_view_list, and remove it if no longer needed.
10942         (hash_loc_list): Hash view numbers.
10943         (loc_list_hasher::equal): Compare them.
10944         (optimize_location_lists): Check whether a view list symbol is
10945         needed, and whether the locview attribute is present, and
10946         whether they match.  Remove the locview attribute if no longer
10947         needed.
10948         (index_location_lists): Call skip_loc_list_entry for test.
10949         (dwarf2out_finish): Call output_asm_line_debug_info for test.
10950         Use output_dwarf_version.
10951         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
10952         (struct dw_val_node): Add val_view_list.
10953         * final.c (SEEN_NEXT_VIEW): New.
10954         (set_next_view_needed): New.
10955         (clear_next_view_needed): New.
10956         (maybe_output_next_view): New.
10957         (final_start_function): Rename to...
10958         (final_start_function_1): ... this.  Take pointer to FIRST,
10959         add SEEN parameter.  Emit param bindings in the initial view.
10960         (final_start_function): Reintroduce SEEN-less interface.
10961         (final): Rename to...
10962         (final_1): ... this.  Take SEEN parameter.  Output final pending
10963         next view at the end.
10964         (final): Reintroduce seen-less interface.
10965         (final_scan_insn): Output pending next view before switching
10966         sections or ending a block.  Mark the next view as needed when
10967         outputting variable locations.  Notify debug backend of section
10968         changes, and of location view changes.
10969         (rest_of_handle_final): Adjust.
10970         * toplev.c (process_options): Autodetect value for debug variable
10971         location views option.  Warn on incompat5 without -gdwarf-5.
10972         * doc/invoke.texi (gvariable-location-views): New.
10973         (gvariable-location-views=incompat5): New.
10974         (gno-variable-location-views): New.
10976 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
10978         PR tree-optimization/84136
10979         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
10980         that the result of find_edge is non-NULL.
10982 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
10984         PR target/83008
10985         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
10986         storing integer register in SImode.  Fix cost of 256 and 512
10987         byte aligned SSE register store.
10989 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
10991         * config/i386/i386.c (ix86_multiplication_cost): Fix
10992         multiplication cost for TARGET_AVX512DQ.
10994 2018-02-08  Marek Polacek  <polacek@redhat.com>
10996         PR tree-optimization/84238
10997         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
10998         get_range_strlen.
11000 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11002         PR tree-optimization/84265
11003         * tree-vect-stmts.c (vectorizable_store): Don't treat
11004         VMAT_CONTIGUOUS accesses as grouped.
11005         (vectorizable_load): Likewise.
11007 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11009         PR tree-optimization/81635
11010         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11011         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11012         (test_round_for_mask): New functions.
11013         (wide_int_cc_tests): Call test_round_for_mask.
11014         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11015         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11016         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11017         range returned by get_range_info.
11019 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11021         PR ipa/81360
11022         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11023         * symtab.c: Include builtins.h
11024         (symtab_node::output_to_lto_symbol_table_p): Move here
11025         from lto-streamer-out.c:output_symbol_p.
11026         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11027         (output_symbol_p): Move all logic to symtab.c
11028         (produce_symtab): Update.
11030 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11032         * config/s390/s390-opts.h (enum indirect_branch): Define.
11033         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11034         (s390_indirect_branch_via_thunk)
11035         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11036         (enum s390_indirect_branch_type): Define.
11037         * config/s390/s390.c (struct s390_frame_layout, struct
11038         machine_function): Remove.
11039         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11040         (indirect_branch_table_label_no, indirect_branch_table_name):
11041         Define variables.
11042         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11043         (enum s390_indirect_branch_option): Define.
11044         (s390_return_addr_from_memory): New function.
11045         (s390_handle_string_attribute): New function.
11046         (s390_attribute_table): Add new attribute handler.
11047         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11048         (s390_indirect_branch_via_thunk): New function.
11049         (s390_indirect_branch_via_inline_thunk): New function.
11050         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11051         sibling call optimization for non z10 compiles.
11052         (s390_emit_call): Force indirect branch target to be a single
11053         register.  Add r1 clobber for non-z10 compiles.
11054         (s390_emit_epilogue): Emit return jump via return_use expander.
11055         (s390_reorg): Handle JUMP_INSNs as execute targets.
11056         (s390_option_override_internal): Perform validity checks for the
11057         new command line options.
11058         (s390_indirect_branch_attrvalue): New function.
11059         (s390_indirect_branch_settings): New function.
11060         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11061         (s390_output_indirect_thunk_function):  New function.
11062         (s390_code_end): Implement target hook.
11063         (s390_case_values_threshold): Implement target hook.
11064         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11065         macros.
11066         * config/s390/s390.h (struct s390_frame_layout)
11067         (struct machine_function): Move here from s390.c.
11068         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11069         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11070         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11071         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11072         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11073         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11074         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11075         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11076         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11077         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11078         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11079         (mnemonic attribute): Add values which aren't recognized
11080         automatically.
11081         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11082         pattern for branch conversion.  Fix mnemonic attribute.
11083         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11084         indirect branch via thunk if requested.
11085         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11086         ("*indirect_jump"): Disable for branch conversion using out of
11087         line thunks.
11088         ("indirect_jump_via_thunk<mode>_z10")
11089         ("indirect_jump_via_thunk<mode>")
11090         ("indirect_jump_via_inlinethunk<mode>_z10")
11091         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11092         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11093         ("casesi_jump_via_inlinethunk<mode>_z10")
11094         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11095         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11096         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11097         ("*indirect2_jump"): Disable for branch conversion.
11098         ("casesi_jump"): Turn into expander and expand patterns for branch
11099         conversion.
11100         ("return_use"): New expander.
11101         ("*return"): Emit return via thunk and rename it to ...
11102         ("*return<mode>"): ... this one.
11103         * config/s390/s390.opt: Add new options and and enum for the
11104         option values.
11106 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11108         * lra-constraints.c (match_reload): Unconditionally use
11109         gen_lowpart_SUBREG, rather than selecting between that
11110         and equivalent gen_rtx_SUBREG code.
11112 2018-02-08  Richard Biener  <rguenther@suse.de>
11114         PR tree-optimization/84233
11115         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11116         changed flag instead of boguously re-using phi_inserted.
11118 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11120         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11121         static local variables.
11123 2018-02-08  Richard Biener  <rguenther@suse.de>
11125         PR tree-optimization/84278
11126         * tree-vect-stmts.c (vectorizable_store): When looking for
11127         smaller vector types to perform grouped strided loads/stores
11128         make sure the mode is supported by the target.
11129         (vectorizable_load): Likewise.
11131 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11133         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11134         Increase LDP/STP opportunities by adding adjacent callee-saves.
11136 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11138         PR rtl-optimization/84068
11139         PR rtl-optimization/83459
11140         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11142 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11144         PR tree-optimization/84224
11145         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11146         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11147         non-zero arguments.
11149 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11151         PR target/84113
11152         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11153         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11154         count, remove one USE.
11156 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11158         * doc/install.texi (Configuration): Document the
11159         --with-long-double-format={ibm,ieee} PowerPC configuration
11160         options.
11162         PR target/84154
11163         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11164         Convert from define_expand to be define_insn_and_split.  Rework
11165         float/double/_Float128 conversions to QI/HI/SImode to work with
11166         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
11167         conversions to QI/HImode types did a store and then a load to
11168         truncate the value.  For conversions to VSX registers, don't split
11169         the insn, instead emit the code directly.  Use the code iterator
11170         any_fix to combine signed and unsigned conversions.
11171         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11172         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11173         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11174         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11175         (fix_<mode>di2_hw): Likewise.
11176         (fixuns_<mode>di2_hw): Likewise.
11177         (fix_<mode>si2_hw): Likewise.
11178         (fixuns_<mode>si2_hw): Likewise.
11179         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11180         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11181         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11182         fix<uns>_trunc<SFDF:mode>si2_p8.
11183         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11184         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11185         (fix<uns>_<mode>_mem): Likewise.
11186         (fctiw<u>z_<mode>_mem): Likewise.
11187         (fix<uns>_<mode>_mem): Likewise.
11188         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11189         the register allocator from doing a direct move to the GPRs to do
11190         a store, and instead use the ISA 3.0 store byte/half-word from
11191         vector register instruction.  For IEEE 128-bit floating point,
11192         also optimize stores of 32-bit ints.
11193         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11195 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
11197         * genextract.c (push_pathstr_operand): New function to support
11198         [a-zA-Z].
11199         (walk_rtx): Call push_pathstr_operand.
11200         (print_path): Support [a-zA-Z].
11202 2018-02-07  Richard Biener  <rguenther@suse.de>
11204         PR tree-optimization/84037
11205         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11206         (cse_and_gimplify_to_preheader): Declare.
11207         (vect_get_place_in_interleaving_chain): Likewise.
11208         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11209         ivexpr_map.
11210         (_loop_vec_info::~_loop_vec_info): Delete it.
11211         (cse_and_gimplify_to_preheader): New function.
11212         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11213         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11214         (vectorizable_load): Likewise.  For grouped stores always base
11215         the IV on the first element.
11216         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11217         condition before gimplifying.
11219 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11221         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11222         *DIV_EXPR and *MOD_EXPR.
11224 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
11226         PR target/84248
11227         * config/i386/i386.c (ix86_option_override_internal): Mask out
11228         the CF_SET bit when checking -fcf-protection.
11230 2018-02-07  Tom de Vries  <tom@codesourcery.com>
11232         PR libgomp/84217
11233         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11234         enough.
11236 2018-02-07  Richard Biener  <rguenther@suse.de>
11238         PR tree-optimization/84204
11239         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11240         this place.
11242         PR tree-optimization/84205
11243         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11244         special-case isl_ast_op_zdiv_r.
11246         PR tree-optimization/84223
11247         * graphite-scop-detection.c (gather_bbs::before_dom_children):
11248         Only add conditions from within the region.
11249         (gather_bbs::after_dom_children): Adjust.
11251 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
11253         PR target/84209
11254         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11255         * config/avr/avr.md: Only post-reload split REG-REG moves if
11256         either register is GENERAL_REG_P.
11258 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11260         PR tree-optimization/84235
11261         * tree-ssa-scopedtables.c
11262         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11263         if the subtraction is performed in floating point type where NaNs are
11264         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11265         build 1.  Formatting fix.
11267 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
11269         PR target/84146
11270         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11271         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11272         and skip it regardless of bb boundaries.  Use CALL_P macro,
11273         don't test INSN_P (insn) together with CALL_P or JUMP_P check
11274         unnecessarily, formatting fix.
11276 2018-02-06  Michael Collison  <michael.collison@arm.com>
11278         * config/arm/thumb2.md:
11279         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11280         (*thumb_mov_notscc): Ditto.
11282 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
11284         PR target/84154
11285         * config/rs6000/rs6000.md (su code attribute): Use "u" for
11286         unsigned_fix, not "s".
11288 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11290         * configure.ac (gcc_fn_eh_frame_ro): New function.
11291         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11292         correct .eh_frame permissions.
11293         * configure: Regenerate.
11295 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
11297         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11298         irrelevant options.
11300 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11302         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11303         Display warning message for -mno-speculate-indirect-jumps.
11305 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
11307         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11308         Undocumented.
11309         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11311 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
11313         PR tree-optimization/84225
11314         * tree-eh.c (find_trapping_overflow): Only call
11315         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11317 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11319         PR target/84145
11320         * config/i386/i386.c: Reimplement the check of possible options
11321         -mibt/-mshstk conbination. Change error messages.
11322         * doc/invoke.texi: Fix a typo: remove extra '='.
11324 2018-02-06  Marek Polacek  <polacek@redhat.com>
11326         PR tree-optimization/84228
11327         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11329 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
11331         PR target/82641
11332         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11333         emitted arch directives.
11334         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11335         __ARM_FEATURE_COPROC before changing architectures.
11337 2018-02-06  Richard Biener  <rguenther@suse.de>
11339         * config/i386/i386.c (print_reg): Fix typo.
11340         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11342 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11344         * configure: Regenerate.
11346 2018-02-05  Martin Sebor  <msebor@redhat.com>
11348         PR tree-optimization/83369
11349         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11350         inlining context.
11352 2018-02-05  Martin Liska  <mliska@suse.cz>
11354         * doc/invoke.texi: Cherry-pick upstream r323995.
11356 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
11358         * ira.c (ira_init_register_move_cost): Adjust comment.
11360 2018-02-05  Martin Liska  <mliska@suse.cz>
11362         PR gcov-profile/84137
11363         * doc/gcov.texi: Fix typo in documentation.
11365 2018-02-05  Martin Liska  <mliska@suse.cz>
11367         PR gcov-profile/83879
11368         * doc/gcov.texi: Document necessity of --dynamic-list-data when
11369         using dlopen functionality.
11371 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
11373         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11374         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11375         _mm_maskz_range_ss, _mm_mask_range_round_ss,
11376         _mm_maskz_range_round_ss): New intrinsics.
11377         (__builtin_ia32_rangesd128_round)
11378         (__builtin_ia32_rangess128_round): Remove.
11379         (__builtin_ia32_rangesd128_mask_round,
11380         __builtin_ia32_rangess128_mask_round): New builtins.
11381         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11382         __builtin_ia32_rangess128_round): Remove.
11383         (__builtin_ia32_rangesd128_mask_round,
11384         __builtin_ia32_rangess128_mask_round): New builtins.
11385         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11386         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11387         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11388         "<round_saeonly_constraint>")): Changed to ...
11389         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11390         "<round_saeonly_scalar_constraint>")): ... this.
11391         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11392         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11393         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11394         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11395         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11397 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
11399         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11400         options.
11401         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11402         Remove all values except native, 8540 and 8548.
11404 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
11406         * config/i386/i386.c (ix86_output_function_return): Pass
11407         INVALID_REGNUM, instead of -1, as invalid register number to
11408         indirect_thunk_name and output_indirect_thunk.
11410 2018-02-02  Julia Koval  <julia.koval@intel.com>
11412         * config.gcc: Add -march=icelake.
11413         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11414         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11415         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11416         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11417         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11418         (processor_target_table): Add icelake.
11419         (ix86_option_override_internal): Handle new PTAs.
11420         (get_builtin_code_for_version): Handle icelake.
11421         (M_INTEL_COREI7_ICELAKE): New.
11422         (fold_builtin_cpu): Handle icelake.
11423         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11424         * doc/invoke.texi: Add -march=icelake.
11426 2018-02-02  Julia Koval  <julia.koval@intel.com>
11428         * config/i386/i386.c (ix86_option_override_internal): Change flags type
11429         to wide_int_bitmask.
11430         * wide-int-bitmask.h: New.
11432 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11434         PR target/84066
11435         * config/i386/i386.md: Replace Pmode with word_mode in
11436         builtin_setjmp_setup and builtin_longjmp to support x32.
11438 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
11440         PR target/56010
11441         PR target/83743
11442         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11443         #include "opts.h".
11444         (rs6000_supported_cpu_names): New static variable.
11445         (linux_cpu_translation_table): Likewise.
11446         (elf_platform) <cpu>: Define new static variable and use it.
11447         Translate kernel AT_PLATFORM name to canonical name if needed.
11448         Error if platform name is unknown.
11450 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
11452         PR target/84089
11453         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11455 2018-02-01  Jeff Law  <law@redhat.com>
11457         PR target/84128
11458         * config/i386/i386.c (release_scratch_register_on_entry): Add new
11459         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
11460         the scratch if RELEASE_VIA_POP is false.
11461         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11462         If we have to save a temporary register, decrement SIZE appropriately.
11463         Pass new arguments to release_scratch_register_on_entry.
11464         (ix86_adjust_stack_and_probe): Likewise.
11465         (ix86_emit_probe_stack_range): Pass new arguments to
11466         release_scratch_register_on_entry.
11468 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
11470         PR rtl-optimization/84157
11471         * combine.c (change_zero_ext): Use REG_P predicate in
11472         front of HARD_REGISTER_P predicate.
11474 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
11476         * config/avr/avr.c (avr_option_override): Move disabling of
11477         -fdelete-null-pointer-checks to...
11478         * common/config/avr/avr-common.c (avr_option_optimization_table):
11479         ...here.
11481 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11483         PR tree-optimization/81635
11484         * tree-data-ref.c (split_constant_offset_1): For types that
11485         wrap on overflow, try to use range info to prove that wrapping
11486         cannot occur.
11488 2018-02-01  Renlin Li  <renlin.li@arm.com>
11490         PR target/83370
11491         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11492         TAILCALL_ADDR_REGS.
11493         (aarch64_register_move_cost): Likewise.
11494         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11495         TAILCALL_ADDR_REGS.
11496         (REG_CLASS_NAMES): Likewise.
11497         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11498         TAILCALL_ADDR_REGS. Remove IP registers.
11499         * config/aarch64/aarch64.md (Ucs): Update register constraint.
11501 2018-02-01  Richard Biener  <rguenther@suse.de>
11503         * domwalk.h (dom_walker::dom_walker): Add additional constructor
11504         for specifying RPO order and allow NULL for that.
11505         * domwalk.c (dom_walker::dom_walker): Likewise.
11506         (dom_walker::walk): Handle NULL RPO order.
11507         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11508         in RPO order.
11509         (rewrite_update_dom_walker): Likewise.
11510         (mark_def_dom_walker): Likewise.
11512 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11514         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11515         (aarch64_maybe_expand_sve_subreg_move): Declare.
11516         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11517         * config/aarch64/predicates.md (aarch64_any_register_operand): New
11518         predicate.
11519         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11520         that are semantically a reverse operation.
11521         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11522         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11523         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11524         functions.
11525         (aarch64_can_change_mode_class): For big-endian, forbid changes
11526         between two SVE modes if they have different element sizes.
11528 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11530         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11531         the TImode handling for big-endian targets.
11533 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11535         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11536         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
11537         not just bytes.
11538         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11539         Remove BSWAP handing for big-endian targets and use the form of
11540         LD1RQ appropariate for the mode.
11542 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11544         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11545         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11546         duplicated element.
11548 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11550         PR tearget/83845
11551         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11552         check for operands that need to go through aarch64_sve_reload_be.
11554 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
11556         PR tree-optimization/81661
11557         PR tree-optimization/84117
11558         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11559         * tree-eh.c: Include gimplify.h.
11560         (find_trapping_overflow, replace_trapping_overflow,
11561         rewrite_to_non_trapping_overflow): New functions.
11562         * tree-vect-loop.c: Include tree-eh.h.
11563         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11564         * tree-data-ref.c: Include tree-eh.h.
11565         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11567 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
11569         PR rtl-optimization/84123
11570         * combine.c (change_zero_ext): Check if hard register satisfies
11571         can_change_dest_mode before calling gen_lowpart_SUBREG.
11573 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
11575         PR target/82444
11576         * ira.c (ira_init_register_move_cost): Remove assert.
11578 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11580         PR rtl-optimization/84071
11581         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11582         * doc/tm.texi: Regenerate.
11584 2018-01-31  Richard Biener  <rguenther@suse.de>
11586         PR tree-optimization/84132
11587         * tree-data-ref.c (analyze_miv_subscript): Properly
11588         check whether evolution_function_is_affine_multivariate_p
11589         before calling gcd_of_steps_may_divide_p.
11591 2018-01-31  Julia Koval  <julia.koval@intel.com>
11593         PR target/83618
11594         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
11595         * config/i386/i386.md (rdpid_rex64) New.
11596         (rdpid): Make 32bit only.
11598 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
11600         PR lto/84105
11601         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
11602         an IDENTIFIER_NODE for FUNCTION_TYPE's.
11604 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11606         Revert
11607         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11609         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11611 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11613         PR rtl-optimization/84071
11614         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
11615         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
11617 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11619         * config/arc/arc.c (arc_handle_aux_attribute): New function.
11620         (arc_attribute_table): Add 'aux' attribute.
11621         (arc_in_small_data_p): Consider aux like variables.
11622         (arc_is_aux_reg_p): New function.
11623         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
11624         (arc_get_aux_arg): New function.
11625         (prepare_move_operands): Handle aux-register access.
11626         (arc_handle_aux_attribute): New function.
11627         * doc/extend.texi (ARC Variable attributes): Add subsection.
11629 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11631         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
11632         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
11633         (arc_attribute_table): Add 'uncached' attribute.
11634         (arc_print_operand): Print '.di' flag for uncached memory
11635         accesses.
11636         (arc_in_small_data_p): Do not consider for small data the uncached
11637         types.
11638         (arc_is_uncached_mem_p): New function.
11639         * config/arc/predicates.md (compact_store_memory_operand): Check
11640         for uncached memory accesses.
11641         (nonvol_nonimm_operand): Likewise.
11642         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
11644 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
11646         PR c/84100
11647         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
11648         falign-loops=): Add Optimization flag.
11650 2018-01-30  Jeff Law  <law@redhat.com>
11652         PR target/84064
11653         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
11654         INT_REGISTERS_SAVED.  Check it prior to calling
11655         get_scratch_register_on_entry.
11656         (ix86_adjust_stack_and_probe): Similarly.
11657         (ix86_emit_probe_stack_range): Similarly.
11658         (ix86_expand_prologue): Corresponding changes.
11660 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11662         PR target/40411
11663         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
11664         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
11666 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
11668         PR target/84112
11669         * lra-constraints.c (curr_insn_transform): Process AND in the
11670         address.
11672 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
11674         PR rtl-optimization/83986
11675         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
11676         dependence against last_pending_memory_flush in addition to
11677         pending_jump_insns.
11679 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
11681         PR tree-optimization/81611
11682         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
11683         copies.
11685 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11687         PR target/83758
11688         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
11689         a reg rtx.
11691 2018-01-30  Richard Biener  <rguenther@suse.de>
11692             Jakub Jelinek  <jakub@redhat.com>
11694         PR tree-optimization/84111
11695         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
11696         inner loops added during recursion, as they don't have up-to-date
11697         SSA form.
11699 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
11701         PR ipa/81360
11702         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
11703         (can_inline_edge_by_limits_p): ... here.
11704         (can_early_inline_edge_p, check_callers,
11705         update_caller_keys, update_callee_keys, recursive_inlining,
11706         add_new_edges_to_heap, speculation_useful_p,
11707         inline_small_functions,
11708         inline_small_functions, flatten_function,
11709         inline_to_all_callers_1): Update.
11711 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
11713         * profile-count.c (profile_count::combine_with_ipa_count): Handle
11714         zeros correctly.
11716 2018-01-30  Richard Biener  <rguenther@suse.de>
11718         PR tree-optimization/83008
11719         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
11720         invariant and constant vector uses in stmts when they need
11721         more than one stmt.
11723 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11725         PR bootstrap/84017
11726         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
11727         * configure: Regenerate.
11729 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
11731         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
11732         pattern.
11733         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
11734         Use gen_rtx_REG rather than gen_lowpart.
11736 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
11738         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
11739         rather than 0 when creating partial subregs.
11741 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
11743         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
11744         of usage.
11746 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
11748         PR target/81550
11749         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
11750         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
11751         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
11752         flags.  This restores the settings used before the 2017-07-24.
11753         Turning off pre increment/decrement/modify allows IVOPTS to
11754         optimize DF/SF loops where the index is an int.
11756 2018-01-29  Richard Biener  <rguenther@suse.de>
11757             Kelvin Nilsen  <kelvin@gcc.gnu.org>
11759         PR bootstrap/80867
11760         * tree-vect-stmts.c (vectorizable_call): Don't call
11761         targetm.vectorize_builtin_md_vectorized_function if callee is
11762         NULL.
11764 2018-01-22  Carl Love  <cel@us.ibm.com>
11766         * doc/extend.tex: Fix typo in second arg in
11767         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
11769 2018-01-29  Richard Biener  <rguenther@suse.de>
11771         PR tree-optimization/84086
11772         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
11773         (flush_ssaname_freelist): When SSA names were released reset
11774         the SCEV hash table.
11776 2018-01-29  Richard Biener  <rguenther@suse.de>
11778         PR tree-optimization/84057
11779         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
11780         removed paths when removing edges.
11782 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
11784         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
11785         -mfunction-return=@var{choice}.
11787 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11789         PR diagnostic/84034
11790         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
11791         Handle CR like TAB.
11792         (layout::print_source_line): Likewise.
11793         (test_get_line_width_without_trailing_whitespace): Add test cases.
11795 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
11797         PR middle-end/84040
11798         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
11799         debug insns.
11801 2018-01-26  Jim Wilson  <jimw@sifive.com>
11803         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
11805         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
11806         specified.
11808 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11810         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
11811         and CMP + SUB-immediate -> SUBS.
11813 2018-01-26  Martin Sebor  <msebor@redhat.com>
11815         PR tree-optimization/83896
11816         * tree-ssa-strlen.c (get_string_len): Rename...
11817         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
11818         Avoid assuming length is constant.
11819         (handle_char_store): Use HOST_WIDE_INT for string length.
11821 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
11823         PR target/81763
11824         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
11825         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
11827 2018-01-26  Richard Biener  <rguenther@suse.de>
11829         PR rtl-optimization/84003
11830         * dse.c (record_store): Only record redundant stores when
11831         the earlier store aliases at least all accesses the later one does.
11833 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
11835         PR rtl-optimization/83985
11836         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
11837         REG_CFA_RESTORE insns.
11838         (delete_unmarked_insns): Don't ignore separate shrink wrapping
11839         REG_CFA_RESTORE insns here.
11841         PR c/83989
11842         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
11843         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
11845 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
11847         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
11848         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
11849         (arc_init): Likewise.
11850         (arc_override_options): Likewise.
11851         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
11852         value.
11853         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
11854         support.
11855         * config/arc/arc.h (TARGET_DBNZ): Define.
11856         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
11857         properly set the tune attribute.
11858         (dbnz): Use TARGET_DBNZ guard.
11859         * config/arc/arc.opt (mtune): Add core3 option.
11861 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
11863         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
11864         recognize new pic like addresses.
11865         (arc_delegitimize_address): Clean up.
11867 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
11869         * config/arc/arc-arches.def: Option mrf16 valid for all
11870         architectures.
11871         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
11872         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
11873         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
11874         * config/arc/arc-tables.opt: Regenerate.
11875         * config/arc/arc.c (arc_conditional_register_usage): Handle
11876         reduced register file case.
11877         (arc_file_start): Set must have build attributes.
11878         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
11879         mrf16 option value.
11880         * config/arc/arc.opt (mrf16): Add new option.
11881         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
11882         * config/arc/genmultilib.awk: Handle new mrf16 option.
11883         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
11884         * config/arc/t-multilib: Regenerate.
11885         * doc/invoke.texi (ARC Options): Document mrf16 option.
11887 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
11889         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
11890         * config/arc/arc.c (arc_handle_secure_attribute): New function.
11891         (arc_attribute_table): Add 'secure_call' attribute.
11892         (arc_print_operand): Print secure call operand.
11893         (arc_function_ok_for_sibcall): Don't optimize tail calls when
11894         secure.
11895         (arc_is_secure_call_p): New function.  * config/arc/arc.md
11896         (call_i): Add support for sjli instruction.
11897         (call_value_i): Likewise.
11898         * config/arc/constraints.md (Csc): New constraint.
11900 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
11901             John Eric Martin  <John.Martin@emmicro-us.com>
11903         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
11904         * config/arc/arc.c (_arc_jli_section): New struct.
11905         (arc_jli_section): New type.
11906         (rc_jli_sections): New static variable.
11907         (arc_handle_jli_attribute): New function.
11908         (arc_attribute_table): Add jli_always and jli_fixed attribute.
11909         (arc_file_end): New function.
11910         (TARGET_ASM_FILE_END): Define.
11911         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
11912         (arc_add_jli_section): New function.
11913         (jli_call_scan): Likewise.
11914         (arc_reorg): Call jli_call_scan.
11915         (arc_output_addsi): Remove 'S' from printing asm operand.
11916         (arc_is_jli_call_p): New function.
11917         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
11918         operand.
11919         (movhi_insn): Likewise.
11920         (movsi_insn): Likewise.
11921         (movsi_set_cc_insn): Likewise.
11922         (loadqi_update): Likewise.
11923         (load_zeroextendqisi_update): Likewise.
11924         (load_signextendqisi_update): Likewise.
11925         (loadhi_update): Likewise.
11926         (load_zeroextendhisi_update): Likewise.
11927         (load_signextendhisi_update): Likewise.
11928         (loadsi_update): Likewise.
11929         (loadsf_update): Likewise.
11930         (movsicc_insn): Likewise.
11931         (bset_insn): Likewise.
11932         (bxor_insn): Likewise.
11933         (bclr_insn): Likewise.
11934         (bmsk_insn): Likewise.
11935         (bicsi3_insn): Likewise.
11936         (cmpsi_cc_c_insn): Likewise.
11937         (movsi_ne): Likewise.
11938         (movsi_cond_exec): Likewise.
11939         (clrsbsi2): Likewise.
11940         (norm_f): Likewise.
11941         (normw): Likewise.
11942         (swap): Likewise.
11943         (divaw): Likewise.
11944         (flag): Likewise.
11945         (sr): Likewise.
11946         (kflag): Likewise.
11947         (ffs): Likewise.
11948         (ffs_f): Likewise.
11949         (fls): Likewise.
11950         (call_i): Remove 'S' asm letter, add jli instruction.
11951         (call_value_i): Likewise.
11952         * config/arc/arc.op (mjli-always): New option.
11953         * config/arc/constraints.md (Cji): New constraint.
11954         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
11955         operand.
11956         (subsf3_fpx): Likewise.
11957         (mulsf3_fpx): Likewise.
11958         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
11959         asm operand.
11960         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
11961         function attrbutes.
11962         * doc/invoke.texi (ARC): Document mjli-always option.
11964 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
11966         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
11967         avoid addition with 0 and use incw and decw where possible.
11969 2018-01-26  Richard Biener  <rguenther@suse.de>
11971         PR tree-optimization/81082
11972         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
11973         association if it requires casting to unsigned.
11974         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
11975         from fold_plusminus_mult_expr to catch important cases late when
11976         range info is available.
11978 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11980         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
11981         * configure.ac (hidden_linkonce): New test.
11982         * configure: Regenerate.
11983         * config.in: Regenerate.
11985 2018-01-26  Julia Koval  <julia.koval@intel.com>
11987         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
11988         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
11989         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
11990         _mm_mask_bitshuffle_epi64_mask): Fix type.
11991         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
11992         USI_FTYPE_V4DI_V4DI_USI): Remove.
11993         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
11994         __builtin_ia32_vpshufbitqmb256_mask,
11995         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
11996         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
11997         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
11999 2018-01-26  Alan Modra  <amodra@gmail.com>
12001         PR target/84033
12002         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12003         UNSPEC_VBPERMQ.  Sort other unspecs.
12005 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12007         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12009 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12011         PR middle-end/83055
12012         * predict.c (drop_profile): Do not push/pop cfun; update also
12013         node->count.
12014         (handle_missing_profiles): Fix logic looking for zero profiles.
12016 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12018         PR middle-end/83977
12019         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12020         on functions with #pragma omp declare simd or functions with simd
12021         attribute.
12022         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12023         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12024         Remove trailing \n from warning_at calls.
12026 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12028         PR target/84028
12029         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12030         for neutered workers.
12032 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12034         PR target/68467
12035         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12036         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12038 2018-01-24  Jeff Law  <law@redhat.com>
12040         PR target/83994
12041         * i386.c (get_probe_interval): Move to earlier point.
12042         (ix86_compute_frame_layout): If -fstack-clash-protection and
12043         the frame is larger than the probe interval, then use pushes
12044         to save registers rather than reg->mem moves.
12045         (ix86_expand_prologue): Remove conditional for int_registers_saved
12046         assertion.
12048 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12050         PR target/84014
12051         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12052         min/max for never referenced object.
12054 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12056         PR middle-end/83977
12057         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12058         here.
12059         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12060         attributes from DECL_ATTRIBUTES (decl) without affecting
12061         DECL_ATTRIBUTES (current_function_decl).
12062         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12063         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12065 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12067         PR tree-optimization/83979
12068         * fold-const.c (fold_comparison): Use constant_boolean_node
12069         instead of boolean_{true,false}_node.
12071 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12073         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12074         with zero counts.
12076 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12078         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12079         Simplify the clause that sets the length attribute.
12080         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12081         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12082         clause that sets the length attribute.
12083         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12085 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12087         PR target/83589
12088         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12089         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12090         Add strict parameter.
12091         (prevent_branch_around_nothing): Insert dummy insn between branch to
12092         label and label with no ptx insn inbetween.
12093         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12095 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12097         PR target/81352
12098         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12099         for neutered threads in warp.
12100         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12102 2018-01-24  Richard Biener  <rguenther@suse.de>
12104         PR tree-optimization/83176
12105         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12106         operands.
12108 2018-01-24  Richard Biener  <rguenther@suse.de>
12110         PR tree-optimization/82819
12111         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12112         code generating pluses that are no-ops in the target precision.
12114 2018-01-24  Richard Biener  <rguenther@suse.de>
12116         PR middle-end/84000
12117         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12119 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12121         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12122         to merge probabilities.
12123         * predict.c (probably_never_executed): Also mark as cold functions
12124         with global 0 profile and guessed local profile.
12125         * profile-count.c (profile_probability::combine_with_count): New
12126         member function.
12127         * profile-count.h (profile_probability::operator*,
12128         profile_probability::operator*=, profile_probability::operator/,
12129         profile_probability::operator/=): Reduce precision to adjusted
12130         and set value to guessed on contradictory divisions.
12131         (profile_probability::combine_with_freq): Remove.
12132         (profile_probability::combine_wiht_count): Declare.
12133         (profile_count::force_nonzero):: Set to adjusted.
12134         (profile_count::probability_in):: Set quality to adjusted.
12135         * tree-ssa-tail-merge.c (replace_block_by): Use
12136         combine_with_count.
12138 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12139             Jim Wilson  <jimw@sifive.com>
12141         * config/riscv/riscv.c (riscv_stack_boundary): New.
12142         (riscv_option_override): Set riscv_stack_boundary.  Handle
12143         riscv_preferred_stack_boundary_arg.
12144         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12145         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12146         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12147         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12148         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12149         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12151 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12153         PR target/83905
12154         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12155         of struct ix86_frame.
12156         (ix86_expand_epilogue): Likewise.  Add a local variable for
12157         the reg_save_offset field in struct ix86_frame.
12159 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
12161         PR tree-optimization/82604
12162         * tree-loop-distribution.c (enum partition_kind): New enum item
12163         PKIND_PARTIAL_MEMSET.
12164         (partition_builtin_p): Support above new enum item.
12165         (generate_code_for_partition): Ditto.
12166         (compute_access_range): Differentiate cases that equality can be
12167         proven at all loops, the innermost loops or no loops.
12168         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12169         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
12170         (finalize_partitions, distribute_loop): Don't fuse partition of
12171         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12172         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12173         parloop is enabled.
12175 2018-01-23  Martin Liska  <mliska@suse.cz>
12177         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12178         order to ignore the predictor.
12179         (PRED_POLYMORPHIC_CALL): Likewise.
12180         (PRED_RECURSIVE_CALL): Likewise.
12182 2018-01-23  Martin Liska  <mliska@suse.cz>
12184         * tree-profile.c (tree_profiling): Print function header to
12185         aware reader which function we are working on.
12186         * value-prof.c (gimple_find_values_to_profile): Do not print
12187         not interesting value histograms.
12189 2018-01-23  Martin Liska  <mliska@suse.cz>
12191         * profile-count.h (enum profile_quality): Add
12192         profile_uninitialized as the first value. Do not number values
12193         as they are zero based.
12194         (profile_count::verify): Update sanity check.
12195         (profile_probability::verify): Likewise.
12197 2018-01-23  Nathan Sidwell  <nathan@acm.org>
12199         * doc/invoke.texi (ffor-scope): Deprecate.
12201 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12203         PR tree-optimization/83510
12204         * domwalk.c (set_all_edges_as_executable): New function.
12205         (dom_walker::dom_walker): Convert bool param
12206         "skip_unreachable_blocks" to enum reachability.  Move setup of
12207         edge flags to set_all_edges_as_executable and only do it when
12208         reachability is REACHABLE_BLOCKS.
12209         * domwalk.h (enum dom_walker::reachability): New enum.
12210         (dom_walker::dom_walker): Convert bool param
12211         "skip_unreachable_blocks" to enum reachability.
12212         (set_all_edges_as_executable): New decl.
12213         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
12214         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12215         "reachability".
12216         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12217         but converting true to REACHABLE_BLOCKS.
12218         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12219         * tree-vrp.c
12220         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12221         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12222         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12223         REACHABLE_BLOCKS.
12224         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12225         if check_all_array_refs will be called.
12227 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12229         * tree.c (selftest::test_location_wrappers): Add more test
12230         coverage.
12232 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12234         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12235         (selftest::test_bit_in_range): Likewise.
12237 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12239         PR testsuite/83888
12240         * doc/sourcebuild.texi (vect_float): Say that the selector
12241         only describes the situation when -funsafe-math-optimizations is on.
12242         (vect_float_strict): Document.
12244 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12246         PR tree-optimization/83965
12247         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12248         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12249         instead of checking only for a reduction.
12250         (vect_recog_widen_sum_pattern): Likewise.
12252 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12254         * predict.c (probably_never_executed): Only use precise profile info.
12255         (compute_function_frequency): Skip after inlining hack since we now
12256         have quality checking.
12258 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12260         * profile-count.h (profile_probability::very_unlikely,
12261         profile_probability::unlikely, profile_probability::even): Set
12262         precision to guessed.
12264 2018-01-23  Richard Biener  <rguenther@suse.de>
12266         PR tree-optimization/83963
12267         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12268         Properly terminate dominator walk when crossing the exit edge not
12269         when visiting its source block.
12271 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
12273         PR c++/83918
12274         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12275         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12277 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
12279         PR tree-optimization/83957
12280         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
12281         semicolon after for body surrounded by braces.
12283         PR tree-optimization/83081
12284         * profile-count.h (profile_probability::split): New method.
12285         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12286         Use profile_probability::split.
12287         (do_compare_rtx_and_jump): Fix adjustment of probabilities
12288         when splitting a single conditional jump into 2.
12290 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
12292         PR tree-optimization/69452
12293         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12294         decl.
12296 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12298         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12299         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12300         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12302 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12304         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12305         declaration.
12306         * config/rl78/rl78.md (movdi): New define_expand.
12307         * config/rl78/rl78.c (rl78_split_movdi): New function.
12309 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
12311         PR target/83862
12312         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12313         no longer used.
12314         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12315         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12316         128-bit to produce an UNSPEC move to get the double word with the
12317         signbit and then a shift directly to do signbit.
12318         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12319         implementation with a new version that just does either a direct
12320         move or a regular move.  Move memory interface to separate insns.
12321         Move insns so they are next to the expander.
12322         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12323         with signbit move.  Split big and little endian case.
12324         (signbit<mode>2_dm_mem_le): Likewise.
12325         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12326         (signbit<mode>2_dm2): Likewise.
12328 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12330         * config/rl78/rl78.md (anddi3): New define_expand.
12332 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12334         * config/rl78/rl78.md (umindi3): New define_expand.
12336 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12338         * config/rl78/rl78.md (smindi3): New define_expand.
12340 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12342         * config/rl78/rl78.md (smaxdi3): New define_expand.
12344 2018-01-22  Carl Love  <cel@us.ibm.com>
12346         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12347         LVX_V1TI): Add macro expansion.
12348         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12349         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12350         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12351         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12352         Change check to determine if the instruction is a byte reversing
12353         entry.  Fix typo in comment.
12354         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12355         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12356         Add def_builtin calls for new builtins.
12357         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12358         Add define_insn expansion.
12360 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12362         * config/rl78/rl78.md (umaxdi3): New define_expand.
12364 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12366         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12367         for non-QImode registers.
12369 2018-01-22  Richard Biener  <rguenther@suse.de>
12371         PR tree-optimization/83963
12372         * graphite-scop-detection.c (scop_detection::get_sese): Delay
12373         including the loop exit block.
12374         (scop_detection::merge_sese): Likewise.
12375         (scop_detection::add_scop): Do it here instead.
12377 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12379         * doc/sourcebuild.texi (arm_softfloat): Document.
12381 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
12383         PR gcc/77734
12384         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12385         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12386         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12388 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12389             David Edelsohn  <dje.gcc@gmail.com>
12391         PR target/83946
12392         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12393         Change "crset eq" to "crset 2".
12394         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12395         (*call_indirect_aix<mode>_nospec): Likewise.
12396         (*call_value_indirect_aix<mode>_nospec): Likewise.
12397         (*call_indirect_elfv2<mode>_nospec): Likewise.
12398         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12399         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12400         change assembly output from . to $.
12401         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12402         (indirect_jump<mode>_nospec): Change assembly output from . to $.
12403         (*tablejump<mode>_internal1_nospec): Likewise.
12405 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
12407         PR target/80870
12408         * config/sh/sh_optimize_sett_clrt.cc:
12409         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12411 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
12413         PR tree-optimization/83940
12414         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12415         offset_dt to vect_constant_def rather than vect_unknown_def_type.
12416         (vect_check_load_store_mask): Add a mask_dt_out parameter and
12417         use it to pass back the definition type.
12418         (vect_check_store_rhs): Likewise rhs_dt_out.
12419         (vect_build_gather_load_calls): Add a mask_dt argument and use
12420         it instead of a call to vect_is_simple_use.
12421         (vectorizable_store): Update calls to vect_check_load_store_mask
12422         and vect_check_store_rhs.  Use the dt returned by the latter instead
12423         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
12424         instead of calls to vect_is_simple_use.  Pass the scalar rather
12425         than the vector operand to vect_is_simple_use when handling
12426         second and subsequent copies of an rhs value.
12427         (vectorizable_load): Update calls to vect_check_load_store_mask
12428         and vect_build_gather_load_calls.  Use the cached mask_dt and
12429         gs_info.offset_dt instead of calls to vect_is_simple_use.
12431 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
12433         PR middle-end/83945
12434         * tree-emutls.c: Include gimplify.h.
12435         (lower_emutls_2): New function.
12436         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12437         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12438         it before further processing.
12440         PR target/83930
12441         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12442         UINTVAL (trueop1) instead of INTVAL (op1).
12444 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
12446         PR debug/81570
12447         PR debug/83728
12448         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12449         INCOMING_FRAME_SP_OFFSET if not defined.
12450         (scan_trace): Add ENTRY argument.  If true and
12451         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12452         emit a note to adjust the CFA offset.
12453         (create_cfi_notes): Adjust scan_trace callers.
12454         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12455         INCOMING_FRAME_SP_OFFSET in the CIE.
12456         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12457         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12458         Likewise.
12459         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12460         * doc/tm.texi: Regenerated.
12462 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12464         PR rtl-optimization/83147
12465         * lra-constraints.c (remove_inheritance_pseudos): Use
12466         lra_substitute_pseudo_within_insn.
12468 2018-01-19  Tom de Vries  <tom@codesourcery.com>
12469             Cesar Philippidis  <cesar@codesourcery.com>
12471         PR target/83920
12472         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12474 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
12476         PR target/83790
12477         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12478         spaces for function labels.
12480 2018-01-19  Martin Liska  <mliska@suse.cz>
12482         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12483         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12484         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12485         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12486         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12487         (PRED_CONST_RETURN): Change from 69 to 65.
12488         (PRED_NULL_RETURN): Change from 91 to 71.
12489         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12490         (PRED_LOOP_GUARD): Change from 66 to 73.
12492 2018-01-19  Martin Liska  <mliska@suse.cz>
12494         * predict.c (predict_insn_def): Add new assert.
12495         (struct branch_predictor): Change type to signed integer.
12496         (test_prediction_value_range): Amend test to cover
12497         PROB_UNINITIALIZED.
12498         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12499         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12500         (PRED_LOOP_ITERATIONS_MAX): Likewise.
12501         (PRED_LOOP_IV_COMPARE): Likewise.
12502         * predict.h (PROB_UNINITIALIZED): Define new constant.
12504 2018-01-19  Martin Liska  <mliska@suse.cz>
12506         * predict.c (dump_prediction): Add new format for
12507         analyze_brprob.py script which is enabled with -details
12508         suboption.
12509         * profile-count.h (precise_p): New function.
12511 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12513         PR tree-optimization/83922
12514         * tree-vect-loop.c (vect_verify_full_masking): Return false if
12515         there are no statements that need masking.
12516         (vect_active_double_reduction_p): New function.
12517         (vect_analyze_loop_operations): Use it when handling phis that
12518         are not in the loop header.
12520 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12522         PR tree-optimization/83914
12523         * tree-vect-loop.c (vectorizable_induction): Don't convert
12524         init_expr or apply the peeling adjustment for inductions
12525         that are nested within the vectorized loop.
12527 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12529         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12530         instead of NEG.
12532 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12534         PR sanitizer/81715
12535         PR testsuite/83882
12536         * function.h (gimplify_parameters): Add gimple_seq * argument.
12537         * function.c: Include gimple.h and options.h.
12538         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12539         for the added local temporaries if needed.
12540         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12541         if there are any parameter cleanups, wrap whole body into a
12542         try/finally with the cleanups.
12544 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
12546         PR target/82964
12547         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12548         Use GET_MODE_CLASS for scalar floating point.
12550 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12552         PR ipa/82256
12553         patch by PaX Team
12554         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12555         Fix call of call_cgraph_insertion_hooks.
12557 2018-01-18  Martin Sebor  <msebor@redhat.com>
12559         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12561 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12563         PR ipa/83619
12564         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12565         frequencies.
12567 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
12569         PR other/70268
12570         * common.opt: (-ffile-prefix-map): New option.
12571         * opts.c (common_handle_option): Defer it.
12572         * opts-global.c (handle_common_deferred_options): Handle it.
12573         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12574         * file-prefix-map.h: New file.
12575         (remap_debug_filename, add_debug_prefix_map): ...here.
12576         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12577         * final.c (debug_prefix_map, add_debug_prefix_map
12578         remap_debug_filename): Move to...
12579         * file-prefix-map.c: New file.
12580         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12581         generalize, get rid of alloca(), use strrchr() instead of strchr().
12582         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12583         Implement in terms of add_prefix_map().
12584         (remap_macro_filename, remap_debug_filename): Implement in term of
12585         remap_filename().
12586         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12587         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12588         * dbxout.c: Include file-prefix-map.h.
12589         * varasm.c: Likewise.
12590         * vmsdbgout.c: Likewise.
12591         * xcoffout.c: Likewise.
12592         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
12593         * doc/cppopts.texi (-fmacro-prefix-map): Document.
12594         * doc/invoke.texi (-ffile-prefix-map): Document.
12595         (-fdebug-prefix-map): Update description.
12597 2018-01-18  Martin Liska  <mliska@suse.cz>
12599         * config/i386/i386.c (indirect_thunk_name): Document that also
12600         lfence is emitted.
12601         (output_indirect_thunk): Document why both instructions
12602         (pause and lfence) are generated.
12604 2018-01-18  Richard Biener  <rguenther@suse.de>
12606         PR tree-optimization/83887
12607         * graphite-scop-detection.c
12608         (scop_detection::get_nearest_dom_with_single_entry): Remove.
12609         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
12610         (scop_detection::merge_sese): Re-implement with a flood-fill
12611         algorithm that properly finds a SESE region if it exists.
12613 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12615         PR c/61240
12616         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
12617         pointer_diff optimizations use view_convert instead of convert.
12619 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12621         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12622         Generate different code for -mno-speculate-indirect-jumps.
12623         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12624         (*call_indirect_aix<mode>): Disable for
12625         -mno-speculate-indirect-jumps.
12626         (*call_indirect_aix<mode>_nospec): New define_insn.
12627         (*call_value_indirect_aix<mode>): Disable for
12628         -mno-speculate-indirect-jumps.
12629         (*call_value_indirect_aix<mode>_nospec): New define_insn.
12630         (*sibcall_nonlocal_sysv<mode>): Generate different code for
12631         -mno-speculate-indirect-jumps.
12632         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12634 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12636         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
12637         long double type, set the flags for noting the default long double
12638         type, even if we don't pass or return a long double type.
12640 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
12642         PR ipa/83051
12643         * ipa-inline.c (flatten_function): Do not overwrite final inlining
12644         failure.
12646 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
12648         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
12649         support for merge[hl].
12650         (fold_mergehl_helper): New helper function.
12651         (tree-vector-builder.h): New #include for tree_vector_builder usage.
12652         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
12653         (altivec_vmrglw_direct): Add xxmrglw insn.
12655 2018-01-17  Andrew Waterman  <andrew@sifive.com>
12657         * config/riscv/riscv.c (riscv_conditional_register_usage): If
12658         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
12660 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
12662         PR lto/83121
12663         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
12664         call the lto_location_cache before reading the
12665         DECL_SOURCE_LOCATION of the types.
12667 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
12668             Richard Sandiford  <richard.sandiford@linaro.org>
12670         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
12671         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
12672         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
12673         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
12674         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
12675         Add declaration.
12676         * config/aarch64/constraints.md (aarch64_movti_operand):
12677         Limit immediates.
12678         * config/aarch64/predicates.md (Uti): Add new constraint.
12680 2018-01-17 Carl Love  <cel@us.ibm.com>
12682         * config/rs6000/vsx.md (define_expand xl_len_r,
12683         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
12684         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
12685         lxvll.
12686         (define_expand, define_insn): Move the shift left from  the
12687         define_insn to the define_expand for lxvl and stxvl instructions.
12688         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
12689         and XL_LEN_R definitions to PURE.
12691 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
12693         * config/i386/i386.c (indirect_thunk_name): Declare regno
12694         as unsigned int.  Compare regno with INVALID_REGNUM.
12695         (output_indirect_thunk): Ditto.
12696         (output_indirect_thunk_function): Ditto.
12697         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
12698         in the call to output_indirect_thunk_function.
12700 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
12702         PR middle-end/83884
12703         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
12704         rather than the size of inner_type to determine the stack slot size
12705         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
12707 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
12709         PR target/83546
12710         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
12711         to PTA_SILVERMONT.
12713 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
12715         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
12716         endian Linux systems to optionally enable multilibs for selecting
12717         the long double type if the user configured an explicit type.
12718         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
12719         have no long double multilibs if not defined.
12720         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
12721         warn if the user used -mabi={ieee,ibm}longdouble and we built
12722         multilibs for long double.
12723         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
12724         appropriate multilib option.
12725         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
12726         multilib options.
12727         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
12728         for building long double multilibs.
12729         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
12731 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
12733         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
12734         copies.
12736         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
12737         64 bits.
12738         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
12739         128 bits.
12741         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
12742         variables.
12744         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
12745         return value.
12747 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
12749         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
12750         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
12752 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12754         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
12755         different rtl trees depending on TARGET_64BIT.
12756         (rs6000_gen_lvx): Likewise.
12758 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
12760         * config/visium/visium.md (nop): Tweak comment.
12761         (hazard_nop): Likewise.
12763 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12765         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
12766         -mspeculate-indirect-jumps.
12767         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
12768         for -mno-speculate-indirect-jumps.
12769         (*call_indirect_elfv2<mode>_nospec): New define_insn.
12770         (*call_value_indirect_elfv2<mode>): Disable for
12771         -mno-speculate-indirect-jumps.
12772         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
12773         (indirect_jump): Emit different RTL for
12774         -mno-speculate-indirect-jumps.
12775         (*indirect_jump<mode>): Disable for
12776         -mno-speculate-indirect-jumps.
12777         (*indirect_jump<mode>_nospec): New define_insn.
12778         (tablejump): Emit different RTL for
12779         -mno-speculate-indirect-jumps.
12780         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
12781         (tablejumpsi_nospec): New define_expand.
12782         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
12783         (tablejumpdi_nospec): New define_expand.
12784         (*tablejump<mode>_internal1): Disable for
12785         -mno-speculate-indirect-jumps.
12786         (*tablejump<mode>_internal1_nospec): New define_insn.
12787         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
12788         option.
12790 2018-01-16  Artyom Skrobov tyomitch@gmail.com
12792         * caller-save.c (insert_save): Drop unnecessary parameter.  All
12793         callers updated.
12795 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
12796             Richard Biener  <rguenth@suse.de>
12798         PR libgomp/83590
12799         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
12800         return early, inline manually is_gimple_sizepos.  Make sure if we
12801         call gimplify_expr we don't end up with a gimple constant.
12802         * tree.c (variably_modified_type_p): Don't return true for
12803         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
12804         * gimplify.h (is_gimple_sizepos): Remove.
12806 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
12808         PR tree-optimization/83857
12809         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
12810         vectorizable_live_operation for pure SLP statements.
12811         (vectorizable_live_operation): Handle PHIs.
12813 2018-01-16  Richard Biener  <rguenther@suse.de>
12815         PR tree-optimization/83867
12816         * tree-vect-stmts.c (vect_transform_stmt): Precompute
12817         nested_in_vect_loop_p since the scalar stmt may get invalidated.
12819 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
12821         PR c/83844
12822         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
12823         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
12824         If off is not INTEGER_CST, issue a may not be aligned warning
12825         rather than isn't aligned.  Use isn%'t rather than isn't.
12826         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
12827         into MULT_EXPR.
12828         <case MULT_EXPR>: Improve the case when bottom and one of the
12829         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
12830         operand, in that case check if the other operand is multiple of
12831         bottom divided by the INTEGER_CST operand.
12833 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
12835         PR target/83858
12836         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
12837         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
12838         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
12839         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
12840         * config/pa/pa.c (pa_function_arg_advance): Likewise.
12841         (pa_function_arg, pa_arg_partial_bytes): Likewise.
12842         (pa_function_arg_size): New function.
12844 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
12846         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
12847         in a separate statement.
12849 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
12851         PR tree-optimization/83847
12852         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
12853         group gathers and scatters.
12855 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
12857         PR rtl-optimization/86620
12858         * params.def (max-sched-ready-insns): Bump minimum value to 1.
12860         PR rtl-optimization/83213
12861         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
12862         to last if both are JUMP_INSNs.
12864         PR tree-optimization/83843
12865         * gimple-ssa-store-merging.c
12866         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
12867         store_immediate_info for bswap/nop orig_stores.
12869 2018-01-15  Andrew Waterman  <andrew@sifive.com>
12871         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
12872         !TARGET_MUL.
12873         <UDIV>: Increase cost if !TARGET_DIV.
12875 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
12877         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
12878         (define_attr "cr_logical_3op"): New.
12879         (cceq_ior_compare): Adjust.
12880         (cceq_ior_compare_complement): Adjust.
12881         (*cceq_rev_compare): Adjust.
12882         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
12883         (is_cracked_insn): Adjust.
12884         (insn_must_be_first_in_group): Adjust.
12885         * config/rs6000/40x.md: Adjust.
12886         * config/rs6000/440.md: Adjust.
12887         * config/rs6000/476.md: Adjust.
12888         * config/rs6000/601.md: Adjust.
12889         * config/rs6000/603.md: Adjust.
12890         * config/rs6000/6xx.md: Adjust.
12891         * config/rs6000/7450.md: Adjust.
12892         * config/rs6000/7xx.md: Adjust.
12893         * config/rs6000/8540.md: Adjust.
12894         * config/rs6000/cell.md: Adjust.
12895         * config/rs6000/e300c2c3.md: Adjust.
12896         * config/rs6000/e500mc.md: Adjust.
12897         * config/rs6000/e500mc64.md: Adjust.
12898         * config/rs6000/e5500.md: Adjust.
12899         * config/rs6000/e6500.md: Adjust.
12900         * config/rs6000/mpc.md: Adjust.
12901         * config/rs6000/power4.md: Adjust.
12902         * config/rs6000/power5.md: Adjust.
12903         * config/rs6000/power6.md: Adjust.
12904         * config/rs6000/power7.md: Adjust.
12905         * config/rs6000/power8.md: Adjust.
12906         * config/rs6000/power9.md: Adjust.
12907         * config/rs6000/rs64.md: Adjust.
12908         * config/rs6000/titan.md: Adjust.
12910 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
12912         * config/i386/predicates.md (indirect_branch_operand): Rewrite
12913         ix86_indirect_branch_register logic.
12915 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
12917         * config/i386/constraints.md (Bs): Update
12918         ix86_indirect_branch_register check.  Don't check
12919         ix86_indirect_branch_register with GOT_memory_operand.
12920         (Bw): Likewise.
12921         * config/i386/predicates.md (GOT_memory_operand): Don't check
12922         ix86_indirect_branch_register here.
12923         (GOT32_symbol_operand): Likewise.
12925 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
12927         * config/i386/predicates.md (constant_call_address_operand):
12928         Rewrite ix86_indirect_branch_register logic.
12929         (sibcall_insn_operand): Likewise.
12931 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
12933         * config/i386/constraints.md (Bs): Replace
12934         ix86_indirect_branch_thunk_register with
12935         ix86_indirect_branch_register.
12936         (Bw): Likewise.
12937         * config/i386/i386.md (indirect_jump): Likewise.
12938         (tablejump): Likewise.
12939         (*sibcall_memory): Likewise.
12940         (*sibcall_value_memory): Likewise.
12941         Peepholes of indirect call and jump via memory: Likewise.
12942         * config/i386/i386.opt: Likewise.
12943         * config/i386/predicates.md (indirect_branch_operand): Likewise.
12944         (GOT_memory_operand): Likewise.
12945         (call_insn_operand): Likewise.
12946         (sibcall_insn_operand): Likewise.
12947         (GOT32_symbol_operand): Likewise.
12949 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
12951         PR middle-end/83837
12952         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
12953         type rather than type addr's type points to.
12954         (expand_omp_atomic_mutex): Likewise.
12955         (expand_omp_atomic): Likewise.
12957 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
12959         PR target/83839
12960         * config/i386/i386.c (output_indirect_thunk_function): Use
12961         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
12962         for  __x86_return_thunk.
12964 2018-01-15  Richard Biener  <rguenther@suse.de>
12966         PR middle-end/83850
12967         * expmed.c (extract_bit_field_1): Fix typo.
12969 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12971         PR target/83687
12972         * config/arm/iterators.md (VF): New mode iterator.
12973         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
12974         Remove integer-related logic from pattern.
12975         (neon_vabd<mode>_3): Likewise.
12977 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
12979         PR middle-end/82694
12980         * common.opt (fstrict-overflow): No longer an alias.
12981         (fwrapv-pointer): New option.
12982         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
12983         also for pointer types based on flag_wrapv_pointer.
12984         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
12985         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
12986         opts->x_flag_wrapv got set.
12987         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
12988         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
12989         POINTER_TYPE_OVERFLOW_UNDEFINED.
12990         * match.pd: Likewise in address comparison pattern.
12991         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
12993 2018-01-15  Richard Biener  <rguenther@suse.de>
12995         PR lto/83804
12996         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
12997         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
12998         Reset type names to their identifier if their TYPE_DECL doesn't
12999         have linkage (and thus is used for ODR and devirt).
13000         (save_debug_info_for_decl): Remove.
13001         (save_debug_info_for_type): Likewise.
13002         (add_tree_to_fld_list): Adjust.
13003         * tree-pretty-print.c (dump_generic_node): Make dumping of
13004         type names more robust.
13006 2018-01-15  Richard Biener  <rguenther@suse.de>
13008         * BASE-VER: Bump to 8.0.1.
13010 2018-01-14  Martin Sebor  <msebor@redhat.com>
13012         PR other/83508
13013         * builtins.c (check_access): Avoid warning when the no-warning bit
13014         is set.
13016 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13018         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13019         * ira-color (allocno_hard_regs_compare): Likewise.
13021 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13023         PR target/83013
13024         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13025         Use .pushsection/.popsection.
13027 2018-01-14  Martin Sebor  <msebor@redhat.com>
13029         PR c++/81327
13030         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13032 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13034         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13035         entry from extra_headers.
13036         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13037         extra_headers, make the list bitwise identical to the i?86-*-* one.
13039 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13041         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13042         -mcmodel=large with -mindirect-branch=thunk,
13043         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13044         -mfunction-return=thunk-extern.
13045         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13046         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13047         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13049 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13051         * config/i386/i386.c (print_reg): Print the name of the full
13052         integer register without '%'.
13053         (ix86_print_operand): Handle 'V'.
13054         * doc/extend.texi: Document 'V' modifier.
13056 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13058         * config/i386/constraints.md (Bs): Disallow memory operand for
13059         -mindirect-branch-register.
13060         (Bw): Likewise.
13061         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13062         (GOT_memory_operand): Likewise.
13063         (call_insn_operand): Likewise.
13064         (sibcall_insn_operand): Likewise.
13065         (GOT32_symbol_operand): Likewise.
13066         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13067         for -mindirect-branch-register.
13068         (tablejump): Likewise.
13069         (*sibcall_memory): Likewise.
13070         (*sibcall_value_memory): Likewise.
13071         Disallow peepholes of indirect call and jump via memory for
13072         -mindirect-branch-register.
13073         (*call_pop): Replace m with Bw.
13074         (*call_value_pop): Likewise.
13075         (*sibcall_pop_memory): Replace m with Bs.
13076         * config/i386/i386.opt (mindirect-branch-register): New option.
13077         * doc/invoke.texi: Document -mindirect-branch-register option.
13079 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13081         * config/i386/i386-protos.h (ix86_output_function_return): New.
13082         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13083         set function_return_type.
13084         (indirect_thunk_name): Add ret_p to indicate thunk for function
13085         return.
13086         (output_indirect_thunk_function): Pass false to
13087         indirect_thunk_name.
13088         (ix86_output_indirect_branch_via_reg): Likewise.
13089         (ix86_output_indirect_branch_via_push): Likewise.
13090         (output_indirect_thunk_function): Create alias for function
13091         return thunk if regno < 0.
13092         (ix86_output_function_return): New function.
13093         (ix86_handle_fndecl_attribute): Handle function_return.
13094         (ix86_attribute_table): Add function_return.
13095         * config/i386/i386.h (machine_function): Add
13096         function_return_type.
13097         * config/i386/i386.md (simple_return_internal): Use
13098         ix86_output_function_return.
13099         (simple_return_internal_long): Likewise.
13100         * config/i386/i386.opt (mfunction-return=): New option.
13101         (indirect_branch): Mention -mfunction-return=.
13102         * doc/extend.texi: Document function_return function attribute.
13103         * doc/invoke.texi: Document -mfunction-return= option.
13105 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13107         * config/i386/i386-opts.h (indirect_branch): New.
13108         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13109         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13110         with local indirect jump when converting indirect call and jump.
13111         (ix86_set_indirect_branch_type): New.
13112         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13113         (indirectlabelno): New.
13114         (indirect_thunk_needed): Likewise.
13115         (indirect_thunk_bnd_needed): Likewise.
13116         (indirect_thunks_used): Likewise.
13117         (indirect_thunks_bnd_used): Likewise.
13118         (INDIRECT_LABEL): Likewise.
13119         (indirect_thunk_name): Likewise.
13120         (output_indirect_thunk): Likewise.
13121         (output_indirect_thunk_function): Likewise.
13122         (ix86_output_indirect_branch_via_reg): Likewise.
13123         (ix86_output_indirect_branch_via_push): Likewise.
13124         (ix86_output_indirect_branch): Likewise.
13125         (ix86_output_indirect_jmp): Likewise.
13126         (ix86_code_end): Call output_indirect_thunk_function if needed.
13127         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13128         needed.
13129         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13130         (ix86_attribute_table): Add indirect_branch.
13131         * config/i386/i386.h (machine_function): Add indirect_branch_type
13132         and has_local_indirect_jump.
13133         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13134         to true.
13135         (tablejump): Likewise.
13136         (*indirect_jump): Use ix86_output_indirect_jmp.
13137         (*tablejump_1): Likewise.
13138         (simple_return_indirect_internal): Likewise.
13139         * config/i386/i386.opt (mindirect-branch=): New option.
13140         (indirect_branch): New.
13141         (keep): Likewise.
13142         (thunk): Likewise.
13143         (thunk-inline): Likewise.
13144         (thunk-extern): Likewise.
13145         * doc/extend.texi: Document indirect_branch function attribute.
13146         * doc/invoke.texi: Document -mindirect-branch= option.
13148 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13150         PR ipa/83051
13151         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13153 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13155         * ipa-inline.c (want_inline_small_function_p): Return false if
13156         inlining has already failed with CIF_FINAL_ERROR.
13157         (update_caller_keys): Call want_inline_small_function_p before
13158         can_inline_edge_p.
13159         (update_callee_keys): Likewise.
13161 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13163         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13164         New function.
13165         (rs6000_quadword_masked_address_p): Likewise.
13166         (quad_aligned_load_p): Likewise.
13167         (quad_aligned_store_p): Likewise.
13168         (const_load_sequence_p): Add comment to describe the outer-most loop.
13169         (mimic_memory_attributes_and_flags): New function.
13170         (rs6000_gen_stvx): Likewise.
13171         (replace_swapped_aligned_store): Likewise.
13172         (rs6000_gen_lvx): Likewise.
13173         (replace_swapped_aligned_load): Likewise.
13174         (replace_swapped_load_constant): Capitalize argument name in
13175         comment describing this function.
13176         (rs6000_analyze_swaps): Add a third pass to search for vector loads
13177         and stores that access quad-word aligned addresses and replace
13178         with stvx or lvx instructions when appropriate.
13179         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13180         New function prototype.
13181         (rs6000_quadword_masked_address_p): Likewise.
13182         (rs6000_gen_lvx): Likewise.
13183         (rs6000_gen_stvx): Likewise.
13184         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13185         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13186         when memory address is aligned.
13187         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13188         this split to select lvx instruction when memory address is aligned.
13189         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13190         instruction when memory address is aligned.
13191         (*vsx_le_perm_load_v16qi): Likewise.
13192         (four unnamed splitters): Modify to select the stvx instruction
13193         when memory is aligned.
13195 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
13197         * predict.c (determine_unlikely_bbs): Handle correctly BBs
13198         which appears in the queue multiple times.
13200 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13201             Alan Hayward  <alan.hayward@arm.com>
13202             David Sherwood  <david.sherwood@arm.com>
13204         * tree-vectorizer.h (vec_lower_bound): New structure.
13205         (_loop_vec_info): Add check_nonzero and lower_bounds.
13206         (LOOP_VINFO_CHECK_NONZERO): New macro.
13207         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13208         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13209         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13210         fields.  Make seg_len the distance travelled, not including the
13211         access size.
13212         (dr_direction_indicator): Declare.
13213         (dr_zero_step_indicator): Likewise.
13214         (dr_known_forward_stride_p): Likewise.
13215         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13216         tree-ssanames.h.
13217         (runtime_alias_check_p): Allow runtime alias checks with
13218         variable strides.
13219         (operator ==): Compare access_size and align.
13220         (prune_runtime_alias_test_list): Rework for new distinction between
13221         the access_size and seg_len.
13222         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
13223         segment lengths.
13224         (get_segment_min_max): New function.
13225         (create_intersect_range_checks): Use it.
13226         (dr_step_indicator): New function.
13227         (dr_direction_indicator): Likewise.
13228         (dr_zero_step_indicator): Likewise.
13229         (dr_known_forward_stride_p): Likewise.
13230         * tree-loop-distribution.c (data_ref_segment_size): Return
13231         DR_STEP * (niters - 1).
13232         (compute_alias_check_pairs): Update call to the dr_with_seg_len
13233         constructor.
13234         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13235         (vect_preserves_scalar_order_p): New function, split out from...
13236         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
13237         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13238         (vect_vfa_access_size): New function.
13239         (vect_vfa_align): Likewise.
13240         (vect_compile_time_alias): Take access_size_a and access_b arguments.
13241         (dump_lower_bound): New function.
13242         (vect_check_lower_bound): Likewise.
13243         (vect_small_gap_p): Likewise.
13244         (vectorizable_with_step_bound_p): Likewise.
13245         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13246         depencies if the vectorization factor is 1.  Convert the checks
13247         for nonzero steps into checks on the bounds of DR_STEP.  Try using
13248         a bunds check for variable steps if the minimum required step is
13249         relatively small. Update calls to the dr_with_seg_len
13250         constructor and to vect_compile_time_alias.
13251         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13252         function.
13253         (vect_loop_versioning): Call it.
13254         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13255         when retrying.
13256         (vect_estimate_min_profitable_iters): Account for any bounds checks.
13258 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13259             Alan Hayward  <alan.hayward@arm.com>
13260             David Sherwood  <david.sherwood@arm.com>
13262         * doc/sourcebuild.texi (vect_scatter_store): Document.
13263         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13264         optabs.
13265         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13266         Document.
13267         * genopinit.c (main): Add supports_vec_scatter_store and
13268         supports_vec_scatter_store_cached to target_optabs.
13269         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13270         IFN_MASK_SCATTER_STORE.
13271         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13272         functions.
13273         * internal-fn.h (internal_store_fn_p): Declare.
13274         (internal_fn_stored_value_index): Likewise.
13275         * internal-fn.c (scatter_store_direct): New macro.
13276         (expand_scatter_store_optab_fn): New function.
13277         (direct_scatter_store_optab_supported_p): New macro.
13278         (internal_store_fn_p): New function.
13279         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13280         IFN_MASK_SCATTER_STORE.
13281         (internal_fn_mask_index): Likewise.
13282         (internal_fn_stored_value_index): New function.
13283         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13284         for scatter stores.
13285         * optabs-query.h (supports_vec_scatter_store_p): Declare.
13286         * optabs-query.c (supports_vec_scatter_store_p): New function.
13287         * tree-vectorizer.h (vect_get_store_rhs): Declare.
13288         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13289         true for scatter stores.
13290         (vect_gather_scatter_fn_p): Handle scatter stores too.
13291         (vect_check_gather_scatter): Consider using scatter stores if
13292         supports_vec_scatter_store_p.
13293         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13294         scatter stores too.
13295         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13296         internal_fn_stored_value_index.
13297         (check_load_store_masking): Handle scatter stores too.
13298         (vect_get_store_rhs): Make public.
13299         (vectorizable_call): Use internal_store_fn_p.
13300         (vectorizable_store): Handle scatter store internal functions.
13301         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13302         when deciding whether the end of the group has been reached.
13303         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13304         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13305         (mask_scatter_store<mode>): New insns.
13307 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13308             Alan Hayward  <alan.hayward@arm.com>
13309             David Sherwood  <david.sherwood@arm.com>
13311         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13312         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13313         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13314         function.
13315         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13316         Use vect_truncate_gather_scatter_offset if we can't treat the
13317         operation as a normal gather load or scatter store.
13318         (get_group_load_store_type): Take the gather_scatter_info
13319         as argument.  Try using a gather load or scatter store for
13320         single-element groups.
13321         (get_load_store_type): Update calls to get_group_load_store_type
13322         and vect_use_strided_gather_scatters_p.
13324 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13325             Alan Hayward  <alan.hayward@arm.com>
13326             David Sherwood  <david.sherwood@arm.com>
13328         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13329         optional tree argument.
13330         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13331         null target hooks.
13332         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13333         but continue to use the current value as a fallback.
13334         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13335         to compare the updates.
13336         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13337         (get_load_store_type): Use it when handling a strided access.
13338         (vect_get_strided_load_store_ops): New function.
13339         (vect_get_data_ptr_increment): Likewise.
13340         (vectorizable_load): Handle strided gather loads.  Always pass
13341         a step to vect_create_data_ref_ptr and bump_vector_ptr.
13343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13344             Alan Hayward  <alan.hayward@arm.com>
13345             David Sherwood  <david.sherwood@arm.com>
13347         * doc/md.texi (gather_load@var{m}): Document.
13348         (mask_gather_load@var{m}): Likewise.
13349         * genopinit.c (main): Add supports_vec_gather_load and
13350         supports_vec_gather_load_cached to target_optabs.
13351         * optabs-tree.c (init_tree_optimization_optabs): Use
13352         ggc_cleared_alloc to allocate target_optabs.
13353         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13354         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13355         functions.
13356         * internal-fn.h (internal_load_fn_p): Declare.
13357         (internal_gather_scatter_fn_p): Likewise.
13358         (internal_fn_mask_index): Likewise.
13359         (internal_gather_scatter_fn_supported_p): Likewise.
13360         * internal-fn.c (gather_load_direct): New macro.
13361         (expand_gather_load_optab_fn): New function.
13362         (direct_gather_load_optab_supported_p): New macro.
13363         (direct_internal_fn_optab): New function.
13364         (internal_load_fn_p): Likewise.
13365         (internal_gather_scatter_fn_p): Likewise.
13366         (internal_fn_mask_index): Likewise.
13367         (internal_gather_scatter_fn_supported_p): Likewise.
13368         * optabs-query.c (supports_at_least_one_mode_p): New function.
13369         (supports_vec_gather_load_p): Likewise.
13370         * optabs-query.h (supports_vec_gather_load_p): Declare.
13371         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13372         and memory_type field.
13373         (NUM_PATTERNS): Bump to 15.
13374         * tree-vect-data-refs.c: Include internal-fn.h.
13375         (vect_gather_scatter_fn_p): New function.
13376         (vect_describe_gather_scatter_call): Likewise.
13377         (vect_check_gather_scatter): Try using internal functions for
13378         gather loads.  Recognize existing calls to a gather load function.
13379         (vect_analyze_data_refs): Consider using gather loads if
13380         supports_vec_gather_load_p.
13381         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13382         (vect_get_gather_scatter_offset_type): Likewise.
13383         (vect_convert_mask_for_vectype): Likewise.
13384         (vect_add_conversion_to_patterm): Likewise.
13385         (vect_try_gather_scatter_pattern): Likewise.
13386         (vect_recog_gather_scatter_pattern): New pattern recognizer.
13387         (vect_vect_recog_func_ptrs): Add it.
13388         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13389         internal_fn_mask_index and internal_gather_scatter_fn_p.
13390         (check_load_store_masking): Take the gather_scatter_info as an
13391         argument and handle gather loads.
13392         (vect_get_gather_scatter_ops): New function.
13393         (vectorizable_call): Check internal_load_fn_p.
13394         (vectorizable_load): Likewise.  Handle gather load internal
13395         functions.
13396         (vectorizable_store): Update call to check_load_store_masking.
13397         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13398         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13399         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13400         (aarch64_gather_scale_operand_d): New predicates.
13401         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13402         (mask_gather_load<mode>): New insns.
13404 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13405             Alan Hayward  <alan.hayward@arm.com>
13406             David Sherwood  <david.sherwood@arm.com>
13408         * optabs.def (fold_left_plus_optab): New optab.
13409         * doc/md.texi (fold_left_plus_@var{m}): Document.
13410         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13411         * internal-fn.c (fold_left_direct): Define.
13412         (expand_fold_left_optab_fn): Likewise.
13413         (direct_fold_left_optab_supported_p): Likewise.
13414         * fold-const-call.c (fold_const_fold_left): New function.
13415         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13416         * tree-parloops.c (valid_reduction_p): New function.
13417         (gather_scalar_reductions): Use it.
13418         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13419         (vect_finish_replace_stmt): Declare.
13420         * tree-vect-loop.c (fold_left_reduction_fn): New function.
13421         (needs_fold_left_reduction_p): New function, split out from...
13422         (vect_is_simple_reduction): ...here.  Accept reductions that
13423         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13424         (vect_force_simple_reduction): Also store the reduction type in
13425         the assignment's STMT_VINFO_REDUC_TYPE.
13426         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13427         (merge_with_identity): New function.
13428         (vect_expand_fold_left): Likewise.
13429         (vectorize_fold_left_reduction): Likewise.
13430         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
13431         scalar phi in place for it.  Check for target support and reject
13432         cases that would reassociate the operation.  Defer the transform
13433         phase to vectorize_fold_left_reduction.
13434         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13435         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13436         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13438 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13440         * tree-if-conv.c (predicate_mem_writes): Remove redundant
13441         call to ifc_temp_var.
13443 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13444             Alan Hayward  <alan.hayward@arm.com>
13445             David Sherwood  <david.sherwood@arm.com>
13447         * target.def (legitimize_address_displacement): Take the original
13448         offset as a poly_int.
13449         * targhooks.h (default_legitimize_address_displacement): Update
13450         accordingly.
13451         * targhooks.c (default_legitimize_address_displacement): Likewise.
13452         * doc/tm.texi: Regenerate.
13453         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13454         as an argument, moving assert of ad->disp == ad->disp_term to...
13455         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
13456         Try calling targetm.legitimize_address_displacement before expanding
13457         the address rather than afterwards, and adjust for the new interface.
13458         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13459         Match the new hook interface.  Handle SVE addresses.
13460         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13461         new hook interface.
13463 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13465         * Makefile.in (OBJS): Add early-remat.o.
13466         * target.def (select_early_remat_modes): New hook.
13467         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13468         * doc/tm.texi: Regenerate.
13469         * targhooks.h (default_select_early_remat_modes): Declare.
13470         * targhooks.c (default_select_early_remat_modes): New function.
13471         * timevar.def (TV_EARLY_REMAT): New timevar.
13472         * passes.def (pass_early_remat): New pass.
13473         * tree-pass.h (make_pass_early_remat): Declare.
13474         * early-remat.c: New file.
13475         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13476         function.
13477         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13479 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13480             Alan Hayward  <alan.hayward@arm.com>
13481             David Sherwood  <david.sherwood@arm.com>
13483         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13484         vfm1 with a bound_epilog parameter.
13485         (vect_do_peeling): Update calls accordingly, and move the prologue
13486         call earlier in the function.  Treat the base bound_epilog as 0 for
13487         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
13488         this base when peeling for gaps.
13489         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13490         with fully-masked loops.
13491         (vect_estimate_min_profitable_iters): Handle the single peeled
13492         iteration in that case.
13494 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13495             Alan Hayward  <alan.hayward@arm.com>
13496             David Sherwood  <david.sherwood@arm.com>
13498         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13499         single-element interleaving even if the size is not a power of 2.
13500         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13501         accesses for single-element interleaving if the group size is
13502         not a power of 2.
13504 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13505             Alan Hayward  <alan.hayward@arm.com>
13506             David Sherwood  <david.sherwood@arm.com>
13508         * doc/md.texi (fold_extract_last_@var{m}): Document.
13509         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13510         * optabs.def (fold_extract_last_optab): New optab.
13511         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13512         * internal-fn.c (fold_extract_direct): New macro.
13513         (expand_fold_extract_optab_fn): Likewise.
13514         (direct_fold_extract_optab_supported_p): Likewise.
13515         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13516         * tree-vect-loop.c (vect_model_reduction_cost): Handle
13517         EXTRACT_LAST_REDUCTION.
13518         (get_initial_def_for_reduction): Do not create an initial vector
13519         for EXTRACT_LAST_REDUCTION reductions.
13520         (vectorizable_reduction): Leave the scalar phi in place for
13521         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
13522         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
13523         epilogue code for EXTRACT_LAST_REDUCTION and defer the
13524         transform phase to vectorizable_condition.
13525         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13526         split out from...
13527         (vect_finish_stmt_generation): ...here.
13528         (vect_finish_replace_stmt): New function.
13529         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13530         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13531         pattern.
13532         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13534 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13535             Alan Hayward  <alan.hayward@arm.com>
13536             David Sherwood  <david.sherwood@arm.com>
13538         * doc/md.texi (extract_last_@var{m}): Document.
13539         * optabs.def (extract_last_optab): New optab.
13540         * internal-fn.def (EXTRACT_LAST): New internal function.
13541         * internal-fn.c (cond_unary_direct): New macro.
13542         (expand_cond_unary_optab_fn): Likewise.
13543         (direct_cond_unary_optab_supported_p): Likewise.
13544         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13545         loops using EXTRACT_LAST.
13546         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13547         (extract_last_<mode>): ...this optab.
13548         (vec_extract<mode><Vel>): Update accordingly.
13550 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13551             Alan Hayward  <alan.hayward@arm.com>
13552             David Sherwood  <david.sherwood@arm.com>
13554         * target.def (empty_mask_is_expensive): New hook.
13555         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13556         * doc/tm.texi: Regenerate.
13557         * targhooks.h (default_empty_mask_is_expensive): Declare.
13558         * targhooks.c (default_empty_mask_is_expensive): New function.
13559         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13560         if the target says that empty masks are expensive.
13561         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13562         New function.
13563         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13565 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13566             Alan Hayward  <alan.hayward@arm.com>
13567             David Sherwood  <david.sherwood@arm.com>
13569         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13570         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13571         (vect_use_loop_mask_for_alignment_p): New function.
13572         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13573         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13574         niters_skip argument.  Make sure that the first niters_skip elements
13575         of the first iteration are inactive.
13576         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13577         Update call to vect_set_loop_masks_directly.
13578         (get_misalign_in_elems): New function, split out from...
13579         (vect_gen_prolog_loop_niters): ...here.
13580         (vect_update_init_of_dr): Take a code argument that specifies whether
13581         the adjustment should be added or subtracted.
13582         (vect_update_init_of_drs): Likewise.
13583         (vect_prepare_for_masked_peels): New function.
13584         (vect_do_peeling): Skip prologue peeling if we're using a mask
13585         instead.  Update call to vect_update_inits_of_drs.
13586         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13587         mask_skip_niters.
13588         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13589         alignment.  Do not include the number of peeled iterations in
13590         the minimum threshold in that case.
13591         (vectorizable_induction): Adjust the start value down by
13592         LOOP_VINFO_MASK_SKIP_NITERS iterations.
13593         (vect_transform_loop): Call vect_prepare_for_masked_peels.
13594         Take the number of skipped iterations into account when calculating
13595         the loop bounds.
13596         * tree-vect-stmts.c (vect_gen_while_not): New function.
13598 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13599             Alan Hayward  <alan.hayward@arm.com>
13600             David Sherwood  <david.sherwood@arm.com>
13602         * doc/sourcebuild.texi (vect_fully_masked): Document.
13603         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
13604         default value to 0.
13605         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
13606         split out from...
13607         (vect_analyze_loop_2): ...here. Don't check the vectorization
13608         factor against the number of loop iterations if the loop is
13609         fully-masked.
13611 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13612             Alan Hayward  <alan.hayward@arm.com>
13613             David Sherwood  <david.sherwood@arm.com>
13615         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
13616         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
13617         (dump_groups): Update accordingly.
13618         (iv_use::mem_type): New member variable.
13619         (address_p): New function.
13620         (record_use): Add a mem_type argument and initialize the new
13621         mem_type field.
13622         (record_group_use): Add a mem_type argument.  Use address_p.
13623         Remove obsolete null checks of base_object.  Update call to record_use.
13624         (find_interesting_uses_op): Update call to record_group_use.
13625         (find_interesting_uses_cond): Likewise.
13626         (find_interesting_uses_address): Likewise.
13627         (get_mem_type_for_internal_fn): New function.
13628         (find_address_like_use): Likewise.
13629         (find_interesting_uses_stmt): Try find_address_like_use before
13630         calling find_interesting_uses_op.
13631         (addr_offset_valid_p): Use the iv mem_type field as the type
13632         of the addressed memory.
13633         (add_autoinc_candidates): Likewise.
13634         (get_address_cost): Likewise.
13635         (split_small_address_groups_p): Use address_p.
13636         (split_address_groups): Likewise.
13637         (add_iv_candidate_for_use): Likewise.
13638         (autoinc_possible_for_pair): Likewise.
13639         (rewrite_groups): Likewise.
13640         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
13641         (determine_group_iv_cost): Update after split of USE_ADDRESS.
13642         (get_alias_ptr_type_for_ptr_address): New function.
13643         (rewrite_use_address): Rewrite address uses in calls that were
13644         identified by find_address_like_use.
13646 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13647             Alan Hayward  <alan.hayward@arm.com>
13648             David Sherwood  <david.sherwood@arm.com>
13650         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
13651         TARGET_MEM_REFs.
13652         * gimple-expr.h (is_gimple_addressable: Likewise.
13653         * gimple-expr.c (is_gimple_address): Likewise.
13654         * internal-fn.c (expand_call_mem_ref): New function.
13655         (expand_mask_load_optab_fn): Use it.
13656         (expand_mask_store_optab_fn): Likewise.
13658 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13659             Alan Hayward  <alan.hayward@arm.com>
13660             David Sherwood  <david.sherwood@arm.com>
13662         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
13663         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
13664         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
13665         (cond_umax@var{mode}): Document.
13666         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
13667         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
13668         (cond_umin_optab, cond_umax_optab): New optabs.
13669         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
13670         (COND_IOR, COND_XOR): New internal functions.
13671         * internal-fn.h (get_conditional_internal_fn): Declare.
13672         * internal-fn.c (cond_binary_direct): New macro.
13673         (expand_cond_binary_optab_fn): Likewise.
13674         (direct_cond_binary_optab_supported_p): Likewise.
13675         (get_conditional_internal_fn): New function.
13676         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
13677         Cope with reduction statements that are vectorized as calls rather
13678         than assignments.
13679         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
13680         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
13681         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
13682         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13683         (UNSPEC_COND_EOR): New unspecs.
13684         (optab): Add mappings for them.
13685         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
13686         (sve_int_op, sve_fp_op): New int attributes.
13688 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13689             Alan Hayward  <alan.hayward@arm.com>
13690             David Sherwood  <david.sherwood@arm.com>
13692         * optabs.def (while_ult_optab): New optab.
13693         * doc/md.texi (while_ult@var{m}@var{n}): Document.
13694         * internal-fn.def (WHILE_ULT): New internal function.
13695         * internal-fn.h (direct_internal_fn_supported_p): New override
13696         that takes two types as argument.
13697         * internal-fn.c (while_direct): New macro.
13698         (expand_while_optab_fn): New function.
13699         (convert_optab_supported_p): Likewise.
13700         (direct_while_optab_supported_p): New macro.
13701         * wide-int.h (wi::udiv_ceil): New function.
13702         * tree-vectorizer.h (rgroup_masks): New structure.
13703         (vec_loop_masks): New typedef.
13704         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
13705         and fully_masked_p.
13706         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
13707         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
13708         (vect_max_vf): New function.
13709         (slpeel_make_loop_iterate_ntimes): Delete.
13710         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
13711         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
13712         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
13713         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
13714         internal-fn.h, stor-layout.h and optabs-query.h.
13715         (vect_set_loop_mask): New function.
13716         (add_preheader_seq): Likewise.
13717         (add_header_seq): Likewise.
13718         (interleave_supported_p): Likewise.
13719         (vect_maybe_permute_loop_masks): Likewise.
13720         (vect_set_loop_masks_directly): Likewise.
13721         (vect_set_loop_condition_masked): Likewise.
13722         (vect_set_loop_condition_unmasked): New function, split out from
13723         slpeel_make_loop_iterate_ntimes.
13724         (slpeel_make_loop_iterate_ntimes): Rename to..
13725         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
13726         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
13727         (vect_do_peeling): Update call accordingly.
13728         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
13729         loops.
13730         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13731         mask_compare_type, can_fully_mask_p and fully_masked_p.
13732         (release_vec_loop_masks): New function.
13733         (_loop_vec_info): Use it to free the loop masks.
13734         (can_produce_all_loop_masks_p): New function.
13735         (vect_get_max_nscalars_per_iter): Likewise.
13736         (vect_verify_full_masking): Likewise.
13737         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
13738         retries, and free the mask rgroups before retrying.  Check loop-wide
13739         reasons for disallowing fully-masked loops.  Make the final decision
13740         about whether use a fully-masked loop or not.
13741         (vect_estimate_min_profitable_iters): Do not assume that peeling
13742         for the number of iterations will be needed for fully-masked loops.
13743         (vectorizable_reduction): Disable fully-masked loops.
13744         (vectorizable_live_operation): Likewise.
13745         (vect_halve_mask_nunits): New function.
13746         (vect_double_mask_nunits): Likewise.
13747         (vect_record_loop_mask): Likewise.
13748         (vect_get_loop_mask): Likewise.
13749         (vect_transform_loop): Handle the case in which the final loop
13750         iteration might handle a partial vector.  Call vect_set_loop_condition
13751         instead of slpeel_make_loop_iterate_ntimes.
13752         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
13753         (check_load_store_masking): New function.
13754         (prepare_load_store_mask): Likewise.
13755         (vectorizable_store): Handle fully-masked loops.
13756         (vectorizable_load): Likewise.
13757         (supportable_widening_operation): Use vect_halve_mask_nunits for
13758         booleans.
13759         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
13760         (vect_gen_while): New function.
13761         * config/aarch64/aarch64.md (umax<mode>3): New expander.
13762         (aarch64_uqdec<mode>): New insn.
13764 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13765             Alan Hayward  <alan.hayward@arm.com>
13766             David Sherwood  <david.sherwood@arm.com>
13768         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
13769         (reduc_xor_scal_optab): New optabs.
13770         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
13771         (reduc_xor_scal_@var{m}): Document.
13772         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
13773         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
13774         internal functions.
13775         * fold-const-call.c (fold_const_call): Handle them.
13776         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
13777         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
13778         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
13779         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
13780         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
13781         (UNSPEC_XORV): New unspecs.
13782         (optab): Add entries for them.
13783         (BITWISEV): New int iterator.
13784         (bit_reduc_op): New int attributes.
13786 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13787             Alan Hayward  <alan.hayward@arm.com>
13788             David Sherwood  <david.sherwood@arm.com>
13790         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
13791         * internal-fn.def (VEC_SHL_INSERT): New internal function.
13792         * optabs.def (vec_shl_insert_optab): New optab.
13793         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
13794         (duplicate_and_interleave): Likewise.
13795         * tree-vect-loop.c: Include internal-fn.h.
13796         (neutral_op_for_slp_reduction): New function, split out from
13797         get_initial_defs_for_reduction.
13798         (get_initial_def_for_reduction): Handle option 2 for variable-length
13799         vectors by loading the neutral value into a vector and then shifting
13800         the initial value into element 0.
13801         (get_initial_defs_for_reduction): Replace the code argument with
13802         the neutral value calculated by neutral_op_for_slp_reduction.
13803         Use gimple_build_vector for constant-length vectors.
13804         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
13805         but the first group_size elements have a neutral value.
13806         Use duplicate_and_interleave otherwise.
13807         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
13808         Update call to get_initial_defs_for_reduction.  Handle SLP
13809         reductions for variable-length vectors by creating one vector
13810         result for each scalar result, with the elements associated
13811         with other scalar results stubbed out with the neutral value.
13812         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
13813         Require IFN_VEC_SHL_INSERT for double reductions on
13814         variable-length vectors, or SLP reductions that have
13815         a neutral value.  Require can_duplicate_and_interleave_p
13816         support for variable-length unchained SLP reductions if there
13817         is no neutral value, such as for MIN/MAX reductions.  Also require
13818         the number of vector elements to be a multiple of the number of
13819         SLP statements when doing variable-length unchained SLP reductions.
13820         Update call to vect_create_epilog_for_reduction.
13821         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
13822         and remove initial values.
13823         (duplicate_and_interleave): Make public.
13824         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
13825         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
13827 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13828             Alan Hayward  <alan.hayward@arm.com>
13829             David Sherwood  <david.sherwood@arm.com>
13831         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
13832         (can_duplicate_and_interleave_p): New function.
13833         (vect_get_and_check_slp_defs): Take the vector of statements
13834         rather than just the current one.  Remove excess parentheses.
13835         Restriction rejectinon of vect_constant_def and vect_external_def
13836         for variable-length vectors to boolean types, or types for which
13837         can_duplicate_and_interleave_p is false.
13838         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
13839         (duplicate_and_interleave): New function.
13840         (vect_get_constant_vectors): Use gimple_build_vector for
13841         constant-length vectors and suitable variable-length constant
13842         vectors.  Use duplicate_and_interleave for other variable-length
13843         vectors.  Don't defer the update when inserting new statements.
13845 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13846             Alan Hayward  <alan.hayward@arm.com>
13847             David Sherwood  <david.sherwood@arm.com>
13849         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
13850         min_profitable_iters doesn't go negative.
13852 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13853             Alan Hayward  <alan.hayward@arm.com>
13854             David Sherwood  <david.sherwood@arm.com>
13856         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
13857         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
13858         * optabs.def (vec_mask_load_lanes_optab): New optab.
13859         (vec_mask_store_lanes_optab): Likewise.
13860         * internal-fn.def (MASK_LOAD_LANES): New internal function.
13861         (MASK_STORE_LANES): Likewise.
13862         * internal-fn.c (mask_load_lanes_direct): New macro.
13863         (mask_store_lanes_direct): Likewise.
13864         (expand_mask_load_optab_fn): Handle masked operations.
13865         (expand_mask_load_lanes_optab_fn): New macro.
13866         (expand_mask_store_optab_fn): Handle masked operations.
13867         (expand_mask_store_lanes_optab_fn): New macro.
13868         (direct_mask_load_lanes_optab_supported_p): Likewise.
13869         (direct_mask_store_lanes_optab_supported_p): Likewise.
13870         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
13871         parameter.
13872         (vect_load_lanes_supported): Likewise.
13873         * tree-vect-data-refs.c (strip_conversion): New function.
13874         (can_group_stmts_p): Likewise.
13875         (vect_analyze_data_ref_accesses): Use it instead of checking
13876         for a pair of assignments.
13877         (vect_store_lanes_supported): Take a masked_p parameter.
13878         (vect_load_lanes_supported): Likewise.
13879         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
13880         vect_store_lanes_supported and vect_load_lanes_supported.
13881         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13882         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
13883         parameter.  Don't allow gaps for masked accesses.
13884         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
13885         and vect_load_lanes_supported.
13886         (get_load_store_type): Take a masked_p parameter and update
13887         call to get_group_load_store_type.
13888         (vectorizable_store): Update call to get_load_store_type.
13889         Handle IFN_MASK_STORE_LANES.
13890         (vectorizable_load): Update call to get_load_store_type.
13891         Handle IFN_MASK_LOAD_LANES.
13893 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13894             Alan Hayward  <alan.hayward@arm.com>
13895             David Sherwood  <david.sherwood@arm.com>
13897         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
13898         modes for SVE.
13899         * config/aarch64/aarch64-protos.h
13900         (aarch64_sve_struct_memory_operand_p): Declare.
13901         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
13902         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
13903         (VPRED, vpred): Handle SVE structure modes.
13904         * config/aarch64/constraints.md (Utx): New constraint.
13905         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
13906         (aarch64_sve_struct_nonimmediate_operand): New predicates.
13907         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
13908         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
13909         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
13910         structure modes.  Split into pieces after RA.
13911         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
13912         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
13913         New patterns.
13914         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
13915         SVE structure modes.
13916         (aarch64_classify_address): Likewise.
13917         (sizetochar): Move earlier in file.
13918         (aarch64_print_operand): Handle SVE register lists.
13919         (aarch64_array_mode): New function.
13920         (aarch64_sve_struct_memory_operand_p): Likewise.
13921         (TARGET_ARRAY_MODE): Redefine.
13923 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13924             Alan Hayward  <alan.hayward@arm.com>
13925             David Sherwood  <david.sherwood@arm.com>
13927         * target.def (array_mode): New target hook.
13928         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
13929         * doc/tm.texi: Regenerate.
13930         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
13931         * hooks.c (hook_optmode_mode_uhwi_none): New function.
13932         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
13933         targetm.array_mode.
13934         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
13935         type sizes.
13937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13938             Alan Hayward  <alan.hayward@arm.com>
13939             David Sherwood  <david.sherwood@arm.com>
13941         * fold-const.c (fold_binary_loc): Check the argument types
13942         rather than the result type when testing for a vector operation.
13944 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13946         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
13947         * doc/tm.texi: Regenerate.
13949 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13950             Alan Hayward  <alan.hayward@arm.com>
13951             David Sherwood  <david.sherwood@arm.com>
13953         * doc/invoke.texi (-msve-vector-bits=): Document new option.
13954         (sve): Document new AArch64 extension.
13955         * doc/md.texi (w): Extend the description of the AArch64
13956         constraint to include SVE vectors.
13957         (Upl, Upa): Document new AArch64 predicate constraints.
13958         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
13959         enum.
13960         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
13961         (msve-vector-bits=): New option.
13962         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
13963         SVE when these are disabled.
13964         (sve): New extension.
13965         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
13966         modes.  Adjust their number of units based on aarch64_sve_vg.
13967         (MAX_BITSIZE_MODE_ANY_MODE): Define.
13968         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
13969         aarch64_addr_query_type.
13970         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
13971         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
13972         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
13973         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
13974         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
13975         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
13976         (aarch64_simd_imm_zero_p): Delete.
13977         (aarch64_check_zero_based_sve_index_immediate): Declare.
13978         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
13979         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
13980         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
13981         (aarch64_sve_float_mul_immediate_p): Likewise.
13982         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
13983         rather than an rtx.
13984         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
13985         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
13986         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
13987         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
13988         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
13989         (aarch64_regmode_natural_size): Likewise.
13990         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
13991         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
13992         left one place.
13993         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
13994         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
13995         for VG and the SVE predicate registers.
13996         (V_ALIASES): Add a "z"-prefixed alias.
13997         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
13998         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
13999         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14000         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14001         (REG_CLASS_NAMES): Add entries for them.
14002         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14003         and the predicate registers.
14004         (aarch64_sve_vg): Declare.
14005         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14006         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14007         (REGMODE_NATURAL_SIZE): Define.
14008         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14009         SVE macros.
14010         * config/aarch64/aarch64.c: Include cfgrtl.h.
14011         (simd_immediate_info): Add a constructor for series vectors,
14012         and an associated step field.
14013         (aarch64_sve_vg): New variable.
14014         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14015         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14016         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14017         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14018         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14019         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14020         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14021         (aarch64_get_mask_mode): New functions.
14022         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14023         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14024         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14025         predicate modes and predicate registers.  Explicitly restrict
14026         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14027         to store a vector mode if it is recognized by
14028         aarch64_classify_vector_mode.
14029         (aarch64_regmode_natural_size): New function.
14030         (aarch64_hard_regno_caller_save_mode): Return the original mode
14031         for predicates.
14032         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14033         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14034         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14035         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14036         functions.
14037         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14038         does not overlap dest if the function is frame-related.  Handle
14039         SVE constants.
14040         (aarch64_split_add_offset): New function.
14041         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14042         them aarch64_add_offset.
14043         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14044         and update call to aarch64_sub_sp.
14045         (aarch64_add_cfa_expression): New function.
14046         (aarch64_expand_prologue): Pass extra temporary registers to the
14047         functions above.  Handle the case in which we need to emit new
14048         DW_CFA_expressions for registers that were originally saved
14049         relative to the stack pointer, but now have to be expressed
14050         relative to the frame pointer.
14051         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14052         functions above.
14053         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14054         IP0 and IP1 values for SVE frames.
14055         (aarch64_expand_vec_series): New function.
14056         (aarch64_expand_sve_widened_duplicate): Likewise.
14057         (aarch64_expand_sve_const_vector): Likewise.
14058         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14059         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14060         into the register, rather than emitting a SET directly.
14061         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14062         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14063         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14064         (offset_9bit_signed_scaled_p): New functions.
14065         (aarch64_replicate_bitmask_imm): New function.
14066         (aarch64_bitmask_imm): Use it.
14067         (aarch64_cannot_force_const_mem): Reject expressions involving
14068         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14069         (aarch64_classify_index): Handle SVE indices, by requiring
14070         a plain register index with a scale that matches the element size.
14071         (aarch64_classify_address): Handle SVE addresses.  Assert that
14072         the mode of the address is VOIDmode or an integer mode.
14073         Update call to aarch64_classify_symbol.
14074         (aarch64_classify_symbolic_expression): Update call to
14075         aarch64_classify_symbol.
14076         (aarch64_const_vec_all_in_range_p): New function.
14077         (aarch64_print_vector_float_operand): Likewise.
14078         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14079         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14080         and the FP immediates 1.0 and 0.5.
14081         (aarch64_print_address_internal): Handle SVE addresses.
14082         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14083         (aarch64_regno_regclass): Handle predicate registers.
14084         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14085         data modes.
14086         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14087         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14088         (aarch64_convert_sve_vector_bits): New function.
14089         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14090         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14091         rather than an rtx.
14092         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14093         Handle SVE vector and predicate modes.  Accept VL-based constants
14094         that need only one temporary register, and VL offsets that require
14095         no temporary registers.
14096         (aarch64_conditional_register_usage): Mark the predicate registers
14097         as fixed if SVE isn't available.
14098         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14099         Return true for SVE vector and predicate modes.
14100         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14101         rather than an unsigned int.  Handle SVE modes.
14102         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14103         SVE modes.
14104         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14105         if SVE is enabled.
14106         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14107         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14108         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14109         (aarch64_sve_float_mul_immediate_p): New functions.
14110         (aarch64_sve_valid_immediate): New function.
14111         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14112         Explicitly reject structure modes.  Check for INDEX constants.
14113         Handle PTRUE and PFALSE constants.
14114         (aarch64_check_zero_based_sve_index_immediate): New function.
14115         (aarch64_simd_imm_zero_p): Delete.
14116         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14117         vector modes.  Accept constants in the range of CNT[BHWD].
14118         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14119         ask for an Advanced SIMD mode.
14120         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14121         (aarch64_simd_vector_alignment): Handle SVE predicates.
14122         (aarch64_vectorize_preferred_vector_alignment): New function.
14123         (aarch64_simd_vector_alignment_reachable): Use it instead of
14124         the vector size.
14125         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14126         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14127         functions.
14128         (MAX_VECT_LEN): Delete.
14129         (expand_vec_perm_d): Add a vec_flags field.
14130         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14131         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14132         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14133         for SVE modes.
14134         (aarch64_evpc_rev): Rename to...
14135         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14136         (aarch64_evpc_rev_global): New function.
14137         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14138         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14139         MAX_VECT_LEN.
14140         (aarch64_evpc_sve_tbl): New function.
14141         (aarch64_expand_vec_perm_const_1): Update after rename of
14142         aarch64_evpc_rev.  Handle SVE permutes too, trying
14143         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14144         than aarch64_evpc_tbl.
14145         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14146         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14147         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14148         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14149         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14150         (aarch64_expand_sve_vcond): New functions.
14151         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14152         of aarch64_vector_mode_p.
14153         (aarch64_dwarf_poly_indeterminate_value): New function.
14154         (aarch64_compute_pressure_classes): Likewise.
14155         (aarch64_can_change_mode_class): Likewise.
14156         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14157         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14158         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14159         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14160         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14161         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14162         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14163         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14164         constraints.
14165         (Dn, Dl, Dr): Accept const as well as const_vector.
14166         (Dz): Likewise.  Compare against CONST0_RTX.
14167         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14168         of "vector" where appropriate.
14169         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14170         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14171         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14172         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14173         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14174         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14175         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14176         (v_int_equiv): Extend to SVE modes.
14177         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14178         mode attributes.
14179         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14180         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14181         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14182         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14183         (SVE_COND_FP_CMP): New int iterators.
14184         (perm_hilo): Handle the new unpack unspecs.
14185         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14186         attributes.
14187         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14188         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14189         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14190         (aarch64_equality_operator, aarch64_constant_vector_operand)
14191         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14192         (aarch64_sve_nonimmediate_operand): Likewise.
14193         (aarch64_sve_general_operand): Likewise.
14194         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14195         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14196         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14197         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14198         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14199         (aarch64_sve_float_arith_immediate): Likewise.
14200         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14201         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14202         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
14203         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
14204         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14205         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14206         (aarch64_sve_float_arith_operand): Likewise.
14207         (aarch64_sve_float_arith_with_sub_operand): Likewise.
14208         (aarch64_sve_float_mul_operand): Likewise.
14209         (aarch64_sve_vec_perm_operand): Likewise.
14210         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14211         (aarch64_mov_operand): Accept const_poly_int and const_vector.
14212         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14213         as well as const_vector.
14214         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14215         in file.  Use CONST0_RTX and CONSTM1_RTX.
14216         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
14217         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14218         Use aarch64_simd_imm_zero.
14219         * config/aarch64/aarch64-sve.md: New file.
14220         * config/aarch64/aarch64.md: Include it.
14221         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14222         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14223         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14224         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14225         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14226         (sve): New attribute.
14227         (enabled): Disable instructions with the sve attribute unless
14228         TARGET_SVE.
14229         (movqi, movhi): Pass CONST_POLY_INT operaneds through
14230         aarch64_expand_mov_immediate.
14231         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14232         CNT[BHSD] immediates.
14233         (movti): Split CONST_POLY_INT moves into two halves.
14234         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14235         Split additions that need a temporary here if the destination
14236         is the stack pointer.
14237         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14238         (*add<mode>3_poly_1): New instruction.
14239         (set_clobber_cc): New expander.
14241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14243         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14244         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
14245         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14246         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14247         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
14248         Change innermode from fixed_mode_size to machine_mode.
14249         (simplify_subreg): Update call accordingly.  Handle a constant-sized
14250         subreg of a variable-length CONST_VECTOR.
14252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14253             Alan Hayward  <alan.hayward@arm.com>
14254             David Sherwood  <david.sherwood@arm.com>
14256         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14257         (add_offset_to_base): New function, split out from...
14258         (create_mem_ref): ...here.  When handling a scale other than 1,
14259         check first whether the address is valid without the offset.
14260         Add it into the base if so, leaving the index and scale as-is.
14262 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14264         PR c++/83778
14265         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14266         fold_for_warn before checking if arg2 is INTEGER_CST.
14268 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
14270         * config/rs6000/predicates.md (load_multiple_operation): Delete.
14271         (store_multiple_operation): Delete.
14272         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14273         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14274         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14275         guarded by TARGET_STRING.
14276         (rs6000_output_load_multiple): Delete.
14277         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14278         OPTION_MASK_STRING / TARGET_STRING handling.
14279         (print_operand) <'N', 'O'>: Add comment that these are unused now.
14280         (const rs6000_opt_masks) <"string">: Change mask to 0.
14281         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14282         (MASK_STRING): Delete.
14283         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14284         parts.  Simplify.
14285         (load_multiple): Delete.
14286         (*ldmsi8): Delete.
14287         (*ldmsi7): Delete.
14288         (*ldmsi6): Delete.
14289         (*ldmsi5): Delete.
14290         (*ldmsi4): Delete.
14291         (*ldmsi3): Delete.
14292         (store_multiple): Delete.
14293         (*stmsi8): Delete.
14294         (*stmsi7): Delete.
14295         (*stmsi6): Delete.
14296         (*stmsi5): Delete.
14297         (*stmsi4): Delete.
14298         (*stmsi3): Delete.
14299         (movmemsi_8reg): Delete.
14300         (corresponding unnamed define_insn): Delete.
14301         (movmemsi_6reg): Delete.
14302         (corresponding unnamed define_insn): Delete.
14303         (movmemsi_4reg): Delete.
14304         (corresponding unnamed define_insn): Delete.
14305         (movmemsi_2reg): Delete.
14306         (corresponding unnamed define_insn): Delete.
14307         (movmemsi_1reg): Delete.
14308         (corresponding unnamed define_insn): Delete.
14309         * config/rs6000/rs6000.opt (mno-string): New.
14310         (mstring): Replace by deprecation warning stub.
14311         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14313 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14315         * regrename.c (regrename_do_replace): If replacing the same
14316         reg multiple times, try to reuse last created gen_raw_REG.
14318         PR debug/81155
14319         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14320         main to workaround a bug in GDB.
14322 2018-01-12  Tom de Vries  <tom@codesourcery.com>
14324         PR target/83737
14325         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14327 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
14329         PR rtl-optimization/80481
14330         * ira-color.c (get_cap_member): New function.
14331         (allocnos_conflict_by_live_ranges_p): Use it.
14332         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14333         (setup_slot_coalesced_allocno_live_ranges): Ditto.
14335 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
14337         PR target/83628
14338         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14339         (*saddl_se_1): Ditto.
14340         (*ssubsi_1): Ditto.
14341         (*ssubl_se_1): Ditto.
14343 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14345         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14346         rather than wi::to_widest for DR_INITs.
14347         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14348         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14349         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14350         INTEGER_CSTs.
14351         (vect_analyze_group_access_1): Note that here.
14353 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14355         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14356         polynomial type sizes.
14358 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14360         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14361         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14362         (gimple_add_tmp_var): Likewise.
14364 2018-01-12  Martin Liska  <mliska@suse.cz>
14366         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14367         (gimple_alloc_sizes): Likewise.
14368         (dump_gimple_statistics): Use PRIu64 in printf format.
14369         * gimple.h: Change uint64_t to int.
14371 2018-01-12  Martin Liska  <mliska@suse.cz>
14373         * tree-core.h: Use uint64_t instead of int.
14374         * tree.c (tree_node_counts): Likewise.
14375         (tree_node_sizes): Likewise.
14376         (dump_tree_statistics): Use PRIu64 in printf format.
14378 2018-01-12  Martin Liska  <mliska@suse.cz>
14380         * Makefile.in: As qsort_chk is implemented in vec.c, add
14381         vec.o to linkage of gencfn-macros.
14382         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14383         passing the info to record_node_allocation_statistics.
14384         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14385         and pass the info.
14386         * ggc-common.c (struct ggc_usage): Add operator== and use
14387         it in operator< and compare function.
14388         * mem-stats.h (struct mem_usage): Likewise.
14389         * vec.c (struct vec_usage): Remove operator< and compare
14390         function. Can be simply inherited.
14392 2018-01-12  Martin Jambor  <mjambor@suse.cz>
14394         PR target/81616
14395         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14396         * tree-ssa-math-opts.c: Include domwalk.h.
14397         (convert_mult_to_fma_1): New function.
14398         (fma_transformation_info): New type.
14399         (fma_deferring_state): Likewise.
14400         (cancel_fma_deferring): New function.
14401         (result_of_phi): Likewise.
14402         (last_fma_candidate_feeds_initial_phi): Likewise.
14403         (convert_mult_to_fma): Added deferring logic, split actual
14404         transformation to convert_mult_to_fma_1.
14405         (math_opts_dom_walker): New type.
14406         (math_opts_dom_walker::after_dom_children): New method, body moved
14407         here from pass_optimize_widening_mul::execute, added deferring logic
14408         bits.
14409         (pass_optimize_widening_mul::execute): Moved most of code to
14410         math_opts_dom_walker::after_dom_children.
14411         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14412         * config/i386/i386.c (ix86_option_override_internal): Added
14413         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14415 2018-01-12  Richard Biener  <rguenther@suse.de>
14417         PR debug/83157
14418         * dwarf2out.c (gen_variable_die): Do not reset old_die for
14419         inline instance vars.
14421 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
14423         PR target/81819
14424         * config/rx/rx.c (rx_is_restricted_memory_address):
14425         Handle SUBREG case.
14427 2018-01-12  Richard Biener  <rguenther@suse.de>
14429         PR tree-optimization/80846
14430         * target.def (split_reduction): New target hook.
14431         * targhooks.c (default_split_reduction): New function.
14432         * targhooks.h (default_split_reduction): Declare.
14433         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14434         target requests first reduce vectors by combining low and high
14435         parts.
14436         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14437         (get_vectype_for_scalar_type_and_size): Export.
14438         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14439         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14440         * doc/tm.texi: Regenerate.
14441         * config/i386/i386.c (ix86_split_reduction): Implement
14442         TARGET_VECTORIZE_SPLIT_REDUCTION.
14444 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14446         PR target/83368
14447         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14448         in PIC mode except for TARGET_VXWORKS_RTP.
14449         * config/sparc/sparc.c: Include cfgrtl.h.
14450         (TARGET_INIT_PIC_REG): Define.
14451         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14452         (sparc_pic_register_p): New predicate.
14453         (sparc_legitimate_address_p): Use it.
14454         (sparc_legitimize_pic_address): Likewise.
14455         (sparc_delegitimize_address): Likewise.
14456         (sparc_mode_dependent_address_p): Likewise.
14457         (gen_load_pcrel_sym): Remove 4th parameter.
14458         (load_got_register): Adjust call to above.  Remove obsolete stuff.
14459         (sparc_expand_prologue): Do not call load_got_register here.
14460         (sparc_flat_expand_prologue): Likewise.
14461         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14462         (sparc_use_pseudo_pic_reg): New function.
14463         (sparc_init_pic_reg): Likewise.
14464         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14465         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14467 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
14469         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14470         Add item for branch_cost.
14472 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14474         PR rtl-optimization/83565
14475         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14476         not extend the result to a larger mode for rotate operations.
14477         (num_sign_bit_copies1): Likewise.
14479 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14481         PR target/40411
14482         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14483         -symbolic.
14484         Use values-Xc.o for -pedantic.
14485         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14487 2018-01-12  Martin Liska  <mliska@suse.cz>
14489         PR ipa/83054
14490         * ipa-devirt.c (final_warning_record::grow_type_warnings):
14491         New function.
14492         (possible_polymorphic_call_targets): Use it.
14493         (ipa_devirt): Likewise.
14495 2018-01-12  Martin Liska  <mliska@suse.cz>
14497         * profile-count.h (enum profile_quality): Use 0 as invalid
14498         enum value of profile_quality.
14500 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14502         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14503         -mext-string options.
14505 2018-01-12  Richard Biener  <rguenther@suse.de>
14507         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14508         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14509         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14510         Likewise.
14511         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14513 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14515         * configure.ac (--with-long-double-format): Add support for the
14516         configuration option to change the default long double format on
14517         PowerPC systems.
14518         * config.gcc (powerpc*-linux*-*): Likewise.
14519         * configure: Regenerate.
14520         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14521         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14522         used without modification.
14524 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14526         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14527         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14528         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14529         MISC_BUILTIN_SPEC_BARRIER.
14530         (rs6000_init_builtins): Likewise.
14531         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14532         enum value.
14533         (speculation_barrier): New define_insn.
14534         * doc/extend.texi: Document __builtin_speculation_barrier.
14536 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14538         PR target/83203
14539         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14540         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14541         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14542         iterators.
14543         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
14544         integral modes instead of "ss" and "sd".
14545         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14546         vectors with 32-bit and 64-bit elements.
14547         (vecdupssescalarmodesuffix): New mode attribute.
14548         (vec_dup<mode>): Use it.
14550 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
14552         PR target/83330
14553         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14554         frame if argument is passed on stack.
14556 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14558         PR target/82682
14559         * ree.c (combine_reaching_defs): Optimize also
14560         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14561         reg2=any_extend(exp); reg1=reg2;, formatting fix.
14563 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14565         PR middle-end/83189
14566         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14568 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14570         PR middle-end/83718
14571         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14572         after they are computed.
14574 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
14576         PR tree-optimization/83695
14577         * gimple-loop-linterchange.cc
14578         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14579         reset cached scev information after interchange.
14580         (pass_linterchange::execute): Remove call to scev_reset_htab.
14582 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14584         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14585         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14586         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14587         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14588         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14589         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14590         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
14591         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
14592         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
14593         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
14594         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
14595         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
14596         (V_lane_reg): Likewise.
14597         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
14598         New define_expand.
14599         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
14600         (vfmal_lane_low<mode>_intrinsic,
14601         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
14602         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
14603         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
14604         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
14605         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
14606         vfmsl_lane_high<mode>_intrinsic): New define_insns.
14608 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14610         * config/arm/arm-cpus.in (fp16fml): New feature.
14611         (ALL_SIMD): Add fp16fml.
14612         (armv8.2-a): Add fp16fml as an option.
14613         (armv8.3-a): Likewise.
14614         (armv8.4-a): Add fp16fml as part of fp16.
14615         * config/arm/arm.h (TARGET_FP16FML): Define.
14616         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
14617         when appropriate.
14618         * config/arm/arm-modes.def (V2HF): Define.
14619         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
14620         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
14621         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
14622         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
14623         vfmsl_low, vfmsl_high): New set of builtins.
14624         * config/arm/iterators.md (PLUSMINUS): New code iterator.
14625         (vfml_op): New code attribute.
14626         (VFMLHALVES): New int iterator.
14627         (VFML, VFMLSEL): New mode attributes.
14628         (V_reg): Define mapping for V2HF.
14629         (V_hi, V_lo): New mode attributes.
14630         (VF_constraint): Likewise.
14631         (vfml_half, vfml_half_selector): New int attributes.
14632         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
14633         define_expand.
14634         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
14635         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
14636         New define_insn.
14637         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
14638         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
14639         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
14640         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
14641         documentation.
14642         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
14643         Document new effective target and option set.
14645 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14647         * config/arm/arm-cpus.in (armv8_4): New feature.
14648         (ARMv8_4a): New fgroup.
14649         (armv8.4-a): New arch.
14650         * config/arm/arm-tables.opt: Regenerate.
14651         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
14652         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
14653         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
14654         Add matching rules for -march=armv8.4-a and extensions.
14655         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
14657 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
14659         PR target/81821
14660         * config/rx/rx.md (BW): New mode attribute.
14661         (sync_lock_test_and_setsi): Add mode suffix to insn output.
14663 2018-01-11  Richard Biener  <rguenther@suse.de>
14665         PR tree-optimization/83435
14666         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
14667         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
14668         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
14670 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14671             Alan Hayward  <alan.hayward@arm.com>
14672             David Sherwood  <david.sherwood@arm.com>
14674         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
14675         field.
14676         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
14677         (aarch64_print_address_internal): Use it to check for a zero offset.
14679 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14680             Alan Hayward  <alan.hayward@arm.com>
14681             David Sherwood  <david.sherwood@arm.com>
14683         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
14684         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
14685         Return a poly_int64 rather than a HOST_WIDE_INT.
14686         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
14687         rather than a HOST_WIDE_INT.
14688         * config/aarch64/aarch64.h (aarch64_frame): Protect with
14689         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
14690         hard_fp_offset, frame_size, initial_adjust, callee_offset and
14691         final_offset from HOST_WIDE_INT to poly_int64.
14692         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
14693         to_constant when getting the number of units in an Advanced SIMD
14694         mode.
14695         (aarch64_builtin_vectorized_function): Check for a constant number
14696         of units.
14697         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
14698         GET_MODE_SIZE.
14699         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
14700         attribute instead of GET_MODE_NUNITS.
14701         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
14702         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
14703         GET_MODE_SIZE for fixed-size registers.
14704         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
14705         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
14706         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
14707         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
14708         (aarch64_print_operand, aarch64_print_address_internal)
14709         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
14710         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
14711         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
14712         Handle polynomial GET_MODE_SIZE.
14713         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
14714         wider than SImode without modification.
14715         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
14716         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
14717         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
14718         passing and returning SVE modes.
14719         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
14720         rather than GEN_INT.
14721         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
14722         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
14723         (aarch64_allocate_and_probe_stack_space): Likewise.
14724         (aarch64_layout_frame): Cope with polynomial offsets.
14725         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
14726         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
14727         polynomial offsets.
14728         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
14729         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
14730         poly_int64 rather than a HOST_WIDE_INT.
14731         (aarch64_get_separate_components, aarch64_process_components)
14732         (aarch64_expand_prologue, aarch64_expand_epilogue)
14733         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
14734         (aarch64_anchor_offset): New function, split out from...
14735         (aarch64_legitimize_address): ...here.
14736         (aarch64_builtin_vectorization_cost): Handle polynomial
14737         TYPE_VECTOR_SUBPARTS.
14738         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
14739         GET_MODE_NUNITS.
14740         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
14741         number of elements from the PARALLEL rather than the mode.
14742         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
14743         rather than GET_MODE_BITSIZE.
14744         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
14745         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
14746         (aarch64_expand_vec_perm_const_1): Handle polynomial
14747         d->perm.length () and d->perm elements.
14748         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
14749         Apply to_constant to d->perm elements.
14750         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
14751         polynomial CONST_VECTOR_NUNITS.
14752         (aarch64_move_pointer): Take amount as a poly_int64 rather
14753         than an int.
14754         (aarch64_progress_pointer): Avoid temporary variable.
14755         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
14756         the mode attribute instead of GET_MODE.
14758 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14759             Alan Hayward  <alan.hayward@arm.com>
14760             David Sherwood  <david.sherwood@arm.com>
14762         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
14763         x exists before using it.
14764         (aarch64_add_constant_internal): Rename to...
14765         (aarch64_add_offset_1): ...this.  Replace regnum with separate
14766         src and dest rtxes.  Handle the case in which they're different,
14767         including when the offset is zero.  Replace scratchreg with an rtx.
14768         Use 2 additions if there is no spare register into which we can
14769         move a 16-bit constant.
14770         (aarch64_add_constant): Delete.
14771         (aarch64_add_offset): Replace reg with separate src and dest
14772         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
14773         Use aarch64_add_offset_1.
14774         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
14775         an rtx rather than an int.  Take the delta as a poly_int64
14776         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
14777         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
14778         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
14779         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
14780         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
14781         and aarch64_add_sp.
14782         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
14783         aarch64_add_constant.
14785 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14787         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
14788         Use scalar_float_mode.
14790 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14792         * config/aarch64/aarch64-simd.md
14793         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
14794         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
14795         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
14796         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
14797         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
14798         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
14799         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
14800         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
14801         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
14802         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
14804 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14806         PR target/83514
14807         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
14808         targ_options->x_arm_arch_string is non NULL.
14810 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
14812         * config/aarch64/aarch64.h
14813         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
14815 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
14817         PR target/82096
14818         * expmed.c (emit_store_flag_force): Swap if const op0
14819         and change VOIDmode to mode of op0.
14821 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14823         PR rtl-optimization/83761
14824         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
14825         than bytes to mode_for_size.
14827 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
14829         PR middle-end/83189
14830         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
14831         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
14832         profile.
14834 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
14836         PR middle-end/83575
14837         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
14838         when in layout mode.
14839         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
14840         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
14841         partition fixup.
14843 2018-01-10  Michael Collison  <michael.collison@arm.com>
14845         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
14846         * config/aarch64/aarch64-option-extension.def: Add
14847         AARCH64_OPT_EXTENSION of 'fp16fml'.
14848         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14849         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
14850         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
14851         * config/aarch64/constraints.md (Ui7): New constraint.
14852         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
14853         (VFMLA_SEL_W): Ditto.
14854         (f16quad): Ditto.
14855         (f16mac1): Ditto.
14856         (VFMLA16_LOW): New int iterator.
14857         (VFMLA16_HIGH): Ditto.
14858         (UNSPEC_FMLAL): New unspec.
14859         (UNSPEC_FMLSL): Ditto.
14860         (UNSPEC_FMLAL2): Ditto.
14861         (UNSPEC_FMLSL2): Ditto.
14862         (f16mac): New code attribute.
14863         * config/aarch64/aarch64-simd-builtins.def
14864         (aarch64_fmlal_lowv2sf): Ditto.
14865         (aarch64_fmlsl_lowv2sf): Ditto.
14866         (aarch64_fmlalq_lowv4sf): Ditto.
14867         (aarch64_fmlslq_lowv4sf): Ditto.
14868         (aarch64_fmlal_highv2sf): Ditto.
14869         (aarch64_fmlsl_highv2sf): Ditto.
14870         (aarch64_fmlalq_highv4sf): Ditto.
14871         (aarch64_fmlslq_highv4sf): Ditto.
14872         (aarch64_fmlal_lane_lowv2sf): Ditto.
14873         (aarch64_fmlsl_lane_lowv2sf): Ditto.
14874         (aarch64_fmlal_laneq_lowv2sf): Ditto.
14875         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
14876         (aarch64_fmlalq_lane_lowv4sf): Ditto.
14877         (aarch64_fmlsl_lane_lowv4sf): Ditto.
14878         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
14879         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
14880         (aarch64_fmlal_lane_highv2sf): Ditto.
14881         (aarch64_fmlsl_lane_highv2sf): Ditto.
14882         (aarch64_fmlal_laneq_highv2sf): Ditto.
14883         (aarch64_fmlsl_laneq_highv2sf): Ditto.
14884         (aarch64_fmlalq_lane_highv4sf): Ditto.
14885         (aarch64_fmlsl_lane_highv4sf): Ditto.
14886         (aarch64_fmlalq_laneq_highv4sf): Ditto.
14887         (aarch64_fmlsl_laneq_highv4sf): Ditto.
14888         * config/aarch64/aarch64-simd.md:
14889         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
14890         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
14891         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
14892         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
14893         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
14894         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
14895         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
14896         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
14897         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
14898         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
14899         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
14900         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
14901         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
14902         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
14903         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
14904         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
14905         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
14906         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
14907         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
14908         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
14909         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
14910         (vfmlsl_low_u32): Ditto.
14911         (vfmlalq_low_u32): Ditto.
14912         (vfmlslq_low_u32): Ditto.
14913         (vfmlal_high_u32): Ditto.
14914         (vfmlsl_high_u32): Ditto.
14915         (vfmlalq_high_u32): Ditto.
14916         (vfmlslq_high_u32): Ditto.
14917         (vfmlal_lane_low_u32): Ditto.
14918         (vfmlsl_lane_low_u32): Ditto.
14919         (vfmlal_laneq_low_u32): Ditto.
14920         (vfmlsl_laneq_low_u32): Ditto.
14921         (vfmlalq_lane_low_u32): Ditto.
14922         (vfmlslq_lane_low_u32): Ditto.
14923         (vfmlalq_laneq_low_u32): Ditto.
14924         (vfmlslq_laneq_low_u32): Ditto.
14925         (vfmlal_lane_high_u32): Ditto.
14926         (vfmlsl_lane_high_u32): Ditto.
14927         (vfmlal_laneq_high_u32): Ditto.
14928         (vfmlsl_laneq_high_u32): Ditto.
14929         (vfmlalq_lane_high_u32): Ditto.
14930         (vfmlslq_lane_high_u32): Ditto.
14931         (vfmlalq_laneq_high_u32): Ditto.
14932         (vfmlslq_laneq_high_u32): Ditto.
14933         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
14934         (AARCH64_FL_FOR_ARCH8_4): New.
14935         (AARCH64_ISA_F16FML): New ISA flag.
14936         (TARGET_F16FML): New feature flag for fp16fml.
14937         (doc/invoke.texi): Document new fp16fml option.
14939 2018-01-10  Michael Collison  <michael.collison@arm.com>
14941         * config/aarch64/aarch64-builtins.c:
14942         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
14943         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14944         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
14945         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
14946         (AARCH64_ISA_SHA3): New ISA flag.
14947         (TARGET_SHA3): New feature flag for sha3.
14948         * config/aarch64/iterators.md (sha512_op): New int attribute.
14949         (CRYPTO_SHA512): New int iterator.
14950         (UNSPEC_SHA512H): New unspec.
14951         (UNSPEC_SHA512H2): Ditto.
14952         (UNSPEC_SHA512SU0): Ditto.
14953         (UNSPEC_SHA512SU1): Ditto.
14954         * config/aarch64/aarch64-simd-builtins.def
14955         (aarch64_crypto_sha512hqv2di): New builtin.
14956         (aarch64_crypto_sha512h2qv2di): Ditto.
14957         (aarch64_crypto_sha512su0qv2di): Ditto.
14958         (aarch64_crypto_sha512su1qv2di): Ditto.
14959         (aarch64_eor3qv8hi): Ditto.
14960         (aarch64_rax1qv2di): Ditto.
14961         (aarch64_xarqv2di): Ditto.
14962         (aarch64_bcaxqv8hi): Ditto.
14963         * config/aarch64/aarch64-simd.md:
14964         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
14965         (aarch64_crypto_sha512su0qv2di): Ditto.
14966         (aarch64_crypto_sha512su1qv2di): Ditto.
14967         (aarch64_eor3qv8hi): Ditto.
14968         (aarch64_rax1qv2di): Ditto.
14969         (aarch64_xarqv2di): Ditto.
14970         (aarch64_bcaxqv8hi): Ditto.
14971         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
14972         (vsha512h2q_u64): Ditto.
14973         (vsha512su0q_u64): Ditto.
14974         (vsha512su1q_u64): Ditto.
14975         (veor3q_u16): Ditto.
14976         (vrax1q_u64): Ditto.
14977         (vxarq_u64): Ditto.
14978         (vbcaxq_u16): Ditto.
14979         * config/arm/types.md (crypto_sha512): New type attribute.
14980         (crypto_sha3): Ditto.
14981         (doc/invoke.texi): Document new sha3 option.
14983 2018-01-10  Michael Collison  <michael.collison@arm.com>
14985         * config/aarch64/aarch64-builtins.c:
14986         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
14987         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
14988         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
14989         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
14990         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
14991         (AARCH64_ISA_SM4): New ISA flag.
14992         (TARGET_SM4): New feature flag for sm4.
14993         * config/aarch64/aarch64-simd-builtins.def
14994         (aarch64_sm3ss1qv4si): Ditto.
14995         (aarch64_sm3tt1aq4si): Ditto.
14996         (aarch64_sm3tt1bq4si): Ditto.
14997         (aarch64_sm3tt2aq4si): Ditto.
14998         (aarch64_sm3tt2bq4si): Ditto.
14999         (aarch64_sm3partw1qv4si): Ditto.
15000         (aarch64_sm3partw2qv4si): Ditto.
15001         (aarch64_sm4eqv4si): Ditto.
15002         (aarch64_sm4ekeyqv4si): Ditto.
15003         * config/aarch64/aarch64-simd.md:
15004         (aarch64_sm3ss1qv4si): Ditto.
15005         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15006         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15007         (aarch64_sm4eqv4si): Ditto.
15008         (aarch64_sm4ekeyqv4si): Ditto.
15009         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15010         (sm3part_op): Ditto.
15011         (CRYPTO_SM3TT): Ditto.
15012         (CRYPTO_SM3PART): Ditto.
15013         (UNSPEC_SM3SS1): New unspec.
15014         (UNSPEC_SM3TT1A): Ditto.
15015         (UNSPEC_SM3TT1B): Ditto.
15016         (UNSPEC_SM3TT2A): Ditto.
15017         (UNSPEC_SM3TT2B): Ditto.
15018         (UNSPEC_SM3PARTW1): Ditto.
15019         (UNSPEC_SM3PARTW2): Ditto.
15020         (UNSPEC_SM4E): Ditto.
15021         (UNSPEC_SM4EKEY): Ditto.
15022         * config/aarch64/constraints.md (Ui2): New constraint.
15023         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15024         * config/arm/types.md (crypto_sm3): New type attribute.
15025         (crypto_sm4): Ditto.
15026         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15027         (vsm3tt1aq_u32): Ditto.
15028         (vsm3tt1bq_u32): Ditto.
15029         (vsm3tt2aq_u32): Ditto.
15030         (vsm3tt2bq_u32): Ditto.
15031         (vsm3partw1q_u32): Ditto.
15032         (vsm3partw2q_u32): Ditto.
15033         (vsm4eq_u32): Ditto.
15034         (vsm4ekeyq_u32): Ditto.
15035         (doc/invoke.texi): Document new sm4 option.
15037 2018-01-10  Michael Collison  <michael.collison@arm.com>
15039         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15040         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15041         (AARCH64_FL_FOR_ARCH8_4): New.
15042         (AARCH64_FL_V8_4): New flag.
15043         (doc/invoke.texi): Document new armv8.4-a option.
15045 2018-01-10  Michael Collison  <michael.collison@arm.com>
15047         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15048         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15049         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15050         * config/aarch64/aarch64-option-extension.def: Add
15051         AARCH64_OPT_EXTENSION of 'sha2'.
15052         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15053         (crypto): Disable sha2 and aes if crypto disabled.
15054         (crypto): Enable aes and sha2 if enabled.
15055         (simd): Disable sha2 and aes if simd disabled.
15056         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15057         New flags.
15058         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15059         (TARGET_SHA2): New feature flag for sha2.
15060         (TARGET_AES): New feature flag for aes.
15061         * config/aarch64/aarch64-simd.md:
15062         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15063         conditional on TARGET_AES.
15064         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15065         (aarch64_crypto_sha1hsi): Make pattern conditional
15066         on TARGET_SHA2.
15067         (aarch64_crypto_sha1hv4si): Ditto.
15068         (aarch64_be_crypto_sha1hv4si): Ditto.
15069         (aarch64_crypto_sha1su1v4si): Ditto.
15070         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15071         (aarch64_crypto_sha1su0v4si): Ditto.
15072         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15073         (aarch64_crypto_sha256su0v4si): Ditto.
15074         (aarch64_crypto_sha256su1v4si): Ditto.
15075         (doc/invoke.texi): Document new aes and sha2 options.
15077 2018-01-10  Martin Sebor  <msebor@redhat.com>
15079         PR tree-optimization/83781
15080         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15081         as string arrays.
15083 2018-01-11  Martin Sebor  <msebor@gmail.com>
15084             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15086         PR tree-optimization/83501
15087         PR tree-optimization/81703
15089         * tree-ssa-strlen.c (get_string_cst): Rename...
15090         (get_string_len): ...to this.  Handle global constants.
15091         (handle_char_store): Adjust.
15093 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15094             Jim Wilson  <jimw@sifive.com>
15096         * config/riscv/riscv-protos.h (riscv_output_return): New.
15097         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15098         (riscv_attribute_table, riscv_output_return),
15099         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15100         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15101         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15102         function.
15103         (riscv_expand_prologue): Add early return for naked function.
15104         (riscv_expand_epilogue): Likewise.
15105         (riscv_function_ok_for_sibcall): Return false for naked function.
15106         (riscv_set_current_function): New.
15107         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15108         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15109         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15110         * doc/extend.texi (RISC-V Function Attributes): New.
15112 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15114         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15115         check for 128-bit long double before checking TCmode.
15116         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15117         128-bit long doubles before checking TFmode or TCmode.
15118         (FLOAT128_IBM_P): Likewise.
15120 2018-01-10  Martin Sebor  <msebor@redhat.com>
15122         PR tree-optimization/83671
15123         * builtins.c (c_strlen): Unconditionally return zero for the empty
15124         string.
15125         Use -Warray-bounds for warnings.
15126         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15127         for non-constant array indices with COMPONENT_REF, arrays of
15128         arrays, and pointers to arrays.
15129         (gimple_fold_builtin_strlen): Determine and set length range for
15130         non-constant character arrays.
15132 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15134         PR middle-end/81897
15135         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15136         empty blocks.
15138 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15140         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15142 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15144         PR target/83399
15145         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15146         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15147         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15148         indexed_or_indirect_operand predicate.
15149         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15150         (*vsx_le_perm_load_v8hi): Likewise.
15151         (*vsx_le_perm_load_v16qi): Likewise.
15152         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15153         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15154         (*vsx_le_perm_store_v8hi): Likewise.
15155         (*vsx_le_perm_store_v16qi): Likewise.
15156         (eight unnamed splitters): Likewise.
15158 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15160         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15161         * config/rs6000/emmintrin.h: Likewise.
15162         * config/rs6000/mmintrin.h: Likewise.
15163         * config/rs6000/xmmintrin.h: Likewise.
15165 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
15167         PR c++/43486
15168         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15169         "public_flag".
15170         * tree.c (tree_nop_conversion): Return true for location wrapper
15171         nodes.
15172         (maybe_wrap_with_location): New function.
15173         (selftest::check_strip_nops): New function.
15174         (selftest::test_location_wrappers): New function.
15175         (selftest::tree_c_tests): Call it.
15176         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15177         (maybe_wrap_with_location): New decl.
15178         (EXPR_LOCATION_WRAPPER_P): New macro.
15179         (location_wrapper_p): New inline function.
15180         (tree_strip_any_location_wrapper): New inline function.
15182 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
15184         PR target/83735
15185         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15186         stack_realign_offset for the largest alignment of stack slot
15187         actually used.
15188         (ix86_find_max_used_stack_alignment): New function.
15189         (ix86_finalize_stack_frame_flags): Use it.  Set
15190         max_used_stack_alignment if we don't realign stack.
15191         * config/i386/i386.h (machine_function): Add
15192         max_used_stack_alignment.
15194 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
15196         * config/arm/arm.opt (-mbranch-cost): New option.
15197         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15198         account.
15200 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
15202         PR target/83629
15203         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
15204         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15206 2018-01-10  Richard Biener  <rguenther@suse.de>
15208         PR debug/83765
15209         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15210         early out so it also covers the case where we have a non-NULL
15211         origin.
15213 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15215         PR tree-optimization/83753
15216         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15217         for non-strided grouped accesses if the number of elements is 1.
15219 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15221         PR target/81616
15222         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15223         * i386.h (TARGET_USE_GATHER): Define.
15224         * x86-tune.def (X86_TUNE_USE_GATHER): New.
15226 2018-01-10  Martin Liska  <mliska@suse.cz>
15228         PR bootstrap/82831
15229         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15230         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15231         partitioning.
15232         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15233         CLEANUP_NO_PARTITIONING is not set.
15235 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15237         * doc/rtl.texi: Remove documentation of (const ...) wrappers
15238         for vectors, as a partial revert of r254296.
15239         * rtl.h (const_vec_p): Delete.
15240         (const_vec_duplicate_p): Don't test for vector CONSTs.
15241         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15242         * expmed.c (make_tree): Likewise.
15244         Revert:
15245         * common.md (E, F): Use CONSTANT_P instead of checking for
15246         CONST_VECTOR.
15247         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15248         checking for CONST_VECTOR.
15250 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15252         PR middle-end/83575
15253         * predict.c (force_edge_cold): Handle in more sane way edges
15254         with no prediction.
15256 2018-01-09  Carl Love  <cel@us.ibm.com>
15258         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15259         V4SI, V4SF types.
15260         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15261         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15262         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15263         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
15264         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15265         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
15266         * config/rs6000/rs6000-protos.h: Add extern defition for
15267         rs6000_generate_float2_double_code.
15268         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15269         function.
15270         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15271         (float2_v2df): Add define_expand.
15273 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
15275         PR target/83628
15276         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15277         op_mode in the force_to_mode call.
15279 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15281         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15282         instead of checking each element individually.
15283         (aarch64_evpc_uzp): Likewise.
15284         (aarch64_evpc_zip): Likewise.
15285         (aarch64_evpc_ext): Likewise.
15286         (aarch64_evpc_rev): Likewise.
15287         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15288         instead of checking each element individually.  Return true without
15289         generating rtl if
15290         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15291         whether all selected elements come from the same input, instead of
15292         checking each element individually.  Remove calls to gen_rtx_REG,
15293         start_sequence and end_sequence and instead assert that no rtl is
15294         generated.
15296 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15298         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15299         order of HIGH and CONST checks.
15301 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15303         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15304         if the destination isn't an SSA_NAME.
15306 2018-01-09  Richard Biener  <rguenther@suse.de>
15308         PR tree-optimization/83668
15309         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15310         move prologue...
15311         (canonicalize_loop_form): ... here, renamed from ...
15312         (canonicalize_loop_closed_ssa_form): ... this and amended to
15313         swap successor edges for loop exit blocks to make us use
15314         the RPO order we need for initial schedule generation.
15316 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
15318         PR tree-optimization/64811
15319         * match.pd: When optimizing comparisons with Inf, avoid
15320         introducing or losing exceptions from comparisons with NaN.
15322 2018-01-09  Martin Liska  <mliska@suse.cz>
15324         PR sanitizer/82517
15325         * asan.c (shadow_mem_size): Add gcc_assert.
15327 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
15329         Don't save registers in main().
15331         PR target/83738
15332         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15333         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15334         * config/avr/avr.c (avr_set_current_function): Don't error if
15335         naked, OS_task or OS_main are specified at the same time.
15336         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15337         OS_main.
15338         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15339         attribute.
15340         * common/config/avr/avr-common.c (avr_option_optimization_table):
15341         Switch on -mmain-is-OS_task for optimizing compilations.
15343 2018-01-09  Richard Biener  <rguenther@suse.de>
15345         PR tree-optimization/83572
15346         * graphite.c: Include cfganal.h.
15347         (graphite_transform_loops): Connect infinite loops to exit
15348         and remove fake edges at the end.
15350 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15352         * ipa-inline.c (edge_badness): Revert accidental checkin.
15354 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15356         PR ipa/80763
15357         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15358         symbols; not inline clones.
15360 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
15362         PR target/83507
15363         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15364         hard registers.  Formatting fixes.
15366         PR preprocessor/83722
15367         * gcc.c (try_generate_repro): Pass
15368         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15369         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15370         do_report_bug.
15372 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
15373             Kito Cheng  <kito.cheng@gmail.com>
15375         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15376         (riscv_leaf_function_p): Delete.
15377         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15379 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15381         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15382         function.
15383         (do_ifelse): New function.
15384         (do_isel): New function.
15385         (do_sub3): New function.
15386         (do_add3): New function.
15387         (do_load_mask_compare): New function.
15388         (do_overlap_load_compare): New function.
15389         (expand_compare_loop): New function.
15390         (expand_block_compare): Call expand_compare_loop() when appropriate.
15391         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15392         option description.
15393         (-mblock-compare-inline-loop-limit): New option.
15395 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15397         PR target/83677
15398         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15399         Reverse order of second and third operands in first alternative.
15400         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15401         of first and second elements in UNSPEC_VPERMR vector.
15402         (altivec_expand_vec_perm_le): Likewise.
15404 2018-01-08  Jeff Law  <law@redhat.com>
15406         PR rtl-optimizatin/81308
15407         * tree-switch-conversion.c (cfg_altered): New file scoped static.
15408         (process_switch): If group_case_labels makes a change, then set
15409         cfg_altered.
15410         (pass_convert_switch::execute): If a switch is converted, then
15411         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
15413         PR rtl-optimization/81308
15414         * recog.c (split_all_insns): Conditionally cleanup the CFG after
15415         splitting insns.
15417 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
15419         PR target/83663 - Revert r255946
15420         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15421         generation for cases where splatting a value is not useful.
15422         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15423         across a vec_duplicate and a paradoxical subreg forming a vector
15424         mode to a vec_concat.
15426 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15428         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15429         -march=armv8.3-a variants.
15430         * config/arm/t-multilib: Likewise.
15431         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
15433 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15435         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15436         to generate rtl.
15437         (cceq_ior_compare_complement): Give it a name so I can use it, and
15438         change boolean_or_operator predicate to boolean_operator so it can
15439         be used to generate a crand.
15440         (eqne): New code iterator.
15441         (bd/bd_neg): New code_attrs.
15442         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15443         a single define_insn.
15444         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15445         decrement (bdnzt/bdnzf/bdzt/bdzf).
15446         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15447         with the new names of the branch decrement patterns, and added the
15448         names of the branch decrement conditional patterns.
15450 2018-01-08  Richard Biener  <rguenther@suse.de>
15452         PR tree-optimization/83563
15453         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15454         cache.
15456 2018-01-08  Richard Biener  <rguenther@suse.de>
15458         PR middle-end/83713
15459         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15461 2018-01-08  Richard Biener  <rguenther@suse.de>
15463         PR tree-optimization/83685
15464         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15465         references to abnormals.
15467 2018-01-08  Richard Biener  <rguenther@suse.de>
15469         PR lto/83719
15470         * dwarf2out.c (output_indirect_strings): Handle empty
15471         skeleton_debug_str_hash.
15472         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15474 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15476         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15477         (emit_store_direct): Likewise.
15478         (arc_trampoline_adjust_address): Likewise.
15479         (arc_asm_trampoline_template): New function.
15480         (arc_initialize_trampoline): Use asm_trampoline_template.
15481         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15482         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15483         * config/arc/arc.md (flush_icache): Delete pattern.
15485 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15487         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15488         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15489         munaligned-access.
15491 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15493         PR target/83681
15494         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15495         by not USED_FOR_TARGET.
15496         (make_pass_resolve_sw_modes): Likewise.
15498 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15500         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15501         USED_FOR_TARGET.
15503 2018-01-08  Richard Biener  <rguenther@suse.de>
15505         PR middle-end/83580
15506         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15508 2018-01-08  Richard Biener  <rguenther@suse.de>
15510         PR middle-end/83517
15511         * match.pd ((t * 2) / 2) -> t): Add missing :c.
15513 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
15515         PR middle-end/81897
15516         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15517         basic blocks with a small number of successors.
15518         (convert_control_dep_chain_into_preds): Improve handling of
15519         forwarder blocks.
15520         (dump_predicates): Split apart into...
15521         (dump_pred_chain): ...here...
15522         (dump_pred_info): ...and here.
15523         (can_one_predicate_be_invalidated_p): Add debugging printfs.
15524         (can_chain_union_be_invalidated_p): Improve check for invalidation
15525         of paths.
15526         (uninit_uses_cannot_happen): Avoid unnecessary if
15527         convert_control_dep_chain_into_preds yielded nothing.
15529 2018-01-06  Martin Sebor  <msebor@redhat.com>
15531         PR tree-optimization/83640
15532         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15533         subtracting negative offset from size.
15534         (builtin_access::overlap): Adjust offset bounds of the access to fall
15535         within the size of the object if possible.
15537 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
15539         PR rtl-optimization/83699
15540         * expmed.c (extract_bit_field_1): Restrict the vector usage of
15541         extract_bit_field_as_subreg to cases in which the extracted
15542         value is also a vector.
15544         * lra-constraints.c (process_alt_operands): Test for the equivalence
15545         substitutions when detecting a possible reload cycle.
15547 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
15549         PR debug/83480
15550         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15551         by default if flag_selective_schedling{,2}.  Formatting fixes.
15553         PR rtl-optimization/83682
15554         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15555         if it has non-VECTOR_MODE element mode.
15556         (vec_duplicate_p): Likewise.
15558         PR middle-end/83694
15559         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15560         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15562 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15564         PR target/83604
15565         * config/i386/i386-builtin.def
15566         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15567         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15568         Require also OPTION_MASK_ISA_AVX512F in addition to
15569         OPTION_MASK_ISA_GFNI.
15570         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15571         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15572         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15573         to OPTION_MASK_ISA_GFNI.
15574         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15575         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15576         OPTION_MASK_ISA_AVX512BW.
15577         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15578         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15579         addition to OPTION_MASK_ISA_GFNI.
15580         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15581         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15582         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15583         to OPTION_MASK_ISA_GFNI.
15584         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15585         a requirement for all ISAs rather than any of them with a few
15586         exceptions.
15587         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15588         processing.
15589         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15590         bitmasks to be enabled with 3 exceptions, instead of requiring any
15591         enabled ISA with lots of exceptions.
15592         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
15593         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
15594         Change avx512bw in isa attribute to avx512f.
15595         * config/i386/sgxintrin.h: Add license boilerplate.
15596         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
15597         to __AVX512F__ and __AVX512VL to __AVX512VL__.
15598         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
15599         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
15600         defined.
15601         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
15602         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
15603         temporarily sse2 rather than sse if not enabled already.
15605         PR target/83604
15606         * config/i386/sse.md (VI248_VLBW): Rename to ...
15607         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
15608         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
15609         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
15610         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
15611         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
15612         mode iterator instead of VI248_VLBW.
15614 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
15616         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
15617         (record_modified): Skip clobbers; add debug output.
15618         (param_change_prob): Use sreal frequencies.
15620 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15622         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
15623         punt for user-aligned variables.
15625 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15627         * tree-chrec.c (chrec_contains_symbols): Return true for
15628         POLY_INT_CST.
15630 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
15632         PR target/82439
15633         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
15634         of (x|y) == x for BICS pattern.
15636 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15638         PR tree-optimization/83605
15639         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
15640         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
15641         can throw.
15643 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15645         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
15646         * config/epiphany/rtems.h: New file.
15648 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15649             Uros Bizjak  <ubizjak@gmail.com>
15651         PR target/83554
15652         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
15653         QIreg_operand instead of register_operand predicate.
15654         * config/i386/i386.c (ix86_rop_should_change_byte_p,
15655         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
15656         comments instead of -fmitigate[-_]rop.
15658 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15660         PR bootstrap/81926
15661         * cgraphunit.c (symbol_table::compile): Switch to text_section
15662         before calling assembly_start debug hook.
15663         * run-rtl-passes.c (run_rtl_passes): Likewise.
15664         Include output.h.
15666 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15668         * tree-vrp.c (extract_range_from_binary_expr_1): Check
15669         range_int_cst_p rather than !symbolic_range_p before calling
15670         extract_range_from_multiplicative_op_1.
15672 2018-01-04  Jeff Law  <law@redhat.com>
15674         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
15675         redundant test in assertion.
15677 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15679         * doc/rtl.texi: Document machine_mode wrapper classes.
15681 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15683         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
15684         using tree_to_uhwi.
15686 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15688         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
15689         the VEC_PERM_EXPR fold to fail.
15691 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15693         PR debug/83585
15694         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
15695         to switched_sections.
15697 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15699         PR target/83680
15700         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
15701         test for d.testing.
15703 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
15705         PR target/83387
15706         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
15707         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
15709 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15711         PR debug/83666
15712         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
15713         is BLKmode and bitpos not zero or mode change is needed.
15715 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15717         PR target/83675
15718         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
15719         TARGET_VIS2.
15721 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
15723         PR target/83628
15724         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
15725         instead of MULT rtx.  Update all corresponding splitters.
15726         (*saddl_se): Ditto.
15727         (*ssub<modesuffix>): Ditto.
15728         (*ssubl_se): Ditto.
15729         (*cmp_sadd_di): Update split patterns.
15730         (*cmp_sadd_si): Ditto.
15731         (*cmp_sadd_sidi): Ditto.
15732         (*cmp_ssub_di): Ditto.
15733         (*cmp_ssub_si): Ditto.
15734         (*cmp_ssub_sidi): Ditto.
15735         * config/alpha/predicates.md (const23_operand): New predicate.
15736         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
15737         Look for ASHIFT, not MULT inner operand.
15738         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
15740 2018-01-04  Martin Liska  <mliska@suse.cz>
15742         PR gcov-profile/83669
15743         * gcov.c (output_intermediate_file): Add version to intermediate
15744         gcov file.
15745         * doc/gcov.texi: Document new field 'version' in intermediate
15746         file format. Fix location of '-k' option of gcov command.
15748 2018-01-04  Martin Liska  <mliska@suse.cz>
15750         PR ipa/82352
15751         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
15753 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15755         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
15757 2018-01-03  Martin Sebor  <msebor@redhat.com>
15759         PR tree-optimization/83655
15760         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
15761         checking calls with invalid arguments.
15763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15765         * tree-vect-stmts.c (vect_get_store_rhs): New function.
15766         (vectorizable_mask_load_store): Delete.
15767         (vectorizable_call): Return false for masked loads and stores.
15768         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
15769         instead of gimple_assign_rhs1.
15770         (vectorizable_load): Handle IFN_MASK_LOAD.
15771         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
15773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15775         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
15776         split out from..,
15777         (vectorizable_mask_load_store): ...here.
15778         (vectorizable_load): ...and here.
15780 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15782         * tree-vect-stmts.c (vect_build_all_ones_mask)
15783         (vect_build_zero_merge_argument): New functions, split out from...
15784         (vectorizable_load): ...here.
15786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15788         * tree-vect-stmts.c (vect_check_store_rhs): New function,
15789         split out from...
15790         (vectorizable_mask_load_store): ...here.
15791         (vectorizable_store): ...and here.
15793 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15795         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
15796         split out from...
15797         (vectorizable_mask_load_store): ...here.
15799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15801         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
15802         (vect_model_store_cost): Take a vec_load_store_type instead of a
15803         vect_def_type.
15804         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
15805         (vect_model_store_cost): Take a vec_load_store_type instead of a
15806         vect_def_type.
15807         (vectorizable_mask_load_store): Update accordingly.
15808         (vectorizable_store): Likewise.
15809         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
15811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15813         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
15814         IFN_MASK_LOAD calls here rather than...
15815         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
15817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15818             Alan Hayward  <alan.hayward@arm.com>
15819             David Sherwood  <david.sherwood@arm.com>
15821         * expmed.c (extract_bit_field_1): For vector extracts,
15822         fall back to extract_bit_field_as_subreg if vec_extract
15823         isn't available.
15825 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15826             Alan Hayward  <alan.hayward@arm.com>
15827             David Sherwood  <david.sherwood@arm.com>
15829         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
15830         they are variable or constant sized.
15831         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
15832         slots for constant-sized data.
15834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15835             Alan Hayward  <alan.hayward@arm.com>
15836             David Sherwood  <david.sherwood@arm.com>
15838         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
15839         handling COND_EXPRs with boolean comparisons, try to find a better
15840         basis for the mask type than the boolean itself.
15842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15844         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
15845         is calculated and how it can be overridden.
15846         * genmodes.c (max_bitsize_mode_any_mode): New variable.
15847         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
15848         if defined.
15849         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
15850         if nonzero.
15852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15853             Alan Hayward  <alan.hayward@arm.com>
15854             David Sherwood  <david.sherwood@arm.com>
15856         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
15857         Remove the mode argument.
15858         (aarch64_simd_valid_immediate): Remove the mode and inverse
15859         arguments.
15860         * config/aarch64/iterators.md (bitsize): New iterator.
15861         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
15862         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
15863         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
15864         aarch64_simd_valid_immediate.
15865         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
15866         (aarch64_reg_or_bic_imm): Likewise.
15867         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
15868         with an insn_type enum and msl with a modifier_type enum.
15869         Replace element_width with a scalar_mode.  Change the shift
15870         to unsigned int.  Add constructors for scalar_float_mode and
15871         scalar_int_mode elements.
15872         (aarch64_vect_float_const_representable_p): Delete.
15873         (aarch64_can_const_movi_rtx_p)
15874         (aarch64_simd_scalar_immediate_valid_for_move)
15875         (aarch64_simd_make_constant): Update call to
15876         aarch64_simd_valid_immediate.
15877         (aarch64_advsimd_valid_immediate_hs): New function.
15878         (aarch64_advsimd_valid_immediate): Likewise.
15879         (aarch64_simd_valid_immediate): Remove mode and inverse
15880         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
15881         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
15882         and aarch64_float_const_representable_p on the result.
15883         (aarch64_output_simd_mov_immediate): Remove mode argument.
15884         Update call to aarch64_simd_valid_immediate and use of
15885         simd_immediate_info.
15886         (aarch64_output_scalar_simd_mov_immediate): Update call
15887         accordingly.
15889 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15890             Alan Hayward  <alan.hayward@arm.com>
15891             David Sherwood  <david.sherwood@arm.com>
15893         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
15894         (mode_nunits): Likewise CONST_MODE_NUNITS.
15895         * machmode.def (ADJUST_NUNITS): Document.
15896         * genmodes.c (mode_data::need_nunits_adj): New field.
15897         (blank_mode): Update accordingly.
15898         (adj_nunits): New variable.
15899         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
15900         parameter.
15901         (emit_mode_size_inline): Set need_bytesize_adj for all modes
15902         listed in adj_nunits.
15903         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
15904         listed in adj_nunits.  Don't emit case statements for such modes.
15905         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
15906         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
15907         nothing if adj_nunits is nonnull.
15908         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
15909         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
15910         (emit_mode_fbit): Update use of print_maybe_const_decl.
15911         (emit_move_size): Likewise.  Treat the array as non-const
15912         if adj_nunits.
15913         (emit_mode_adjustments): Handle adj_nunits.
15915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15917         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
15918         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
15919         (VECTOR_MODES): Use it.
15920         (make_vector_modes): Take the prefix as an argument.
15922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15923             Alan Hayward  <alan.hayward@arm.com>
15924             David Sherwood  <david.sherwood@arm.com>
15926         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
15927         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
15928         for MODE_VECTOR_BOOL.
15929         * machmode.def (VECTOR_BOOL_MODE): Document.
15930         * genmodes.c (VECTOR_BOOL_MODE): New macro.
15931         (make_vector_bool_mode): New function.
15932         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
15933         MODE_VECTOR_BOOL.
15934         * lto-streamer-in.c (lto_input_mode_table): Likewise.
15935         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
15936         Likewise.
15937         * stor-layout.c (int_mode_for_mode): Likewise.
15938         * tree.c (build_vector_type_for_mode): Likewise.
15939         * varasm.c (output_constant_pool_2): Likewise.
15940         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
15941         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
15942         for MODE_VECTOR_BOOL.
15943         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
15944         of mode class checks.
15945         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
15946         instead of a list of mode class checks.
15947         (expand_vector_scalar_condition): Likewise.
15948         (type_for_widest_vector_mode): Handle BImode as an inner mode.
15950 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15951             Alan Hayward  <alan.hayward@arm.com>
15952             David Sherwood  <david.sherwood@arm.com>
15954         * machmode.h (mode_size): Change from unsigned short to
15955         poly_uint16_pod.
15956         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
15957         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
15958         or if measurement_type is not polynomial.
15959         (fixed_size_mode::includes_p): Check for constant-sized modes.
15960         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
15961         return a poly_uint16 rather than an unsigned short.
15962         (emit_mode_size): Change the type of mode_size from unsigned short
15963         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
15964         (emit_mode_adjustments): Cope with polynomial vector sizes.
15965         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
15966         for GET_MODE_SIZE.
15967         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
15968         for GET_MODE_SIZE.
15969         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
15970         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
15971         * caller-save.c (setup_save_areas): Likewise.
15972         (replace_reg_with_saved_mem): Likewise.
15973         * calls.c (emit_library_call_value_1): Likewise.
15974         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
15975         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
15976         (gen_lowpart_for_combine): Likewise.
15977         * convert.c (convert_to_integer_1): Likewise.
15978         * cse.c (equiv_constant, cse_insn): Likewise.
15979         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
15980         (cselib_subst_to_values): Likewise.
15981         * dce.c (word_dce_process_block): Likewise.
15982         * df-problems.c (df_word_lr_mark_ref): Likewise.
15983         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
15984         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
15985         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
15986         (rtl_for_decl_location): Likewise.
15987         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
15988         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
15989         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
15990         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
15991         (expand_expr_real_1): Likewise.
15992         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
15993         (pad_below): Likewise.
15994         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
15995         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
15996         * ira.c (get_subreg_tracking_sizes): Likewise.
15997         * ira-build.c (ira_create_allocno_objects): Likewise.
15998         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
15999         (ira_sort_regnos_for_alter_reg): Likewise.
16000         * ira-costs.c (record_operand_costs): Likewise.
16001         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16002         (resolve_simple_move): Likewise.
16003         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16004         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16005         (lra_constraints): Likewise.
16006         (CONST_POOL_OK_P): Reject variable-sized modes.
16007         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16008         (add_pseudo_to_slot, lra_spill): Likewise.
16009         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16010         * optabs-query.c (get_best_extraction_insn): Likewise.
16011         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16012         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16013         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16014         * recog.c (offsettable_address_addr_space_p): Likewise.
16015         * regcprop.c (maybe_mode_change): Likewise.
16016         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16017         * regrename.c (build_def_use): Likewise.
16018         * regstat.c (dump_reg_info): Likewise.
16019         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16020         (find_reloads, find_reloads_subreg_address): Likewise.
16021         * reload1.c (eliminate_regs_1): Likewise.
16022         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16023         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16024         (simplify_binary_operation_1, simplify_subreg): Likewise.
16025         * targhooks.c (default_function_arg_padding): Likewise.
16026         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16027         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16028         (verify_gimple_assign_ternary): Likewise.
16029         * tree-inline.c (estimate_move_cost): Likewise.
16030         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16031         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16032         (get_address_cost_ainc): Likewise.
16033         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16034         (vect_supportable_dr_alignment): Likewise.
16035         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16036         (vectorizable_reduction): Likewise.
16037         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16038         (vectorizable_operation, vectorizable_load): Likewise.
16039         * tree.c (build_same_sized_truth_vector_type): Likewise.
16040         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16041         * var-tracking.c (emit_note_insn_var_location): Likewise.
16042         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16043         (ADDR_VEC_ALIGN): Likewise.
16045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16046             Alan Hayward  <alan.hayward@arm.com>
16047             David Sherwood  <david.sherwood@arm.com>
16049         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16050         unsigned short.
16051         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16052         or if measurement_type is polynomial.
16053         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16054         * combine.c (make_extraction): Likewise.
16055         * dse.c (find_shift_sequence): Likewise.
16056         * dwarf2out.c (mem_loc_descriptor): Likewise.
16057         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16058         (extract_bit_field, extract_low_bits): Likewise.
16059         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16060         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16061         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16062         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16063         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16064         * reload.c (find_reloads): Likewise.
16065         * reload1.c (alter_reg): Likewise.
16066         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16067         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16068         * tree-if-conv.c (predicate_mem_writes): Likewise.
16069         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16070         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16071         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16072         * valtrack.c (dead_debug_insert_temp): Likewise.
16073         * varasm.c (mergeable_constant_section): Likewise.
16074         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16077             Alan Hayward  <alan.hayward@arm.com>
16078             David Sherwood  <david.sherwood@arm.com>
16080         * expr.c (expand_assignment): Cope with polynomial mode sizes
16081         when assigning to a CONCAT.
16083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16084             Alan Hayward  <alan.hayward@arm.com>
16085             David Sherwood  <david.sherwood@arm.com>
16087         * machmode.h (mode_precision): Change from unsigned short to
16088         poly_uint16_pod.
16089         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16090         short.
16091         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16092         or if measurement_type is not polynomial.
16093         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16094         in which the mode is already known to be a scalar_int_mode.
16095         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16096         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16097         initializer.
16098         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16099         for GET_MODE_PRECISION.
16100         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16101         for GET_MODE_PRECISION.
16102         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16103         as polynomial.
16104         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16105         (expand_field_assignment, make_extraction): Likewise.
16106         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16107         (get_last_value): Likewise.
16108         * convert.c (convert_to_integer_1): Likewise.
16109         * cse.c (cse_insn): Likewise.
16110         * expr.c (expand_expr_real_1): Likewise.
16111         * lra-constraints.c (simplify_operand_subreg): Likewise.
16112         * optabs-query.c (can_atomic_load_p): Likewise.
16113         * optabs.c (expand_atomic_load): Likewise.
16114         (expand_atomic_store): Likewise.
16115         * ree.c (combine_reaching_defs): Likewise.
16116         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16117         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16118         * tree.h (type_has_mode_precision_p): Likewise.
16119         * ubsan.c (instrument_si_overflow): Likewise.
16121 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16122             Alan Hayward  <alan.hayward@arm.com>
16123             David Sherwood  <david.sherwood@arm.com>
16125         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16126         polynomial numbers of units.
16127         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16128         (valid_vector_subparts_p): New function.
16129         (build_vector_type): Remove temporary shim and take the number
16130         of units as a poly_uint64 rather than an int.
16131         (build_opaque_vector_type): Take the number of units as a
16132         poly_uint64 rather than an int.
16133         * tree.c (build_vector_from_ctor): Handle polynomial
16134         TYPE_VECTOR_SUBPARTS.
16135         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16136         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16137         (build_vector_from_val): If the number of units is variable,
16138         use build_vec_duplicate_cst for constant operands and
16139         VEC_DUPLICATE_EXPR otherwise.
16140         (make_vector_type): Remove temporary is_constant ().
16141         (build_vector_type, build_opaque_vector_type): Take the number of
16142         units as a poly_uint64 rather than an int.
16143         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16144         VECTOR_CST_NELTS.
16145         * cfgexpand.c (expand_debug_expr): Likewise.
16146         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16147         (store_constructor, expand_expr_real_1): Likewise.
16148         (const_scalar_mask_from_tree): Likewise.
16149         * fold-const-call.c (fold_const_reduction): Likewise.
16150         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16151         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16152         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16153         (fold_relational_const): Likewise.
16154         (native_interpret_vector): Likewise.  Change the size from an
16155         int to an unsigned int.
16156         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16157         TYPE_VECTOR_SUBPARTS.
16158         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16159         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16160         duplicating a non-constant operand into a variable-length vector.
16161         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16162         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16163         * ipa-icf.c (sem_variable::equals): Likewise.
16164         * match.pd: Likewise.
16165         * omp-simd-clone.c (simd_clone_subparts): Likewise.
16166         * print-tree.c (print_node): Likewise.
16167         * stor-layout.c (layout_type): Likewise.
16168         * targhooks.c (default_builtin_vectorization_cost): Likewise.
16169         * tree-cfg.c (verify_gimple_comparison): Likewise.
16170         (verify_gimple_assign_binary): Likewise.
16171         (verify_gimple_assign_ternary): Likewise.
16172         (verify_gimple_assign_single): Likewise.
16173         * tree-pretty-print.c (dump_generic_node): Likewise.
16174         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16175         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16176         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16177         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16178         (vect_shift_permute_load_chain): Likewise.
16179         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16180         (expand_vector_condition, optimize_vector_constructor): Likewise.
16181         (lower_vec_perm, get_compute_type): Likewise.
16182         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16183         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16184         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16185         (vect_recog_mask_conversion_pattern): Likewise.
16186         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16187         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16188         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16189         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16190         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16191         (vectorizable_shift, vectorizable_operation, vectorizable_store)
16192         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16193         (supportable_widening_operation): Likewise.
16194         (supportable_narrowing_operation): Likewise.
16195         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16196         Likewise.
16197         * varasm.c (output_constant): Likewise.
16199 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16200             Alan Hayward  <alan.hayward@arm.com>
16201             David Sherwood  <david.sherwood@arm.com>
16203         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
16204         so that both the length == 3 and length != 3 cases set up their
16205         own permute vectors.  Add comments explaining why we know the
16206         number of elements is constant.
16207         (vect_permute_load_chain): Likewise.
16209 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16210             Alan Hayward  <alan.hayward@arm.com>
16211             David Sherwood  <david.sherwood@arm.com>
16213         * machmode.h (mode_nunits): Change from unsigned char to
16214         poly_uint16_pod.
16215         (ONLY_FIXED_SIZE_MODES): New macro.
16216         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16217         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16218         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16219         New typedefs.
16220         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16221         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16222         or if measurement_type is not polynomial.
16223         * genmodes.c (ZERO_COEFFS): New macro.
16224         (emit_mode_nunits_inline): Make mode_nunits_inline return a
16225         poly_uint16.
16226         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16227         Use ZERO_COEFFS when emitting initializers.
16228         * data-streamer.h (bp_pack_poly_value): New function.
16229         (bp_unpack_poly_value): Likewise.
16230         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16231         for GET_MODE_NUNITS.
16232         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16233         for GET_MODE_NUNITS.
16234         * tree.c (make_vector_type): Remove temporary shim and make
16235         the real function take the number of units as a poly_uint64
16236         rather than an int.
16237         (build_vector_type_for_mode): Handle polynomial nunits.
16238         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16239         * emit-rtl.c (const_vec_series_p_1): Likewise.
16240         (gen_rtx_CONST_VECTOR): Likewise.
16241         * fold-const.c (test_vec_duplicate_folding): Likewise.
16242         * genrecog.c (validate_pattern): Likewise.
16243         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16244         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16245         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16246         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16247         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16248         * rtlanal.c (subreg_get_info): Likewise.
16249         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16250         (vect_grouped_load_supported): Likewise.
16251         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16252         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16253         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16254         (simplify_const_unary_operation, simplify_binary_operation_1)
16255         (simplify_const_binary_operation, simplify_ternary_operation)
16256         (test_vector_ops_duplicate, test_vector_ops): Likewise.
16257         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16258         instead of CONST_VECTOR_NUNITS.
16259         * varasm.c (output_constant_pool_2): Likewise.
16260         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16261         explicit-encoded elements in the XVEC for variable-length vectors.
16263 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16265         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16267 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16268             Alan Hayward  <alan.hayward@arm.com>
16269             David Sherwood  <david.sherwood@arm.com>
16271         * coretypes.h (fixed_size_mode): Declare.
16272         (fixed_size_mode_pod): New typedef.
16273         * builtins.h (target_builtins::x_apply_args_mode)
16274         (target_builtins::x_apply_result_mode): Change type to
16275         fixed_size_mode_pod.
16276         * builtins.c (apply_args_size, apply_result_size, result_vector)
16277         (expand_builtin_apply_args_1, expand_builtin_apply)
16278         (expand_builtin_return): Update accordingly.
16280 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16282         * cse.c (hash_rtx_cb): Hash only the encoded elements.
16283         * cselib.c (cselib_hash_rtx): Likewise.
16284         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16285         CONST_VECTOR encoding.
16287 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16288             Jeff Law  <law@redhat.com>
16290         PR target/83641
16291         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16292         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16293         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16294         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16296         PR target/83641
16297         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16298         explicitly probe *sp in a noreturn function if there were any callee
16299         register saves or frame pointer is needed.
16301 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16303         PR debug/83621
16304         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16305         BLKmode for ternary, binary or unary expressions.
16307         PR debug/83645
16308         * var-tracking.c (delete_vta_debug_insn): New inline function.
16309         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16310         insns from get_insns () to NULL instead of each bb separately.
16311         Use delete_vta_debug_insn.  No longer static.
16312         (vt_debug_insns_local, variable_tracking_main_1): Adjust
16313         delete_vta_debug_insns callers.
16314         * rtl.h (delete_vta_debug_insns): Declare.
16315         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16316         instead of variable_tracking_main.
16318 2018-01-03  Martin Sebor  <msebor@redhat.com>
16320         PR tree-optimization/83603
16321         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16322         arguments past the endof the argument list in functions declared
16323         without a prototype.
16324         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16325         Avoid checking when arguments are null.
16327 2018-01-03  Martin Sebor  <msebor@redhat.com>
16329         PR c/83559
16330         * doc/extend.texi (attribute const): Fix a typo.
16331         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16332         issuing -Wsuggest-attribute for void functions.
16334 2018-01-03  Martin Sebor  <msebor@redhat.com>
16336         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16337         offset_int::from instead of wide_int::to_shwi.
16338         (maybe_diag_overlap): Remove assertion.
16339         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16340         * gimple-ssa-sprintf.c (format_directive): Same.
16341         (parse_directive): Same.
16342         (sprintf_dom_walker::compute_format_length): Same.
16343         (try_substitute_return_value): Same.
16345 2018-01-03  Jeff Law  <law@redhat.com>
16347         PR middle-end/83654
16348         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16349         non-constant residual for zero at runtime and avoid probing in
16350         that case.  Reorganize code for trailing problem to mirror handling
16351         of the residual.
16353 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16355         PR tree-optimization/83501
16356         * tree-ssa-strlen.c (get_string_cst): New.
16357         (handle_char_store): Call get_string_cst.
16359 2018-01-03  Martin Liska  <mliska@suse.cz>
16361         PR tree-optimization/83593
16362         * tree-ssa-strlen.c: Include tree-cfg.h.
16363         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16364         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16365         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16366         to false.
16367         (strlen_dom_walker::before_dom_children): Call
16368         gimple_purge_dead_eh_edges. Dump tranformation with details
16369         dump flags.
16370         (strlen_dom_walker::before_dom_children): Update call by adding
16371         new argument cleanup_eh.
16372         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16374 2018-01-03  Martin Liska  <mliska@suse.cz>
16376         PR ipa/83549
16377         * cif-code.def (VARIADIC_THUNK): New enum value.
16378         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16379         thunks.
16381 2018-01-03  Jan Beulich  <jbeulich@suse.com>
16383         * sse.md (mov<mode>_internal): Tighten condition for when to use
16384         vmovdqu<ssescalarsize> for TI and OI modes.
16386 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16388         Update copyright years.
16390 2018-01-03  Martin Liska  <mliska@suse.cz>
16392         PR ipa/83594
16393         * ipa-visibility.c (function_and_variable_visibility): Skip
16394         functions with noipa attribure.
16396 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16398         * gcc.c (process_command): Update copyright notice dates.
16399         * gcov-dump.c (print_version): Ditto.
16400         * gcov.c (print_version): Ditto.
16401         * gcov-tool.c (print_version): Ditto.
16402         * gengtype.c (create_file): Ditto.
16403         * doc/cpp.texi: Bump @copying's copyright year.
16404         * doc/cppinternals.texi: Ditto.
16405         * doc/gcc.texi: Ditto.
16406         * doc/gccint.texi: Ditto.
16407         * doc/gcov.texi: Ditto.
16408         * doc/install.texi: Ditto.
16409         * doc/invoke.texi: Ditto.
16411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16413         * vector-builder.h (vector_builder::m_full_nelts): Change from
16414         unsigned int to poly_uint64.
16415         (vector_builder::full_nelts): Update prototype accordingly.
16416         (vector_builder::new_vector): Likewise.
16417         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16418         (vector_builder::operator ==): Likewise.
16419         (vector_builder::finalize): Likewise.
16420         * int-vector-builder.h (int_vector_builder::int_vector_builder):
16421         Take the number of elements as a poly_uint64 rather than an
16422         unsigned int.
16423         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16424         from unsigned int to poly_uint64.
16425         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16426         (vec_perm_indices::new_vector): Likewise.
16427         (vec_perm_indices::length): Likewise.
16428         (vec_perm_indices::nelts_per_input): Likewise.
16429         (vec_perm_indices::input_nelts): Likewise.
16430         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16431         number of elements per input as a poly_uint64 rather than an
16432         unsigned int.  Use the original encoding for variable-length
16433         vectors, rather than clamping each individual element.
16434         For the second and subsequent elements in each pattern,
16435         clamp the step and base before clamping their sum.
16436         (vec_perm_indices::series_p): Handle polynomial element counts.
16437         (vec_perm_indices::all_in_range_p): Likewise.
16438         (vec_perm_indices_to_tree): Likewise.
16439         (vec_perm_indices_to_rtx): Likewise.
16440         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16441         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16442         (tree_vector_builder::new_binary_operation): Handle polynomial
16443         element counts.  Return false if we need to know the number
16444         of elements at compile time.
16445         * fold-const.c (fold_vec_perm): Punt if the number of elements
16446         isn't known at compile time.
16448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16450         * vec-perm-indices.h (vec_perm_builder): Change element type
16451         from HOST_WIDE_INT to poly_int64.
16452         (vec_perm_indices::element_type): Update accordingly.
16453         (vec_perm_indices::clamp): Handle polynomial element_types.
16454         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16455         (vec_perm_indices::all_in_range_p): Likewise.
16456         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16457         than shwi trees.
16458         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16459         polynomial vec_perm_indices element types.
16460         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16461         * fold-const.c (fold_vec_perm): Likewise.
16462         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16463         * tree-vect-generic.c (lower_vec_perm): Likewise.
16464         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16465         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16466         element type to HOST_WIDE_INT.
16468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16469             Alan Hayward  <alan.hayward@arm.com>
16470             David Sherwood  <david.sherwood@arm.com>
16472         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16473         rather than an int.  Use plus_constant.
16474         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16475         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16478             Alan Hayward  <alan.hayward@arm.com>
16479             David Sherwood  <david.sherwood@arm.com>
16481         * calls.c (emit_call_1, expand_call): Change struct_value_size from
16482         a HOST_WIDE_INT to a poly_int64.
16484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16485             Alan Hayward  <alan.hayward@arm.com>
16486             David Sherwood  <david.sherwood@arm.com>
16488         * calls.c (load_register_parameters): Cope with polynomial
16489         mode sizes.  Require a constant size for BLKmode parameters
16490         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
16491         forces a parameter to be padded at the lsb end in order to
16492         fill a complete number of words, require the parameter size
16493         to be ordered wrt UNITS_PER_WORD.
16495 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16496             Alan Hayward  <alan.hayward@arm.com>
16497             David Sherwood  <david.sherwood@arm.com>
16499         * reload1.c (spill_stack_slot_width): Change element type
16500         from unsigned int to poly_uint64_pod.
16501         (alter_reg): Treat mode sizes as polynomial.
16503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16504             Alan Hayward  <alan.hayward@arm.com>
16505             David Sherwood  <david.sherwood@arm.com>
16507         * reload.c (complex_word_subreg_p): New function.
16508         (reload_inner_reg_of_subreg, push_reload): Use it.
16510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16511             Alan Hayward  <alan.hayward@arm.com>
16512             David Sherwood  <david.sherwood@arm.com>
16514         * lra-constraints.c (process_alt_operands): Reject matched
16515         operands whose sizes aren't ordered.
16516         (match_reload): Refer to this check here.
16518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16519             Alan Hayward  <alan.hayward@arm.com>
16520             David Sherwood  <david.sherwood@arm.com>
16522         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16523         that the mode size is in the set {1, 2, 4, 8, 16}.
16525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16526             Alan Hayward  <alan.hayward@arm.com>
16527             David Sherwood  <david.sherwood@arm.com>
16529         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16530         Use plus_constant instead of gen_rtx_PLUS.
16532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16533             Alan Hayward  <alan.hayward@arm.com>
16534             David Sherwood  <david.sherwood@arm.com>
16536         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16537         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16538         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16539         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16540         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16541         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16542         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16543         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16544         * config/i386/i386.c (ix86_push_rounding): ...this new function.
16545         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16546         a poly_int64.
16547         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16548         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16549         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16550         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16551         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16552         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16553         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16554         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16555         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16556         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16557         function.
16558         * expr.c (emit_move_resolve_push): Treat the input and result
16559         of PUSH_ROUNDING as a poly_int64.
16560         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16561         (emit_push_insn): Likewise.
16562         * lra-eliminations.c (mark_not_eliminable): Likewise.
16563         * recog.c (push_operand): Likewise.
16564         * reload1.c (elimination_effects): Likewise.
16565         * rtlanal.c (nonzero_bits1): Likewise.
16566         * calls.c (store_one_arg): Likewise.  Require the padding to be
16567         known at compile time.
16569 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16570             Alan Hayward  <alan.hayward@arm.com>
16571             David Sherwood  <david.sherwood@arm.com>
16573         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16574         Use plus_constant instead of gen_rtx_PLUS.
16576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16577             Alan Hayward  <alan.hayward@arm.com>
16578             David Sherwood  <david.sherwood@arm.com>
16580         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16581         rather than an int.
16583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16584             Alan Hayward  <alan.hayward@arm.com>
16585             David Sherwood  <david.sherwood@arm.com>
16587         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16588         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16589         via stack temporaries.  Treat the mode size as polynomial too.
16591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16592             Alan Hayward  <alan.hayward@arm.com>
16593             David Sherwood  <david.sherwood@arm.com>
16595         * expr.c (expand_expr_real_2): When handling conversions involving
16596         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
16597         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
16598         as a poly_uint64 too.
16600 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16601             Alan Hayward  <alan.hayward@arm.com>
16602             David Sherwood  <david.sherwood@arm.com>
16604         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
16606 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16607             Alan Hayward  <alan.hayward@arm.com>
16608             David Sherwood  <david.sherwood@arm.com>
16610         * combine.c (can_change_dest_mode): Handle polynomial
16611         REGMODE_NATURAL_SIZE.
16612         * expmed.c (store_bit_field_1): Likewise.
16613         * expr.c (store_constructor): Likewise.
16614         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
16615         and polynomial REGMODE_NATURAL_SIZE.
16616         (gen_lowpart_common): Likewise.
16617         * reginfo.c (record_subregs_of_mode): Likewise.
16618         * rtlanal.c (read_modify_subreg_p): Likewise.
16620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16621             Alan Hayward  <alan.hayward@arm.com>
16622             David Sherwood  <david.sherwood@arm.com>
16624         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
16625         numbers of elements.
16627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16628             Alan Hayward  <alan.hayward@arm.com>
16629             David Sherwood  <david.sherwood@arm.com>
16631         * match.pd: Cope with polynomial numbers of vector elements.
16633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16634             Alan Hayward  <alan.hayward@arm.com>
16635             David Sherwood  <david.sherwood@arm.com>
16637         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
16638         in a POINTER_PLUS_EXPR.
16640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16641             Alan Hayward  <alan.hayward@arm.com>
16642             David Sherwood  <david.sherwood@arm.com>
16644         * omp-simd-clone.c (simd_clone_subparts): New function.
16645         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
16646         (ipa_simd_modify_function_body): Likewise.
16648 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16649             Alan Hayward  <alan.hayward@arm.com>
16650             David Sherwood  <david.sherwood@arm.com>
16652         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
16653         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
16654         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
16655         (expand_vector_condition, vector_element): Likewise.
16656         (subparts_gt): New function.
16657         (get_compute_type): Use subparts_gt.
16658         (count_type_subparts): Delete.
16659         (expand_vector_operations_1): Use subparts_gt instead of
16660         count_type_subparts.
16662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16663             Alan Hayward  <alan.hayward@arm.com>
16664             David Sherwood  <david.sherwood@arm.com>
16666         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
16667         (vect_compile_time_alias): ...this new function.  Do the calculation
16668         on poly_ints rather than trees.
16669         (vect_prune_runtime_alias_test_list): Update call accordingly.
16671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16672             Alan Hayward  <alan.hayward@arm.com>
16673             David Sherwood  <david.sherwood@arm.com>
16675         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
16676         numbers of units.
16677         (vect_schedule_slp_instance): Likewise.
16679 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16680             Alan Hayward  <alan.hayward@arm.com>
16681             David Sherwood  <david.sherwood@arm.com>
16683         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
16684         constant and extern definitions for variable-length vectors.
16685         (vect_get_constant_vectors): Note that the number of units
16686         is known to be constant.
16688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16689             Alan Hayward  <alan.hayward@arm.com>
16690             David Sherwood  <david.sherwood@arm.com>
16692         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
16693         of units as polynomial.  Choose between WIDE and NARROW based
16694         on multiple_p.
16696 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16697             Alan Hayward  <alan.hayward@arm.com>
16698             David Sherwood  <david.sherwood@arm.com>
16700         * tree-vect-stmts.c (simd_clone_subparts): New function.
16701         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
16703 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16704             Alan Hayward  <alan.hayward@arm.com>
16705             David Sherwood  <david.sherwood@arm.com>
16707         * tree-vect-stmts.c (vectorizable_call): Treat the number of
16708         vectors as polynomial.  Use build_index_vector for
16709         IFN_GOMP_SIMD_LANE.
16711 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16712             Alan Hayward  <alan.hayward@arm.com>
16713             David Sherwood  <david.sherwood@arm.com>
16715         * tree-vect-stmts.c (get_load_store_type): Treat the number of
16716         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
16717         for variable-length vectors.
16718         (vectorizable_mask_load_store): Treat the number of units as
16719         polynomial, asserting that it is constant if the condition has
16720         already been enforced.
16721         (vectorizable_store, vectorizable_load): Likewise.
16723 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16724             Alan Hayward  <alan.hayward@arm.com>
16725             David Sherwood  <david.sherwood@arm.com>
16727         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
16728         of units as polynomial.  Punt if we can't tell at compile time
16729         which vector contains the final result.
16731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16732             Alan Hayward  <alan.hayward@arm.com>
16733             David Sherwood  <david.sherwood@arm.com>
16735         * tree-vect-loop.c (vectorizable_induction): Treat the number
16736         of units as polynomial.  Punt on SLP inductions.  Use an integer
16737         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
16738         cast of such a series for variable-length floating-point
16739         reductions.
16741 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16742             Alan Hayward  <alan.hayward@arm.com>
16743             David Sherwood  <david.sherwood@arm.com>
16745         * tree.h (build_index_vector): Declare.
16746         * tree.c (build_index_vector): New function.
16747         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
16748         of units as polynomial, forcibly converting it to a constant if
16749         vectorizable_reduction has already enforced the condition.
16750         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
16751         to create a {1,2,3,...} vector.
16752         (vectorizable_reduction): Treat the number of units as polynomial.
16753         Choose vectype_in based on the largest scalar element size rather
16754         than the smallest number of units.  Enforce the restrictions
16755         relied on above.
16757 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16758             Alan Hayward  <alan.hayward@arm.com>
16759             David Sherwood  <david.sherwood@arm.com>
16761         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
16762         number of units as polynomial.
16764 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16765             Alan Hayward  <alan.hayward@arm.com>
16766             David Sherwood  <david.sherwood@arm.com>
16768         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
16769         * target.def (autovectorize_vector_sizes): Return the vector sizes
16770         by pointer, using vector_sizes rather than a bitmask.
16771         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
16772         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
16773         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
16774         Likewise.
16775         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
16776         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
16777         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
16778         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
16779         * omp-general.c (omp_max_vf): Likewise.
16780         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16781         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
16782         * tree-vect-loop.c (vect_analyze_loop): Likewise.
16783         * tree-vect-slp.c (vect_slp_bb): Likewise.
16784         * doc/tm.texi: Regenerate.
16785         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
16786         to a poly_uint64.
16787         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
16788         the vector size as a poly_uint64 rather than an unsigned int.
16789         (current_vector_size): Change from an unsigned int to a poly_uint64.
16790         (get_vectype_for_scalar_type): Update accordingly.
16791         * tree.h (build_truth_vector_type): Take the size and number of
16792         units as a poly_uint64 rather than an unsigned int.
16793         (build_vector_type): Add a temporary overload that takes
16794         the number of units as a poly_uint64 rather than an unsigned int.
16795         * tree.c (make_vector_type): Likewise.
16796         (build_truth_vector_type): Take the number of units as a poly_uint64
16797         rather than an unsigned int.
16799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16800             Alan Hayward  <alan.hayward@arm.com>
16801             David Sherwood  <david.sherwood@arm.com>
16803         * target.def (get_mask_mode): Take the number of units and length
16804         as poly_uint64s rather than unsigned ints.
16805         * targhooks.h (default_get_mask_mode): Update accordingly.
16806         * targhooks.c (default_get_mask_mode): Likewise.
16807         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
16808         * doc/tm.texi: Regenerate.
16810 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16811             Alan Hayward  <alan.hayward@arm.com>
16812             David Sherwood  <david.sherwood@arm.com>
16814         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
16815         * omp-general.c (omp_max_vf): Likewise.
16816         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
16817         (expand_omp_simd): Handle polynomial safelen.
16818         * omp-low.c (omplow_simd_context): Add a default constructor.
16819         (omplow_simd_context::max_vf): Change from int to poly_uint64.
16820         (lower_rec_simd_input_clauses): Update accordingly.
16821         (lower_rec_input_clauses): Likewise.
16823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16824             Alan Hayward  <alan.hayward@arm.com>
16825             David Sherwood  <david.sherwood@arm.com>
16827         * tree-vectorizer.h (vect_nunits_for_cost): New function.
16828         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
16829         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
16830         (vect_analyze_slp_cost): Likewise.
16831         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
16832         (vect_model_load_cost): Likewise.
16834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16835             Alan Hayward  <alan.hayward@arm.com>
16836             David Sherwood  <david.sherwood@arm.com>
16838         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
16839         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
16840         from an unsigned int * to a poly_uint64_pod *.
16841         (calculate_unrolling_factor): New function.
16842         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
16844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16845             Alan Hayward  <alan.hayward@arm.com>
16846             David Sherwood  <david.sherwood@arm.com>
16848         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
16849         from an unsigned int to a poly_uint64.
16850         (_loop_vec_info::slp_unrolling_factor): Likewise.
16851         (_loop_vec_info::vectorization_factor): Change from an int
16852         to a poly_uint64.
16853         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
16854         (vect_get_num_vectors): New function.
16855         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
16856         (vect_get_num_copies): Use vect_get_num_vectors.
16857         (vect_analyze_data_ref_dependences): Change max_vf from an int *
16858         to an unsigned int *.
16859         (vect_analyze_data_refs): Change min_vf from an int * to a
16860         poly_uint64 *.
16861         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
16862         than an unsigned HOST_WIDE_INT.
16863         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
16864         (vect_analyze_data_ref_dependence): Change max_vf from an int *
16865         to an unsigned int *.
16866         (vect_analyze_data_ref_dependences): Likewise.
16867         (vect_compute_data_ref_alignment): Handle polynomial vf.
16868         (vect_enhance_data_refs_alignment): Likewise.
16869         (vect_prune_runtime_alias_test_list): Likewise.
16870         (vect_shift_permute_load_chain): Likewise.
16871         (vect_supportable_dr_alignment): Likewise.
16872         (dependence_distance_ge_vf): Take the vectorization factor as a
16873         poly_uint64 rather than an unsigned HOST_WIDE_INT.
16874         (vect_analyze_data_refs): Change min_vf from an int * to a
16875         poly_uint64 *.
16876         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
16877         vfm1 as a poly_uint64 rather than an int.  Make the same change
16878         for the returned bound_scalar.
16879         (vect_gen_vector_loop_niters): Handle polynomial vf.
16880         (vect_do_peeling): Likewise.  Update call to
16881         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
16882         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
16883         be constant.
16884         * tree-vect-loop.c (vect_determine_vectorization_factor)
16885         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
16886         (vect_get_known_peeling_cost): Likewise.
16887         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
16888         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
16889         (vect_transform_loop): Likewise.  Use the lowest possible VF when
16890         updating the upper bounds of the loop.
16891         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
16892         rather than an int.
16893         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
16894         polynomial unroll factors.
16895         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
16896         (vect_make_slp_decision): Likewise.
16897         (vect_supported_load_permutation_p): Likewise, and polynomial
16898         vf too.
16899         (vect_analyze_slp_cost): Handle polynomial vf.
16900         (vect_slp_analyze_node_operations): Likewise.
16901         (vect_slp_analyze_bb_1): Likewise.
16902         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
16903         than an unsigned HOST_WIDE_INT.
16904         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
16905         (vectorizable_load): Handle polynomial vf.
16906         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
16907         a poly_uint64.
16908         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
16910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16911             Alan Hayward  <alan.hayward@arm.com>
16912             David Sherwood  <david.sherwood@arm.com>
16914         * match.pd: Handle bit operations involving three constants
16915         and try to fold one pair.
16917 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16919         * tree-vect-loop-manip.c: Include gimple-fold.h.
16920         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
16921         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
16922         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
16923         Add a path that uses a step of VF instead of 1, but disable it
16924         for now.
16925         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
16926         and niters_no_overflow parameters.  Update calls to
16927         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
16928         Create a new SSA name if the latter choses to use a ste other
16929         than zero, and return it via niters_vector_mult_vf_var.
16930         * tree-vect-loop.c (vect_transform_loop): Update calls to
16931         vect_do_peeling, vect_gen_vector_loop_niters and
16932         slpeel_make_loop_iterate_ntimes.
16933         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
16934         (vect_gen_vector_loop_niters): Update declarations after above changes.
16936 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
16938         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
16939         128-bit round to integer instructions.
16940         (ceil<mode>2): Likewise.
16941         (btrunc<mode>2): Likewise.
16942         (round<mode>2): Likewise.
16944 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16946         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
16947         unaligned VSX load/store on P8/P9.
16948         (expand_block_clear): Allow the use of unaligned VSX
16949         load/store on P8/P9.
16951 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16953         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
16954         New function.
16955         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
16956         swap associated with both a load and a store.
16958 2018-01-02  Andrew Waterman  <andrew@sifive.com>
16960         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
16961         * config/riscv/riscv.md (clear_cache): Use it.
16963 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
16965         * web.c: Remove out-of-date comment.
16967 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
16969         * expr.c (fixup_args_size_notes): Check that any existing
16970         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
16971         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
16972         (emit_single_push_insn): ...here.
16974 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
16976         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
16977         (const_vector_encoded_nelts): New function.
16978         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
16979         (const_vector_int_elt, const_vector_elt): Declare.
16980         * emit-rtl.c (const_vector_int_elt_1): New function.
16981         (const_vector_elt): Likewise.
16982         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
16983         of CONST_VECTOR_ELT.
16985 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
16987         * expr.c: Include rtx-vector-builder.h.
16988         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
16989         directly on the tree encoding.
16990         (const_vector_from_tree): Likewise.
16991         * optabs.c: Include rtx-vector-builder.h.
16992         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
16993         sequence of "u" values.
16994         * vec-perm-indices.c: Include rtx-vector-builder.h.
16995         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
16996         directly on the vec_perm_indices encoding.
16998 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17000         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17001         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17002         * rtx-vector-builder.h: New file.
17003         * rtx-vector-builder.c: Likewise.
17004         * rtl.h (rtx_def::u2): Add a const_vector field.
17005         (CONST_VECTOR_NPATTERNS): New macro.
17006         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17007         (CONST_VECTOR_DUPLICATE_P): Likewise.
17008         (CONST_VECTOR_STEPPED_P): Likewise.
17009         (CONST_VECTOR_ENCODED_ELT): Likewise.
17010         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17011         (unwrap_const_vec_duplicate): Likewise.
17012         (const_vec_series_p): Check for a non-duplicated vector encoding.
17013         Say that the function only returns true for integer vectors.
17014         * emit-rtl.c: Include rtx-vector-builder.h.
17015         (gen_const_vec_duplicate_1): Delete.
17016         (gen_const_vector): Call gen_const_vec_duplicate instead of
17017         gen_const_vec_duplicate_1.
17018         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17019         (gen_const_vec_duplicate): Use rtx_vector_builder.
17020         (gen_const_vec_series): Likewise.
17021         (gen_rtx_CONST_VECTOR): Likewise.
17022         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17023         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17024         Build a new vector rather than modifying a CONST_VECTOR in-place.
17025         (handle_special_swappables): Update call accordingly.
17026         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17027         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17028         Build a new vector rather than modifying a CONST_VECTOR in-place.
17029         (handle_special_swappables): Update call accordingly.
17031 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17033         * simplify-rtx.c (simplify_const_binary_operation): Use
17034         CONST_VECTOR_ELT instead of XVECEXP.
17036 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17038         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17039         the selector elements to be different from the data elements
17040         if the selector is a VECTOR_CST.
17041         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17042         ssizetype for the selector.
17044 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17046         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17047         before testing each element individually.
17048         * tree-vect-generic.c (lower_vec_perm): Likewise.
17050 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17052         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17053         * selftest-run-tests.c (selftest::run_tests): Call it.
17054         * vector-builder.h (vector_builder::operator ==): New function.
17055         (vector_builder::operator !=): Likewise.
17056         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17057         (vec_perm_indices::all_from_input_p): New function.
17058         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17059         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17060         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17061         instead of reading the VECTOR_CST directly.  Detect whether both
17062         vector inputs are the same before constructing the vec_perm_indices,
17063         and update the number of inputs argument accordingly.  Use the
17064         utility functions added above.  Only construct sel2 if we need to.
17066 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17068         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17069         the broadcast of the low byte.
17070         (expand_mult_highpart): Use an explicit encoding for the permutes.
17071         * optabs-query.c (can_mult_highpart_p): Likewise.
17072         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17073         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17074         (vectorizable_bswap): Likewise.
17075         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17076         explicit encoding for the power-of-2 permutes.
17077         (vect_permute_store_chain): Likewise.
17078         (vect_grouped_load_supported): Likewise.
17079         (vect_permute_load_chain): Likewise.
17081 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17083         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17084         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17085         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17086         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17087         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17088         (vect_gen_perm_mask_any): Likewise.
17090 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17092         * int-vector-builder.h: New file.
17093         * vec-perm-indices.h: Include int-vector-builder.h.
17094         (vec_perm_indices): Redefine as an int_vector_builder.
17095         (auto_vec_perm_indices): Delete.
17096         (vec_perm_builder): Redefine as a stand-alone class.
17097         (vec_perm_indices::vec_perm_indices): New function.
17098         (vec_perm_indices::clamp): Likewise.
17099         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17100         (vec_perm_indices::new_vector): New function.
17101         (vec_perm_indices::new_expanded_vector): Update for new
17102         vec_perm_indices class.
17103         (vec_perm_indices::rotate_inputs): New function.
17104         (vec_perm_indices::all_in_range_p): Operate directly on the
17105         encoded form, without computing elided elements.
17106         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17107         encoding.  Update for new vec_perm_indices class.
17108         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17109         the given vec_perm_builder.
17110         (expand_vec_perm_var): Update vec_perm_builder constructor.
17111         (expand_mult_highpart): Use vec_perm_builder instead of
17112         auto_vec_perm_indices.
17113         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17114         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17115         or double series encoding as appropriate.
17116         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17117         vec_perm_indices instead of auto_vec_perm_indices.
17118         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17119         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17120         (vect_permute_store_chain): Likewise.
17121         (vect_grouped_load_supported): Likewise.
17122         (vect_permute_load_chain): Likewise.
17123         (vect_shift_permute_load_chain): Likewise.
17124         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17125         (vect_transform_slp_perm_load): Likewise.
17126         (vect_schedule_slp_instance): Likewise.
17127         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17128         (vectorizable_mask_load_store): Likewise.
17129         (vectorizable_bswap): Likewise.
17130         (vectorizable_store): Likewise.
17131         (vectorizable_load): Likewise.
17132         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17133         vec_perm_indices instead of auto_vec_perm_indices.  Use
17134         tree_to_vec_perm_builder to read the vector from a tree.
17135         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17136         vec_perm_builder instead of a vec_perm_indices.
17137         (have_whole_vector_shift): Use vec_perm_builder and
17138         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17139         truncation to calc_vec_perm_mask_for_shift.
17140         (vect_create_epilog_for_reduction): Likewise.
17141         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17142         from auto_vec_perm_indices to vec_perm_indices.
17143         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17144         instead of changing individual elements.
17145         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17146         the vector in d.perm.
17147         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17148         from auto_vec_perm_indices to vec_perm_indices.
17149         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17150         instead of changing individual elements.
17151         (arm_vectorize_vec_perm_const): Use new_vector to install
17152         the vector in d.perm.
17153         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17154         Update vec_perm_builder constructor.
17155         (rs6000_expand_interleave): Likewise.
17156         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17157         (rs6000_expand_interleave): Likewise.
17159 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17161         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17162         to qimode could truncate the indices.
17163         * optabs.c (expand_vec_perm_var): Likewise.
17165 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17167         * Makefile.in (OBJS): Add vec-perm-indices.o.
17168         * vec-perm-indices.h: New file.
17169         * vec-perm-indices.c: Likewise.
17170         * target.h (vec_perm_indices): Replace with a forward class
17171         declaration.
17172         (auto_vec_perm_indices): Move to vec-perm-indices.h.
17173         * optabs.h: Include vec-perm-indices.h.
17174         (expand_vec_perm): Delete.
17175         (selector_fits_mode_p, expand_vec_perm_var): Declare.
17176         (expand_vec_perm_const): Declare.
17177         * target.def (vec_perm_const_ok): Replace with...
17178         (vec_perm_const): ...this new hook.
17179         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17180         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17181         * doc/tm.texi: Regenerate.
17182         * optabs.def (vec_perm_const): Delete.
17183         * doc/md.texi (vec_perm_const): Likewise.
17184         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17185         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17186         expand_vec_perm for constant permutation vectors.  Assert that
17187         the mode of variable permutation vectors is the integer equivalent
17188         of the mode that is being permuted.
17189         * optabs-query.h (selector_fits_mode_p): Declare.
17190         * optabs-query.c: Include vec-perm-indices.h.
17191         (selector_fits_mode_p): New function.
17192         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17193         is defined, instead of checking whether the vec_perm_const_optab
17194         exists.  Use targetm.vectorize.vec_perm_const instead of
17195         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
17196         fit in the vector mode before using a variable permute.
17197         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17198         vec_perm_indices instead of an rtx.
17199         (expand_vec_perm): Replace with...
17200         (expand_vec_perm_const): ...this new function.  Take the selector
17201         as a vec_perm_indices rather than an rtx.  Also take the mode of
17202         the selector.  Update call to shift_amt_for_vec_perm_mask.
17203         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
17204         Use vec_perm_indices::new_expanded_vector to expand the original
17205         selector into bytes.  Check whether the indices fit in the vector
17206         mode before using a variable permute.
17207         (expand_vec_perm_var): Make global.
17208         (expand_mult_highpart): Use expand_vec_perm_const.
17209         * fold-const.c: Includes vec-perm-indices.h.
17210         * tree-ssa-forwprop.c: Likewise.
17211         * tree-vect-data-refs.c: Likewise.
17212         * tree-vect-generic.c: Likewise.
17213         * tree-vect-loop.c: Likewise.
17214         * tree-vect-slp.c: Likewise.
17215         * tree-vect-stmts.c: Likewise.
17216         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17217         Delete.
17218         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17219         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17220         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17221         (aarch64_vectorize_vec_perm_const): ...this new function.
17222         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17223         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17224         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17225         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17226         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17227         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17228         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17229         into...
17230         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
17231         check for NEON modes.
17232         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17233         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17234         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17235         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17236         into...
17237         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
17238         the old VEC_PERM_CONST conditions.
17239         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17240         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17241         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17242         (ia64_vectorize_vec_perm_const_ok): Merge into...
17243         (ia64_vectorize_vec_perm_const): ...this new function.
17244         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17245         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17246         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17247         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17248         * config/mips/mips.c (mips_expand_vec_perm_const)
17249         (mips_vectorize_vec_perm_const_ok): Merge into...
17250         (mips_vectorize_vec_perm_const): ...this new function.
17251         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17252         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17253         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17254         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17255         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17256         (rs6000_expand_vec_perm_const): Delete.
17257         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17258         Delete.
17259         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17260         (altivec_expand_vec_perm_const_le): Take each operand individually.
17261         Operate on constant selectors rather than rtxes.
17262         (altivec_expand_vec_perm_const): Likewise.  Update call to
17263         altivec_expand_vec_perm_const_le.
17264         (rs6000_expand_vec_perm_const): Delete.
17265         (rs6000_vectorize_vec_perm_const_ok): Delete.
17266         (rs6000_vectorize_vec_perm_const): New function.
17267         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17268         an element count and rtx array.
17269         (rs6000_expand_extract_even): Update call accordingly.
17270         (rs6000_expand_interleave): Likewise.
17271         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17272         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17273         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17274         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17275         (rs6000_expand_vec_perm_const): Delete.
17276         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17277         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17278         (altivec_expand_vec_perm_const_le): Take each operand individually.
17279         Operate on constant selectors rather than rtxes.
17280         (altivec_expand_vec_perm_const): Likewise.  Update call to
17281         altivec_expand_vec_perm_const_le.
17282         (rs6000_expand_vec_perm_const): Delete.
17283         (rs6000_vectorize_vec_perm_const_ok): Delete.
17284         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
17285         reference to the SPE evmerge intructions.
17286         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17287         an element count and rtx array.
17288         (rs6000_expand_extract_even): Update call accordingly.
17289         (rs6000_expand_interleave): Likewise.
17290         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17291         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17292         new function.
17293         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17295 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17297         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17298         vector mode and that that mode matches the mode of the data
17299         being permuted.
17300         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17301         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
17302         directly using expand_vec_perm_1 when forcing selectors into
17303         registers.
17304         (expand_vec_perm_var): New function, split out from expand_vec_perm.
17306 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17308         * optabs-query.h (can_vec_perm_p): Delete.
17309         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17310         * optabs-query.c (can_vec_perm_p): Split into...
17311         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17312         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17313         particular selector is valid.
17314         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17315         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17316         (vect_grouped_load_supported): Likewise.
17317         (vect_shift_permute_load_chain): Likewise.
17318         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17319         (vect_transform_slp_perm_load): Likewise.
17320         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17321         (vectorizable_bswap): Likewise.
17322         (vect_gen_perm_mask_checked): Likewise.
17323         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
17324         implementations of variable permutation vectors into account
17325         when deciding which selector to use.
17326         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17327         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17328         with a false third argument.
17329         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17330         to test whether the constant selector is valid and can_vec_perm_var_p
17331         to test whether a variable selector is valid.
17333 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17335         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17336         * optabs-query.c (can_vec_perm_p): Likewise.
17337         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17338         instead of vec_perm_indices.
17339         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17340         (vect_gen_perm_mask_checked): Likewise,
17341         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17342         (vect_gen_perm_mask_checked): Likewise,
17344 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17346         * optabs-query.h (qimode_for_vec_perm): Declare.
17347         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17348         (qimode_for_vec_perm): ...this new function.
17349         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17351 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17353         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17354         does not have a conditional at the top.
17356 2018-01-02  Richard Biener  <rguenther@suse.de>
17358         * ipa-inline.c (big_speedup_p): Fix expression.
17360 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17362         PR target/81616
17363         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17364         for generic 4->6.
17366 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17368         PR target/81616
17369         Generic tuning.
17370         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17371         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17372         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17373         cond_taken_branch_cost 3->4.
17375 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
17377         PR tree-optimization/83581
17378         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17379         TODO_cleanup_cfg if any changes have been made.
17381         PR middle-end/83608
17382         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17383         convert_modes if target mode has the right side, but different mode
17384         class.
17386         PR middle-end/83609
17387         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17388         last argument when extracting from CONCAT.  If either from_real or
17389         from_imag is NULL, use expansion through memory.  If result is not
17390         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17391         the parts directly to inner mode, if even that fails, use expansion
17392         through memory.
17394         PR middle-end/83623
17395         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17396         check for bswap in mode rather than HImode and use that in expand_unop
17397         too.
17399 Copyright (C) 2018 Free Software Foundation, Inc.
17401 Copying and distribution of this file, with or without modification,
17402 are permitted in any medium without royalty provided the copyright
17403 notice and this notice are preserved.