2018-06-25 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob84b8b64acba262eea44f1082f35142d6aff624bd
1 2018-06-25  Richard Biener  <rguenther@suse.de>
3         PR tree-optimization/86304
4         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5         epilogue-if-converted loops as well.
7 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
9         * lto-section-out.c (lto_begin_section): Do not print section
10         name for noaddr and unnumbered dumps.
12 2018-06-25  Richard Biener  <rguenther@suse.de>
14         * tree-vectorizer.h (struct vec_info_shared): New structure
15         with parts split out from struct vec_info and loop_nest from
16         struct _loop_vec_info.
17         (struct vec_info): Adjust accordingly.
18         (struct _loop_vec_info): Likewise.
19         (LOOP_VINFO_LOOP_NEST): Adjust.
20         (LOOP_VINFO_DATAREFS): Likewise.
21         (LOOP_VINFO_DDRS): Likewise.
22         (struct _bb_vec_info): Likewise.
23         (BB_VINFO_DATAREFS): Likewise.
24         (BB_VINFO_DDRS): Likewise.
25         (struct _stmt_vec_info): Add dr_aux member.
26         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
27         (DR_MISALIGNMENT_UNINITIALIZED): New.
28         (set_dr_misalignment): Adjust.
29         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
30         (vect_analyze_loop): Adjust prototype.
31         (vect_analyze_loop_form): Likewise.
32         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
33         Compute dependences lazily.
34         (vect_record_base_alignments): Use shared datarefs/ddrs.
35         (vect_verify_datarefs_alignment): Likewise.
36         (vect_analyze_data_refs_alignment): Likewise.
37         (vect_analyze_data_ref_accesses): Likewise.
38         (vect_analyze_data_refs): Likewise.
39         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
40         constructor parameter for shared part.
41         (vect_analyze_loop_form): Pass in shared part and adjust.
42         (vect_analyze_loop_2): Pass in storage for the number of
43         stmts.  Move loop nest finding to the caller.  Compute
44         datarefs lazily.
45         (vect_analyze_loop): Pass in shared part.
46         (vect_transform_loop): Verify shared datarefs are unchanged.
47         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
48         constructor parameter for shared part.
49         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
50         (vect_slp_bb): Verify shared datarefs are unchanged before
51         transform.
52         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
53         change.
54         (new_stmt_vec_info): Initialize DR_AUX misalignment to
55         DR_MISALIGNMENT_UNINITIALIZED.
56         * tree-vectorizer.c (vec_info::vec_info): Add constructor
57         parameter for shared part.
58         (vec_info::~vec_info): Adjust.
59         (vec_info_shared::vec_info_shared): New.
60         (vec_info_shared::~vec_info_shared): Likewise.
61         (vec_info_shared::save_datarefs): Likewise.
62         (vec_info_shared::check_datarefs): Likewise.
63         (try_vectorize_loop_1): Construct shared part live for analyses
64         of a single loop for multiple vector sizes.
65         * tree-parloops.c (gather_scalar_reductions): Adjust.
67 2018-06-25  Richard Biener  <rguenther@suse.de>
69         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
70         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
71         (vect_analyze_data_refs): Remove similar code from here and
72         simplify accordingly.
74 2018-06-25  Richard Biener  <rguenther@suse.de>
76         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
77         for reverse storage order accesses rather than asserting
78         they cannot happen here.
80 2018-06-25  Tom de Vries  <tdevries@suse.de>
82         PR debug/86257
83         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
84         Use data16 instead of .byte for insn prefix.
86 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
88         PR C++/86082
89         * parser.c (make_char_string_pack): Pass this literal chars
90         through cpp_interpret_string.
91         (cp_parser_userdef_numeric_literal): Check the result of
92         make_char_string_pack.
94 2018-06-24  Maya Rashish  <coypu@sdf.org>
96         * ginclude/stddef.h: Simplify conditions around avoiding
97         re-definition of __size_t.
99 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
101         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
102         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
104 2018-06-22  Maya Rashish  <coypu@sdf.org>
106         * doc/invoke.texi (mno-fancy-math-387): Update for changes
107         made to OpenBSD and NetBSD through the years.
109 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
111         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
112         behavior of vec_pack (vector double, vector double) to match
113         behavior of vec_float2 (vector double, vector double).
115 2018-06-22  Olivier Hainque  <hainque@adacore.com>
117         * gimplify.c (gimplify_function_tree): Prevent creation
118         of a trampoline for the address of the current function
119         passed to entry/exit instrumentation hooks.
121 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
123         PR target/86222
124         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
125         correctly.
127 2018-06-22  Martin Liska  <mliska@suse.cz>
129         PR tree-optimization/86263
130         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
131         Bail out if is_enabled is false.
132         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
133         New declaration.
134         (jump_table_cluster::is_enabled): New function.
136 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
138         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
139         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
140         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
141         (lto_input_ts_binfo_tree_pointers): Likewise.
142         * tree-streamer-out.c (streamer_write_tree_bitfields,
143         write_ts_binfo_tree_pointers): Likewise.
144         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
146 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
148         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
150 2018-06-22  Martin Liska  <mliska@suse.cz>
152         * symbol-summary.h (get): Make it pure and inline move
153         functionality from ::get function.
154         (get): Remove and inline into ::get and ::get_create.
155         (get_create): Move code from ::get function.
157 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
159         PR target/85994
160         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
161         -x assembler-with-cpp.
163 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
165         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
166         _FILE_OFFSET_BITS=64 for C++.
168 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
170         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
171         conversion insn that shows up when pr85657-3.c is compiled using
172         IEEE 128-bit long double.
173         (neg<mode>2_internal): Use the correct mode to check whether the
174         mode is IBM extended.
175         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
176         multiply and divide external functions from being created more
177         than once.
179 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
181         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
182         functions.
183         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
184         the edge can be forwarded.
185         (cfg_layout_merge_blocks): Likewise.
187 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
189         * except.c (finish_eh_generation): Commit edge insertions only after
190         the EH edges have been redirected from post-landing to landing pads.
192 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
194         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
195         create_tmp_var_for to create the FRAME decl.
196         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
198 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
200         * tree-inline.c (copy_edges_for_bb): Minor tweak.
201         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
202         debug statement when resetting its value.
203         (expand_call_inline): Copy the locus of the call onto the assignment
204         of the return value, if any.  Use local variable in more cases.
206 2018-06-21  Martin Liska  <mliska@suse.cz>
208         * ipa-pure-const.c (propagate_nothrow): Use
209         funct_state_summaries->get.
210         (dump_malloc_lattice): Likewise.
211         (propagate_malloc): Likewise.
213 2018-06-21  Richard Biener  <rguenther@suse.de>
215         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
216         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
217         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
218         comment.
219         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
220         BLOCK_ABSTRACT_ORIGIN unconditionally.
222 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
224         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
225         deleting it.
226         * ipa-reference.c (ipa_reference_c_finalize): Delete
227         ipa_ref_opt_sum_summaries and set it to NULL.
229 2018-06-21  Tom de Vries  <tdevries@suse.de>
231         PR tree-optimization/85859
232         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
233         test with comment from bb_no_side_effects_p.
235 2018-06-21  Richard Biener  <rguenther@suse.de>
237         PR tree-optimization/86232
238         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
239         max for constant niter.
241 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
243         * config/aarch64/aarch64-simd.md
244         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
246 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
248         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
249         Make opernads of the unspec commutative.
251 2018-06-21  Richard Biener  <rguenther@suse.de>
253         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
254         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
255         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
256         (vect_analyze_data_ref_dependence): Re-order checks to deal with
257         NULL DR_STEP.
258         (vect_record_base_alignments): Do not record base alignment
259         for gathers or scatters.
260         (vect_compute_data_ref_alignment): Drop return value that is always
261         true.  Bail out early for gathers or scatters.
262         (vect_enhance_data_refs_alignment): Bail out early for gathers
263         or scatters.
264         (vect_find_same_alignment_drs): Likewise.
265         (vect_analyze_data_refs_alignment): Remove dead code.
266         (vect_slp_analyze_and_verify_node_alignment): Likewise.
267         (vect_analyze_data_refs): For possible gathers or scatters do
268         not create an alternate DR, just check their possible validity
269         and mark them.  Adjust DECL_NONALIASED handling to not rely
270         on DR_BASE_ADDRESS.
271         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
272         update inits of gathers or scatters.
273         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
274         Also copy gather/scatter flag to pattern vinfo.
276 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
278         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
279         behavior of vec_packsu (vector unsigned long long, vector unsigned
280         long long) to match behavior of vec_packs with same signature.
282 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
283             Thomas Schwinge <thomas@codesourcery.com>
284             Cesar Philippidis  <cesar@codesourcery.com>
286         * gimplify.c (gimplify_scan_omp_clauses): Add support for
287         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
288         (gimplify_adjust_omp_clauses): Likewise.
289         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
290         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
291         (gimplify_omp_target_update): Update handling of acc update and
292         enter/exit data.
293         * omp-low.c (install_var_field): Remove unused parameter
294         base_pointers_restrict.
295         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
296         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
297         FINALIZE}
298         (omp_target_base_pointers_restrict_p): Delete.
299         (scan_omp_target): Update call to scan_sharing_clauses.
300         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
301         FINALIZE}.
302         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
303         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
304         (convert_local_omp_clauses): Likewise.
305         * tree-pretty-print.c (dump_omp_clause): Likewise.
306         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
307         FINALIZE}.
308         (omp_clause_code_name): Likewise.
310 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
312         PR debug/86194
313         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
314         be narrowed.
316         PR tree-optimization/86231
317         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
318         anti-range don't overwrite *vr0min before using it to compute *vr0max.
320 2018-06-20  Tom de Vries  <tdevries@suse.de>
322         PR tree-optimization/86097
323         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
324         iv type if signedness of iv type is not the same as that of *nit.
326 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
328         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
329         EDGE_EH edges, verify they are all EDGE_EH.
331 2018-06-20  Maya Rashish  <coypu@sdf.org>
333         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
335 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
337         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
338         * config/aarch64/aarch64.c (xgene1_tunings): Add
339         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
340         (aarch64_mode_valid_for_sched_fusion_p):
341         Allow 16-byte modes.
342         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
343         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
344         128-bit modes.
345         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
346         New pattern.
347         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
348         * config/aarch64/iterators.md (VQ2): New mode iterator.
350 2018-06-20  Martin Liska  <mliska@suse.cz>
352         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
353         Change default ratio from 10 to 8.
355 2018-06-20  Martin Liska  <mliska@suse.cz>
357         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
358         New.
359         (bit_test_cluster::find_bit_tests): Likewise.
360         (switch_decision_tree::analyze_switch_statement): Find clusters.
361         * tree-switch-conversion.h (struct jump_table_cluster): Document
362         hierarchy.
364 2018-06-20  Martin Liska  <mliska@suse.cz>
366         * tree-switch-conversion.c (switch_conversion::collect):
367         Record m_uniq property.
368         (switch_conversion::expand): Bail out for special conditions.
369         (group_cluster::~group_cluster): New.
370         (group_cluster::group_cluster): Likewise.
371         (group_cluster::dump): Likewise.
372         (jump_table_cluster::emit): New.
373         (switch_decision_tree::fix_phi_operands_for_edges): New.
374         (struct case_node): Remove struct.
375         (jump_table_cluster::can_be_handled): New.
376         (case_values_threshold): Moved to header.
377         (reset_out_edges_aux): Likewise.
378         (jump_table_cluster::is_beneficial): New.
379         (bit_test_cluster::can_be_handled): Likewise.
380         (add_case_node): Remove.
381         (bit_test_cluster::is_beneficial): New.
382         (case_bit_test::cmp): New.
383         (bit_test_cluster::emit): New.
384         (expand_switch_as_decision_tree_p): Remove.
385         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
386         (fix_phi_operands_for_edge): Likewise.
387         (switch_decision_tree::analyze_switch_statement): New.
388         (compute_cases_per_edge): Move ...
389         (switch_decision_tree::compute_cases_per_edge): ... here.
390         (try_switch_expansion): Likewise.
391         (switch_decision_tree::try_switch_expansion): Likewise.
392         (record_phi_operand_mapping): Likewise.
393         (switch_decision_tree::record_phi_operand_mapping): Likewise.
394         (emit_case_decision_tree): Likewise.
395         (switch_decision_tree::emit): Likewise.
396         (balance_case_nodes): Likewise.
397         (switch_decision_tree::balance_case_nodes): Likewise.
398         (dump_case_nodes): Likewise.
399         (switch_decision_tree::dump_case_nodes): Likewise.
400         (emit_jump): Likewise.
401         (switch_decision_tree::emit_jump): Likewise.
402         (emit_cmp_and_jump_insns): Likewise.
403         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
404         (emit_case_nodes): Likewise.
405         (switch_decision_tree::emit_case_nodes): Likewise.
406         (conditional_probability): Remove.
407         * tree-switch-conversion.h (enum cluster_type): New.
408         (PRINT_CASE): New.
409         (struct cluster): Likewise.
410         (cluster::cluster): Likewise.
411         (struct simple_cluster): Likewise.
412         (simple_cluster::simple_cluster): Likewise.
413         (struct group_cluster): Likewise.
414         (struct jump_table_cluster): Likewise.
415         (struct bit_test_cluster): Likewise.
416         (struct min_cluster_item): Likewise.
417         (struct case_tree_node): Likewise.
418         (case_tree_node::case_tree_node): Likewise.
419         (jump_table_cluster::case_values_threshold): Likewise.
420         (struct case_bit_test): Likewise.
421         (struct switch_decision_tree): Likewise.
422         (struct switch_conversion): Likewise.
423         (switch_decision_tree::reset_out_edges_aux): Likewise.
425 2018-06-20  Martin Liska  <mliska@suse.cz>
427         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
428         (hoist_edge_and_branch_if_true): Likewise.
429         (expand_switch_using_bit_tests_p): Likewise.
430         (struct case_bit_test): Likewise.
431         (case_bit_test_cmp): Likewise.
432         (emit_case_bit_tests): Likewise.
433         (switch_conversion::switch_conversion): New class.
434         (struct switch_conv_info): Remove old struct.
435         (collect_switch_conv_info): More to ...
436         (switch_conversion::collect): ... this.
437         (check_range): Likewise.
438         (switch_conversion::check_range): Likewise.
439         (check_all_empty_except_final): Likewise.
440         (switch_conversion::check_all_empty_except_final): Likewise.
441         (check_final_bb): Likewise.
442         (switch_conversion::check_final_bb): Likewise.
443         (create_temp_arrays): Likewise.
444         (switch_conversion::create_temp_arrays): Likewise.
445         (free_temp_arrays): Likewise.
446         (gather_default_values): Likewise.
447         (switch_conversion::gather_default_values): Likewise.
448         (build_constructors): Likewise.
449         (switch_conversion::build_constructors): Likewise.
450         (constructor_contains_same_values_p): Likewise.
451         (switch_conversion::contains_same_values_p): Likewise.
452         (array_value_type): Likewise.
453         (switch_conversion::array_value_type): Likewise.
454         (build_one_array): Likewise.
455         (switch_conversion::build_one_array): Likewise.
456         (build_arrays): Likewise.
457         (switch_conversion::build_arrays): Likewise.
458         (gen_def_assigns): Likewise.
459         (switch_conversion::gen_def_assigns): Likewise.
460         (prune_bbs): Likewise.
461         (switch_conversion::prune_bbs): Likewise.
462         (fix_phi_nodes): Likewise.
463         (switch_conversion::fix_phi_nodes): Likewise.
464         (gen_inbound_check): Likewise.
465         (switch_conversion::gen_inbound_check): Likewise.
466         (process_switch): Use the newly created class.
467         (switch_conversion::expand): New.
468         (switch_conversion::~switch_conversion): New.
469         * tree-switch-conversion.h: New file.
471 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
473         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
474         tree-vect-patterns.c.
475         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
476         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
477         (vect_recog_sad_pattern): Likewise.
478         (vect_recog_widen_sum_pattern): Likewise.
479         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
480         (vect_recog_widen_shift_pattern): Remove the type_in argument.
481         (vect_recog_rotate_pattern): Likewise.
482         (vect_recog_mult_pattern): Likewise.
483         (vect_recog_vector_vector_shift_pattern): Likewise.
484         (vect_recog_divmod_pattern): Likewise.
485         (vect_recog_mixed_size_cond_pattern): Likewise.
486         (vect_recog_bool_pattern): Likewise.
487         (vect_recog_mask_conversion_pattern): Likewise.
488         (vect_try_gather_scatter_pattern): Likewise.
489         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
490         (vect_recog_over_widening_pattern): Likewise.
491         (vect_recog_gather_scatter_pattern): Likewise.
492         (vect_recog_func_ptr): Move from tree-vectorizer.h
493         (vect_vect_recog_func_ptrs): Move further down the file.
494         (vect_recog_func): Likewise.  Remove the third argument.
495         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
496         (vect_pattern_recog_1): Expect the pattern function to do any
497         necessary target tests.  Also expect it to provide a vector type.
498         Remove the type_in handling.
500 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
502         * tree-vect-patterns.c (vect_pattern_detected): New function.
503         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
504         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
505         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
506         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
507         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
508         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
509         (vect_recog_mask_conversion_pattern)
510         (vect_try_gather_scatter_pattern): Likewise.
512 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
514         * tree-vect-patterns.c (vect_get_internal_def): New function.
515         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
516         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
517         (search_type_for_mask_1): Use it.
519 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
521         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
522         redundant WIDEN_SUM_EXPR handling.
523         (vect_recog_sad_pattern): Likewise.
525 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
527         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
528         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
529         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
530         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
531         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
533 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
535         * tree-vect-stmts.c (vectorizable_call): Make sure that we
536         use the stmt_vec_info of the original bb statement for the
537         new zero assignment, even if the call is part of a pattern.
539 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
541         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
542         that the sequence is attached to the original statement rather
543         than the pattern statement.
544         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
545         PATTERN_DEF_SEQ from the original statement rather than
546         the main pattern statement.
547         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
548         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
549         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
551 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
553         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
554         definition statements before the early exit for statements that aren't
555         live or relevant.
556         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
557         split out from...
558         (vect_transform_loop): ...here.  Process pattern definition
559         statements without first checking whether the main pattern
560         statement is live or relevant.
562 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
564         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
565         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
566         
567 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
569         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
570         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
571         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
572         (expand_block_compare): Change select_block_compare_mode call.
573         (expand_strncmp_align_check): Use new functions, fix comment.
574         (emit_final_str_compare_gpr): New function.
575         (expand_strn_compare): Refactor and clean up code.
576         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
578 2018-06-19  Tony Reix  <tony.reix@atos.com>
579             Damien Bergamini  <damien.bergamini@atos.com>
580             David Edelsohn  <dje.gcc@gmail.com>
582         * collect2.c (static_obj): New variable.
583         (static_libs): New variable.
584         (is_in_list): Uncomment declaration.
585         (main): Track AIX libraries linked statically.
586         (is_in_list): Uncomment definition.
587         (scan_prog_file): Don't add AIX shared libraries initializer
588         to constructor list if linking statically.
590 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
592         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
593         constant.
594         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
596 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
598         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
599         blocks.
601 2018-06-19  Martin Liska  <mliska@suse.cz>
603         * config/i386/i386.c (ix86_can_inline_p): Do not use
604         ipa_fn_summaries::get_create.
605         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
606         get.
607         (devirtualization_time_bonus): Likewise.
608         (ipcp_propagate_stage): Likewise.
609         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
610         (edge_set_predicate): Likewise.
611         (evaluate_conditions_for_known_args): Likewise.
612         (evaluate_properties_for_edge): Likewise.
613         (ipa_call_summary::reset): Tranform to ...
614         (ipa_call_summary::~ipa_call_summary): ... this.
615         (ipa_fn_summary::reset): Transform to ...
616         (ipa_fn_summary::~ipa_fn_summary): ... this.
617         (ipa_fn_summary_t::remove): Rename to ...
618         (ipa_fn_summary_t::remove_callees): ... this.
619         (ipa_fn_summary_t::duplicate): Use placement new
620         instead of memory copy.
621         (ipa_call_summary_t::duplicate): Likewise.
622         (ipa_call_summary_t::remove): Remove.
623         (dump_ipa_call_summary): Change get_create to get.
624         (ipa_dump_fn_summary): Dump only when summary exists.
625         (analyze_function_body): Use symbol_summary::get instead
626         of get_create.
627         (compute_fn_summary): Likewise.
628         (estimate_edge_devirt_benefit): Likewise.
629         (estimate_edge_size_and_time): Likewise.
630         (inline_update_callee_summaries): Likewise.
631         (remap_edge_change_prob): Likewise.
632         (remap_edge_summaries): Likewise.
633         (ipa_merge_fn_summary_after_inlining): Likewise.
634         (write_ipa_call_summary): Likewise.
635         (ipa_fn_summary_write): Likewise.
636         (ipa_free_fn_summary): Likewise.
637         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
638         (struct ipa_call_summary): Likewise.
639         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
640         of get_create.
641         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
642         (estimate_size_after_inlining): Likewise.
643         (estimate_growth): Likewise.
644         (growth_likely_positive): Likewise.
645         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
646         (inline_call): Likewise.
647         * ipa-inline.c (caller_growth_limits): Likewise.
648         (can_inline_edge_p): Likewise.
649         (can_inline_edge_by_limits_p): Likewise.
650         (compute_uninlined_call_time): Likewise.
651         (compute_inlined_call_time): Likewise.
652         (want_inline_small_function_p): Likewise.
653         (edge_badness): Likewise.
654         (update_caller_keys): Likewise.
655         (update_callee_keys): Likewise.
656         (inline_small_functions): Likewise.
657         (inline_to_all_callers_1): Likewise.
658         (dump_overall_stats): Likewise.
659         (early_inline_small_functions): Likewise.
660         (early_inliner): Likewise.
661         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
662         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
663         * ipa-pure-const.c (malloc_candidate_p): Likewise.
664         * ipa-split.c (execute_split_functions): Likewise.
665         * symbol-summary.h: Likewise.
666         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
668 2018-06-19  Richard Biener  <rguenther@suse.de>
670         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
671         (vectorize_loops): ... here.  Fix dbgcnt handling.
672         (try_vectorize_loop): Wrap try_vectorize_loop_1.
674 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
676         PR target/86197
677         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
678         ieee128 argument takes up only one (vector) register, not two (floating
679         point) registers.
681 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
683         * gimplify.c (gimplify_init_constructor): Really never clear for an
684         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
686 2018-06-19  Richard Biener  <rguenther@suse.de>
688         PR tree-optimization/86179
689         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
690         after failed recognition.
692 2018-06-18  Martin Sebor  <msebor@redhat.com>
694         PR middle-end/85602
695         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
696         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
697         Handle integer subtraction.
698         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
699         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
701 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
703         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
704         param from rtx to rtx_insn *.
705         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
706         param.
707         (frv_ifcvt_modify_insn): Likwise.
708         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
709         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
710         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
711         as_a <rtx_insn *> cast to local "unprotected_region" once
712         it's been established that it's not NULL or pc_rtx.
713         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
714         param "sethi" from rtx to rtx_insn *.
715         (nds32_group_float_insns): Likewise for param "insn".
716         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
717         param.
718         (vax_output_int_subtract): Likewise.
719         * config/vax/vax.c (vax_output_int_add): Likewise for param
720         "insn".
721         (vax_output_int_subtract): Likewise.
722         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
723         (emit_pattern_after): Likewise for param "after".
724         (emit_insn_after): Likewise.
725         (emit_jump_insn_after): Likewise.
726         (emit_call_insn_after): Likewise.
727         (emit_debug_insn_after): Likewise.
728         (emit_pattern_before): Likewise for param "before".
729         (emit_insn_before): Likewise.
730         (emit_jump_insn_before): Likewise.
731         * final.c (get_insn_template): Likewise for param "insn", removing
732         a cast.
733         * output.h (get_insn_template): Likewise for 2nd param.
734         * rtl.h (emit_insn_before): Likewise.
735         (emit_jump_insn_before): Likewise.
736         (emit_debug_insn_before_noloc): Likewise.
737         (emit_insn_after): Likewise.
738         (emit_jump_insn_after): Likewise.
739         (emit_call_insn_after): Likewise.
740         (emit_debug_insn_after): Likewise.
741         (set_insn_deleted): Likewise for param.
743 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
745         PR target/85358
746         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
747         floating point modes, so that IFmode is numerically greater than
748         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
749         to declare the ordering.  This prevents IFmode from being
750         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
751         machine.  Include rs6000-modes.h to share the fractional values
752         between genmodes* and the rest of the compiler.
753         (IFmode): Likewise.
754         (KFmode): Likewise.
755         (TFmode): Likewise.
756         * config/rs6000/rs6000-modes.h: New file.
757         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
758         meaning of rs6000_long_double_size so that 126..128 selects an
759         appropriate 128-bit floating point type.
760         (rs6000_option_override_internal): Likewise.
761         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
762         (TARGET_LONG_DOUBLE_128): Change the meaning of
763         rs6000_long_double_size so that 126..128 selects an appropriate
764         128-bit floating point type.
765         (LONG_DOUBLE_TYPE_SIZE): Update comment.
766         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
767         source and destination to match the standard usage.
768         (truncifkf2): Likewise.
769         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
770         ISA 2.07 to use an explicit clobber, instead of passing in a
771         temporary.
772         (copysign<mode>3_soft): Likewise.
774 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
776         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
777         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
778         (vect_slp_analyze_instance_dependence): Likewise.
779         (vect_enhance_data_refs_alignment): Likewise.
780         (vect_analyze_data_refs_alignment): Likewise.
781         (vect_slp_analyze_and_verify_instance_alignment
782         (vect_analyze_data_ref_accesses): Likewise.
783         (vect_prune_runtime_alias_test_list): Likewise.
784         (vect_analyze_data_refs): Likewise.
785         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
786         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
787         (vect_analyze_scalar_cycles_1): Likewise.
788         (vect_get_loop_niters): Likewise.
789         (vect_analyze_loop_form_1): Likewise.
790         (vect_update_vf_for_slp): Likewise.
791         (vect_analyze_loop_operations): Likewise.
792         (vect_analyze_loop): Likewise.
793         (vectorizable_induction): Likewise.
794         (vect_transform_loop): Likewise.
795         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
796         * tree-vect-slp.c (vect_analyze_slp): Likewise.
797         (vect_make_slp_decision): Likewise.
798         (vect_detect_hybrid_slp): Likewise.
799         (vect_slp_analyze_operations): Likewise.
800         (vect_slp_bb): Likewise.
801         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
802         (vectorizable_bswap): Likewise.
803         (vectorizable_call): Likewise.
804         (vectorizable_simd_clone_call): Likewise.
805         (vectorizable_conversion): Likewise.
806         (vectorizable_assignment): Likewise.
807         (vectorizable_shift): Likewise.
808         (vectorizable_operation): Likewise.
809         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
811 2018-06-18  Martin Sebor  <msebor@redhat.com>
813         PR tree-optimization/81384
814         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
815         * builtins.c (expand_builtin_strnlen): New function.
816         (expand_builtin): Call it.
817         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
818         * builtins.def (BUILT_IN_STRNLEN): New.
819         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
820         Warn for bounds in excess of maximum object size.
821         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
822         single-value ranges.  Handle strnlen.
823         (handle_builtin_strlen): Handle strnlen.
824         (strlen_check_and_optimize_stmt): Same.
825         * doc/extend.texi (Other Builtins): Document strnlen.
827 2018-06-18  Maya Rashish  <coypu@sdf.org>
829         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
830         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
831         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
833         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
834         here to ...
835         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
837 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
839         * tree.c (escaped_string::escape): Replace cast to char * by
840         const_cast<char *> (unescaped).
842 2018-06-18  Nick Clifton  <nickc@redhat.com>
844         PR 84195
845         * tree.c (escaped_string): New class.  Converts an unescaped
846         string into its escaped equivalent.
847         (warn_deprecated_use): Use the new class to convert the
848         deprecation message, if present.
849         (test_escaped_strings): New self test.
850         (test_c_tests): Add test_escaped_strings.
851         * doc/extend.texi (deprecated): Add a note that the
852         deprecation message is affected by the -fmessage-length
853         option, and that control characters will be escaped.
854         (#pragma GCC error): Document this pragma.
855         (#pragma GCC warning): Likewise.
856         * doc/invoke.texi (-fmessage-length): Document this option's
857         effect on the #warning and #error preprocessor directives and
858         the deprecated attribute.
860 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
862         * tree.c (decl_value_expr_lookup): Revert latest change.
863         (decl_value_expr_insert): Likewise.
865 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
867         * gimplify.c (nonlocal_vlas): Delete.
868         (nonlocal_vla_vars): Likewise.
869         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
870         referenced VLAs.
871         (gimplify_body): Do not create and destroy nonlocal_vlas.
872         * tree-nested.c: Include diagnostic.h.
873         (use_pointer_in_frame): Tweak.
874         (lookup_field_for_decl): Add assertion and declare the transformation.
875         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
876         internal error when the reference is in a wrong context.  Do not
877         create a debug decl by default.
878         (note_nonlocal_block_vlas): Delete.
879         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
880         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
881         create a debug decl by default.
882         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
883         call is in a wrong context.
884         (fixup_vla_decls): New function.
885         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
886         debug variables were created.
887         * tree.c (decl_value_expr_lookup): Add checking assertion.
888         (decl_value_expr_insert): Likewise.
890 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
892         PR middle-end/82479
893         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
894         * tree-scalar-evolution.c (interpret_expr): Likewise.
895         (expression_expensive_p): Likewise.
896         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
897         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
898         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
899         (ssa_defined_by_minus_one_stmt_p): New.
901 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
903         PR middle-end/64946
904         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
905         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
906         * dojump.c (do_jump): Likewise.
907         * expr.c (expand_expr_real_2): Check operand type's sign.
908         * fold-const.c (const_unop): Handle ABSU_EXPR.
909         (fold_abs_const): Likewise.
910         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
911         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
912         (strip_sign_op_1): Likesise.
913         * match.pd: Add new pattern to generate ABSU_EXPR.
914         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
915         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
916         * tree-eh.c (operation_could_trap_helper_p): Likewise.
917         * tree-inline.c (estimate_operator_cost): Likewise.
918         * tree-pretty-print.c (dump_generic_node): Likewise.
919         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
920         * tree.def (ABSU_EXPR): New.
922 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
924         PR middle-end/86095
925         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
926         documented as preserved for backward compatibility only.
927         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
929         PR rtl-optimization/86108
930         * bb-reorder.c (create_forwarder_block): Renamed to ...
931         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
932         jump from new landing pad to the second part.
933         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
934         Adjust callers.
936 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
938         PR middle-end/85878
939         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
940         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
941         Only call store_expr for halves if the mode is the same.
943         PR middle-end/86123
944         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
945         Fix up comment formatting.
947 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
949         * typed-splay-tree.h (typed_splay_tree::remove): New function.
950         (typed_splay_tree::closure,
951         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
952         (typed_splay_tree::typed_splay_tree,
953         typed_splay_tree::operator =): Declared private.
954         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
955         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
956         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
957         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
958         typed_splay_tree::splay_tree_splay,
959         typed_splay_tree::splay_tree_foreach_helper,
960         typed_splay_tree::splay_tree_insert,
961         typed_splay_tree::splay_tree_remove,
962         typed_splay_tree::splay_tree_lookup,
963         typed_splay_tree::splay_tree_predecessor,
964         typed_splay_tree::splay_tree_successor,
965         typed_splay_tree::splay_tree_min,
966         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
967         (typed_splay_tree::root, typed_splay_tree::comp,
968         typed_splay_tree::delete_key,
969         typed_splay_tree::delete_value): New data members.
970         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
971         typed_splay_tree::remove.
973 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
975         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
976         -mginv and -mno-ginv to the assembler.
977         * config/mips/mips.opt (-mcrc): New option.
978         (-mginv): Likewise.
979         * doc/invoke.text (-mcrc): Document.
980         (-mginv): Likewise.
982 2018-06-15  Nick Clifton  <nickc@redhat.com>
984         PR 84195
985         * tree.c (escaped_string): New class.  Converts an unescaped
986         string into its escaped equivalent.
987         (warn_deprecated_use): Use the new class to convert the
988         deprecation message, if present.
989         (test_escaped_strings): New self test.
990         (test_c_tests): Add test_escaped_strings.
991         * doc/extend.texi (deprecated): Add a note that the
992         deprecation message is affected by the -fmessage-length
993         option, and that control characters will be escaped.
994         (#pragma GCC error): Document this pragma.
995         (#pragma GCC warning): Likewise.
996         * doc/invoke.texi (-fmessage-length): Document this option's
997         effect on the #warning and #error preprocessor directives and
998         the deprecated attribute.
1000 2018-06-15  Richard Biener  <rguenther@suse.de>
1002         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1003         here, also noting vector size used.
1004         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1005         size used in MSG_OPTIMIZED_LOCATIONS dump.
1006         (pass_slp_vectorize::execute): Adjust.
1008 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1010         PR target/85968
1011         * config/arc/arc.c (arc_return_address_register): Fix
1012         if-condition.
1014 2018-06-15  Richard Biener  <rguenther@suse.de>
1016         PR middle-end/86159
1017         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1018         leave useless conversion stripping to force_gimple_operand_gsi.
1019         (gimplify_build2): Likewise.
1020         (gimplify_build1): Likewise.
1022 2018-06-15  Richard Biener  <rguenther@suse.de>
1024         PR middle-end/86076
1025         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1026         before adjusting their block.
1028 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1030         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1031         multilibs for *-*-rtems*.
1032         * config/riscv/t-rtems: New file.
1034 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1036         PR middle-end/86122
1037         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1038         unsigned_type_for returns NULL.
1040         PR target/85945
1041         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1042         subregs of multi-word pseudos unless the float mode has word size.
1044 2018-06-14  Richard Biener  <rguenther@suse.de>
1046         PR middle-end/86139
1047         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1048         duplicate and harmful type_hash_canon.
1049         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1051 2018-06-14  Richard Biener  <rguenther@suse.de>
1053         PR ipa/86124
1054         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1055         NULL cgraph_node.
1057 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1059         * config/rtems.h (STDINT_LONG32): Define.
1061 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1062             Prachi Godbole  <prachi.godbole@imgtec.com>
1064         * config/mips/mips-cpus.def: Define P6600.
1065         * config/mips/mips-tables.opt: Regenerate.
1066         * config/mips/mips.c (mips_ucbranch_type): New enum.
1067         (mips_rtx_cost_data): Add support for P6600.
1068         (mips_issue_rate): Likewise.
1069         (mips_multipass_dfa_lookahead): Likewise.
1070         (mips_avoid_hazard): Likewise.
1071         (mips_reorg_process_insns): Likewise.
1072         (mips_classify_branch_p6600): New function.
1073         * config/mips/mips.h (TUNE_P6600): New define.
1074         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1075         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1076         * config/mips/mips.md: Include p6600.md.
1077         (processor): Add p6600.
1078         * config/mips/p6600.md: New file.
1079         * doc/invoke.texi: Add p6600 to supported architectures.
1081 2018-06-13  Martin Sebor  <msebor@redhat.com>
1083         PR tree-optimization/86114
1084         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1085         of integer types.
1086         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1088 2018-06-13  Richard Biener  <rguenther@suse.de>
1090         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1091         Properly set vector type of the intermediate stmt.
1092         * tree-vect-stmts.c (vectorizable_operation): The destination
1093         var always has vectype_out type.
1095 2018-06-13  Jeff Law  <law@redhat.com>
1097         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1098         integer 0 for argument to print_rtl_with_bb.
1099         (rl78_reorg): Likewise.
1101 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1103         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1104         from rtx to rtx_insn *.
1105         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1106         "label".
1107         (add_sched_insns_for_speculation): Likewise for local "target",
1108         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1109         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1110         from rtx_insn ** to rtx_code_label **.
1111         (reorg_emit_nops): Likewise.
1112         (c6x_reorg): Likewise for local "call_labels".
1113         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1114         rtx to rtx_insn *.
1115         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1116         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1117         the loops over LABEL_REFS.
1118         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1119         braf_label.
1120         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1121         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1122         (split_branches): Strengthen local "olabel" from rtx to
1123         rtx_insn *, adding a safe_as_a cast.
1124         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1125         to "rtx_insn *".
1126         (add_insn_after): Likewise for first two params.
1127         (add_insn_before): Likewise.
1128         (remove_insn): Likewise for param.
1129         (emit_pattern_before_noloc): Likewise for second and third params.
1130         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1131         (emit_call_insn_before_noloc): Likewise.
1132         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1133         to "rtx_insn *".
1134         (emit_barrier_before): Likewise.
1135         (emit_label_before): Strengthen "label" param from "rtx" to
1136         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1137         "rtx_insn *".
1138         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1139         "rtx_insn *".
1140         (emit_pattern_after_noloc): Likewise.
1141         (emit_insn_after_noloc): Likewise.
1142         (emit_jump_insn_after_noloc): Likewise.
1143         (emit_call_insn_after_noloc): Likewise.
1144         (emit_debug_insn_after_noloc): Likewise.
1145         (emit_barrier_after): Likewise.
1146         (emit_label_after): Likewise for both params.
1147         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1148         "loc" param from "int" to "location_t".
1149         (emit_insn_after_setloc): Likewise.
1150         (emit_jump_insn_after_setloc): Likewise.
1151         (emit_call_insn_after_setloc): Likewise.
1152         (emit_debug_insn_after_setloc): Likewise.
1153         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1154         "loc" param from "int" to "location_t".
1155         (emit_pattern_before): Convert NULL_RTX to NULL.
1156         (emit_insn_before_setloc): Convert "loc" param from "int" to
1157         "location_t".
1158         (emit_jump_insn_before_setloc): Likewise.
1159         (emit_call_insn_before_setloc): Likewise.
1160         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1161         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1162         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1163         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1164         Convert 3rd param from "int" to "location_t".
1165         (emit_barrier_before, emit_barrier_after, next_real_insn):
1166         Strengthen param from rtx to rtx_insn *.
1167         (emit_label_before): Strengthen 1st param from "rtx" to
1168         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1169         "rtx_insn *".
1170         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1171         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1172         Strengthen 2nd param from "rtx" to "rtx_insn *".
1173         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1174         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1175         Likewise. Convert 3rd param from "int" to "location_t".
1176         (emit_label_after): Strengthen 1st param from "rtx" to
1177         "rtx_code_label *".
1178         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1179         "rtx_insn *".
1180         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1181         from "rtx" to "rtx_insn *".
1183 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1185         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1186         bodies streamed in with -Q.
1187         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1188         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1189         * gimple-streamer-out.c: Include gimple-pretty-print.h
1190         (output_bb): Dump stmts streamed.
1191         * lto-section-out.c: Include print-tree.h
1192         (lto_begin_section): Dump sections created.
1193         (lto_output_decl_index): Dump decl encoded.
1194         * lto-streamer-out.c: Include print-tree.h
1195         (create_output_block): Dump output block created.
1196         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1197         (output_function): Dump function output.
1198         (output_constructor): Dump constructor streamed.
1199         (write_global_stream): Output indexes encoded.
1200         (produce_asm_for_decls): Dump streams encoded.
1201         * lto-streamer.c (streamer_dump_file): New global var.
1202         * lto-streamer.h (streamer_dump_file): Declare.
1203         * passes.c (ipa_write_summaries): Initialize streamer dump.
1204         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1205         in.
1207 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1209         PR target/86048
1210         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1211         offsets for register save directives.  Emit a second batch of save
1212         directives, if need be, when the function accesses prior frames.
1214 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1216         * config/arc/fpu.md (fmasf4): Force operand to register.
1217         (fnmasf4): Likewise.
1219 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1221         * config/arc/arc-protos.h (arc_pad_return): Remove.
1222         * config/arc/arc.c (machine_function): Remove force_short_suffix
1223         and size_reason.
1224         (arc_print_operand): Adjust printing of '&'.
1225         (arc_verify_short): Remove conditional printing of short suffix.
1226         (arc_final_prescan_insn): Remove reference to size_reason.
1227         (pad_return): New function.
1228         (arc_reorg): Call pad_return.
1229         (arc_pad_return): Remove.
1230         (arc_init_machine_status): Remove reference to force_short_suffix.
1231         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1232         (attr length): When attribute iscompact is true force to 2
1233         regardless; in the case of maybe check if we want to force the
1234         instruction to have 4 bytes length.
1235         (nopv): Change it to generate 4 byte long nop as well.
1236         (blockage): New pattern.
1237         (simple_return): Remove call to arc_pad_return.
1238         (p_return_i): Likewise.
1240 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1242         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1244 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1246         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1247         ARC cores.
1249 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1251         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1252         for ARC700 and ARCv2.
1254 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1256         PR target/86076
1257         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1258         operands[2] instead of operands[1].
1261 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1263         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1264         case, check whether the outer register overlaps an unallocatable
1265         register, not just whether it fits the required class.
1267 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1269         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1270         are poly_ints.
1271         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1272         (memrefs_conflict_p): Likewise.
1273         (init_alias_analysis): Likewise.
1274         * cfgexpand.c (expand_debug_expr): Likewise.
1275         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1276         * cse.c (fold_rtx): Likewise.
1277         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1278         * expr.c (emit_block_move_hints): Likewise.
1279         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1280         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1281         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1282         (emit_group_store): Likewise.
1283         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1284         to read the PRE/POST_MODIFY increment.
1285         * calls.c (store_one_arg): Use strip_offset.
1286         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1287         poly_int_rtx_p.
1288         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1289         by a VEC_SELECT.
1290         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1291         (simplify_binary_operation_1): Extend CONST_INT handling to
1292         poly_int_rtx_p.
1293         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1294         than a HOST_WIDE_INT.
1295         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1296         poly_int64.
1297         (adjust_mems, add_stores): Update accodingly.
1298         (vt_canonicalize_addr): Track polynomial offsets.
1299         (emit_note_insn_var_location): Likewise.
1300         (vt_add_function_parameter): Likewise.
1301         (vt_initialize): Likewise.
1303 2018-06-12  Jeff Law  <law@redhat.com>
1305         * config.gcc (alpha*-*-freebsd*): Remove.
1306         * config/alpha/freebsd.h: Remove.
1308 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1310         PR other/69968
1311         * spellcheck-tree.c (levenshtein_distance): Rename to...
1312         (get_edit_distance): ...this, and update for underlying renaming.
1313         * spellcheck-tree.h (levenshtein_distance): Rename to...
1314         (get_edit_distance): ...this.
1315         * spellcheck.c (levenshtein_distance): Rename to...
1316         (get_edit_distance): ...this.  Convert from Levenshtein distance
1317         to Damerau-Levenshtein distance by supporting transpositions of
1318         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1319         "v_one_ago".
1320         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1321         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1322         update for underlying renaming.
1323         (selftest::levenshtein_distance_unit_test): Rename to...
1324         (selftest::test_get_edit_distance_unit): ...this, and update for
1325         underlying renaming.
1326         (selftest::test_find_closest_string): Add example from PR 69968
1327         where transposition helps
1328         (selftest::test_metric_conditions): Update for renaming.
1329         (selftest::test_metric_conditions): Likewise.
1330         (selftest::spellcheck_c_tests): Likewise.
1331         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1332         (get_edit_distance): ...this.
1333         (best_match::consider): Update for renaming.
1335 2018-06-12  Martin Sebor  <msebor@redhat.com>
1337         PR tree-optimization/85259
1338         * builtins.c (compute_objsize): Handle constant offsets.
1339         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1340         true iff a warning has been issued.
1341         * gimple.h (gimple_nonartificial_location): New function.
1342         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1343         gimple_nonartificial_location and handle -Wno-system-headers.
1344         (handle_builtin_stxncpy): Same.
1346 2018-06-12  Martin Sebor  <msebor@redhat.com>
1348         PR c/85931
1349         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1351 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1353         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1354         BUILTIN_VEC_XST entries for pointer to double and long long.
1356 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1358         PR target/85990
1359         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1360         Update comments.
1361         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1362         Likewise.
1364 2018-06-12  Martin Liska  <mliska@suse.cz>
1366         * doc/options.texi: Document IntegerRange.
1368 2018-06-12  Martin Liska  <mliska@suse.cz>
1370         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1371         * opt-functions.awk: Handle Deprecated flag.
1372         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1373         and report error.
1374         (read_cmdline_option): Report warning for a deprecated option.
1375         * opts.h (struct cl_option): Add new field cl_deprecated.
1376         (CL_ERR_DEPRECATED): New.
1378 2018-06-12  Martin Liska  <mliska@suse.cz>
1380         * doc/options.texi: Document Deprecated option flag.
1382 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1384         * config/arc/arc-arch.h (arc_extras): New enum.
1385         (arc_cpu_t):Add field extra.
1386         (arc_cpu_types): Consider the extras.
1387         * config/arc/arc-cpus.def: Add extras info.
1388         * config/arc/arc-opts.h (processor_type): Consider extra field.
1389         * config/arc/arc.c (arc_override_options): Handle extra field.
1391 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1393         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1394         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1395         field.
1396         * config/arc/arc.c (arc_init): Update pic warning.
1397         (irq_range): Update irq range parsing warnings.
1398         (arc_override_options): Update various warning messages.
1399         (arc_handle_aux_attribute): Likewise.
1401 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1403         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1405 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1407         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1408         compiler messages directives.
1410 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1412         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1413         * config/mips/mips-tables.opt: Regenerate.
1414         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1415         mips64r6.
1416         * doc/invoke.texi: Document -march=i6500.
1418 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1420         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1421         (i6400_gpmul): Add cpu_unit.
1422         (i6400_gpdiv): Likewise.
1423         (i6400_msa_add_d): Update reservations.
1424         (i6400_msa_int_add) Likewise.
1425         (i6400_msa_short_logic3) Likewise.
1426         (i6400_msa_short_logic2) Likewise.
1427         (i6400_msa_short_logic) Likewise.
1428         (i6400_msa_move) Likewise.
1429         (i6400_msa_cmp) Likewise.
1430         (i6400_msa_short_float2) Likewise.
1431         (i6400_msa_div_d) Likewise.
1432         (i6400_msa_long_logic1) Likewise.
1433         (i6400_msa_long_logic2) Likewise.
1434         (i6400_msa_mult) Likewise.
1435         (i6400_msa_long_float2) Likewise.
1436         (i6400_msa_long_float4) Likewise.
1437         (i6400_msa_long_float5) Likewise.
1438         (i6400_msa_long_float8) Likewise.
1439         (i6400_fpu_fadd): Include frint type.
1440         (i6400_fpu_store): New define_insn_reservation.
1441         (i6400_fpu_load): Likewise.
1442         (i6400_fpu_move): Likewise.
1443         (i6400_fpu_fcmp): Likewise.
1444         (i6400_fpu_fmadd): Likewise.
1445         (i6400_int_mult): Include imul3nc type and update reservation.
1446         (i6400_int_div): Include idiv3 type and update reservation.
1447         (i6400_int_load): Update to check type not move_type.
1448         (i6400_int_store): Likewise.
1449         (i6400_int_prefetch): Set zero latency.
1451 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1453         * gcc.c: Document new %@{...} sequence.
1454         (LINK_COMMAND_SPEC): Use it for the -L switches.
1455         (cpp_unique_options): Use it for the -I switches.
1456         (at_file_argbuf): New global variable.
1457         (in_at_file): Likewise.
1458         (alloc_args): Create at_file_argbuf.
1459         (clear_args): Truncate at_file_argbuf.
1460         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1461         (open_at_file): New function.
1462         (close_at_file): Likewise.
1463         (create_at_file): Delete.
1464         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1465         <'o'>: Likewise.
1466         <'@'>: New case.
1467         (validate_switches_from_spec): Deal with %@{...} sequence.
1468         (validate_switches): Likewise.
1469         (driver::finalize): Call clear_args.
1471 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1473         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1475 2018-06-11  Martin Sebor  <msebor@redhat.com>
1477         * doc/invoke.texi (-Wall): List -Wc++17-compat.
1478         (Wno-class-memaccess): Add @opindex.
1479         (Wno-templates, Wno-multiple-inheritance): Same.
1480         (Wno-virtual-inheritance, Wno-namespaces): Same.
1481         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1482         (Wno-format-overflow, Wno-format-truncation): Same.
1483         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1484         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1485         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1486         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1487         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1488         (Wno-misspelled-isr): Same.
1490 2018-06-11  Martin Sebor  <msebor@redhat.com>
1492         * PR tree-optimization/86083
1493         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1495 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1497         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1499 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
1501         PR target/85755
1502         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1503         on the correct operand.
1504         (*movdi_internal64): Ditto.
1506 2018-06-11  Martin Liska  <mliska@suse.cz>
1508         PR tree-optimization/86089
1509         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1511 2018-06-11  Julia Koval  <julia.koval@intel.com>
1513         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1514         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1515         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
1517 2018-06-11  Olivier Hainque  <hainque@adacore.com>
1519         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1520         for Ada with strict dwarf2.
1522 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
1524         PR target/85755
1525         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1526         addresses.
1528 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
1530         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1532 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
1534         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1535         TARGET_ELF.
1537 2018-06-08  Martin Liska  <mliska@suse.cz>
1539         * tree-cfg.h (debug_function): Fix argument type to match
1540         implementation.
1542 2018-06-08  Martin Liska  <mliska@suse.cz>
1544         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1545         Remove usage of MPX-related (and removed) fields.
1546         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1548 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
1550         * cfg.c (debug): Use TDF_NONE rather than 0.
1551         * cfghooks.c (debug): Likewise.
1552         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1553         (struct dump_option_value_info): Convert to...
1554         (struct kv_pair): ...this template type.
1555         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1556         rather than 0.
1557         (optinfo_verbosity_options): Likewise.
1558         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1559         OPTGROUP_NONE.
1560         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1561         than int for "optgroup_flags" param.
1562         (dump_generic_expr_loc): Use dump_flags_t rather than int for
1563         "dump_kind" param.
1564         (dump_dec): Likewise.
1565         (dump_finish): Use TDF_NONE rather than 0.
1566         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1567         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
1568         than 0.  Update for change to option_ptr.
1569         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1570         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
1571         0.  Update for changes to optinfo_verbosity_options and
1572         optgroup_options.
1573         (opt_info_switch_p): Convert optgroup_flags from int to
1574         optgroup_flags_t.
1575         (dump_basic_block): Use dump_flags_t rather than int
1576         for "dump_kind" param.
1577         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1578         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1579         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1580         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1581         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1582         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1583         TDF_NONE): Convert from macros to...
1584         (enum dump_flag): ...this new enum.
1585         (dump_flags_t): Update to use enum.
1586         (operator|, operator&, operator~, operator|=, operator&=):
1587         Implement for dump_flags_t.
1588         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1589         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1590         Convert from macros to...
1591         (enum optgroup_flag): ...this new enum.
1592         (optgroup_flags_t): New typedef.
1593         (operator|, operator|=): Implement for optgroup_flags_t.
1594         (struct dump_file_info): Convert field "alt_flags" to
1595         dump_flags_t.  Convert field "optgroup_flags" to
1596         optgroup_flags_t.
1597         (dump_basic_block): Use dump_flags_t rather than int for param.
1598         (dump_generic_expr_loc): Likewise.
1599         (dump_dec): Likewise.
1600         (dump_register): Convert param "optgroup_flags" to
1601         optgroup_flags_t.
1602         (opt_info_enable_passes): Likewise.
1603         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1604         than 0.
1605         * gimple-pretty-print.c (debug): Likewise.
1606         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1607         (merged_store_group::apply_stores): Likewise.
1608         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1609         * gimple.c (verify_gimple_pp): Likewise.
1610         * graphite-poly.c (print_pbb_body): Likewise.
1611         * passes.c (pass_manager::register_one_dump_file): Convert
1612         local "optgroup_flags" to optgroup_flags_t.
1613         * print-tree.c (print_node): Use TDF_NONE rather than 0.
1614         (debug): Likewise.
1615         (debug_body): Likewise.
1616         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1617         to optgroup_flags_t.
1618         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1619         than 0.
1620         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1621         (convert_mult_to_fma): Likewise.
1622         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1623         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1624         * tree-vect-data-refs.c (dump_lower_bound): Convert param
1625         "dump_kind" to dump_flags_t.
1627 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1629         * config/rs6000/rs6000.c (min, max): Delete.
1631 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1633         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1634         -mabi=spe and -mabi=no-spe.
1636 2018-06-08  Martin Liska  <mliska@suse.cz>
1638         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1639         where we expect an existing summary.
1641 2018-06-08  Martin Liska  <mliska@suse.cz>
1643         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1644         * ipa-inline.h (estimate_edge_growth): Likewise.
1646 2018-06-08  Martin Liska  <mliska@suse.cz>
1648         * cgraph.c (function_version_hasher::hash): Use
1649         cgraph_node::get_uid ().
1650         (function_version_hasher::equal):
1651         * cgraph.h (cgraph_node::get_uid): New method.
1652         * ipa-inline.c (update_caller_keys): Use
1653         cgraph_node::get_uid ().
1654         (update_callee_keys): Likewise.
1655         * ipa-utils.c (searchc): Likewise.
1656         (ipa_reduced_postorder): Likewise.
1657         * lto-cgraph.c (input_node): Likewise.
1658         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1659         * symbol-summary.h (symtab_insertion): Likewise.
1660         (symtab_removal): Likewise.
1661         (symtab_duplication): Likewise.
1662         * tree-pretty-print.c (dump_function_header): Likewise.
1663         * tree-sra.c (convert_callers_for_node): Likewise.
1665 2018-06-08  Martin Liska  <mliska@suse.cz>
1667         * cgraph.c (symbol_table::create_edge): Always assign a new
1668         unique number.
1669         (symbol_table::free_edge): Do not recycle numbers.
1670         * cgraph.h (cgraph_edge::get): New method.
1671         * symbol-summary.h (symtab_removal): Use it.
1672         (symtab_duplication): Likewise.
1673         (call_summary::hashable_uid): Remove.
1675 2018-06-08  Martin Liska  <mliska@suse.cz>
1677         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1678         (initialize_growth_caches): Remove.
1679         (free_growth_caches): Likewise.
1680         (do_estimate_edge_time): Use edge_growth_cache.
1681         (do_estimate_edge_size): Likewise.
1682         (do_estimate_edge_hints): Likewise.
1683         * ipa-inline.c (reset_edge_caches): Likewise.
1684         (recursive_inlining): Likewise.
1685         (inline_small_functions): Likewise.
1686         * ipa-inline.h (initialize_growth_caches): Remove.
1687         (estimate_edge_size): Likewise.
1688         (estimate_edge_time): Likewise.
1689         (estimate_edge_hints): Likewise.
1690         (reset_edge_growth_cache): Likewise.
1691         * symbol-summary.h (call_summary::remove): New method.
1693 2018-06-08  Martin Liska  <mliska@suse.cz>
1695         * ipa-cp.c (class edge_clone_summary): New summary.
1696         (grow_edge_clone_vectors): Remove.
1697         (ipcp_edge_duplication_hook): Remove.
1698         (class edge_clone_summary_t): New call_summary class.
1699         (ipcp_edge_removal_hook): Remove.
1700         (edge_clone_summary_t::duplicate): New function.
1701         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1702         (create_specialized_node): Likewise.
1703         (ipcp_driver): Initialize edge_clone_summaries and do not
1704         register hooks.
1706 2018-06-08  Martin Liska  <mliska@suse.cz>
1708         * symbol-summary.h (get): New function.
1709         (call_summary::m_initialize_when_cloning): New class member.
1711 2018-06-08  Martin Liska  <mliska@suse.cz>
1713         * cgraph.c (cgraph_node::remove): Do not recycle uid.
1714         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1715         (symbol_table::allocate_cgraph_symbol): Do not set uid.
1716         * passes.c (uid_hash_t): Record removed_nodes by their uids.
1717         (remove_cgraph_node_from_order): Use the removed_nodes set.
1718         (do_per_function_toporder): Likwise.
1719         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1720         instead of summary_uid.
1721         (symtab_removal): Likewise.
1722         (symtab_duplication): Likewise.
1724 2018-06-08  Martin Liska  <mliska@suse.cz>
1726         * ipa-cp.c (ipcp_store_bits_results): Use
1727         ipcp_transformation_sum.
1728         (ipcp_store_vr_results): Likewise.
1729         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1730         to ...
1731         (ipcp_transformation_initialize): ... this.
1732         (ipa_set_node_agg_value_chain):
1733         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1734         (write_ipcp_transformation_info): Likewise.
1735         (read_ipcp_transformation_info): Likewise.
1736         (ipcp_update_bits): Likewise.
1737         (ipcp_update_vr): Likewise.
1738         (ipcp_transform_function): Likewise.
1739         * ipa-prop.h: Rename ipcp_transformation_summary to
1740         ipcp_transformation.
1741         (class ipcp_transformation_t): New function summary.
1742         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1743         (ipa_get_agg_replacements_for_node): Likewise.
1745 2018-06-08  Martin Liska  <mliska@suse.cz>
1747         * ipa-pure-const.c (struct funct_state_d): Do it class instead
1748         of struct.
1749         (class funct_state_summary_t): New function_summary class.
1750         (has_function_state): Remove.
1751         (get_function_state): Likewise.
1752         (set_function_state): Likewise.
1753         (add_new_function): Likewise.
1754         (funct_state_summary_t::insert): New function.
1755         (duplicate_node_data): Remove.
1756         (remove_node_data): Remove.
1757         (funct_state_summary_t::duplicate): New function.
1758         (register_hooks): Create new funct_state_summaries.
1759         (pure_const_generate_summary): Use it.
1760         (pure_const_write_summary): Likewise.
1761         (pure_const_read_summary): Likewise.
1762         (propagate_pure_const): Likewise.
1763         (propagate_nothrow): Likewise.
1764         (dump_malloc_lattice): Likewise.
1765         (propagate_malloc): Likewise.
1766         (execute): Do not register hooks, just remove summary
1767         instead.
1768         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1769         constructor.
1771 2018-06-08  Martin Liska  <mliska@suse.cz>
1773         * ipa-reference.c (remove_node_data): Remove.
1774         (duplicate_node_data): Likewise.
1775         (class ipa_ref_var_info_summary_t): New class.
1776         (class ipa_ref_opt_summary_t): Likewise.
1777         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1778         (get_reference_optimization_summary): Use
1779         ipa_ref_opt_sum_summaries.
1780         (set_reference_vars_info): Remove.
1781         (set_reference_optimization_summary): Likewise.
1782         (ipa_init): Create summaries.
1783         (init_function_info): Use function summary.
1784         (ipa_ref_opt_summary_t::duplicate): New function.
1785         (ipa_ref_opt_summary_t::remove): New function.
1786         (get_read_write_all_from_node): Fix GNU coding style.
1787         (propagate): Use function summary.
1788         (write_node_summary_p): Fix GNU coding style.
1789         (stream_out_bitmap): Likewise.
1790         (ipa_reference_read_optimization_summary): Use function summary.
1791         (ipa_reference_c_finalize): Do not release hooks.
1793 2018-06-08  Martin Liska  <mliska@suse.cz>
1795         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1796         (analyze_function_body): Extract multiple calls of get_create.
1797         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1798         * ipa-inline.c (recursive_inlining): Use ::get method.
1799         * ipa-inline.h (estimate_edge_growth): Likewise.
1801 2018-06-08  Martin Liska  <mliska@suse.cz>
1803         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1804         HSA_INVALID.
1805         (hsa_function_summary::hsa_function_summary): Use the new enum
1806         value.
1807         (hsa_gpu_implementation_p): Use hsa_summaries::get.
1808         * hsa-gen.c (hsa_get_host_function): Likewise.
1809         (get_brig_function_name): Likewise.
1810         * ipa-hsa.c (process_hsa_functions): Likewise.
1811         (ipa_hsa_write_summary): Likewise.
1812         * symbol-summary.h (symtab_duplication): Use ::get function/
1813         (get): New function.
1815 2018-06-08  Martin Liska  <mliska@suse.cz>
1817         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1818         of get.
1819         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1820         (hsa_register_kernel): Likewise.
1821         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1822         * hsa-gen.c (hsa_get_host_function): Likewise.
1823         (get_brig_function_name): Likewise.
1824         (generate_hsa): Likewise.
1825         (pass_gen_hsail::execute): Likewise.
1826         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1827         (devirtualization_time_bonus): Likewise.
1828         (ipcp_propagate_stage): Likewise.
1829         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1830         (edge_set_predicate): Likewise.
1831         (evaluate_conditions_for_known_args): Likewise.
1832         (evaluate_properties_for_edge): Likewise.
1833         (ipa_fn_summary::reset): Likewise.
1834         (ipa_fn_summary_t::duplicate): Likewise.
1835         (dump_ipa_call_summary): Likewise.
1836         (ipa_dump_fn_summary): Likewise.
1837         (analyze_function_body): Likewise.
1838         (compute_fn_summary): Likewise.
1839         (estimate_edge_devirt_benefit): Likewise.
1840         (estimate_edge_size_and_time): Likewise.
1841         (estimate_calls_size_and_time): Likewise.
1842         (estimate_node_size_and_time): Likewise.
1843         (inline_update_callee_summaries): Likewise.
1844         (remap_edge_change_prob): Likewise.
1845         (remap_edge_summaries): Likewise.
1846         (ipa_merge_fn_summary_after_inlining): Likewise.
1847         (ipa_update_overall_fn_summary): Likewise.
1848         (read_ipa_call_summary): Likewise.
1849         (inline_read_section): Likewise.
1850         (write_ipa_call_summary): Likewise.
1851         (ipa_fn_summary_write): Likewise.
1852         (ipa_free_fn_summary): Likewise.
1853         * ipa-hsa.c (process_hsa_functions): Likewise.
1854         (ipa_hsa_write_summary): Likewise.
1855         (ipa_hsa_read_section): Likewise.
1856         * ipa-icf.c (sem_function::merge): Likewise.
1857         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1858         (do_estimate_edge_time): Likewise.
1859         (estimate_size_after_inlining): Likewise.
1860         (estimate_growth): Likewise.
1861         (growth_likely_positive): Likewise.
1862         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1863         (inline_call): Likewise.
1864         * ipa-inline.c (caller_growth_limits): Likewise.
1865         (can_inline_edge_p): Likewise.
1866         (can_inline_edge_by_limits_p): Likewise.
1867         (compute_uninlined_call_time): Likewise.
1868         (compute_inlined_call_time): Likewise.
1869         (want_inline_small_function_p): Likewise.
1870         (edge_badness): Likewise.
1871         (update_caller_keys): Likewise.
1872         (update_callee_keys): Likewise.
1873         (recursive_inlining): Likewise.
1874         (inline_small_functions): Likewise.
1875         (inline_to_all_callers_1): Likewise.
1876         (dump_overall_stats): Likewise.
1877         (early_inline_small_functions): Likewise.
1878         (early_inliner): Likewise.
1879         * ipa-inline.h (estimate_edge_growth): Likewise.
1880         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1881         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1882         * ipa-prop.h (IPA_NODE_REF): Likewise.
1883         (IPA_EDGE_REF): Likewise.
1884         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1885         (propagate_malloc): Likewise.
1886         * ipa-split.c (execute_split_functions): Likewise.
1887         * symbol-summary.h: Rename get to get_create.
1888         (get): Likewise.
1889         (get_create): Likewise.
1890         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1892 2018-06-08  Martin Liska  <mliska@suse.cz>
1894         * symbol-summary.h (release): Move definition out of class
1895         declaration.
1896         (symtab_removal): Likewise.
1897         (symtab_duplication): Likewise.
1899 2018-06-08  Martin Liska  <mliska@suse.cz>
1901         * symbol-summary.h (function_summary): Move constructor
1902         implementation out of class declaration.
1903         (release): Likewise.
1904         (symtab_insertion): Likewise.
1905         (symtab_removal): Likewise.
1906         (symtab_duplication): Likewise.
1907         (get): Likewise.
1909 2018-06-08  Martin Liska  <mliska@suse.cz>
1911         * Makefile.in: Remove support for MPX (macros, related functions,
1912         fields in cgraph_node, ...).
1913         * builtin-types.def (BT_BND): Likewise.
1914         (BT_FN_BND_CONST_PTR): Likewise.
1915         (BT_FN_CONST_PTR_BND): Likewise.
1916         (BT_FN_VOID_PTR_BND): Likewise.
1917         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
1918         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
1919         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
1920         (expand_builtin_mempcpy_with_bounds): Likewise.
1921         (expand_builtin_memset_with_bounds): Likewise.
1922         (expand_builtin_memset_args): Likewise.
1923         (std_expand_builtin_va_start): Likewise.
1924         (expand_builtin): Likewise.
1925         (expand_builtin_with_bounds): Likewise.
1926         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
1927         (DEF_LIB_BUILTIN_CHKP): Likewise.
1928         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
1929         (DEF_CHKP_BUILTIN): Likewise.
1930         (BUILT_IN_MEMCPY): Likewise.
1931         (BUILT_IN_MEMMOVE): Likewise.
1932         (BUILT_IN_MEMPCPY): Likewise.
1933         (BUILT_IN_MEMSET): Likewise.
1934         (BUILT_IN_STPCPY): Likewise.
1935         (BUILT_IN_STRCAT): Likewise.
1936         (BUILT_IN_STRCHR): Likewise.
1937         (BUILT_IN_STRCPY): Likewise.
1938         (BUILT_IN_STRLEN): Likewise.
1939         (BUILT_IN_MEMCPY_CHK): Likewise.
1940         (BUILT_IN_MEMMOVE_CHK): Likewise.
1941         (BUILT_IN_MEMPCPY_CHK): Likewise.
1942         (BUILT_IN_MEMSET_CHK): Likewise.
1943         (BUILT_IN_STPCPY_CHK): Likewise.
1944         (BUILT_IN_STRCAT_CHK): Likewise.
1945         (BUILT_IN_STRCPY_CHK): Likewise.
1946         * calls.c (store_bounds): Likewise.
1947         (emit_call_1): Likewise.
1948         (special_function_p): Likewise.
1949         (maybe_warn_nonstring_arg): Likewise.
1950         (initialize_argument_information): Likewise.
1951         (finalize_must_preallocate): Likewise.
1952         (compute_argument_addresses): Likewise.
1953         (expand_call): Likewise.
1954         * cfgexpand.c (expand_call_stmt): Likewise.
1955         (expand_return): Likewise.
1956         (expand_gimple_stmt_1): Likewise.
1957         (pass_expand::execute): Likewise.
1958         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
1959         (cgraph_node::remove): Likewise.
1960         (cgraph_node::dump): Likewise.
1961         (cgraph_node::verify_node): Likewise.
1962         * cgraph.h (chkp_function_instrumented_p): Likewise.
1963         (symtab_node::get_alias_target): Likewise.
1964         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
1965         (cgraph_local_p): Likewise.
1966         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
1967         (cgraph_edge::rebuild_references): Likewise.
1968         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
1969         (walk_polymorphic_call_targets): Likewise.
1970         (cgraph_node::expand_thunk): Likewise.
1971         (symbol_table::output_weakrefs): Likewise.
1972         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
1973         (ix86_handle_option): Likewise.
1974         * config/i386/constraints.md: Likewise.
1975         * config/i386/i386-builtin-types.def (BND): Likewise.
1976         (VOID): Likewise.
1977         (PVOID): Likewise.
1978         (ULONG): Likewise.
1979         * config/i386/i386-builtin.def (BDESC_END): Likewise.
1980         (BDESC_FIRST): Likewise.
1981         (BDESC): Likewise.
1982         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
1983         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
1984         * config/i386/i386.c (enum reg_class): Likewise.
1985         (ix86_target_string): Likewise.
1986         (ix86_option_override_internal): Likewise.
1987         (ix86_conditional_register_usage): Likewise.
1988         (ix86_valid_target_attribute_inner_p): Likewise.
1989         (ix86_set_indirect_branch_type): Likewise.
1990         (ix86_set_current_function): Likewise.
1991         (ix86_function_arg_regno_p): Likewise.
1992         (init_cumulative_args): Likewise.
1993         (ix86_function_arg_advance): Likewise.
1994         (ix86_function_arg): Likewise.
1995         (ix86_pass_by_reference): Likewise.
1996         (ix86_function_value_regno_p): Likewise.
1997         (ix86_function_value_1): Likewise.
1998         (ix86_function_value_bounds): Likewise.
1999         (ix86_return_in_memory): Likewise.
2000         (ix86_setup_incoming_vararg_bounds): Likewise.
2001         (ix86_va_start): Likewise.
2002         (indirect_thunk_need_prefix): Likewise.
2003         (print_reg): Likewise.
2004         (ix86_print_operand): Likewise.
2005         (ix86_expand_call): Likewise.
2006         (ix86_output_function_return): Likewise.
2007         (reg_encoded_number): Likewise.
2008         (BDESC_VERIFYS): Likewise.
2009         (ix86_init_mpx_builtins): Likewise.
2010         (ix86_init_builtins): Likewise.
2011         (ix86_emit_cmove): Likewise.
2012         (ix86_emit_move_max): Likewise.
2013         (ix86_expand_builtin): Likewise.
2014         (ix86_builtin_mpx_function): Likewise.
2015         (ix86_get_arg_address_for_bt): Likewise.
2016         (ix86_load_bounds): Likewise.
2017         (ix86_store_bounds): Likewise.
2018         (ix86_load_returned_bounds): Likewise.
2019         (ix86_store_returned_bounds): Likewise.
2020         (ix86_class_likely_spilled_p): Likewise.
2021         (ix86_hard_regno_mode_ok): Likewise.
2022         (x86_order_regs_for_local_alloc): Likewise.
2023         (ix86_mitigate_rop): Likewise.
2024         (ix86_bnd_prefixed_insn_p): Likewise.
2025         (ix86_mpx_bound_mode): Likewise.
2026         (ix86_make_bounds_constant): Likewise.
2027         (ix86_initialize_bounds): Likewise.
2028         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2029         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2030         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2031         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2032         (TARGET_CHKP_BOUND_MODE): Likewise.
2033         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2034         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2035         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2036         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2037         * config/i386/i386.h (TARGET_MPX): Likewise.
2038         (TARGET_MPX_P): Likewise.
2039         (VALID_BND_REG_MODE): Likewise.
2040         (FIRST_BND_REG): Likewise.
2041         (LAST_BND_REG): Likewise.
2042         (enum reg_class): Likewise.
2043         (BND_REG_P): Likewise.
2044         (BND_REGNO_P): Likewise.
2045         (BNDmode): Likewise.
2046         (ADJUST_INSN_LENGTH): Likewise.
2047         * config/i386/i386.md: Likewise.
2048         * config/i386/i386.opt: Likewise.
2049         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2050         (defined): Likewise.
2051         (LINK_MPX): Likewise.
2052         (MPX_SPEC): Likewise.
2053         (LIBMPX_SPEC): Likewise.
2054         (LIBMPXWRAPPERS_SPEC): Likewise.
2055         (CHKP_SPEC): Likewise.
2056         * config/i386/predicates.md: Likewise.
2057         * dbxout.c (dbxout_type): Likewise.
2058         * doc/extend.texi: Likewise.
2059         * doc/invoke.texi: Likewise.
2060         * doc/md.texi: Likewise.
2061         * doc/tm.texi: Likewise.
2062         * doc/tm.texi.in: Likewise.
2063         * dwarf2out.c (is_base_type): Likewise.
2064         (gen_formal_types_die): Likewise.
2065         (gen_subprogram_die): Likewise.
2066         (gen_type_die_with_usage): Likewise.
2067         (gen_decl_die): Likewise.
2068         (dwarf2out_late_global_decl): Likewise.
2069         * expr.c (expand_assignment): Likewise.
2070         (emit_storent_insn): Likewise.
2071         (store_expr_with_bounds): Likewise.
2072         (store_expr): Likewise.
2073         (expand_expr_real_1): Likewise.
2074         * expr.h (store_expr_with_bounds): Likewise.
2075         * function.c (use_register_for_decl): Likewise.
2076         (struct bounds_parm_data): Likewise.
2077         (assign_parms_augmented_arg_list): Likewise.
2078         (assign_parm_find_entry_rtl): Likewise.
2079         (assign_parm_is_stack_parm): Likewise.
2080         (assign_parm_load_bounds): Likewise.
2081         (assign_bounds): Likewise.
2082         (assign_parms): Likewise.
2083         (expand_function_start): Likewise.
2084         * gcc.c (CHKP_SPEC): Likewise.
2085         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2086         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2087         (wrestrict_dom_walker::check_call): Likewise.
2088         * gimple.c (gimple_build_call_from_tree): Likewise.
2089         * gimple.h (enum gf_mask): Likewise.
2090         (gimple_call_with_bounds_p): Likewise.
2091         (gimple_call_set_with_bounds): Likewise.
2092         * gimplify.c (gimplify_init_constructor): Likewise.
2093         * ipa-cp.c (initialize_node_lattices): Likewise.
2094         (propagate_constants_across_call): Likewise.
2095         (find_more_scalar_values_for_callers_subset): Likewise.
2096         * ipa-hsa.c (process_hsa_functions): Likewise.
2097         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2098         * ipa-icf.c (sem_function::merge): Likewise.
2099         * ipa-inline.c (early_inliner): Likewise.
2100         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2101         (warn_function_cold): Likewise.
2102         (propagate_pure_const): Likewise.
2103         * ipa-ref.h (enum GTY): Likewise.
2104         * ipa-split.c (find_retbnd): Likewise.
2105         (consider_split): Likewise.
2106         (split_function): Likewise.
2107         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2108         * ipa.c (walk_polymorphic_call_targets): Likewise.
2109         (symbol_table::remove_unreachable_nodes): Likewise.
2110         (process_references): Likewise.
2111         (cgraph_build_static_cdtor_1): Likewise.
2112         * lto-cgraph.c (lto_output_node): Likewise.
2113         (output_refs): Likewise.
2114         (compute_ltrans_boundary): Likewise.
2115         (input_overwrite_node): Likewise.
2116         (input_node): Likewise.
2117         (input_cgraph_1): Likewise.
2118         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2119         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2120         (class pass_chkp_instrumentation_passes): Likewise.
2121         (make_pass_chkp_instrumentation_passes): Likewise.
2122         * passes.def: Likewise.
2123         * rtl.h (struct GTY): Likewise.
2124         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2125         * stor-layout.c (layout_type): Likewise.
2126         * symtab.c: Likewise.
2127         * target.def: Likewise.
2128         * targhooks.c (default_chkp_bound_type): Likewise.
2129         (default_chkp_bound_mode): Likewise.
2130         (default_builtin_chkp_function): Likewise.
2131         (default_chkp_function_value_bounds): Likewise.
2132         (default_chkp_make_bounds_constant): Likewise.
2133         (default_chkp_initialize_bounds): Likewise.
2134         * targhooks.h (default_chkp_bound_type): Likewise.
2135         (default_chkp_bound_mode): Likewise.
2136         (default_builtin_chkp_function): Likewise.
2137         (default_chkp_function_value_bounds): Likewise.
2138         (default_chkp_make_bounds_constant): Likewise.
2139         (default_chkp_initialize_bounds): Likewise.
2140         * toplev.c (compile_file): Likewise.
2141         (process_options): Likewise.
2142         * tree-core.h (DEF_BUILTIN): Likewise.
2143         (DEF_BUILTIN_CHKP): Likewise.
2144         * tree-inline.c (declare_return_variable): Likewise.
2145         (remap_gimple_stmt): Likewise.
2146         (copy_bb): Likewise.
2147         (initialize_inlined_parameters): Likewise.
2148         (expand_call_inline): Likewise.
2149         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2150         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2151         (make_pass_ipa_chkp_produce_thunks): Likewise.
2152         (make_pass_chkp): Likewise.
2153         (make_pass_chkp_opt): Likewise.
2154         (make_pass_chkp_instrumentation_passes): Likewise.
2155         * tree-pretty-print.c (dump_generic_node): Likewise.
2156         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2157         * tree-ssa-dce.c (propagate_necessity): Likewise.
2158         (eliminate_unnecessary_stmts): Likewise.
2159         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2160         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2161         * tree-ssa-sccvn.h: Likewise.
2162         * tree-ssa-strlen.c (get_string_length): Likewise.
2163         (valid_builtin_call): Likewise.
2164         (adjust_last_stmt): Likewise.
2165         (handle_builtin_strchr): Likewise.
2166         (handle_builtin_strcpy): Likewise.
2167         (handle_builtin_stxncpy): Likewise.
2168         (handle_builtin_memcpy): Likewise.
2169         (handle_builtin_strcat): Likewise.
2170         (strlen_check_and_optimize_stmt): Likewise.
2171         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2172         * tree-streamer-in.c: Likewise.
2173         * tree-streamer.c (record_common_node): Likewise.
2174         * tree.c (tree_code_size): Likewise.
2175         (wide_int_to_tree_1): Likewise.
2176         (type_contains_placeholder_1): Likewise.
2177         (build_common_tree_nodes): Likewise.
2178         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2179         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2180         (POINTER_BOUNDS_P): Likewise.
2181         (BOUNDED_TYPE_P): Likewise.
2182         (BOUNDED_P): Likewise.
2183         (CALL_WITH_BOUNDS_P): Likewise.
2184         (pointer_bounds_type_node): Likewise.
2185         * value-prof.c (gimple_ic): Likewise.
2186         * var-tracking.c (vt_add_function_parameters): Likewise.
2187         * varasm.c (make_decl_rtl): Likewise.
2188         (assemble_start_function): Likewise.
2189         (output_constant): Likewise.
2190         (maybe_assemble_visibility): Likewise.
2191         * varpool.c (ctor_for_folding): Likewise.
2192         * chkp-builtins.def: Remove.
2193         * ipa-chkp.c: Remove.
2194         * ipa-chkp.h: Remove.
2195         * rtl-chkp.c: Remove.
2196         * rtl-chkp.h: Remove.
2197         * tree-chkp-opt.c: Remove.
2198         * tree-chkp.c: Remove.
2199         * tree-chkp.h: Remove.
2201 2018-06-07  Carl Love  <cel@us.ibm.com>
2203         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2204         vextract_fp_from_shortl): Add BE support.
2206 2018-06-07  Paul Koning  <ni1d@arrl.net>
2208         * compare-elim.c (try_merge_compare): Don't merge compare if
2209         address contains a side effect.
2210         (try_eliminate_compare): Likewise.
2212 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2214         * config.gcc: Support "tremont".
2215         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2216         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2217         PROCESSOR_TREMONT.
2218         * config/i386/i386.c (m_TREMONT): Define.
2219         (processor_target_table): Add "tremont".
2220         (PTA_TREMONT): Define.
2221         (ix86_lea_outperforms): Add TARGET_TREMONT.
2222         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2223         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2224         and M_INTEL_GOLDMONT_PLUS.
2225         (fold_builtin_cpu): Add "tremont".
2226         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2227         (ix86_option_override_internal): Add "tremont".
2228         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2229         (processor_type): Add PROCESSOR_TREMONT.
2230         * config/i386/x86-tune.def: Add m_TREMONT.
2231         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2233 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2235         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2236         symbol defined for msp430i* devices to be lower case.
2238         gcc/testsuite/gcc.target/msp430/
2239         * msp430i-device-symbol.c: New test.
2240         * msp430f-device-symbol.c: New test.
2241         * msp430.h: New test header file.
2243 2018-06-07  Richard Biener  <rguenther@suse.de>
2245         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2246         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2247         Properly wrap signed arithmetic if overflow wraps.
2249 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2251         PR tree-optimization/69615
2252         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2253         of a cast from a same precision integral SSA_NAME in a bb dominated
2254         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2255         cast to utype if rhs2 has already a compatible type.
2257 2018-06-07  Richard Biener  <rguenther@suse.de>
2259         PR tree-optimization/85935
2260         * graphite-scop-detection.c (find_params_in_bb): Analyze
2261         condition operands with respect to the correct loop.  Assert
2262         the analysis doesn't fail.
2264 2018-06-04  Carl Love  <cel@us.ibm.com>
2266         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2267         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2268         as it is slightly cheaper.
2269         (first_match_or_eos_index_<mode>):
2270         Calculate index using natural element order.
2271         (first_match_index_<mode>):
2272         Calculate index using natural element order.
2273         (first_match_or_eos_index_<mode>):
2274         Calculate index using natural order.
2275         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2276         for BE and LE modes.
2277         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2278         P9V_BUILTIN_VCLZLSBB_V16QI.
2279         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2280         specific.
2282 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2284         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2285         indentation and line wrap for many prototypes.  Add missing
2286         @smallexample directives around block of prototypes for vec_xl and
2287         vec_xst.
2289 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2291         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2292         track if we pass or return IEEE 128-bit floating point.
2293         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2294         C++ mangling that is compatible with GCC 8.1.
2295         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2296         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2297         floating point types.
2298         (rs6000_function_arg_advance_1): Likewise.
2299         (rs6000_mangle_type): Optionally generate mangled names that match
2300         what GCC 8.1 generated for IEEE 128-bit floating point types.
2301         (rs6000_globalize_decl_name): If we have an external function that
2302         passes or returns IEEE 128-bit types, generate a weak reference
2303         from the mangled name used in GCC 8.1 to the current mangled
2304         name.
2305         (rs6000_init_builtins): Make __ibm128 use the long double type if
2306         long double is IBM extended double.  Make __float128 use the long
2307         double type if long double is IEEE 128-bit.
2309         PR target/85657
2310         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2311         macro for __ibm128 built-in functions.
2312         (PACK_IF): Add __ibm128 pack/unpack functions.
2313         (UNPACK_IF): Likewise.
2314         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2315         enable long double built-in functions if long double is IEEE
2316         128-bit floating point.
2317         (rs6000_invalid_builtin): Update long double built-in function
2318         error message.
2319         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2320         functions, adjust the built-in function to use the long double
2321         built-in function if __ibm128 and long double are the same type.
2322         * doc/extend.texi (PowerPC builtins): Update documention for
2323         __builtin_{,un}pack_longdouble.  Add documentation for
2324         __builtin_{,un}pack_ibm128.
2326 2018-06-06  Jim Wilson  <jimw@sifive.com>
2328         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2329         (struct machine_function): New field interrupt_mode.
2330         (riscv_handle_type_attribute): New function.  Add forward declaration.
2331         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2332         (riscv_expand_epilogue): Check interrupt_mode field.
2333         (riscv_set_current_function): Check interrupt attribute args and
2334         set interrupt_mode field.
2335         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2336         (riscv_sret, riscv_uret): New.
2337         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2338         new arguments to interrupt attribute.
2340 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2342         PR target/63177
2343         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2344         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2346 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2348         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2349         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2350         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2351         several redundant entries.
2353 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2355         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2356         type from "rtx" to "rtx_insn *".
2357         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2358         for local "call_insn", removing cast.
2359         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2361 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2363         PR tree-optimization/86066
2364         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2365         for BIT_INSERT_EXPR stores.
2367 2018-06-06  Richard Biener  <rguenther@suse.de>
2369         PR tree-optimization/86062
2370         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2371         component refs ontop
2372         of to be offsetted base.
2374 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2376         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2377         to be static and remove check on interrupt attribute name.
2379         gcc/testsuite/gcc.target/msp430/
2380         * function-attributes-4.c: New test.
2381         * static-interrupts.c: New test.
2383 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2385         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2386         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2388 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2390         PR target/79924
2391         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2392         second argument.
2393         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2394         Remove second argument, change how error is called.
2395         (aarch64_layout_arg): Remove second argument from
2396         aarch64_err_no_fpadvsimd call.
2397         (aarch64_init_cumulative_args): Ditto.
2398         (aarch64_gimplify_va_arg_expr): Ditto.
2399         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2401 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2403         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2404         (*simple_return_indirect_internal<mode>): Rename from
2405         simple_return_indirect_internal.  Use W mode iterator.
2406         (rstorssp): New expander.
2407         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2408         (clrssbsy): New expander.
2409         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2411 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2413         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2414         __typeof__.
2415         (cmse_check_pointed_object): Likewise.
2417 2018-06-05  Martin Liska  <mliska@suse.cz>
2419         PR gcov-profile/47618
2420         * doc/invoke.texi: Document how -fprofile-dir format
2421         is extended.
2423 2018-06-05  Richard Biener  <rguenther@suse.de>
2425         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2426         removal pretend DOM info isn't available so we do not update
2427         it and only remove edges, not dominated blocks.  Actually free
2428         DOM info in case we removed something.  Remove unreachable blocks.
2429         (mfb_keep_latches): Work with either DOM info or marked backedges.
2430         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2431         first.  Mark backedges if DOM info isn't available.
2432         (Re-)compute DOM info after cleanup_control_flow_pre.
2434 2018-06-05  Richard Biener  <rguenther@suse.de>
2436         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2437         (locus_discrim_hasher::hash): Adjust.
2438         (locus_discrim_hasher::equal): Likewise.
2439         (next_discriminator_for_locus): Work on line directly.
2440         (same_line_p): Pass in expanded locus1 as well.
2441         (assign_discriminators): Avoid redundant location expansions.
2443 2018-06-05  Richard Biener  <rguenther@suse.de>
2445         PR tree-optimization/86046
2446         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2447         if required after clearing TREE_ADDRESSABLE.
2449 2018-06-05  Richard Biener  <rguenther@suse.de>
2451         PR tree-optimization/86047
2452         * tree-ssa-loop.c (for_each_index): Glob handling of all
2453         decls and constants and really handle all of them.
2455 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2457         PR target/81497
2458         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2459         qualifier_void_pointer and qualifier_const_void_pointer.
2460         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2461         (arm_init_builtins): Handle the above.
2462         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2463         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2464         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2465         void intrinsics.
2467 2018-06-05  Martin Liska  <mliska@suse.cz>
2469         * auto-profile.c (read_autofdo_file): Do not use
2470         gcov_ctr_summary struct.
2471         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2472         * coverage.c (struct counts_entry): Likewise.
2473         (read_counts_file): Read just single summary entry.
2474         (get_coverage_counts): Use gcov_summary struct.
2475         * coverage.h (get_coverage_counts): Likewise.
2476         * gcov-dump.c (dump_working_sets): Likewise.
2477         (tag_summary): Dump just single summary.
2478         * gcov-io.c (gcov_write_summary): Write just histogram
2479         summary.
2480         (gcov_read_summary): Read just single summary.
2481         (compute_working_sets): Use gcov_summary struct.
2482         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2483         of GCOV_COUNTERS_SUMMABLE.
2484         (GCOV_COUNTERS_SUMMABLE): Remove.
2485         (GCOV_FIRST_VALUE_COUNTER): Replace with
2486         GCOV_COUNTER_V_INTERVAL.
2487         (struct gcov_ctr_summary): Remove.
2488         (struct gcov_summary): Directly use fields of former
2489         gcov_ctr_summary.
2490         (compute_working_sets): Use gcov_summary struct.
2491         * gcov.c (read_count_file): Do not use ctrs fields.
2492         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2493         struct.
2494         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2495         struct.
2496         * profile.c: Likewise.
2497         * profile.h: Likewise.
2499 2018-06-05  Martin Liska  <mliska@suse.cz>
2501         PR gcov-profile/84846
2502         * gcov.c (output_lines): Print working directory only
2503         in intermediate format.
2505 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
2507         * config/s390/s390-builtin-types.def: Add void function type.
2508         * config/s390/s390-builtins.def: Use the function type for the
2509         tbeginc builtin.
2511 2018-06-04  Jim Wilson  <jimw@sifive.com>
2513         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2514         to int.
2515         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
2516         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
2517         handle EH_RETURN_DATA_REGNO registers properly.
2518         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2519         (riscv_expand_epilogue): Update comment.  Change argument name and
2520         type.  Update code to use new name and type.  Pass new args to
2521         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
2522         EXCEPTION_RETURN.
2523         * config/riscv/riscv.md (NORMAL_RETURN): New.
2524         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2525         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2526         (eh_return): Call gen_eh_return_internal and emit barrier.
2527         (eh_return_internal): Call riscv_expand_epilogue.
2529 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
2531         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2532         bit_insertion field and declare can_be_merged_into method.
2533         (merged_store_group::can_be_merged_into): New method.
2534         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2535         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
2536         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2538 2018-06-04  Richard Biener  <rguenther@suse.de>
2540         PR tree-optimization/85955
2541         * builtins.c (fold_builtin_sincos): Convert pointers to
2542         destination to appropriate type before dereferencing.
2544 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
2546         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2548 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
2550         * expr.c (expand_expr_real_1): Force the operand into memory if
2551         its TYPE_MODE is BLKmode and if there is no integer mode for
2552         the number of bits being extracted.
2554 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2556         PR target/85832
2557         PR target/86036
2558         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2559         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2561 2018-06-04  Richard Biener  <rguenther@suse.de>
2563         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2564         (cleanup_tree_cfg_noloop): ... single caller.  Do
2565         start_recording_case_labels later.
2567 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
2569         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2570         to _IMMINTRIN_H_INCLUDED.
2571         * config/i386/pconfigintrin.h: Ditto.
2572         * config/i386/waitpkgintrin.h: Ditto.
2573         * config/i386/immintrin.h: Add includes for sgxintrin.h,
2574         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2575         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2576         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2577         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2578         waitpkgintrin.h and cldemoteintrin.h.
2580 2018-06-04  Richard Biener  <rguenther@suse.de>
2582         PR tree-optimization/86038
2583         * tracer.c (find_best_successor): Check probability for
2584         being initialized, bail out if not.
2586 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
2588         PR target/86003
2589         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2590         of bits to ignore when comparing architectures.
2592 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2594         PR tree-optimization/69615
2595         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2596         maximum or minimum of the type, try to merge it also as if
2597         range1 is + [-, x - 1] or + [x + 1, -].
2599         PR c++/86025
2600         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2602 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2604         PR tree-optimization/86034
2605         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2606         the unsigned bitfield type in a bit insertion sequence if it does not
2607         have a larger precision than the bitfield size.
2608         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2610 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
2612         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2614 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2616         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2617         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2618         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2619         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2621 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2623         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2624         Disable -fdelete-null-pointer-checks for ELF toolchain.
2626 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2627             Kito Cheng  <kito.cheng@gmail.com>
2629         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2630         (nds32le-*-*, nds32be-*-*): Integrate checking process.
2631         (nds32*-*-*): Add glibc and uclibc conditions.
2632         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2633         (TARGET_EXCEPT_UNWIND_INFO): Define.
2634         * config/nds32/elf.h: New file.
2635         * config/nds32/linux.h: New file.
2636         * config/nds32/nds32-elf.opt: New file.
2637         * config/nds32/nds32-linux.opt: New file.
2638         * config/nds32/nds32-fp-as-gp.c
2639         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2640         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2641         TARGET_LINUX_ABI.
2642         (nds32_asm_file_end): Ditto.
2643         (nds32_print_operand): Ditto.
2644         (nds32_insert_attributes): Ditto.
2645         (nds32_init_libfuncs): New function.
2646         (TARGET_HAVE_TLS): Define.
2647         (TARGET_INIT_LIBFUNCS): Define.
2648         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2649         spec content.
2650         (TARGET_ELF): Apply different mcmodel setting.
2651         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2652         been migrated into elf.h and linux.h files.
2653         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2654         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2655         (mcmodel): The content has been migrated into nds32-elf.opt and
2656         nds32-linux.opt files.
2657         * config/nds32/t-elf: New file.
2658         * config/nds32/t-linux: New file.
2660 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2661             Shiva Chen  <shiva0217@gmail.com>
2663         * config/nds32/constants.md (unspec_volatile_element): Add
2664         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2665         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2666         optimization.
2667         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2668         (make_pass_nds32_fp_as_gp): Declare.
2669         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2670         optmization pass.
2671         (nds32_asm_function_end_prologue): Remove unused asm output.
2672         (nds32_asm_function_begin_epilogue): Remove unused asm output.
2673         (nds32_asm_file_start): Output necessary fp_as_gp information.
2674         (nds32_option_override): Adjust register usage.
2675         (nds32_expand_prologue): Consider fp_as_gp situation.
2676         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2677         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2678         (epilogue): Ditto.
2679         (return): Ditto.
2680         (simple_return): Ditto.
2681         (omit_fp_begin): Output special directive for fp_as_gp.
2682         (omit_fp_end): Output special directive for fp_as_gp.
2683         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2684         mforbid-fp-as-gp): New options.
2686 2018-06-01  Mark Wielaard  <mark@klomp.org>
2688         * dwarf2out.c (dwarf2out_finish): Remove generation of
2689         DW_AT_loclists_base.
2691 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2693         * gimple-ssa-store-merging.c: Include gimple-fold.h.
2694         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2695         (struct merged_store_group): Add bit_insertion field.
2696         (dump_char_array): Use standard hexadecimal format.
2697         (merged_store_group::merged_store_group): Set bit_insertion to false.
2698         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
2699         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
2700         also print the mask in the dump file.
2701         (pass_store_merging::gate): Minor tweak.
2702         (imm_store_chain_info::coalesce_immediate): Fix wrong association
2703         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
2704         stores with INTEGER_CST stores.
2705         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2706         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2707         and use it throughout.  Generate bit insertion sequences if need be.
2708         (pass_store_merging::process_store): Remove redundant condition.
2709         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2711 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
2713         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2714         the 128-bit floating point types.  Fix function comment.
2716 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2718         * config/aarch64/aarch64-simd.md
2719         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2720         mnemonics.
2721         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2722         mnemonics.
2724 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2726         PR tree-optimization/85989
2727         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2728         variable.
2729         (backprop::intersect_uses): Check it when deciding whether this
2730         is a backedge reference.
2731         (backprop::process_block): Add each phi to m_visited_phis
2732         after visiting it, then clear it at the end.
2734 2018-06-01  Richard Biener  <rguenther@suse.de>
2736         * tree-vectorizer.h (vect_dr_stmt): New function.
2737         (vect_get_load_cost): Adjust.
2738         (vect_get_store_cost): Likewise.
2739         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2740         Use vect_dr_stmt instead of DR_SMTT.
2741         (vect_record_base_alignments): Likewise.
2742         (vect_calculate_target_alignment): Likewise.
2743         (vect_compute_data_ref_alignment): Likewise and make static.
2744         (vect_update_misalignment_for_peel): Likewise.
2745         (vect_verify_datarefs_alignment): Likewise.
2746         (vector_alignment_reachable_p): Likewise.
2747         (vect_get_data_access_cost): Likewise.  Pass down
2748         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2749         (vect_get_peeling_costs_all_drs): Likewise.
2750         (vect_peeling_hash_get_lowest_cost): Likewise.
2751         (vect_enhance_data_refs_alignment): Likewise.
2752         (vect_find_same_alignment_drs): Likewise.
2753         (vect_analyze_data_refs_alignment): Likewise.
2754         (vect_analyze_group_access_1): Likewise.
2755         (vect_analyze_group_access): Likewise.
2756         (vect_analyze_data_ref_access): Likewise.
2757         (vect_analyze_data_ref_accesses): Likewise.
2758         (vect_vfa_segment_size): Likewise.
2759         (vect_small_gap_p): Likewise.
2760         (vectorizable_with_step_bound_p): Likewise.
2761         (vect_prune_runtime_alias_test_list): Likewise.
2762         (vect_analyze_data_refs): Likewise.
2763         (vect_supportable_dr_alignment): Likewise.
2764         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2765         (vect_gen_prolog_loop_niters): Likewise.
2766         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2767         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2768         modify DR_STMT.
2769         (vect_recog_mask_conversion_pattern): Likewise.
2770         (vect_try_gather_scatter_pattern): Likewise.
2771         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2772         to vect_get_store_cost.
2773         (vect_get_store_cost): Get stmt_info instead of DR.
2774         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2775         (vect_get_load_cost): Get stmt_info instead of DR.
2777 2018-06-01  Richard Biener  <rguenther@suse.de>
2779         PR middle-end/86017
2780         * gimple-fold.c (var_decl_component_p): Also allow offsetted
2781         vars wrapped in MEM_REFs.
2783 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2785         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2786         Fix subreg tests so that we only return a choice between
2787         GENERAL_REGS and FP_REGS if the original classes included both.
2789 2018-06-01  Richard Biener  <rguenther@suse.de>
2791         PR ipa/85960
2792         * tree-ssa-structalias.c (get_function_part_constraint):
2793         Handle NULL fi->decl.
2794         (find_func_aliases_for_call): Properly handle indirect
2795         fi from direct call.
2796         (find_func_clobbers): Likewise.
2797         (ipa_pta_execute): Likewise.
2798         (create_variable_info_for): For functions that are ifunc_resolver
2799         resolve to a varinfo that contains the result of the resolver call.
2800         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2801         aliases.
2803 2018-05-31  Michael Collison  <michael.collison@arm.com>
2805         * config/aarch64/aarch64.md:
2806         (*fix_to_zero_extenddfdi2): New pattern.
2807         * gcc.target/aarch64/fix_extend1.c: New testcase.
2809 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
2811         PR middle-end/78809
2812         PR middle-end/83026
2813         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2814         and BUILT_IN_STRNCMP_EQ.
2815         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2816         BUILT_IN_STRNCMP_EQ.
2817         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2818         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2819         (gimple_fold_builtin): Likewise.
2820         * tree-ssa-strlen.c (compute_string_length): New function.
2821         (determine_min_obsize): New function.
2822         (handle_builtin_string_cmp): New function to handle calls to
2823         string compare functions.
2824         (strlen_optimize_stmt): Add handling to builtin string compare
2825         calls.
2826         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2827         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2828         * tree.c (build_common_builtin_nodes): Add new defines of
2829         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2831 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
2833         PR target/85984
2834         * bb-reorder.c (pass_partition_blocks::gate): Return false for
2835         functions with naked attribute.
2837 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
2839         * config/i386/sse.md (avx_vec_concat<mode>):
2840         Substitute concat_tg_mode mode attribute with xtg_mode.
2841         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2842         (concat_tg_mode): Remove mode attribute.
2844 2018-05-31  Martin Sebor  <msebor@redhat.com>
2846         PR c/82063
2847         * calls.c (alloc_max_size): Correct a logic error/typo.
2848         Treat excessive arguments as infinite.  Warn for invalid arguments.
2849         * doc/invoke.texi (-Walloc-size-larger-than): Update.
2851 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
2853         PR target/85829
2854         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2855         and movx for Haswell.
2857 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
2858             Cesar Philippidis  <cesar@codesourcery.com>
2860         PR middle-end/85879
2861         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2862         when emitting error on private/firstprivate reductions.
2863         * omp-low.c (lower_omp_target): Avoid reference-type processing
2864         on pointers for firstprivate clause.
2866 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2868         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2869         (st1x2): Likewise.
2870         (st1x3): Likewise.
2871         * config/aarch64/aarch64-simd.md
2872         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2873         (aarch64_ld1_x3_<mode>): Likewise
2874         (aarch64_st1x2<VALLDIF:mode>): Likewise
2875         (aarch64_st1_x2_<mode>): Likewise
2876         (aarch64_st1x3<VALLDIF:mode>): Likewise
2877         (aarch64_st1_x3_<mode>): Likewise
2878         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2879         (vld1_s8_x3): Likewise.
2880         (vld1_u16_x3): Likewise.
2881         (vld1_s16_x3): Likewise.
2882         (vld1_u32_x3): Likewise.
2883         (vld1_s32_x3): Likewise.
2884         (vld1_u64_x3): Likewise.
2885         (vld1_s64_x3): Likewise.
2886         (vld1_f16_x3): Likewise.
2887         (vld1_f32_x3): Likewise.
2888         (vld1_f64_x3): Likewise.
2889         (vld1_p8_x3): Likewise.
2890         (vld1_p16_x3): Likewise.
2891         (vld1_p64_x3): Likewise.
2892         (vld1q_u8_x3): Likewise.
2893         (vld1q_s8_x3): Likewise.
2894         (vld1q_u16_x3): Likewise.
2895         (vld1q_s16_x3): Likewise.
2896         (vld1q_u32_x3): Likewise.
2897         (vld1q_s32_x3): Likewise.
2898         (vld1q_u64_x3): Likewise.
2899         (vld1q_s64_x3): Likewise.
2900         (vld1q_f16_x3): Likewise.
2901         (vld1q_f32_x3): Likewise.
2902         (vld1q_f64_x3): Likewise.
2903         (vld1q_p8_x3): Likewise.
2904         (vld1q_p16_x3): Likewise.
2905         (vld1q_p64_x3): Likewise.
2906         (vst1_s64_x2): Likewise.
2907         (vst1_u64_x2): Likewise.
2908         (vst1_f64_x2): Likewise.
2909         (vst1_s8_x2): Likewise.
2910         (vst1_p8_x2): Likewise.
2911         (vst1_s16_x2): Likewise.
2912         (vst1_p16_x2): Likewise.
2913         (vst1_s32_x2): Likewise.
2914         (vst1_u8_x2): Likewise.
2915         (vst1_u16_x2): Likewise.
2916         (vst1_u32_x2): Likewise.
2917         (vst1_f16_x2): Likewise.
2918         (vst1_f32_x2): Likewise.
2919         (vst1_p64_x2): Likewise.
2920         (vst1q_s8_x2): Likewise.
2921         (vst1q_p8_x2): Likewise.
2922         (vst1q_s16_x2): Likewise.
2923         (vst1q_p16_x2): Likewise.
2924         (vst1q_s32_x2): Likewise.
2925         (vst1q_s64_x2): Likewise.
2926         (vst1q_u8_x2): Likewise.
2927         (vst1q_u16_x2): Likewise.
2928         (vst1q_u32_x2): Likewise.
2929         (vst1q_u64_x2): Likewise.
2930         (vst1q_f16_x2): Likewise.
2931         (vst1q_f32_x2): Likewise.
2932         (vst1q_f64_x2): Likewise.
2933         (vst1q_p64_x2): Likewise.
2934         (vst1_s64_x3): Likewise.
2935         (vst1_u64_x3): Likewise.
2936         (vst1_f64_x3): Likewise.
2937         (vst1_s8_x3): Likewise.
2938         (vst1_p8_x3): Likewise.
2939         (vst1_s16_x3): Likewise.
2940         (vst1_p16_x3): Likewise.
2941         (vst1_s32_x3): Likewise.
2942         (vst1_u8_x3): Likewise.
2943         (vst1_u16_x3): Likewise.
2944         (vst1_u32_x3): Likewise.
2945         (vst1_f16_x3): Likewise.
2946         (vst1_f32_x3): Likewise.
2947         (vst1_p64_x3): Likewise.
2948         (vst1q_s8_x3): Likewise.
2949         (vst1q_p8_x3): Likewise.
2950         (vst1q_s16_x3): Likewise.
2951         (vst1q_p16_x3): Likewise.
2952         (vst1q_s32_x3): Likewise.
2953         (vst1q_s64_x3): Likewise.
2954         (vst1q_u8_x3): Likewise.
2955         (vst1q_u16_x3): Likewise.
2956         (vst1q_u32_x3): Likewise.
2957         (vst1q_u64_x3): Likewise.
2958         (vst1q_f16_x3): Likewise.
2959         (vst1q_f32_x3): Likewise.
2960         (vst1q_f64_x3): Likewise.
2961         (vst1q_p64_x3): Likewise.
2963 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2965         * config/msp430/msp430.c (msp430_output_labelref): Prepend
2966         user_label_prefix to name.
2968         * tree-core.h: Update comment about the format of NAME string
2969         passed to handler in attribute_spec.
2971         * config/msp430/msp430.md: Remove erroneous subreg expression from
2972         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
2973         zero_extend{q,h}isi2.
2975 2018-05-30  Borislav Petkov  <bp@suse.de>
2977         * doc/extend.texi: Document some architecture specific
2978         constraints and sort entries.
2980 2018-05-30  Martin Sebor  <msebor@redhat.com>
2982         PR middle-end/85369
2983         * builtins.c (expand_builtin_stpcpy_1): New function.
2984         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
2985         only if the former succeeds.
2987 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2989         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
2990         in saphira.
2992 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2994         * doc/invoke.texi (-flinker-output): Document
2996 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2998         * passes.c (ipa_write_summaries): Only modify statements if body
2999         is in memory.
3000         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3001         incrementally linking.
3002         (ipa_passes): Likewise.
3003         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3004         pass down resolution info.
3005         * common.opt (flag_incremental_link): Update info.
3006         * gcc.c (plugin specs): Turn flinker-output=* to
3007         -plugin-opt=-linker-output-known
3008         * toplev.c (compile_file): Also cut compilation when doing incremental
3009         link.
3010         * flag-types. (enum lto_partition_model): Add
3011         LTO_LINKER_OUTPUT_NOLTOREL.
3012         (invoke.texi): Add -flinker-output docs.
3013         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3014         link same way as WPA; do not stream in dead initializers.
3016         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3017         darf2out_register_external_decl): Support incremental link.
3019 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3021         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3023 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3025         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3026         it down to simple_object_copy_lto_debug_sections.
3027         (run_gcc): Determine incremental LTO link time and configure
3028         lto1 into non-wpa mode, disable renaming of debug sections.
3030 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3032         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3033         descriptions of various incorrectly documented functions.
3035 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3037         Revert:
3038         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3039         address check not strict.
3041 2018-05-30  Richard Biener  <rguenther@suse.de>
3043         PR tree-optimization/85964
3044         * tracer.c (better_p): Drop initialized count check, we only
3045         call the function with initialized counts now.
3046         (find_best_successor): Do find a best edge if one
3047         has uninitialized count.
3048         (find_best_predecessor): Likewise.  Do BB frequency check only
3049         if count is initialized.
3051 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3053         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3054         (aarch64_ldrstr_offset_compare): New.
3055         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3056         load/store orderings.
3057         (aarch64_gen_adjusted_ldpstp): Likewise.
3059 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3061         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3062         Check for subset of GENERAL_REGS and FP_REGS.
3063         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3064         r=w alternative.
3066 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3068         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3069         and wi::to_poly_offset.  Add the current offset and then check
3070         whether the sum fits, rather than using an unchecked addition of
3071         a checked term.  Check for a shwi rather than a uhwi.
3072         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3073         (store_constructor): Use poly_int_tree_p.
3074         (expand_expr_real_1): Likewise.
3075         * function.c (assign_temp): Likewise.
3076         * fold-const.c (const_binop): Use poly_int_tree_p and
3077         wi::to_poly_offset.
3078         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3079         division.
3080         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3081         to_poly_offset for MEM offsets.
3082         * ipa-icf.c (sem_variable::equals): Likewise.
3083         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3084         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3085         wi::to_poly_offset for BIT_FIELD_REF offsets.
3086         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3087         wi::to_poly_offset.
3088         * var-tracking.c (emit_note_insn_var_location): Use
3089         tree_to_poly_uint64.
3091 2018-05-29  Jim Wilson  <jimw@sifive.com>
3093         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3095 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3097         PR target/85950
3098         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3099         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3100         sequence.
3101         (sse4_1_round<mode>2): Use nonimmediate_operand
3102         for operand 1 predicate.
3104 2018-05-29  Martin Sebor  <msebor@redhat.com>
3105             Richard Biener  <rguenther@suse.de>
3107         PR testsuite/85888
3108         * calls.c (get_size_range): Call determine_value_range instead
3109         of get_value_range..
3110         * tree-vrp.h (determine_value_range): Declared new function.
3111         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3113 2018-05-29  Richard Biener  <rguenther@suse.de>
3115         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3116         sure to use non-pattern stmts for get_earlier_stmt arguments.
3117         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3118         called on pattern stmts.
3119         (get_later_stmt): Likewise.
3121 2018-05-29  Martin Liska  <mliska@suse.cz>
3123         PR gcov-profile/85759
3124         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3125         env variables.
3127 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3129         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3130         VEC_UNPACK_*_EXPR.
3131         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3132         VEC_PACK_*_EXPR.
3134         PR target/85918
3135         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3136         VEC_PACK_FLOAT_EXPR): New tree codes.
3137         * tree-pretty-print.c (op_code_prio): Handle
3138         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3139         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3140         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3141         * tree-inline.c (estimate_operator_cost): Likewise.
3142         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3143         * fold-const.c (const_binop): Likewise.
3144         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3145         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3146         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3147         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3148         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3149         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3150         * expr.c (expand_expr_real_2): Likewise.
3151         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3152         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3153         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3154         optabs.
3155         * optabs.c (expand_widen_pattern_expr): For
3156         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3157         sign from result type rather than operand's type.
3158         (expand_binop_directly): For vec_packu_float_optab and
3159         vec_packs_float_optab allow result type to be different from operand's
3160         type.
3161         * optabs-tree.c (optab_for_tree_code): Handle
3162         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3163         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3164         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3165         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3166         VEC_PACK_FLOAT_EXPR.
3167         * tree-vect-stmts.c (supportable_widening_operation): Handle
3168         FIX_TRUNC_EXPR.
3169         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3170         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3171         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3172         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3173         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3174         mode attributes.
3175         (vec_pack<floatprefix>_float_<mode>): New expander.
3176         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3177         attributes.
3178         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3179         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3180         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3181         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3182         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3183         Document.
3184         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3185         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3186         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3187         VEC_PACK_FLOAT_EXPR): Document.
3189 2018-05-29  Richard Biener  <rguenther@suse.de>
3191         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3192         member.
3193         (stmt_vec_info_vec): Make pointer.
3194         (init_stmt_vec_info_vec): Remove.
3195         (free_stmt_vec_info_vec): Likewise.
3196         (set_stmt_vec_info_vec): New function.
3197         (free_stmt_vec_infos): Likewise.
3198         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3199         (set_vinfo_for_stmt): Likewise.
3200         (get_earlier_stmt): Likewise.
3201         (get_later_stmt): Likewise.
3202         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3203         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3204         (vec_info::~vec_info): Free stmt_vec_infos.
3205         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3206         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3207         (pass_slp_vectorize::execute): Likewise.
3208         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3209         (free_stmt_vec_info_vec): Likewise.
3210         (set_stmt_vec_info_vec): New function.
3211         (free_stmt_vec_infos): Likewise.
3212         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3213         the global stmt_vec_info_vec.
3214         * tree-parloops.c (gather_scalar_reductions): Use
3215         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3216         vector.
3218 2018-05-29  Richard Biener  <rguenther@suse.de>
3220         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3222 2018-05-29  Martin Liska  <mliska@suse.cz>
3223             David Malcolm  <dmalcolm@redhat.com>
3225         * vec.c (test_reverse): New.
3226         (vec_c_tests): Add new test.
3227         * vec.h (vl_ptr>::reverse): New function.
3229 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3231         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3233         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3234         and later.
3236 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3238         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3240 2018-05-28  Richard Biener  <rguenther@suse.de>
3242         PR tree-optimization/85933
3243         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3244         look at stmts marked as vectorizable.
3246 2018-05-28  Richard Biener  <rguenther@suse.de>
3248         PR tree-optimization/85934
3249         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3250         vector boolean check before scalar optimization.
3252 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3254         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3255         for armv5te.
3257 2018-05-28  Mark Wielaard  <mark@klomp.org>
3259         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3260         if it is an expression containing a minus sign.
3262 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3264         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3266 2018-05-27  Paul Koning  <ni1d@arrl.net>
3268         * config/pdp11/pdp11.md (truncsihi2): Remove.
3270 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3271             Chung-Ju Wu  <jasonwucj@gmail.com>
3273         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3274         implementation.
3275         (unaligned_store_dw): Ditto.
3276         * config/nds32/nds32-memory-manipulation.c
3277         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3278         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3279         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3280         (emit_setmem_word_loop): Rename to ...
3281         (emit_setmem_doubleword_loop): ... this.
3282         (nds32_gen_dup_4_byte_to_word_value): New function.
3283         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3284         (nds32_expand_setmem_loop): Refine implementation.
3285         (nds32_expand_setmem_loop_v3m): Ditto.
3286         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3287         pattern.
3289 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3291         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3293 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3295         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3296         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3297         machine->attr_no_prologue_p.
3298         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3299         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3300         (nds32_expand_epilogue): Consider attr_naked_p.
3301         (nds32_expand_epilogue_v3pop): Likewise.
3302         (nds32_can_use_return_insn): Likewise.
3303         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3304         attr_no_prologue_p fields.
3305         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3307 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3309         PR target/85918
3310         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3311         attributes.
3312         * config/i386/sse.md
3313         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3314         Rename to ...
3315         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3316         ... this.
3317         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3318         Rename to ...
3319         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3320         ... this.
3321         (*<floatsuffix>floatv2div2sf2): Rename to ...
3322         (*float<floatunssuffix>v2div2sf2): ... this.
3323         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3324         (float<floatunssuffix>v2div2sf2_mask): ... this.
3325         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3326         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3327         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3328         to ...
3329         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3330         ... this.
3331         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3332         Rename to ...
3333         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3334         ... this.
3335         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3336         Rename to ...
3337         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3338         ... this.
3339         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3340         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3341         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3342         gen_ufix_truncv8dfv8si2.
3343         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3344         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3345         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3346         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3347         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3348         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3349         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3350         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3352 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3354         PR target/85900
3355         PR target/85345
3356         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3358 2018-05-25  Jim Wilson  <jimw@sifive.com>
3360         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3361         * config/riscv/riscv.c (struct machine_function): Add
3362         interrupt_handler_p and attribute_checked_p fields.
3363         (riscv_attribute_table): Add interrupt.
3364         (riscv_interrupt_type_p): New.
3365         (riscv_save_reg_p): Save extra regs for interrupt handler.
3366         (riscv_use_save_libcall): Return false  for interrupt handler.
3367         (riscv_first_stack_step): Add forward declaration.
3368         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3369         for interrupt handler with large frame.  Use it for saved reg list.
3370         (riscv_expand_prologue): Move flag_stack_usage_info support to
3371         eliminate duplication.
3372         (riscv_expand_epilogue): Generate mret for interrupt handler.
3373         (riscv_epilogue_uses): New.
3374         (riscv_can_use_return_insn): Return false for interrupt handler.
3375         (riscv_function_ok_for_sibcall): Likewise.
3376         (riscv_set_current_function): Add interrupt handler support.
3377         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3378         * config/riscv/riscv.md (UNSPECV_MRET): New.
3379         (GP_REGNUM): New.
3380         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3381         (riscv_mret): New.
3382         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3384 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3386         PR tree-optimization/85712
3387         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3388         this candidate has already been replaced in-situ by a copy.
3390 2018-05-25  Jason Merrill  <jason@redhat.com>
3392         PR c++/80485 - inline function non-zero address.
3393         * symtab.c (nonzero_address): Check DECL_COMDAT.
3395 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3397         PR target/83628
3398         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3399         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3400         extension of SImode operation.  Use const123_operand predicate.
3401         (*saddsi_1): Remove.
3402         (*saddl_se_1): Ditto.
3403         (*ssubsi_1): Ditto.
3404         (*ssubl_se_1): Ditto.
3405         * config/alpha/predicates.md (const123_operand): New predicate.
3406         * config/alpha/constraints.md (P): Use IN_RANGE.
3408 2018-05-25  Richard Biener  <rguenther@suse.de>
3410         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3411         defaulted to true.
3412         (ref_maybe_used_by_stmt_p): Likewise.
3413         (stmt_may_clobber_ref_p): Likewise.
3414         (stmt_may_clobber_ref_p_1): Likewise.
3415         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3416         and pass it along.
3417         (ref_maybe_used_by_stmt_p): Likewise.
3418         (stmt_may_clobber_ref_p): Likewise.
3419         (stmt_may_clobber_ref_p_1): Likewise.
3420         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3421         the alias oracle to disambiguate DRs with stmts DR analysis
3422         couldn't handle.
3423         (vect_analyze_data_refs): Do not give up on not analyzable
3424         DRs for BB vectorization.  Remove code truncating the dataref
3425         vector.
3427 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3429         PR target/85832
3430         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3431         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3432         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3434 2018-05-25  Richard Biener  <rguenther@suse.de>
3436         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3437         function, combining stmt data ref gathering and fatal analysis
3438         parts.
3439         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3440         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3441         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3442         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3443         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3445 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3447         PR tree-optimization/85720
3448         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3449         SCC if all partitions are builtins.
3450         (version_loop_by_alias_check): New parameter.  Generate cancelable
3451         runtime alias check if all partitions are builtins.
3452         (distribute_loop): Update call to above function.
3454 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3456         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3457         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3458         (parm_default_def_partition_arg): Ditto.
3459         (set_parm_default_def_partition): Ditto.
3460         (get_parm_default_def_partitions): Ditto and make it static.
3461         (get_undefined_value_partitions): Ditto and make it static.
3462         (remove_ssa_form): Refactor call to init_var_map here.
3463         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3464         computation for loop region.
3465         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3466         (register_default_def): Delete.
3467         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3468         (parm_default_def_partition_arg): Ditto.
3469         (set_parm_default_def_partition): Ditto.
3470         (get_parm_default_def_partitions): Ditto and make it static.
3471         (get_undefined_value_partitions): Ditto and make it static.
3472         (coalesce_with_default, coalesce_with_default): Update comment.
3473         (create_coalesce_list_for_region): New func factored out from
3474         create_outofssa_var_map.
3475         (populate_coalesce_list_for_outofssa): New func factored out from
3476         create_outofssa_var_map and coalesce_ssa_name.
3477         (create_outofssa_var_map): Delete.
3478         (coalesce_ssa_name): Refactor to support live range computation.
3479         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3480         (get_parm_default_def_partitions): Delete.
3481         (get_undefined_value_partitions): Ditto.
3482         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3483         computation for loop region.
3484         (new_tree_live_info, loe_visit_block): Ditto.
3485         (live_worklist, set_var_live_on_entry): Ditto.
3486         (calculate_live_on_exit, verify_live_on_entry): Ditto.
3487         * tree-ssa-live.h (struct _var_map): New fields.
3488         (init_var_map): Change decl.
3489         (region_contains_p): New.
3491 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3493         * tree-ssa-live.h (live_merge_and_clear): Delete.
3495 2018-05-25  Richard Biener  <rguenther@suse.de>
3497         PR c++/85912
3498         * tree-dump.c (dequeue_and_dump): Remove access to removed
3499         operand 2 of a SWITCH_EXPR.
3501 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3503         * doc/sourcebuild.texi (vect_double_cond_arith): Include
3504         multiplication and division.
3505         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3506         (cond_udiv@var{m}, cond_umod@var{m}): Document.
3507         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3508         (cond_udiv_optab, cond_umod_optab): New optabs.
3509         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3510         (IFN_COND_RDIV): New internal functions.
3511         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3512         TRUNC_MOD_EXPR and RDIV_EXPR.
3513         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3514         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3515         New unspecs.
3516         (SVE_INT_BINARY): Include mult.
3517         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3518         (optab, sve_int_op): Handle mult.
3519         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3520         UNSPEC_COND_DIV.
3521         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3522         for SVE_INT_BINARY_SD.
3524 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3526         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3527         (optab, sve_int_op): Handle div and udiv.
3528         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3529         for SVE_INT_BINARY_SD.
3530         (*<optab><mode>3): New insn for the same.
3532 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3534         * tree-vect-patterns.c: Include predict.h.
3535         (vect_recog_divmod_pattern): Restrict check for division support
3536         to when optimizing for size.
3538 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3540         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3541         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3542         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3543         (gimple_match_op::set_op): Likewise.
3544         (gimple_resimplify4): Declare.
3545         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3546         (expr::gen_transform): Likewise.
3547         (decision_tree::gen): Generate a simplification routine for 4 operands.
3548         * gimple-match-head.c (gimple_simplify): Add an overload for
3549         4 operands.  In the top-level function, handle up to 4 call
3550         arguments and call gimple_resimplify4.
3551         (gimple_resimplify4): New function.
3552         (build_call_internal): Pass a fourth operand.
3553         (maybe_push_to_seq): Likewise.
3554         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3555         Fold VEC_COND_EXPRs of an operation and a default value into
3556         an IFN_COND_* function if possible.
3557         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3558         New unspecs.
3559         (SVE_COND_FP_BINARY): Include them.
3560         (optab, sve_fp_op): Handle them.
3561         (SVE_INT_BINARY_REV): New code iterator.
3562         (SVE_COND_FP_BINARY_REV): New int iterator.
3563         (commutative): New int attribute.
3564         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3565         Declare.
3566         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3567         function.
3568         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3569         (*cond_<optab><mode>): New patterns for reversed operands.
3571 2018-05-25  Richard Biener  <rguenther@suse.de>
3573         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3574         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3575         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3576         (STMT_VINFO_GROUPED_ACCESS): Adjust.
3577         * tree-vect-data-refs.c (everywhere): Adjust users.
3578         * tree-vect-loop.c (everywhere): Likewise.
3579         * tree-vect-slp.c (everywhere): Likewise.
3580         * tree-vect-stmts.c (everywhere): Likewise.
3581         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3583 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3585         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3586         Rename to...
3587         (gcc_cv_as_section_exclude): ... this.
3588         Try Solaris as #exclude syntax.
3589         * configure: Regenerate.
3590         * config.in: Regenerate.
3591         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3592         SECTION_EXCLUDE.
3593         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3594         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3596         * varasm.c (default_elf_asm_named_section): Don't check if
3597         HAVE_GAS_SECTION_EXCLUDE is defined.
3599 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3601         * doc/md.texi: Update the documentation of the cond_* optabs
3602         to mention the new final operand.  Fix GET_MODE_NUNITS call.
3603         Describe the scalar case too.
3604         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3605         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3606         instead of 2.
3607         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3608         (get_conditional_internal_fn): Update comment.
3609         * tree-vect-loop.c (vectorizable_reduction): Pass the original
3610         accumulator value as a final argument to conditional functions.
3611         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3612         a define_expand and add an "else" operand.  Assert for now that
3613         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
3614         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3615         (*cond_<optab><mode>): New patterns.
3616         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3617         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3618         (UNSPEC_COND_EOR): Delete.
3619         (optab): Remove associated mappings.
3620         (SVE_INT_BINARY): New code iterator.
3621         (sve_int_op): Remove int attribute and add "minus" to the code
3622         attribute.
3623         (SVE_COND_INT_OP): Delete.
3624         (SVE_COND_FP_OP): Rename to...
3625         (SVE_COND_FP_BINARY): ...this.
3627 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3629         * optabs.c (can_reuse_operands_p): New function.
3630         (maybe_legitimize_operands): Try to reuse the results for
3631         earlier operands.
3633 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3635         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3636         Add {q} suffix to insn mnemonic.
3638 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3640         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3641         (msp430_warn_func_return): New.
3643 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
3645         * fold-const.c (tree_nonzero_bits): New function.
3646         * fold-const.h (tree_nonzero_bits): Likewise.
3647         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3648         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3650 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3652         PR target/85900
3653         PR target/85345
3654         * varasm.c (assemble_alias): Check ifunc_resolver only on
3655         FUNCTION_DECL.
3657 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3659         PR target/85903
3660         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3661         when memory input operand is handled.
3663 2018-05-24  Luis Machado  <luis.machado@linaro.org>
3665         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3666         global.
3667         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3669 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3671         * match.pd: Delay FMA folds until after vectorization.
3673 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3675         PR target/83009
3676         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3677         address check not strict.
3679 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3681         * gimple-match.h (gimple_match_op): New class.
3682         (mprts_hook): Replace parameters with a gimple_match_op *.
3683         (maybe_build_generic_op): Likewise.
3684         (gimple_simplified_result_is_gimple_val): Replace parameters with
3685         a const gimple_match_op *.
3686         (gimple_simplify): Replace code_helper * and tree * parameters with
3687         a gimple_match_op * parameter.
3688         (gimple_resimplify1): Replace code_helper *, tree and tree *
3689         parameters with a gimple_match_op * parameter.
3690         (gimple_resimplify2): Likewise.
3691         (gimple_resimplify3): Likewise.
3692         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3693         parameters with a gimple_match_op * parameter.
3694         * gimple-match-head.c (gimple_simplify): Change prototypes of
3695         auto-generated functions to take a gimple_match_op * instead of
3696         separate code_helper * and tree * parameters.  Make the same
3697         change in the top-level overload and update calls to the
3698         gimple_resimplify routines.  Update calls to the auto-generated
3699         functions and to maybe_push_res_to_seq in the publicly-facing
3700         operation-specific gimple_simplify overloads.
3701         (gimple_match_op::MAX_NUM_OPS): Define.
3702         (gimple_resimplify1): Replace rcode and ops with a single res_op
3703         parameter.  Update call to gimple_simplify.
3704         (gimple_resimplify2): Likewise.
3705         (gimple_resimplify3): Likewise.
3706         (mprts_hook): Replace parameters with a gimple_match_op *.
3707         (maybe_build_generic_op): Likewise.
3708         (build_call_internal): Replace type, nargs and ops with
3709         a gimple_match_op *.
3710         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3711         with a single gimple_match_op *.  Update calls to mprts_hook,
3712         build_call_internal and gimple_simplified_result_is_gimple_val.
3713         Factor out code that is common to the tree_code and combined_fn cases.
3714         * genmatch.c (expr::gen_transform): Replace tem_code and
3715         tem_ops with a gimple_match_op called tem_op.  Update calls
3716         to the gimple_resimplify functions and maybe_push_res_to_seq.
3717         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3718         res_ops.  Update call to the gimple_resimplify functions.
3719         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3720         (decision_tree::gen): Make the functions take a gimple_match_op *
3721         called res_op instead of separate res_code and res_ops parameters.
3722         Update call accordingly.
3723         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3724         and ops with a single res_op parameter.  Update calls to
3725         maybe_build_generic_op and maybe_push_res_to_seq.
3726         (fold_stmt_1): Update calls to gimple_simplify and
3727         replace_stmt_with_simplification.
3728         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3729         and gimple_simplified_result_is_gimple_val.
3730         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3731         gimple_simplify.
3732         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3733         with a gimple_match_op *.
3734         (vn_nary_build_or_lookup): Likewise.  Update call to
3735         vn_nary_build_or_lookup_1.
3736         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3737         gimple_match_op *.  Update calls to the gimple_resimplify routines
3738         and to gimple_simplified_result_is_gimple_val.
3739         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3740         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3741         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3742         (visit_nary_op): Likewise.
3743         (visit_reference_op_load): Likewise.
3745 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3747         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3748         modifier for printing the step amount.
3750 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
3752         PR target/78849
3753         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3754         types.
3756 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
3758         * doc/sourcebuild.texi (Endianness): New subsubsection.
3760 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3762         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3763         <prefetch_dynamic_strides>: New const bool field.
3764         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3765         prefetch_dynamic_strides.
3766         (exynosm1_prefetch_tune): Likewise.
3767         (thunderxt88_prefetch_tune): Likewise.
3768         (thunderx_prefetch_tune): Likewise.
3769         (thunderx2t99_prefetch_tune): Likewise.
3770         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3771         false.
3772         (aarch64_override_options_internal): Update to set
3773         PARAM_PREFETCH_DYNAMIC_STRIDES.
3774         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3775         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3776         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3777         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3778         prefetch-dynamic-strides setting.
3780 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3782         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3783         <minimum_stride>: New const int field.
3784         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3785         minimum_stride field defaulting to -1.
3786         (exynosm1_prefetch_tune): Likewise.
3787         (thunderxt88_prefetch_tune): Likewise.
3788         (thunderx_prefetch_tune): Likewise.
3789         (thunderx2t99_prefetch_tune): Likewise.
3790         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3791         <default_opt_level>: Set to 3.
3792         (aarch64_override_options_internal): Update to set
3793         PARAM_PREFETCH_MINIMUM_STRIDE.
3794         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3795         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3796         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3797         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3798         stride is constant and is below the minimum stride threshold.
3800 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3802         * config/arm/arm-cpus.in (mode26): Delete.
3803         (armv4): Delete mode26 reference.
3804         * config/arm/arm.c (arm_configure_build_target): Delete use of
3805         isa_bit_mode26.
3807 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3809         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3810         New insn pattern.
3811         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3812         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
3813         for non-SSE modes.
3814         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
3815         (floatunsdidf2): Ditto.
3817 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3819         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3820         (fixuns_trunc<mode>si2_avx512f): Ditto.
3821         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3822         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3823         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3825 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3827         PR rtl-optimization/79985
3828         * df-scan.c (df_insn_refs_collect): Remove special case for
3829         global registers and asm statements.
3831 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3833         * extend.texi (Global Register Variables): Rewrite the bullet list.
3834         Note that the register is available for allocation. Note that access
3835         via inline asm must use constraints. Add note about async-signal
3836         handlers. Remove paragraph about automagic register selection.
3838 2018-05-23  Richard Biener  <rguenther@suse.de>
3840         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3841         of fixed offset from memset VN.
3843 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
3845         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3846         first_interp field.
3847         (alloc_cand_and_find_basis): Initialize first_interp field.
3848         (slsr_process_mul): Modify first_interp field.
3849         (slsr_process_add): Likewise.
3850         (slsr_process_cast): Modify first_interp field for each new
3851         interpretation.
3852         (slsr_process_copy): Likewise.
3853         (dump_candidate): Dump first_interp field.
3854         (replace_mult_candidate): Process all interpretations, not just
3855         subsequent ones.
3856         (replace_rhs_if_not_dup): Likewise.
3857         (replace_one_candidate): Likewise.
3859 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
3861         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3862         Add new boolean.
3863         (aarch64_needs_frame_chain): New function.
3864         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3866 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
3868         PR target/84882
3869         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3870         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3871         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3872         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3873         as true for strict-align.
3874         (aarch64_can_inline_p): Perform checks even when callee has no
3875         attributes to check for strict alignment.
3876         * doc/extend.texi (AArch64 Function Attributes): Document
3877         no-strict-align.
3878         * doc/invoke.texi: (AArch64 Options): Likewise.
3880 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
3882         PR tree-optimization/85853
3883         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3884         the handling of the root of the node to...
3885         (vect_slp_analyze_node_operations_1): ...this new function,
3886         and run the whole thing with the child nodes' def types
3887         set according to their SLP node's def type.
3889 2018-05-23  Richard Biener  <rguenther@suse.de>
3891         PR middle-end/85874
3892         * tree-data-ref.c (create_runtime_alias_checks): Defer
3893         and ignore overflow warnings.
3895 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
3897         PR tree-optimization/85822
3898         * tree-vrp.c (is_masked_range_test): Fix handling of negative
3899         constants.
3901 2018-05-23  Richard Biener  <rguenther@suse.de>
3903         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3904         memset constants via native_interpret_expr.
3906 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
3908         PR target/85345
3909         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
3910         attribute.
3911         (cgraph_node::create_alias): Likewise.
3912         (cgraph_node::get_availability): Check ifunc_resolver instead
3913         of looking up ifunc attribute.
3914         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3915         * varasm.c (do_assemble_alias): Likewise.
3916         (assemble_alias): Likewise.
3917         (default_binds_local_p_3): Likewise.
3918         * cgraph.h (cgraph_node): Add ifunc_resolver.
3919         (cgraph_node::only_called_directly_or_aliased_p): Return false
3920         for IFUNC resolver.
3921         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
3922         attribute.
3923         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
3924         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
3925         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
3926         instead of looking up ifunc attribute.
3928 2018-05-22  Luis Machado  <luis.machado@linaro.org>
3930         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
3932 2018-05-22  Martin Sebor  <msebor@redhat.com>
3934         PR middle-end/85359
3935         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
3936         only when expasion succeeds.
3937         (expand_builtin_strcmp): Same.
3938         (expand_builtin_strncmp): Same.
3940 2018-05-22  Martin Sebor  <msebor@redhat.com>
3942         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
3944 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3945             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3947         * config/aarch64/aarch64-ldpstp.md: Replace uses of
3948         aarch64_mem_pair_operand with memory_operand and delete operand swapping
3949         code.
3950         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3951         Add check for legitimate_address.
3952         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
3953         (aarch64_swap_ldrstr_operands): New.
3954         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
3955         Define prototype.
3957 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3958             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3960         * config/aarch64/aarch64.md: New patterns to generate stp
3961         and ldp.
3962         (store_pair_sw, store_pair_dw): New patterns to generate stp for
3963         single words and double words.
3964         (load_pair_sw, load_pair_dw): Likewise.
3965         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
3966         Delete.
3967         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
3968         Delete.
3969         * config/aarch64/aarch64-ldpstp.md: Modify peephole
3970         for different mode ldpstp and add peephole for merged zero stores.
3971         Likewise for loads.
3972         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3973         Add size check.
3974         (aarch64_gen_store_pair): Rename calls to match new patterns.
3975         (aarch64_gen_load_pair): Rename calls to match new patterns.
3976         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
3977         (load_pair<DREG:mode><DREG2:mode>): ... This.
3978         (store_pair<mode>): Rename to...
3979         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
3980         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
3981         New mode iterators.
3982         (V_INT_EQUIV): Handle SImode.
3983         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
3984         New predicate.
3986 2018-05-22  Martin Sebor  <msebor@redhat.com>
3988         PR c/85623
3989         * calls.c (maybe_warn_nonstring_arg): Use string length to set
3990         or ajust the presumed bound on an operation to avoid unnecessary
3991         warnings.
3993 2018-05-22  Martin Sebor  <msebor@redhat.com>
3995         PR tree-optimization/85826
3996         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
3997         assuming that a DECL necesarily has a constant size.
3999 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4001         PR middle-end/85862
4002         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4004 2018-05-22  Richard Biener  <rguenther@suse.de>
4006         PR tree-optimization/85834
4007         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4008         non-constant and non-zero memset arguments.
4010 2018-05-22  Martin Liska  <mliska@suse.cz>
4012         PR ipa/85607
4013         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4015 2018-05-22  Richard Biener  <rguenther@suse.de>
4017         PR tree-optimization/85863
4018         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4019         comparisons when vectype is specified.
4020         (vectorizable_condition): Do not specify vectype for
4021         vect_is_simple_cond when SLP vectorizing.
4023 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4025         PR target/85657
4026         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4027         define __ibm128 as long double.
4028         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4029         as a distinct type when IEEE 128-bit support is enabled.
4030         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4031         128-bit types to use the correct functions.
4032         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4033         convert between 128-bit floating point types that have different
4034         modes but the same representation, instead of using gen_lowpart to
4035         makean alias.
4036         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4037         KFmode.
4038         (IFKF_reg): New attributes to give the register constraints for
4039         IFmode and KFmode.
4040         (extend<mode>tf2_internal): New insns to mark an explicit
4041         conversion between 128-bit floating point types that have a
4042         different mode but share the same representation.
4044 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4046         PR tree-optimization/85814
4047         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4048         a null return from get_strinfo when unsharing the next
4049         strinfo in the chain.
4051 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4053         PR gcc/84923
4054         * varasm.c (weak_finish): Clean up weak_decls.
4056 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4058         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4059         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4060         UNSPEC_UADALP values.
4061         * config/aarch64/iterators.md (ABAL): New int iterator.
4062         (ABDL2): Likewise.
4063         (ADALP): Likewise.
4064         (sur): Add mappings for the above.
4065         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4066         New define_insn.
4067         (aarch64_<sur>abal<mode>_4): Likewise.
4068         (aarch64_<sur>adalp<mode>_3): Likewise.
4069         (<sur>sadv16qi): New define_expand.
4071 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4073         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4074         (*movdf_internal): Ditto.
4075         (*rcpsf2_sse): Ditto.
4076         (*rsqrtsf2_sse): Ditto.
4077         (*sqrt<mode>2_sse): Ditto.
4079 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4081         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4082         eor3q<mode>4.
4083         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4084         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4085         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4086         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4087         vbcaxq_s64): New.
4088         * config/aarch64/arm_neon.h: Likewise.
4089         * config/aarch64/iterators.md (VQ_I): New.
4091 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4093         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4094         arc*-*-linux*.
4095         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4096         MULTILIB_DIRNAMES
4098 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4100         * config/nds32/constraints.md (S): New constraint.
4101         * config/nds32/nds32.md (call_internal): Use constraint S.
4102         (call_value_internal): Likewise.
4103         (sibcall_internal): Likewise.
4104         (sibcall_value_internal): Likewise.
4106 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4107             Chung-Ju Wu  <jasonwucj@gmail.com>
4109         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4110         into consideration.
4112 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4113             Chung-Ju Wu  <jasonwucj@gmail.com>
4115         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4116         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4117         (nds32_rtx_costs_impl): Simplify.
4118         (nds32_address_cost_impl): Simplify.
4119         (nds32_init_rtx_costs): New function.
4120         (nds32_rtx_costs_speed_prefer): Likewise.
4121         (nds32_rtx_costs_size_prefer): Likewise.
4122         (nds32_address_cost_speed_prefer): Likewise.
4123         (nds32_address_cost_speed_fwprop): Likewise.
4124         (nds32_address_cost_size_prefer): Likewise.
4125         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4126         * config/nds32/nds32.c (nds32_option_override): Use
4127         nds32_init_rtx_costs function.
4129 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4131         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4132         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4133         (TARGET_PIPELINE_N8): Likewise.
4134         (TARGET_PIPELINE_N10): Likewise.
4135         (TARGET_PIPELINE_N13): Likewise.
4136         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4138 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4140         * config/nds32/nds32-fpu.md: Update copyright year.
4142 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4144         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4146 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4148         * config/nds32/nds32.c
4149         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4150         * config/nds32/nds32.opt (minline-asm-r15): New option.
4152 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4154         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4155         MASK_HW_ABS.
4156         * config/nds32/nds32.md (abssi2): New pattern.
4158 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4160         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4161         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4162         Merge insn pattern from sse_cvtsi2ss<round_name> and
4163         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4164         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4165         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4166         using SWI48 mode iterator.
4167         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4168         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4169         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4170         pattern from sse_cvttss2si<round_saeonly_name>
4171         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4172         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4173         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4174         using SWI48 mode iterator.
4175         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4176         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4177         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4178         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4179         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4180         using SWI48 mode iterator.
4181         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4182         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4183         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4184         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4185         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4186         SWI48 mode iterator.
4187         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4188         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4189         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4190         pattern from sse_cvttsd2si<round_saeonly_name>
4191         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4193 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4195         * config/nds32/nds32-md-auxiliary.c
4196         (nds32_valid_smw_lwm_base_p): Refine.
4197         (nds32_output_smw_single_word): Refine.
4198         (nds32_output_smw_double_word): New.
4199         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4201 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4203         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4204         (nds32_output_stack_pop): Refine.
4205         (nds32_expand_unaligned_load): Refine.
4206         (nds32_expand_unaligned_store): Refine.
4208 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4209             Chung-Ju Wu  <jasonwucj@gmail.com>
4211         * config/nds32/constants.md: Add TP_REGNUM constant.
4212         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4213         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4214         UNSPEC_ADD32.
4215         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4216         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4217         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4218         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4219         and PIC code generation.
4220         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4221         code generation.
4222         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4223         optimization.
4224         * config/nds32/nds32.md: Support TLS and PIC.
4225         * config/nds32/nds32.c: Support TLS and PIC.
4226         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4227         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4228         predicate.
4230 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4232         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4233         mode with E_ prefix.
4235 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4236             Chung-Ju Wu  <jasonwucj@gmail.com>
4238         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4239         * config/nds32/nds32-md-auxiliary.c
4240         (symbolic_reference_mentioned_p): New.
4241         (nds32_legitimize_ict_address): New.
4242         (nds32_expand_ict_move): New.
4243         (nds32_indirect_call_referenced_p): New.
4244         (nds32_symbol_binds_local_p): Delete.
4245         (nds32_long_call_p): Modify.
4246         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4247         * config/nds32/nds32-protos.h
4248         (symbolic_reference_mentioned_p): Declare.
4249         (nds32_legitimize_ict_address): Declare.
4250         (nds32_expand_ict_move): Declare.
4251         (nds32_indirect_call_referenced_p): Declare.
4252         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4253         (nds32_relax_group): Use nds32_ict_const_p as condition.
4254         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4255         (nds32_asm_file_start): Output ict_model directive in asm code.
4256         (nds32_legitimate_address_p): Consider indirect call.
4257         (nds32_print_operand): Consider indirect call.
4258         (nds32_print_operand_address): Consider indirect call.
4259         (nds32_insert_attributes): Handle "indirect_call" attribute.
4260         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4261         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4262         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4263         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4264         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4265         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4266         (TARGET_ICT_MODEL_SMALL): Define.
4267         (TARGET_ICT_MODEL_LARGE): Define.
4268         * config/nds32/nds32.md (movsi): Consider ict model.
4269         (call, call_value): Consider ict model.
4270         (sibcall, sibcall_value): Consider ict model.
4271         * config/nds32/nds32.opt (mict-model): New option.
4272         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4273         model.
4275 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4276             Monk Chiang  <sh.chiang04@gmail.com>
4277             Jim Wilson <jimw@sifive.com>
4279         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4280         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4281         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4282         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4283         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4284         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4285         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4286         compute save_libcall_adjustment properly.
4287         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4288         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4289         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4290         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4291         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4292         (ABI_SPEC): Handle mabi=ilp32e.
4293         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4294         (RVE): Add RVE mask.
4295         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4296         <-march>: Add rv32e as an example.
4298 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4300         PR c++/82899
4301         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4302         (intra_create_variable_infos): Handle C++ constructors.
4304 2018-05-18  Martin Liska  <mliska@suse.cz>
4306         * passes.def: Remove a redundant pass.
4308 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4310         PR bootstrap/85838
4311         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4313 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4315         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4316         (ARMv4): Update.
4317         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4318         (ARMv6m): Update.
4319         (armv2, armv2a, armv3, armv3m): Delete architectures.
4320         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4321         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4322         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4323         Delete cpus.
4324         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4325         (*mulsidi3adddi): Likewise.
4326         (mulsidi3): Likewise.
4327         (*mulsidi3_nov6): Likewise.
4328         (umulsidi3): Likewise.
4329         (umulsidi3_nov6): Likewise.
4330         (umaddsidi4): Likewise.
4331         (*umulsidi3adddi): Likewise.
4332         (smulsi3_highpart): Likewise.
4333         (*smulsi3_highpart_nov6): Likewise.
4334         (umulsi3_highpart): Likewise.
4335         (*umulsi3_highpart_nov6): Likewise.
4336         * config/arm/arm.h (arm_arch3m): Delete.
4337         * config/arm/arm.c (arm_arch3m): Delete.
4338         (arm_option_override_internal): Update armv3-related comment.
4339         (arm_configure_build_target): Delete use of isa_bit_mode32.
4340         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4341         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4342         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4343         (mulsa3): Likewise.
4344         (mulusa3): Likewise.
4345         * config/arm/arm-protos.h (arm_arch3m): Delete.
4346         * config/arm/arm-tables.opt: Regenerate.
4347         * config/arm/arm-tune.md: Likewise.
4348         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4349         deleted architectures.
4351 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4353         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4354         (armv5t, armv5te): New features.
4355         (ARMv5, ARMv5e): Delete fgroups.
4356         (ARMv5t, ARMv5te): Adjust for above changes.
4357         (ARMv6m): Likewise.
4358         (armv5, armv5e): Delete arches.
4359         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4360         arm_arch5.
4361         (*call_reg_arm): Likewise.
4362         (*call_value_reg_armv5): Likewise.
4363         (*call_value_reg_arm): Likewise.
4364         (*call_symbol): Likewise.
4365         (*call_value_symbol): Likewise.
4366         (*sibcall_insn): Likewise.
4367         (*sibcall_value_insn): Likewise.
4368         (clzsi2): Likewise.
4369         (prefetch): Likewise.
4370         (define_split and define_peephole2 dependent on arm_arch5):
4371         Likewise.
4372         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4373         arm_arch5e.
4374         (TARGET_ARM_QBIT): Likewise.
4375         (TARGET_DSP_MULTIPLY): Likewise.
4376         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4377         (arm_arch5, arm_arch5e): Delete.
4378         (arm_arch5t, arm_arch5te): Declare.
4379         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4380         (arm_arch5t): Declare.
4381         (arm_option_reconfigure_globals): Update for the above.
4382         (arm_options_perform_arch_sanity_checks): Update comment, replace
4383         use of arm_arch5 with arm_arch5t.
4384         (use_return_insn): Likewise.
4385         (arm_emit_call_insn): Likewise.
4386         (output_return_instruction): Likewise.
4387         (arm_final_prescan_insn): Likewise.
4388         (arm_coproc_builtin_available): Likewise.
4389         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4390         arm_arch5e with arm_arch5t and arm_arch5te.
4391         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4392         (arm_arch5t, arm_arch5te): Declare.
4393         * config/arm/arm-tables.opt: Regenerate.
4394         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4395         * config/arm/t-multilib: Likewise.
4396         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4397         instead of arm_arch5.
4398         (*call_reg_thumb1): Likewise.
4399         (*call_value_reg_thumb1_v5): Likewise.
4400         (*call_value_reg_thumb1): Likewise.
4401         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4402         unreachable path.
4403         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4405 2018-05-18  Martin Liska  <mliska@suse.cz>
4407         PR gcov-profile/84846
4408         * doc/gcov.texi: Document -t option of gcov tool.
4410 2018-05-18  Martin Liska  <mliska@suse.cz>
4412         PR gcov-profile/84846
4413         * gcov.c (print_usage): Add new -t option.
4414         (process_args): Handle the option.
4415         (generate_results): Use stdout as output when requested by
4416         the option.
4418 2018-05-18  Martin Liska  <mliska@suse.cz>
4420         PR gcov-profile/84846
4421         * coverage.c (coverage_init): Write PWD to .gcno file.
4422         * doc/gcov.texi: Document how working directory is printed.
4423         * gcov-dump.c (dump_gcov_file): Print PWD.
4424         * gcov.c (output_intermediate_file): Likewise.
4425         (read_graph_file): Read PWD string.
4426         (output_lines): Print PWD.
4428 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4430         PR middle-end/85817
4431         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4432         for retval and return false if all args to phi are zero.
4434 2018-05-18  Richard Biener  <rguenther@suse.de>
4436         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4437         method.
4438         (evrp_dom_walker::before_dom_children): Call it.
4440 2018-05-18  Richard Biener  <rguenther@suse.de>
4442         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4443         results when processing array refs with variable index.
4445 2018-05-18  Toon Moene  <toon@moene.org>
4447         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4448         directly after that of -floop-interchange. Indicate that both
4449         options are enabled by default when specifying -O3.
4451 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4453         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4454         iterator.  Delete separate integer-mode vec_set<mode> expander.
4455         (aarch64_simd_vec_setv2di): Delete.
4456         (vec_setv2di): Delete.
4457         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4458         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4459         the "w, r" alternative.
4461 2018-05-18  Martin Liska  <mliska@suse.cz>
4463         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4464         * tree-pass.h (make_pass_lower_switch_O0): New function.
4465         * tree-switch-conversion.c (node_has_low_bound): Remove.
4466         (node_has_high_bound): Likewise.
4467         (node_is_bounded): Likewise.
4468         (class pass_lower_switch): Make it a template type and create
4469         two instances.
4470         (pass_lower_switch::execute): Add template argument.
4471         (make_pass_lower_switch): New function.
4472         (make_pass_lower_switch_O0): New function.
4473         (do_jump_if_equal): Remove.
4474         (emit_case_nodes): Simplify to just handle all 3 cases and leave
4475         all the hard work to tree optimization passes.
4477 2018-05-18  Martin Liska  <mliska@suse.cz>
4479         * dbgcnt.c (limit_low): Renamed from limit.
4480         (limit_high): New variable.
4481         (dbg_cnt_is_enabled): Check for upper limit.
4482         (dbg_cnt): Adjust dumping.
4483         (dbg_cnt_set_limit_by_index): Add new argument for high
4484         value.
4485         (dbg_cnt_set_limit_by_name): Likewise.
4486         (dbg_cnt_process_single_pair): Parse new format.
4487         (dbg_cnt_process_opt): Use strtok.
4488         (dbg_cnt_list_all_counters): Remove 'value' and add
4489         'limit_high'.
4490         * doc/invoke.texi: Document changes.
4492 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4494         * doc/sourcebuild.texi (scalar_all_fma): Document.
4495         * tree.def (FMA_EXPR): Delete.
4496         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4497         * internal-fn.c (ternary_direct): New macro.
4498         (expand_ternary_optab_fn): Likewise.
4499         (direct_ternary_optab_supported_p): Likewise.
4500         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4501         * builtins.c (fold_builtin_fma): Delete.
4502         (fold_builtin_3): Don't call it.
4503         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4504         * expr.c (expand_expr_real_2): Likewise.
4505         * fold-const.c (operand_equal_p): Likewise.
4506         (fold_ternary_loc): Likewise.
4507         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4508         * gimple.c (DEFTREECODE): Likewise.
4509         * gimplify.c (gimplify_expr): Likewise.
4510         * optabs-tree.c (optab_for_tree_code): Likewise.
4511         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4512         * tree-eh.c (operation_could_trap_p): Likewise.
4513         (stmt_could_throw_1_p): Likewise.
4514         * tree-inline.c (estimate_operator_cost): Likewise.
4515         * tree-pretty-print.c (dump_generic_node): Likewise.
4516         (op_code_prio): Likewise.
4517         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4518         * tree-ssa-operands.c (get_expr_operands): Likewise.
4519         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4520         * fold-const-call.h (fold_fma): Delete.
4521         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4522         CFN_FNMA and CFN_FNMS.
4523         (fold_fma): Delete.
4524         * genmatch.c (combined_fn): New enum.
4525         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4526         (commutative_op): New function.
4527         (commutate): Use it.  Handle more than 2 operands.
4528         (dt_operand::gen_gimple_expr): Use commutative_op.
4529         (parser::parse_expr): Allow :c to be used with non-binary
4530         operators if the commutative operand is known.
4531         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4532         CFN_FMS, CFN_FNMA and CFN_FNMS.
4533         (backprop::process_assign_use): Remove FMA_EXPR handling.
4534         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4535         (gen_hsa_fma): New function.
4536         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4537         IFN_FNMA and IFN_FNMS.
4538         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4539         * gimple-fold.h (follow_all_ssa_edges): Declare.
4540         * gimple-fold.c (follow_all_ssa_edges): New function.
4541         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4542         gimple_build interface and use follow_all_ssa_edges to fold the result.
4543         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4544         instead of checking for optabs directly.
4545         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4546         rather than FMA_EXPRs.
4547         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4548         call to IFN_FMA instead of an FMA_EXPR.
4550 2018-05-17  Jim Wilson  <jimw@sifive.com>
4552         * expr.c (do_tablejump): When converting index to Pmode, if we have a
4553         sign extended promoted subreg, and the range does not have the sign bit
4554         set, then do a sign extend.
4556         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4557         test, check for sign extended subreg and/or constant operands, and
4558         do a sign extend in that case.
4560 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
4562         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4563         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4564         Add untyped.
4565         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4566         Change logics_shift_reg to logics_shift_imm.
4567         (thunderx2t99_fp_loadpair_basic): Delete.
4568         (thunderx2t99_fp_storepair_basic): Delete.
4569         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4570         (thunderx2t99_asimd_polynomial): Delete.
4571         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4572         and neon_fp_mul_d_scalar_q.
4573         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4574         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4575         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4576         (thunderx2t99_asimd_lut): Add missing tbl types.
4577         (thunderx2t99_asimd_ext): Delete.
4578         (thunderx2t99_asimd_load1_1_mult): Delete.
4579         (thunderx2t99_asimd_load1_2_mult): Delete.
4580         (thunderx2t99_asimd_load1_ldp): New.
4581         (thunderx2t99_asimd_load1): New.
4582         (thunderx2t99_asimd_load2): Add missing *load2* types.
4583         (thunderx2t99_asimd_load3): New.
4584         (thunderx2t99_asimd_load4): New.
4585         (thunderx2t99_asimd_store1_1_mult): Delete.
4586         (thunderx2t99_asimd_store1_2_mult): Delete.
4587         (thunderx2t99_asimd_store2_mult): Delete.
4588         (thunderx2t99_asimd_store2_onelane): Delete.
4589         (thunderx2t99_asimd_store_stp): New.
4590         (thunderx2t99_asimd_store1): New.
4591         (thunderx2t99_asimd_store2): New.
4592         (thunderx2t99_asimd_store3): New.
4593         (thunderx2t99_asimd_store4): New.
4595 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
4597         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4598         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
4600 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
4601             Segher Boessenkool  <segher@kernel.crashing.org>
4603         PR target/85698
4604         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4605         operand.
4607 2018-05-17  Richard Biener  <rguenther@suse.de>
4609         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4610         for pruning loop and prune defs feeding only already visited PHIs.
4612 2018-05-17  Richard Biener  <rguenther@suse.de>
4614         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4616 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
4617             Richard Biener  <rguenther@suse.de>
4619         PR tree-optimization/85793
4620         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4621         for VMAT_ELEMENTWISE.
4623 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4625         * internal-fn.h (lookup_internal_fn): Declare
4626         * internal-fn.c (lookup_internal_fn): New function.
4627         * gimple.c (gimple_build_call_from_tree): Handle calls to
4628         internal functions.
4629         * gimple-pretty-print.c (dump_gimple_call): Print "." before
4630         internal function names.
4631         * tree-pretty-print.c (dump_generic_node): Likewise.
4632         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4634 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4636         * gimple-fold.h (gimple_build): Make the function forms take
4637         combined_fn rather than built_in_function.
4638         (gimple_simplify): Likewise.
4639         * gimple-match-head.c (gimple_simplify): Likewise.
4640         * gimple-fold.c (gimple_build): Likewise.
4641         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4642         rather than gimple_build_call_internal.
4643         (get_initial_defs_for_reduction): Likewise.
4644         (vect_create_epilog_for_reduction): Likewise.
4645         (vectorizable_live_operation): Likewise.
4647 2018-05-17  Martin Liska  <mliska@suse.cz>
4649         * gimple-ssa-sprintf.c (format_directive): Do not use
4650         space in between 'G_' and '('.
4652 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
4654         PR target/85323
4655         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4656         even if the mask is not all ones.
4658         PR target/85323
4659         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4660         vector.
4661         (ix86_gimple_fold_builtin): Likewise.
4663         PR target/85323
4664         * config/i386/i386.c: Include tree-vector-builder.h.
4665         (ix86_vector_shift_count): New function.
4666         (ix86_fold_builtin): Fold shift builtins by scalar count.
4667         (ix86_gimple_fold_builtin): Likewise.
4669         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4670         _mm512_setzero): New intrinsics.
4672 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4673             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4675         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4676         code generation for cases where splatting a value is not useful.
4677         * simplify-rtx.c (simplify_ternary_operation): Simplify
4678         vec_merge across a vec_duplicate and a paradoxical subreg forming
4679         a vector mode to a vec_concat.
4681 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
4683         * config.gcc: Support "goldmont-plus".
4684         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4685         "goldmont-plus".
4686         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4687         PROCESSOR_GOLDMONT_PLUS.
4688         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4689         (processor_target_table): Add "goldmont-plus".
4690         (PTA_GOLDMONT_PLUS): Define.
4691         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4692         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4693         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4694         (fold_builtin_cpu): Add "goldmont-plus".
4695         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4696         (ix86_option_override_internal): Add "goldmont-plus".
4697         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4698         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4699         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4700         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4702 2018-05-17  Richard Biener  <rguenther@suse.de>
4704         PR tree-optimization/85757
4705         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4706         remove defs that only feed that PHI from further processing.
4708 2018-05-16  Jim Wilson  <jimw@sifive.com>
4710         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4711         asterisk to name.
4712         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4714 2018-05-16  Mark Wielaard  <mark@klomp.org>
4716         * dwarf2out.c (count_index_strings): New function.
4717         (output_indirect_strings): Call count_index_strings and generate
4718         header for dwarf_version >= 5.
4720 2018-05-16  Mark Wielaard  <mark@klomp.org>
4722         * dwarf2out.c (dwarf_FORM): New function.
4723         (set_indirect_string): Use dwarf_FORM.
4724         (reset_indirect_string): Likewise.
4725         (size_of_die): Likewise.
4726         (value_format): Likewise.
4727         (output_die): Likewise.
4728         (add_skeleton_AT_string): Likewise.
4729         (output_macinfo_op): Likewise.
4730         (index_string): Likewise.
4731         (output_index_string_offset): Likewise.
4732         (output_index_string): Likewise.
4733         (count_index_strings): Likewise.
4735 2018-05-16  Carl Love  <cel@us.ibm.com>
4737         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4738         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4740 2018-05-16  Martin Jambor  <mjambor@suse.cz>
4742         * ipa-prop.c (ipa_free_all_edge_args): Remove.
4743         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4745 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
4747         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4748         (fnma<mode>4): Likewise.
4749         (fms<mode>4): Likewise.
4750         (fnms<mode>4): Likewise.
4751         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4752         (aarch64_fnma<mode>4): Likewise.
4753         (aarch64_fms<mode>4): Likewise.
4754         (aarch64_fnms<mode>4): Likewise.
4755         (aarch64_fnmadd<mode>4): Likewise.
4757 2018-05-16  Jason Merrill  <jason@redhat.com>
4759         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
4761 2018-05-16  Richard Biener  <rguenther@suse.de>
4763         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4764         (dump_stmt_cost): Declare.
4765         (add_stmt_cost): Dump cost we add.
4766         (add_stmt_costs): New function.
4767         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4768         No longer exported.
4769         (vect_analyze_stmt): Adjust prototype.
4770         (vectorizable_condition): Likewise.
4771         (vectorizable_live_operation): Likewise.
4772         (vectorizable_reduction): Likewise.
4773         (vectorizable_induction): Likewise.
4774         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4775         cost vector to pass to vectorizable_ and record afterwards.
4776         (vect_model_reduction_cost): Take cost vector argument and adjust.
4777         (vect_model_induction_cost): Likewise.
4778         (vectorizable_reduction): Likewise.
4779         (vectorizable_induction): Likewise.
4780         (vectorizable_live_operation): Likewise.
4781         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4782         SLP_TREE_NUMBER_OF_VEC_STMTS.
4783         (vect_analyze_slp_cost_1): Remove.
4784         (vect_analyze_slp_cost): Likewise.
4785         (vect_slp_analyze_node_operations): Take visited args and
4786         a target cost vector.  Avoid processing already visited stmt sets.
4787         (vect_slp_analyze_operations): Use a local cost vector to gather
4788         costs and register those of non-discarded instances.
4789         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4790         (vect_schedule_slp_instance): Remove copying of
4791         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
4792         zero.
4793         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4794         adding cost.  Record cost entry location.
4795         (vect_prologue_cost_for_slp_op): Function to compute cost of
4796         a constant or invariant generated for SLP vect in the prologue,
4797         split out from vect_analyze_slp_cost_1.
4798         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
4799         (vect_model_promotion_demotion_cost): Likewise.
4800         (vect_model_store_cost): Likewise, make static.
4801         (vect_model_load_cost): Likewise.
4802         (vectorizable_bswap): Add cost vector arg and adjust.
4803         (vectorizable_call): Likewise.
4804         (vectorizable_simd_clone_call): Likewise.
4805         (vectorizable_conversion): Likewise.
4806         (vectorizable_assignment): Likewise.
4807         (vectorizable_shift): Likewise.
4808         (vectorizable_operation): Likewise.
4809         (vectorizable_store): Likewise.
4810         (vectorizable_load): Likewise.
4811         (vectorizable_condition): Likewise.
4812         (vectorizable_comparison): Likewise.
4813         (can_vectorize_live_stmts): Likewise.
4814         (vect_analyze_stmt): Likewise.
4815         (vect_transform_stmt): Adjust calls to vectorizable_*.
4816         * tree-vectorizer.c: Include gimple-pretty-print.h.
4817         (dump_stmt_cost): New function.
4819 2018-05-16  Richard Biener  <rguenther@suse.de>
4821         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4822         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4823         * tree-ssa-dse.c: Include tree-ssa-loop.h.
4824         (check_name): New callback.
4825         (dse_classify_store): Track cycles via a visited bitmap of PHI
4826         defs and simplify handling of in-loop and across loop dead stores
4827         and properly fail for loop-variant refs.  Handle byte-tracking with
4828         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4829         limiting the walk.
4831 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
4833         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4834         (vect_get_mask_type_for_stmt): Likewise.
4835         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4836         split out from...
4837         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
4838         to determine the statement's vector type and the vector type that
4839         should be used for calculating nunits.  Deal with cases in which
4840         the type has to be deferred.
4841         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4842         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4843         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4844         (vect_determine_vf_for_stmt): New functions, split out from...
4845         (vect_determine_vectorization_factor): ...here.
4846         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4847         (vect_get_mask_type_for_stmt): New functions, split out from
4848         vect_determine_vectorization_factor.
4850 2018-05-16  Richard Biener  <rguenther@suse.de>
4852         * tree-cfg.c (verify_gimple_assign_ternary): Properly
4853         verify the [VEC_]COND_EXPR embedded comparison.
4855 2018-05-15  Martin Sebor  <msebor@redhat.com>
4857         PR tree-optimization/85753
4858         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4859         RECORD_TYPE in addition to ARRAY_TYPE.
4861 2018-05-15  Martin Sebor  <msebor@redhat.com>
4863         PR middle-end/85643
4864         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4866 2018-05-15  Richard Biener  <rguenther@suse.de>
4868         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4869         add by_clobber_p one.  Change algorithm to collect all defs
4870         representing uses we need to walk and try reducing them to
4871         a single one before failing.
4872         (dse_dom_walker::dse_optimize_stmt): Adjust.
4874 2018-05-13  Mark Wielaard  <mark@klomp.org>
4876         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4877         (size_of_loc_descr): Likewise.
4878         (output_loc_operands): Likewise.
4879         (output_loc_operands_raw): Likewise.
4880         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4881         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4882         (hash_loc_operands): Likewise.
4883         (compare_loc_operands): Likewise.
4885 2018-05-14  Mark Wielaard  <mark@klomp.org>
4887         * dwarf2out.c (count_index_addrs): New function.
4888         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4890 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4892         PR tree-optimization/83648
4893         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4894         return value as malloc candidate.
4896 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4898         PR ipa/85734
4899         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4900         param as true in call to suggest_attribute.
4902 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
4904         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
4905         -mreadonly-in-sdata.
4907 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4909         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
4910         New pattern.
4911         (aarch64_crypto_aesd_fused): Likewise.
4913 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
4915         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
4916         (movsi_aarch64): Likewise.
4917         (load_pairsi): Likewise.
4918         (load_pairdi): Likewise.
4919         (store_pairsi): Likewise.
4920         (store_pairdi): Likewise.
4921         (load_pairsf): Likewise.
4922         (load_pairdf): Likewise.
4923         (store_pairsf): Likewise.
4924         (store_pairdf): Likewise.
4925         (zero_extend): Likewise.
4926         (trunc): Swap alternatives.
4927         (fcvt_target): Add '?' to prefer w over r.
4929 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
4931         PR target/85756
4932         * config/i386/i386.md: Disallow non-commutative arithmetics in
4933         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4934         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
4935         in the peephole2 before it.
4937 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
4939         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
4940         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
4941         (ix86_handle_option): Handle -mcldemote.
4942         * config.gcc: New header.
4943         * config/i386/cldemoteintrin.h: New file.
4944         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
4945         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4946         -mcldemote.
4947         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4948         OPTION_MASK_ISA_CLDEMOTE.
4949         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
4950         (ix86_valid_target_attribute_inner_p): Ditto.
4951         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
4952         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
4953         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
4954         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
4955         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
4956         (cldemote): New.
4957         * config/i386/i386.opt: Add -mcldemote.
4958         * config/i386/x86intrin.h: New header.
4959         * doc/invoke.texi: Add -mcldemote.
4961 2018-05-14  Richard Biener  <rguenther@suse.de>
4963         * doc/match-and-simplify.texi: Adjust :s documentation.
4965 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
4967         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
4968         intended memcpy size.
4969         (REORDER_45): Likewise.
4971 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
4973         * sort.cc: New file.
4974         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
4975         * vec.c (qsort_chk): Use gcc_qsort.
4976         * Makefile.in (OBJS-libcommon): Add sort.o.
4977         (build/sort.o): New target.  Use it...
4978         (BUILD_RTL): ... here, and...
4979         (build/gencfn-macros): ... here, and...
4980         (build/genmatch): ... here.
4982 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4983             Chung-Ju Wu  <jasonwucj@gmail.com>
4985         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
4986         * config/nds32/nds32-graywolf.md: New file.
4987         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
4988         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
4989         pipeline.
4990         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
4991         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
4992         * config/nds32/nds32.md (pipeline_model): Add graywolf.
4993         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
4994         * config/nds32/pipelines.md: Include n15 settings.
4996 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4997             Chung-Ju Wu  <jasonwucj@gmail.com>
4999         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5000         * config/nds32/nds32-n13.md: New file.
5001         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5002         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5003         pipeline.
5004         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5005         * config/nds32/nds32.md (pipeline_model): Add n13.
5006         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5007         * config/nds32/pipelines.md: Include n13 settings.
5009 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5010             Chung-Ju Wu  <jasonwucj@gmail.com>
5012         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5013         * config/nds32/nds32-n10.md: New file.
5014         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5015         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5016         pipeline.
5017         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5018         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5019         * config/nds32/nds32.md (pipeline_model): Add n10.
5020         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5021         * config/nds32/pipelines.md: Include n10 settings.
5023 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5024             Kito Cheng  <kito.cheng@gmail.com>
5025             Chung-Ju Wu  <jasonwucj@gmail.com>
5027         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5028         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5029         Add enum values for DSP extension instructions.
5030         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5031         New constraints.
5032         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5033         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5034         New code iterators.
5035         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5036         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5037         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5038         * config/nds32/nds32-intrinsic.md: Likewise.
5039         * config/nds32/nds32_intrinsic.h: Likewise.
5040         * config/nds32/nds32-md-auxiliary.c: Likewise.
5041         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5042         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5043         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5044         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5045         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5046         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5047         TYPE_DMAC in switch statement.
5048         * config/nds32/nds32.c: New checking and implementation for DSP
5049         extension instructions.
5050         * config/nds32/nds32.h: Likewise.
5051         * config/nds32/nds32.md: Likewise.
5052         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5053         * config/nds32/predicates.md: Implement new predicates for DSP
5054         extension.
5056 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5058         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5059         Reformat alternatives and attributes so it is easier to identify
5060         which constraints/attributes go with which instruction.
5061         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5062         (mov<mode>_softfloat32, FMOVE64): Likewise.
5063         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5064         (mov<mode>_softfloat64, FMOVE64): Likewise.
5066 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5068         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5069         subsection.
5070         (Basic PowerPC Built-in Functions): The new name of the
5071         subsection previously known as "PowerPC Built-in Functions".
5072         (Basic PowerPC Built-in Functions Available on all Configurations):
5073         New subsubsection.
5074         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5075         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5076         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5077         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5079 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5081         PR ipa/85655
5082         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5083         single const.
5085 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5087         PR target/85733
5088         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5090 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5092         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5093         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5094         (ix86_handle_option): Handle -mwaitpkg.
5095         * config.gcc: New header.
5096         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5097         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5098         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5099         function type.
5100         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5101         OPTION_MASK_ISA_WAITPKG.
5102         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5103         (ix86_option_override_internal): Add PTA_WAITPKG.
5104         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5105         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5106         IX86_BUILTIN_TPAUSE.
5107         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5108         __builtin_ia32_umwait and __builtin_ia32_tpause.
5109         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5110         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5111         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5112         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5113         UNSPECV_TPAUSE): New.
5114         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5115         * config/i386/i386.opt: Add -mwaitpkg.
5116         * config/i386/waitpkgintrin.h: New file.
5117         * config/i386/x86intrin.h: New header.
5118         * doc/invoke.texi: Add -mwaitpkg.
5120 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5122         PR target/85606
5123         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5124         equivalent.
5125         (cortex-m0): Use armv6s-m isa.
5126         (cortex-m0plus): Likewise.
5127         (cortex-m1): Likewise.
5128         (cortex-m0.small-multiply): Likewise.
5129         (cortex-m0plus.small-multiply): Likewise.
5130         (cortex-m1.small-multiply): Likewise.
5132 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5133             Jakub Jelinek  <jakub@redhat.com>
5135         PR tree-optimization/85692
5136         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5137         source permute as well.
5139 2018-05-11  Martin Liska  <mliska@suse.cz>
5141         PR sanitizer/85556
5142         * doc/extend.texi: Document LLVM style format for no_sanitize
5143         attribute.
5145 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5147         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5148         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5149         (mode_supports_vsx_dform_quad): Likewise.
5150         (mode_supports_vmx_dform): Move these functions to be next to the
5151         other mode_supports functions.
5152         (mode_supports_dq_form): Likewise.
5153         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5154         mode_supports_dq_form.
5155         (reg_offset_addressing_ok_p): Likewise.
5156         (offsettable_ok_by_alignment): Likewise.
5157         (rs6000_legitimate_offset_address_p): Likewise.
5158         (legitimate_lo_sum_address_p): Likewise.
5159         (rs6000_legitimize_address): Likewise.
5160         (rs6000_legitimize_reload_address): Likewise.
5161         (rs6000_secondary_reload_inner): Likewise.
5162         (rs6000_preferred_reload_class): Likewise.
5163         (rs6000_output_move_128bit): Likewise.
5165 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5167         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5168         Generate SImode target register for null target.
5169         <case IX86_BUILTIN_XGETBV>: Ditto.
5170         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5171         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5173 2018-05-10  Carl Love  <cel@us.ibm.com>
5175         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5176         dcbtt and dcbtstt if operands[2] is 0.
5178 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5180         PR target/85693
5181         * config/i386/sse.md (usadv64qi): New expander.
5183 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5185         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5186         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5187         -maltivec=be support.
5188         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5189         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5190         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5191         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5192         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5193         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5194         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5195         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5196         altivec_vsumsws): Adjust.
5197         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5198         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5199         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5200         support.
5201         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5202         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5203         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5204         (altivec_lve<VI_char>x): Delete expand.
5205         (*altivec_lve<VI_char>x_internal): Rename to...
5206         (altivec_lve<VI_char>x): ... this.
5207         (altivec_lvxl_<mode>): Delete expand.
5208         (*altivec_lvxl_<mode>_internal): Rename to ...
5209         (altivec_lvxl_<mode>): ... this.
5210         (altivec_stvxl_<mode>): Delete expand.
5211         (*altivec_stvxl_<mode>_internal): Rename to ...
5212         (altivec_stvxl_<mode>): ... this.
5213         (altivec_stve<VI_char>x): Delete expand.
5214         (*altivec_stve<VI_char>x_internal): Rename to ...
5215         (altivec_stve<VI_char>x): ... this.
5216         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5217         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5218         reduc_plus_scal_<mode>): Adjust.
5219         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5220         comment.
5221         (rs6000_cpu_cpp_builtins): Adjust.
5222         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5223         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5224         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5225         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5226         -maltivec=be support.
5227         (rs6000_split_vec_extract_var): Adjust.
5228         (rs6000_split_v4si_init): Adjust.
5229         (swap_selector_for_mode): Delete.
5230         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5231         altivec_expand_stvex_be): Delete.
5232         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5233         -maltivec=be support.
5234         (rs6000_gimple_fold_builtin): Ditto.
5235         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5236         Adjust.
5237         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5238         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5239         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5240         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5241         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5242         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5243         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5244         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5245         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5246         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5247         anonymous split): Adjust.
5248         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5249         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5251 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5253         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5254         when --with-gxx-include-dir is also specified.
5255         * configure: Regenerate.
5257 2018-05-09  Jim Wilson  <jimw@sifive.com>
5259         PR target/84797
5260         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5261         * config/riscv/t-withmultilib: New.
5262         * config/riscv/withmultilib.h: New.
5263         * doc/install.texi: Document RISC-V --with-multilib-list support.
5265 2018-05-09  Richard Biener  <rguenther@suse.de>
5267         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5268         vector.
5269         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5270         actual scalar cost using the cost vector and the add_stmt_cost
5271         machinery.
5273 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5275         PR rtl-optimization/85645
5276         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5277         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5279 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5281         PR rtl-optimization/85645
5282         * shrink-wrap.c (spread_components): Return a boolean saying if
5283         anything was changed.
5284         (try_shrink_wrapping_separate): Iterate spread_components until
5285         nothing changes anymore.
5287 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5289         PR rtl-optimization/85645
5290         * regrename.c (build_def_use): Also kill the chains that include the
5291         destination of a REG_CFA_REGISTER note.
5293 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5295         PR rtl-optimization/85645
5296         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5297         insn that has a REG_CFA_REGISTER note.
5299 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5301         * cfgexpand.c (expand_clobber): New function.
5302         (expand_gimple_stmt_1): Use it.
5303         * tree-vect-stmts.c (vect_clobber_variable): New function,
5304         split out from...
5305         (vectorizable_simd_clone_call): ...here.
5306         (vectorizable_store): Emit a clobber either side of an
5307         IFN_STORE_LANES sequence.
5308         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5310 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5312         PR target/85626
5313         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5314         (define_insn "trap_if_false"): Add exit after trap.
5316 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5318         PR rtl-optimization/85638
5319         * bb-reorder.c: Include common/common-target.h.
5320         (create_forwarder_block): New function extracted from...
5321         (fix_up_crossing_landing_pad): ...here.  Rename into...
5322         (dw2_fix_up_crossing_landing_pad): ...this.
5323         (sjlj_fix_up_crossing_landing_pad): New function.
5324         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5325         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5326         from both partitions and exit the loop after one iteration.
5328 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5330         Revert:
5331         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5332         subsection.
5333         (Basic PowerPC Built-in Functions): The new name of the
5334         subsection previously known as "PowerPC Built-in Functions".
5335         (Basic PowerPC Built-in Functions Available on all Configurations):
5336         New subsubsection.
5337         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5338         subsubsection.
5339         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5340         subsubsection.
5341         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5342         subsubsection.
5343         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5344         subsubsection.
5346 2018-05-08  Jim Wilson  <jimw@sifive.com>
5348         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5349         (LD_EMUL_SUFFIX): New.
5350         (LINK_SPEC): Use it.
5352 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5354         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5355         subsection.
5356         (Basic PowerPC Built-in Functions): The new name of the
5357         subsection previously known as "PowerPC Built-in Functions".
5358         (Basic PowerPC Built-in Functions Available on all Configurations):
5359         New subsubsection.
5360         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5361         subsubsection.
5362         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5363         subsubsection.
5364         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5365         subsubsection.
5366         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5367         subsubsection.
5369 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5371         PR target/85683
5372         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5373         after cmpelim optimization.
5375 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5377         * config.gcc: Support "goldmont".
5378         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5379         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5380         PROCESSOR_GOLDMONT.
5381         * config/i386/i386.c (m_GOLDMONT): Define.
5382         (processor_target_table): Add "goldmont".
5383         (PTA_GOLDMONT): Define.
5384         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5385         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5386         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5387         (fold_builtin_cpu): Add "goldmont".
5388         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5389         (ix86_option_override_internal): Add "goldmont".
5390         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5391         (processor_type): Add PROCESSOR_GOLDMONT.
5392         * config/i386/i386.md: Add CPU "glm".
5393         * config/i386/glm.md: New file.
5394         * config/i386/x86-tune.def: Add m_GOLDMONT.
5395         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5397 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5399         PR target/85572
5400         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5401         E_V4DImode.
5402         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5403         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5404         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5406         PR target/85317
5407         * config/i386/i386.c (ix86_fold_builtin): Handle
5408         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5410         PR target/85480
5411         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5412         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5414 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5416         PR target/85658
5417         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5418         (check_arch): Likewise.
5419         (check_fpu): Return the result rather than printing it.
5420         (end arch): Fix operator precedence.
5421         (end cpu): Likewise.
5422         (END): Print the result from check_fpu.
5424 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5425             Alan Hayward  <alan.hayward@arm.com>
5426             David Sherwood  <david.sherwood@arm.com>
5428         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5429         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5430         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5431         (*fcmuo<mode>_and): New patterns.
5433 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5435         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5436         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5437         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5438         (cmp_op, sve_imm_con): New code attributes.
5439         (SVE_COND_INT_CMP, imm_con): Delete.
5440         (cmp_op): Remove above unspecs from int attribute.
5441         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5442         to...
5443         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5444         comparison-specific unspecs.
5445         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5446         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5447         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5448         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5449         (*vec_fcm<cmp_op><mode>): Rename to...
5450         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5451         (*vec_fcmuo<mode>): Rename to...
5452         (*fcmuo<mode>): ...this and adjust likewise.
5453         (*pred_fcm<cmp_op><mode>): New pattern.
5454         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5455         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5456         functions.
5457         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5458         and UNORDERED.
5459         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5460         (aarch64_emit_sve_predicated_cond): New function.
5461         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5462         (aarch64_emit_unspec_cond_or): Replace with...
5463         (aarch64_emit_sve_or_conds): ...this new function.  Use
5464         aarch64_emit_sve_ptrue_op for the individual comparisons and
5465         aarch64_emit_binop to OR them together.
5466         (aarch64_emit_inverted_unspec_cond): Replace with...
5467         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5468         aarch64_emit_sve_ptrue_op for the comparison and
5469         aarch64_emit_unop to invert the result.
5470         (aarch64_expand_sve_vec_cmp_float): Update after the above
5471         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5473 2018-05-07  Nathan Sidwell  <nathan@acm.org>
5475         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5476         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5477         (Backwards Compatibility): Likewise.
5479 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5481         PR bootstrap/85681
5482         Revert:
5483         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5485         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5486         <prefetch_dynamic_strides>: New const bool field.
5487         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5488         prefetch_dynamic_strides.
5489         (exynosm1_prefetch_tune): Likewise.
5490         (thunderxt88_prefetch_tune): Likewise.
5491         (thunderx_prefetch_tune): Likewise.
5492         (thunderx2t99_prefetch_tune): Likewise.
5493         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5494         to false.
5495         (aarch64_override_options_internal): Update to set
5496         PARAM_PREFETCH_DYNAMIC_STRIDES.
5497         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5498         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5499         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5500         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5501         prefetch-dynamic-strides setting.
5503         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5505         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5506         <minimum_stride>: New const int field.
5507         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5508         minimum_stride field.
5509         (exynosm1_prefetch_tune): Likewise.
5510         (thunderxt88_prefetch_tune): Likewise.
5511         (thunderx_prefetch_tune): Likewise.
5512         (thunderx2t99_prefetch_tune): Likewise.
5513         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5514         (aarch64_override_options_internal): Update to set
5515         PARAM_PREFETCH_MINIMUM_STRIDE.
5516         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5517         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5518         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5519         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5520         stride is constant and is below the minimum stride threshold.
5522 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5524         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5525         to 512.
5527 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5529         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5530         <prefetch_dynamic_strides>: New const bool field.
5531         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5532         prefetch_dynamic_strides.
5533         (exynosm1_prefetch_tune): Likewise.
5534         (thunderxt88_prefetch_tune): Likewise.
5535         (thunderx_prefetch_tune): Likewise.
5536         (thunderx2t99_prefetch_tune): Likewise.
5537         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5538         to false.
5539         (aarch64_override_options_internal): Update to set
5540         PARAM_PREFETCH_DYNAMIC_STRIDES.
5541         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5542         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5543         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5544         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5545         prefetch-dynamic-strides setting.
5547 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5549         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5550         <minimum_stride>: New const int field.
5551         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5552         minimum_stride field.
5553         (exynosm1_prefetch_tune): Likewise.
5554         (thunderxt88_prefetch_tune): Likewise.
5555         (thunderx_prefetch_tune): Likewise.
5556         (thunderx2t99_prefetch_tune): Likewise.
5557         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5558         (aarch64_override_options_internal): Update to set
5559         PARAM_PREFETCH_MINIMUM_STRIDE.
5560         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5561         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5562         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5563         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5564         stride is constant and is below the minimum stride threshold.
5566 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
5568         PR c++/85659
5569         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5570         the type is addressable.  Don't force op into register if it has
5571         BLKmode.
5573 2018-05-05  Roland McGrath  <mcgrathr@google.com>
5575         PR other/77609
5576         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5577         any section for which we don't know a specific type it should have,
5578         regardless of name.  Previously this was done only for the exact
5579         names ".init_array", ".fini_array", and ".preinit_array".
5580         (default_elf_asm_named_section): Add comment about
5581         relationship with default_section_type_flags and SECTION_NOTYPE.
5582         (get_section): Don't consider it a type conflict if one side has
5583         SECTION_NOTYPE and the other doesn't, as long as neither has the
5584         SECTION_BSS et al used in the default_section_type_flags logic.
5586 2018-05-05  Tom de Vries  <tom@codesourcery.com>
5588         PR target/85653
5589         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5590         (workaround_barsyncs): New function.
5591         (nvptx_reorg): Use workaround_barsyncs.
5592         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5593         (define_expand "nvptx_membar_cta"): New define_expand.
5594         (define_insn "*nvptx_membar_cta"): New insn.
5596 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
5598         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5599         To improve optimization opportunities.
5600         * builtin-types.def: The new needed builtin types for the above.
5602 2018-05-04  Richard Biener  <rguenther@suse.de>
5604         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5605         * gimple-ssa-store-merging.c
5606         (imm_store_chain_info::output_merged_store): Remove redundant create,
5607         release split_store vector contents on failure.
5608         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5609         scalar stmt vector on cache hit.
5611 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
5613         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5614         Xilinx FP support.
5615         * config.gcc (powerpc-xilinx-eabi*): Remove.
5616         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5617         support.
5618         (fusion_addis_mem_combo_load): Ditto.
5619         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5620         FP support.
5621         (rs6000_cpu_cpp_builtins): Ditto.
5622         * config/rs6000/rs6000-linux.c
5623         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5624         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5625         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5626         support.
5627         (rs6000_setup_reg_addr_masks): Ditto.
5628         (rs6000_init_hard_regno_mode_ok): Ditto.
5629         (rs6000_option_override_internal): Ditto.
5630         (legitimate_lo_sum_address_p): Ditto.
5631         (rs6000_legitimize_address): Ditto.
5632         (rs6000_legitimize_reload_address): Ditto.
5633         (rs6000_legitimate_address_p): Ditto.
5634         (abi_v4_pass_in_fpr): Ditto.
5635         (setup_incoming_varargs): Ditto.
5636         (rs6000_gimplify_va_arg): Ditto.
5637         (rs6000_split_multireg_move): Ditto.
5638         (rs6000_savres_strategy): Ditto.
5639         (rs6000_emit_prologue_components): Ditto.
5640         (rs6000_emit_epilogue_components): Ditto.
5641         (rs6000_emit_prologue): Ditto.
5642         (rs6000_emit_epilogue): Ditto.
5643         (rs6000_elf_file_end): Ditto.
5644         (rs6000_function_value): Ditto.
5645         (rs6000_libcall_value): Ditto.
5646         * config/rs6000/rs6000.h: Ditto.
5647         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5648         (TARGET_MINMAX): ... this.  New.
5649         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5650         * config/rs6000/rs6000.md: Remove Xilinx FP support.
5651         (*movsi_internal1_single): Delete.
5652         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5653         mfpu=, mxilinx-fpu): Delete.
5654         * config/rs6000/singlefp.h: Delete.
5655         * config/rs6000/sysv4.h: Remove Xilinx FP support.
5656         * config/rs6000/t-rs6000: Ditto.
5657         * config/rs6000/t-xilinx: Delete.
5658         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5659         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5660         (VStype_simple): Delete.
5661         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5662         * config/rs6000/xfpu.h: Delete.
5663         * config/rs6000/xfpu.md: Delete.
5664         * config/rs6000/xilinx.h: Delete.
5665         * config/rs6000/xilinx.opt: Delete.
5666         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5667         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5669 2018-05-04  Tom de Vries  <tom@codesourcery.com>
5671         PR libgomp/85639
5672         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5673         if ignore == 0.
5675 2018-05-04  Richard Biener  <rguenther@suse.de>
5677         PR middle-end/85627
5678         * tree-complex.c (update_complex_assignment): We are always in SSA form.
5679         (expand_complex_div_wide): Likewise.
5680         (expand_complex_operations_1): Likewise.
5681         (expand_complex_libcall): Preserve EH info of the original stmt.
5682         (tree_lower_complex): Handle removed blocks.
5683         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5684         on complex multiplication and division libcall builtins.
5686 2018-05-04  Richard Biener  <rguenther@suse.de>
5688         PR middle-end/85574
5689         * fold-const.c (negate_expr_p): Restrict negation of operand
5690         zero of a division to when we know that can happen without
5691         overflow.
5692         (fold_negate_expr_1): Likewise.
5694 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
5696         PR libstdc++/85466
5697         * real.h (real_nextafter): Declare.
5698         * real.c (real_nextafter): New function.
5699         * fold-const-call.c (fold_const_nextafter): New function.
5700         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5701         CASE_CFN_NEXTTOWARD.
5702         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5703         even when arg1_mode is different from arg0_mode.
5705 2018-05-03  Nathan Sidwell  <nathan@acm.org>
5707         * doc/extend.texi (Deprecated Features): Remove
5708         -ffriend-injection.
5709         (Backwards Compatibility): Likewise.
5710         * doc/invoke.texi (C++ Language Options): Likewise.
5711         (C++ Dialect Options): Likewise.
5713 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
5715         PR target/85530
5716         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5717         _mm512_mask_mullox_epi64): New intrinsics.
5719 2018-05-03  Tom de Vries  <tom@codesourcery.com>
5721         PR testsuite/85106
5722         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5723         dump files): Add offload-tree.
5725 2018-05-03  Richard Biener  <rguenther@suse.de>
5727         PR tree-optimization/85615
5728         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5729         to loops not nested in BBs loop father to avoid creating multi-entry
5730         loops.
5732 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5734         PR tree-optimization/70291
5735         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5736         arguments.  Change return type to tree.  Emit libcall as a new
5737         statement rather than replacing existing one when inplace_p is true.
5738         (expand_complex_multiplication_components): New function.
5739         (expand_complex_multiplication): Expand floating-point complex
5740         multiplication using the above.
5741         (expand_complex_division): Rename inner_type parameter to type.
5742         Update expand_complex_libcall call-site.
5743         (expand_complex_operations_1): Update expand_complex_multiplication
5744         and expand_complex_division call-sites.
5746 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5748         PR target/85582
5749         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5750         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5751         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5752         the highest significant bit of the shift count mask is clear.  In
5753         check whether and[sq]i3 is needed verify that all significant bits
5754         of the shift count other than the highest are set.
5756 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5758         PR libgomp/82428
5759         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5760         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5761         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5762         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5763         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5764         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5765         __builtin_goacc_parlevel_size.
5767 2018-05-02  Richard Biener  <rguenther@suse.de>
5769         PR tree-optimization/85597
5770         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5771         do not use split vect_get_vec_defs call but call vect_get_slp_defs
5772         directly.
5774 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5776         PR testsuite/85106
5777         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5778         dump files): Add ltrans-tree.
5780 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5782         PR testsuite/85106
5783         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5784         dump files): Add wpa-ipa.
5786 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
5788         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
5789         powerpc*-*-linux*paired* target.
5790         * config/rs6000/750cl.h: Delete.
5791         * config/rs6000/paired.h: Delete.
5792         * config/rs6000/paired.md: Delete.
5793         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5794         float support.
5795         * config/rs6000/rs6000-builtin.def: Remove paired float support.
5796         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5797         comment.  Remove paired float support.
5798         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5799         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5800         VECTOR_PAIRED.
5801         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5802         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5803         declarations.
5804         * config/rs6000/rs6000.c: Remove paired float support.
5805         (paired_expand_vector_init, paired_expand_vector_move,
5806         paired_emit_vector_compare, paired_emit_vector_cond_expr,
5807         (paired_expand_lv_builtin, paired_expand_stv_builtin,
5808         paired_expand_builtin, paired_expand_predicate_builtin,
5809         paired_init_builtins): Delete.
5810         * config/rs6000/rs6000.h: Remove paired float support.
5811         * config/rs6000/rs6000.md: Remove paired float support.
5812         (move_from_CR_ov_bit): Delete.
5813         * config/rs6000/rs6000.opt (mpaired): Delete.
5814         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5815         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5817 2018-05-02  Richard Biener  <rguenther@suse.de>
5819         PR middle-end/85567
5820         * gimplify.c (gimplify_save_expr): When in SSA form allow
5821         SAVE_EXPRs to compute to SSA vars.
5823 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5825         PR target/85582
5826         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5827         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5828         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5829         clobber operands[2], instead use a new pseudo.  Formatting fixes.
5831 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
5833         PR tree-optimization/85586
5834         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5835         exit early for statements in the same group if the accesses are
5836         not strided.
5838 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5840         PR lto/85451
5841         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5842         error message.
5844 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
5846         PR tree-optimization/85143
5847         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5849 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5851         PR lto/85451
5852         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5853         not found" error message.
5855 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5857         PR other/83786
5858         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5859         * vec.c (test_ordered_remove_if): New function.
5860         (vec_c_tests): Call test_ordered_remove_if.
5861         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5862         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5863         * tree-vect-patterns.c (vect_pattern_recog_1): Use
5864         VEC_ORDERED_REMOVE_IF.
5866 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5868         PR tree-optimization/82665
5869         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5870         pointer subtraction where arguments come from a memchr call.
5872 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
5874         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5875         --push-state --as-needed and --pop-state instead of --as-needed and
5876         --no-as-needed if ld supports it.
5877         * configure: Regenerated.
5879         PR web/85578
5880         * doc/install.texi2html: Replace _002d with - and _002a with * in
5881         generated html files using sed.
5883 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5885         PR c++/85523
5886         * gcc-rich-location.c (blank_line_before_p): New function.
5887         (use_new_line): New function.
5888         (gcc_rich_location::add_fixit_insert_formatted): New function.
5889         * gcc-rich-location.h
5890         (gcc_rich_location::add_fixit_insert_formatted): New function.
5892 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5894         * selftest.c (assert_streq): Rename "expected" and "actual" to
5895         "val1" and "val2".  Extend NULL-handling to cover both inputs
5896         symmetrically, while still requiring both to be non-NULL for a pass.
5897         * selftest.h (assert_streq): Rename "expected" and "actual" to
5898         "val1" and "val2".
5899         (ASSERT_EQ): Likewise.
5900         (ASSERT_EQ_AT): Likewise.
5901         (ASSERT_KNOWN_EQ): Likewise.
5902         (ASSERT_KNOWN_EQ_AT): Likewise.
5903         (ASSERT_NE): Likewise.
5904         (ASSERT_MAYBE_NE): Likewise.
5905         (ASSERT_MAYBE_NE_AT): Likewise.
5906         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
5907         the assertion to pass.
5908         (ASSERT_STREQ_AT): Likewise.
5910 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
5912         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
5913         interaction with -pie.
5915 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5917         * selftest.h: Fix alphabetization of per-source-file selftest
5918         declarations.
5920 2018-04-30  Jason Merrill  <jason@redhat.com>
5922         PR c++/61982 - dead stores to destroyed objects.
5923         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
5924         of clobber.
5926 2018-04-30  Jason Merrill  <jason@redhat.com>
5928         * tree.c (build_clobber): New.
5929         * tree.h: Declare it.
5930         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
5932 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5934         * diagnostic-show-locus.c (layout::layout): Update for
5935         location_get_source_line returning a char_span.
5936         (struct char_span): Move to input.h.
5937         (struct correction): Update for fields in char_span becoming
5938         private.
5939         (struct source_line): Update for location_get_source_line
5940         returning a char_span.
5941         (layout::print_line): Likewise.
5942         * edit-context.c (edited_file::print_content): Likewise.
5943         (edited_file::print_diff_hunk): Likewise.
5944         (edited_file::print_run_of_changed_lines): Likewise.
5945         (edited_file::get_num_lines): Likewise.
5946         (edited_line::edited_line): Likewise.
5947         * final.c (asm_show_source): Likewise.
5948         * input.c (location_get_source_line): Convert return type
5949         from const char * to char_span, losing the final "line_len"
5950         param.
5951         (dump_location_info): Update for the above.
5952         (get_substring_ranges_for_loc): Likewise.  Use a char_span
5953         when handling the literal within the line.
5954         (test_reading_source_line): Update for location_get_source_line
5955         returning a char_span.
5956         * input.h (class char_span): Move here from
5957         diagnostic-show-locus.c, converting from a struct to a class.
5958         Make data members private.
5959         (char_span::operator bool): New.
5960         (char_span::length): New.
5961         (char_span::get_buffer): New.
5962         (char_span::operator[]): New.
5963         (char_span::subspan): Make const.
5964         (char_span::xstrdup): New.
5965         (location_get_source_line): Convert return type from const char *
5966         to char_span, losing the final "line_size" param.
5968 2018-04-30  Jan Hubicka  <jh@suse.cz>
5970         * lto-wrapper.c (ltrans_priorities): New static var.
5971         (cmp_priority): New.
5972         (run_gcc): Read priorities and if doing parallel build order
5973         the Makefile by them.
5975 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5977         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
5979 2018-04-30  Richard Biener  <rguenther@suse.de>
5981         * tree-cfg.c (verify_address): Remove base argument, add
5982         flag whether to check TREE_ADDRESSABLE and do that.
5983         (verify_expr): Remove.
5984         (verify_types_in_gimple_reference): Add pieces from verify_expr.
5985         (verify_gimple_assign_single): Likewise.
5986         (verify_gimple_switch): Likewise.
5987         (verify_expr_location_1): Dereference tp once.  Add (disabled)
5988         piece from verify_expr.
5989         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
5991 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5993         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
5995 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5997         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
5998         (small_data_pattern): Likewise.
5999         (arc_rewrite_small_data): Likewise.
6000         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6001         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6002         (get_symbol_alignment): New function.
6003         (legitimate_small_data_address_p): Likewise.
6004         (legitimate_scaled_address): Update, call
6005         legitimate_small_data_address_p.
6006         (output_sdata): New static variable.
6007         (arc_print_operand): Update how we handle small data operands.
6008         (arc_print_operand_address): Likewise.
6009         (arc_legitimate_address_p): Update, use
6010         legitimate_small_data_address_p.
6011         (arc_rewrite_small_data_p): Remove.
6012         (arc_rewrite_small_data_1): Likewise.
6013         (arc_rewrite_small_data): Likewise.
6014         (small_data_pattern): Likewise.
6015         (compact_sda_memory_operand): Update to use
6016         legitimate_small_data_address_p and get_symbol_alignment.
6017         (prepare_move_operands): Don't rewite sdata pattern.
6018         (prepare_extend_operands): Remove.
6019         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6020         pattern.
6021         (zero_extendqisi2): Likewise.
6022         (zero_extendhisi2): Likewise.
6023         (extendqihi2): Likewise.
6024         (extendqisi2): Likewise.
6025         (extendhisi2): Likewise.
6026         (addsi3): Likewise.
6027         (subsi3): Likewise.
6028         (andsi3): Likewise.
6029         * config/arc/constraints.md (Usd): Change it to memory constraint.
6031 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6033         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6034         as source of std instructions.
6035         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6036         allow 6-bit constants as source for store instructions.
6037         (movdi_insn): Update instruction pattern to allow 6-bit constants
6038         as source for store instructions.
6040 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6042         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6044 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6045             Sandra Loosemore <sandra@codesourcery.com>
6047         * dumpfile.c (dump_open): Allow '-' for stdout.
6048         * doc/invoke.texi (Developer Options): Document dump filename
6049         determination early.  Document stdin/stdout selection.
6051 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6053         Microblaze Target: PIC data text relative
6055         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6056         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6057         Add declaration.
6058         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6059         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6060         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6061         New addressing mode for data-text relative position indepenedent code.
6062         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6063         'ADDRESS_SYMBOLIC_TXT_REL'.
6064         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6065         (microblaze_legitimate_pic_operand): Exclude function calls from
6066         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6067         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6068         addresses cases.
6069         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6070         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6071         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6072         for 'address + offset'.
6073         (microblaze_expand_prologue): Add new function prologue call for
6074         'r20' assignation.
6075         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6076         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6077         table in case of TARGET_PIC_DATA_TEXT_REL.
6078         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6079         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6080         Add new macros 'UNSPEC_TEXT',
6081         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6082         + exclude function calls from 'UNSPEC_PLT' in case of data text
6083         relative mode.
6084         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6085         new target hook for generating address diff vector tables in case of
6086         flag_pic.
6087         * doc/tm.texi : Regenerate.
6088         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6089         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6090         of addr diff vector generation.
6091         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6092         target hook definition.
6093         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6094         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6095         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6096         option for data text relative.
6098 2018-04-30  Richard Biener  <rguenther@suse.de>
6100         * tree-chrec.h (evolution_function_is_constant_p): Remove
6101         redundant check.
6102         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6104 2018-04-30  Richard Biener  <rguenther@suse.de>
6106         PR bootstrap/85571
6107         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6109 2018-04-30  Richard Biener  <rguenther@suse.de>
6111         PR tree-optimization/28364
6112         PR tree-optimization/85275
6113         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6114         copying first exit test.
6116 2018-04-28  Mark Wielaard  <mark@klomp.org>
6118         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6119         dwarf_version >= 5.
6120         (dwarf_AT): Handle DW_AT_addr_base.
6121         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6123 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6125         PR target/84431
6126         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6127         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6128         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6129         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6131 2018-04-28  Richard Biener  <rguenther@suse.de>
6133         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6134         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6135         to reflect use.  Only add interesting stmts.
6137 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6139         PR ipa/85549
6140         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6141         the jump function allows for passing through aggregate values.
6143 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6145         * input.h (in_system_header_at): Convert from macro to inline
6146         function.
6147         (from_macro_expansion_at): Likewise.
6148         (from_macro_definition_at): Likewise.
6150 2018-04-27  Jeff Law  <law@redhat.com>
6152         * config.gcc: Mark tile* targets as deprecated/obsolete.
6154 2018-04-27  Richard Biener  <rguenther@suse.de>
6156         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6157         fix for ILP32.
6159 2018-04-27  Richard Biener  <rguenther@suse.de>
6161         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6163 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6165         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6166         with Yd constraint. Set "preferred_for_speed" attribute from
6167         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6168         with Yd constraint.
6169         (*movdi_internal): Ditto.
6170         (movti_interunit splitters): Remove
6171         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6172         (movdi_interunit splitters): Ditto.
6173         * config/i386/constraints.md (Ye): Remove.
6174         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6176 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6178         PR target/85512
6179         * config/aarch64/constraints.md (Usg): Limit to 31.
6180         (Usj): Limit to 63.
6182 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6184         PR tree-optimization/85529
6185         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6186         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6187         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6188         zero extension or masking of the MSB bit.
6189         (optimize_range_tests): Add FIRST_BB argument, pass it through
6190         to optimize_range_tests_var_bound.
6191         (maybe_optimize_range_tests, reassociate_bb): Adjust
6192         optimize_range_tests callers.
6194 2018-04-26  Richard Biener  <rguenther@suse.de>
6195             Jakub Jelinek  <jakub@redhat.com>
6197         * cgraph.h (symbol_table): Just declare debug method here.
6198         * symtab.c (symbol_table::debug): Define.
6200 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6202         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6204 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6206         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6207         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6208         (*movdi_internal): Substitute Yi and Yj constraint with x
6209         and Ym and Yn constraint with y constraint.  Update "isa"
6210         attribute and set "preferred_for_speed" attribute from
6211         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6212         (*movsi_internal): Ditto.
6213         (*movdf_internal): Ditto.
6214         (*movsf_internal): Ditto.
6215         (*zero_extendsidi2): Ditto.
6216         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6217         (sse2_loadld): Ditto.
6218         (*vec_extract<ssevecmodelower>_0): Ditto.
6219         (*vec_extractv4si_0_zext_sse4): Ditto.
6220         (vec_concatv2di): Ditto.
6221         (*vec_dup<mode>): Ditto.
6222         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6223         * config/i386/constraints.md (Yi): Remove.
6224         (Yj): Remove.
6225         (Ym): Remove.
6226         (Yn): Remove.
6228 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6230         * dumpfile.c (dump_open): New.
6231         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6232         (dump_finish): Detect stdio/stderr by value not name.
6234 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6236         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6238 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6240         PR target/84952
6241         * config/nvptx/nvptx.c (verify_neutering_jumps)
6242         (verify_neutering_labels): New function
6243         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6245 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6247         PR target/84025
6248         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6249         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6250         need neutering.
6252 2018-04-26  Richard Biener <rguenther@suse.de>
6253             Tom de Vries  <tom@codesourcery.com>
6255         PR lto/85422
6256         * lto-streamer-out.c (output_function): Fixup loops if required to match
6257         discovery done in the reader.
6259 2018-04-26  Richard Biener  <rguenther@suse.de>
6261         PR tree-optimization/85116
6262         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6263         have a loop exit from the single latch predecessor.  Remove
6264         case of header with just condition.
6265         (ch_base::copy_headers): Exclude infinite loops from any
6266         processing.
6267         (pass_ch::execute): Record exits.
6269 2018-04-26  Richard Biener  <rguenther@suse.de>
6271         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6272         prologue cost vector and pass it to vect_get_load_cost.
6273         (vect_get_peeling_costs_all_drs): Likewise.
6274         (vect_peeling_hash_get_lowest_cost): Likewise.
6275         (vect_enhance_data_refs_alignment): Likewise.
6277 2018-04-26  Richard Biener  <rguenther@suse.de>
6279         PR middle-end/85450
6280         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6281         checking of integer<->pointer conversions.
6282         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6283         sign-/zero-extending pointer types.
6284         (expand_omp_for_static_chunk): Likewise.
6286 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6287             Jean Lee  <xiaoyur347@gmail.com>
6289         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6290         (TARGET_ASAN_SHADOW_OFFSET): Define.
6291         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6292         true for -fsanitize=address.
6294 2018-04-25  Mark Wielaard  <mark@klomp.org>
6296         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6297         shorter ones.
6299 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6301         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6302         than "alu", remove explicit "memory" and "imm_disp" attributes.
6303         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6305         PR middle-end/85414
6306         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6307         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6308         gen_lowpart_no_emit.
6310 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6312         PR target/85473
6313         * config/i386/i386.c (ix86_expand_builtin): Change memory
6314         operand to XI, extend p0 to Pmode.
6315         * config/i386/i386.md: Change unspec volatile and operand
6316         1 mode to XI, change operand 0 mode to P.
6318 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6320         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6321         GET_MODE_MASK before any checking.
6322         (nds32_can_use_bset_p): Likewise.
6323         (nds32_can_use_btgl_p): Likewise.
6325 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6327         * config/nds32/nds32-doubleword.md: New define_split pattern for
6328         illegal register number.
6330 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6332         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6334 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6336         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6338 2018-04-25  Richard Biener  <rguenther@suse.de>
6340         * lto-streamer.h (LTO_major_version): Bump to 8.
6342 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6344         * BASE-VER: Set to 9.0.0.
6346 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6348         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6349         in __abskf2 and __powikf2.
6351 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6353         PR target/85512
6354         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6355         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6356         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6357         Use the above on operand 2.  Reindent.
6358         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6360 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6362         PR target/85485
6363         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6364         handle OPT_mcet.
6365         * config/i386/i386.opt (mcet): Removed.
6366         * doc/install.texi: Remove -mcet documentation.
6367         * doc/invoke.texi: Likewise.
6369 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6371         PR target/85485
6372         * doc/install.texi: Remove -mcet from bootstrap-cet.
6374 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6376         PR target/85511
6377         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6378         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6379         if TARGET_64BIT.
6381         PR target/85503
6382         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6383         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6384         containing a CONST_VECTOR.
6386 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6388         * doc/install.texi: Update newlib dependency for nvptx.
6390 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6392         PR target/85508
6393         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6394         instead of INTVAL when shifting x left.
6396 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6398         PR tree-optimization/85478
6399         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6400         vect_grouped_store_supported for single element vectors.
6402 2018-04-24  Richard Biener  <rguenther@suse.de>
6404         PR target/85491
6405         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6406         load cost increase to the case of non-constant step.
6408 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6410         PR target/84828
6411         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6412         destination if any_malformed_asm.
6414 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6416         PR middle-end/85496
6417         * expr.c (store_field): In the bitfield case, if the value comes from
6418         a function call and is returned in registers by means of a PARALLEL,
6419         do not change the mode of the temporary unless BLKmode and VOIDmode.
6421 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6423         PR rtl-optimization/85423
6424         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6425         dependencies to debug insns when the previous insn is non-debug.
6427 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6429         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6430         enums into a single definition.
6431         (fls): Fix predicates and printing.
6432         (seti): Likewise.
6434 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6436         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6437         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6438         and short u6 immediate.
6439         (check_if_valid_sleep_operand): Remove.
6440         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6442 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6444         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6445         flag_always_save_lp condition.
6446         * config/nds32/nds32.opt (malways-save-lp): New option.
6448 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6450         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6451         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6452         * config/nds32/nds32.h
6453         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6454         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6456 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6458         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6459         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6461 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6462             Chung-Ju Wu  <jasonwucj@gmail.com>
6464         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6465         Declare.
6466         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6467         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6469 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6471         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6473 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6475         * config/nds32/nds32-protos.h (nds32_data_alignment,
6476         nds32_local_alignment): Declare.
6477         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6478         nds32_local_alignment): New functions.
6479         (TARGET_CONSTANT_ALIGNMENT): Define.
6480         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6482 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6484         * config/nds32/nds32.c
6485         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6486         (TARGET_MODES_TIEABLE_P): Likewise.
6488 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6490         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6491         level Ofast and Og.
6493 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
6494             Chung-Ju Wu  <jasonwucj@gmail.com>
6496         * config/nds32/constants.md (unspec_volatile_element): Add enum values
6497         for unaligned access.
6498         * config/nds32/nds32-intrinsic.c: Implementation of expanding
6499         unaligned access.
6500         * config/nds32/nds32-intrinsic.md: Likewise.
6501         * config/nds32/nds32_intrinsic.h: Likewise.
6502         * config/nds32/nds32.h (nds32_builtins): Likewise.
6503         * config/nds32/nds32.opt (munaligned-access): New option.
6504         * config/nds32/nds32.c (nds32_asm_file_start): Display
6505         flag_unaligned_access status.
6507 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6509         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6510         -mno-relax is present.
6511         * config/riscv/linux.h (LINK_SPEC): Ditto.
6513 2018-04-20  Martin Sebor  <msebor@redhat.com>
6515         PR c/85365
6516         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6517         for null pointers.
6518         (gimple_fold_builtin_stxcpy_chk): Same.
6519         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6521 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
6523         PR target/85456
6524         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6525         __powikf2 when long double is IEEE 128-bit.
6527 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6529         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6530         step to make sure stack always aligned.
6532 2018-04-20  Carl Love  <cel@us.ibm.com>
6534         PR target/83402
6535         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6536         size check for arg0.
6538 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6539             Tom de Vries  <tom@codesourcery.com>
6541         PR target/85445
6542         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6543         Emit insns for calls too.
6544         (nvptx_find_par): Always look for worker-level predecessor insn.
6545         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
6546         calls.
6547         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6548         (nvptx_process_pars): Propagate frames for calls.
6550 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
6552         PR target/85469
6553         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6554         Removed.
6555         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6556         (ix86_handle_option): Don't handle OPT_mibt.
6557         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6558         __SHSTK__.
6559         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6560         has_ibt and ibt.
6561         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6562         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6563         (ix86_target_macros): Define __CET__ with flag_cf_protection
6564         for -fcf-protection.
6565         * config/i386/i386.c (isa2_opts): Remove -mibt.
6566         * config/i386/i386.h (TARGET_IBT): Removed.
6567         (TARGET_IBT_P): Likewise.
6568         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6569         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6570         * config/i386/i386.opt (mcet): Update help message.
6571         (mshstk): Likewise.
6572         (mibt): Removed.
6573         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
6574         -mcet as an alias for -mshstk.
6576 2018-04-20  Richard Biener <rguenther@suse.de>
6578         PR middle-end/85475
6579         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6580         complexity by forcing a single use of the multiply operand.
6582 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6584         ipa/85449
6585         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6586         recursion dependency to only apply to non-clones.
6588 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6590         ipa/85447
6591         * ipa-cp.c (create_specialized_node): Check that clones of
6592         self-recursive edges exist during IPA-CP.
6594 2018-04-19  Toon Moene  <toon@moene.org>
6596         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6597         by -O3.
6599 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6601         PR tree-optimization/85467
6602         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6603         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
6604         VECTOR_CST element to type.
6606 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6608         PR target/85397
6609         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6610         * config/i386/i386.md (builtin_setjmp_setup): Removed.
6611         (builtin_longjmp): Likewise.
6612         (save_stack_nonlocal): New pattern.
6613         (restore_stack_nonlocal): Likewise.
6615 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6617         PR target/85404
6618         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6619         Replace ASM_OUTPUT_LABEL with fprintf.
6621 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6623         PR target/85417
6624         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6625         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6626         * config/i386/i386-c.c (ix86_target_macros_internal): Also
6627         define __IBT__ and __SHSTK__ for -fcf-protection.
6628         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6629         TARGET_IBT.
6630         (ix86_trampoline_init): Likewise.
6631         (x86_output_mi_thunk): Likewise.
6632         (ix86_notrack_prefixed_insn_p): Likewise.
6633         (ix86_option_override_internal): Don't disallow -fcf-protection.
6634         * config/i386/i386.md (rdssp<mode>): Also enable for
6635         -fcf-protection.
6636         (incssp<mode>): Likewise.
6637         (nop_endbr): Likewise.
6638         * config/i386/i386.opt (mcet): Change help message to built-in
6639         functions only.
6640         (mibt): Likewise.
6641         (mshstk): Likewise.
6642         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6643         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
6644         enable CET built-in functions.
6646 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
6648         * common/config/i386/i386-common.c
6649         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6650         OPTION_MASK_ISA_MOVDIRI_UNSET,
6651         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6652         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6653         * config.gcc (movdirintrin.h): New header.
6654         * config/i386/cpuid.h (bit_MOVDIRI,
6655         bit_MOVDIR64B): New bits.
6656         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6657         and -mmvodir64b.
6658         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6659         (VOID, PVOID, PCVOID)): New function types.
6660         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6661         __builtin_ia32_directstoreu_u64,
6662         __builtin_ia32_movdir64b): New builtins.
6663         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6664         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6665         and -mmovdiri.
6666         (ix86_valid_target_attribute_inner_p): Ditto.
6667         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6668         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6669         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6670         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6671         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6672         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6673         (movdiri<mode>, movdir64b_<mode>): New.
6674         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6675         * config/i386/immintrin.h: Include movdirintrin.h.
6676         * config/i386/movdirintrin.h: New file.
6677         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6679 2018-04-19  Richard Biener  <rguenther@suse.de>
6681         PR middle-end/85455
6682         * cfg.c (clear_bb_flags): When loop state says we have
6683         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6685 2018-04-19  Richard Biener  <rguenther@suse.de>
6687         PR tree-optimization/84737
6688         * tree-vect-data-refs.c (vect_copy_ref_info): New function
6689         copying restrict info.
6690         (vect_setup_realignment): Use it.
6691         * tree-vectorizer.h (vect_copy_ref_info): Declare.
6692         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6693         the first DR to all generated stores.
6694         (vectorizable_load): Likewise for loads.
6696 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6698         PR tree-optimization/85446
6699         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6700         the integral and pointer types to have the same precision.
6702         * doc/install.texi: Document --disable-cet being the default and
6703         --enable-cet=auto.
6705 2018-04-18  Martin Liska  <mliska@suse.cz>
6707         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6708         style.
6710 2018-04-18  Martin Liska  <mliska@suse.cz>
6712         Revert
6713         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6715         PR ipa/83983
6716         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6717         arguments if they are comparable.
6719 2018-04-18  Martin Liska  <mliska@suse.cz>
6721         Revert
6722         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6724         PR lto/84805
6725         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6726         incomplete types.
6728 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
6730         PR target/85388
6731         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6732         ENDBR after calling __morestack.
6734 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
6736         PR jit/85384
6737         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6738         by using gcc_base_ver to generate a gcc_driver_version, and use
6739         it when generating GCC_DRIVER_NAME.
6740         * configure: Regenerate.
6742 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
6744         PR target/81084
6745         * config.gcc: Obsolete powerpc*-*-*spe*.
6747 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6749         PR debug/84637
6750         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6751         (stabstr_D): Change type of unum from unsigned int to
6752         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
6753         type.
6755 2018-04-17  Jim Wilson  <jimw@sifive.com>
6757         PR 84856
6758         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6759         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6760         Set arg_pointer_offset after using pretend_args_size.
6762 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6764         PR rtl-optimization/85431
6765         * dse.c (record_store): Ignore zero width stores.
6767         PR sanitizer/85230
6768         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
6769         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6770         __builtin_stack_restore rather than after it.
6771         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6772         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6773         argument instead of virtual_dynamic_stack_rtx.
6775 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6777         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6778         New prototype.
6779         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6780         Add note to error message to explain internal mapping of overloaded
6781         built-in function name to non-overloaded built-in function name.
6782         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6783         function.
6785 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
6787         PR target/85424
6788         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6789         where the inputs overlap with the output.
6791 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6793         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6794         (=v, v) alternative and explicit "memory" attribute.
6795         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
6796         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6797         attributes.
6798         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6799         "sselog1" type instead of "sselog".
6800         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6801         "sselog".  Remove explicit "memory" attribute.
6802         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6803         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6804         attributes.
6805         (vec_extract_hi_v32hi): Merge all alternatives into one, use
6806         "sselog1" type instead of "sselog".  Remove explicit "memory"
6807         attribute.
6808         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6809         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6810         attribute.
6811         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6812         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6813         attributes.
6814         (vec_extract_hi_v64qi): Merge all alternatives into one, use
6815         "sselog1" type instead of "sselog".  Remove explicit "memory"
6816         attribute.
6817         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6818         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6819         attribute.
6821         PR target/85430
6822         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6824         PR middle-end/85414
6825         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6826         on a SUBREG.
6828 2018-04-17  Martin Jambor  <mjambor@suse.cz>
6830         PR ipa/85421
6831         * ipa-cp.c (create_specialized_node): Call
6832         expand_all_artificial_thunks if necessary.
6834 2018-04-17  Martin Liska  <mliska@suse.cz>
6836         PR lto/85405
6837         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6838         in message, remote space in between '_G' and '('.
6840 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6842         PR target/85281
6843         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6844         avx512f_vmcmp<mode>3<round_saeonly_name>,
6845         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6846         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6847         avx512f_rndscale<mode><round_saeonly_name>,
6848         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6849         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6850         Use %<iptr>2 instead of %2 for -masm=intel.
6851         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6852         avx512f_vcvttss2usi<round_saeonly_name>,
6853         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6854         -masm=intel.
6855         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6856         avx512f_vcvttsd2usi<round_saeonly_name>,
6857         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6858         Use %q1 instead of %1 for -masm=intel.
6859         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6860         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6861         of %3 for -masm=intel.
6862         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6863         -masm=intel.
6864         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6865         -masm=intel.
6866         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6867         -masm=intel.
6868         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6869         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6870         %g1.
6871         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6872         -masm=intel.
6873         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6874         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6875         %g1 and one with %0 and %1.
6876         (avx512er_vmrcp28<mode><round_saeonly_name>,
6877         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6878         %1 for -masm=intel.
6879         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6880         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6881         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6882         of %0 and %{%4%} for -masm=intel.
6883         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6884         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6885         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6886         order of %0 and %{%5%}%{z%} for -masm=intel.
6888 2018-04-17  Jan Hubicka  <jh@suse.cz>
6890         PR lto/85405
6891         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6893 2018-04-17  Martin Liska  <mliska@suse.cz>
6895         PR ipa/85329
6896         * multiple_target.c (create_dispatcher_calls): Set apostrophes
6897         for target_clone error message.  Make default implementation
6898         clone to be a local declaration.
6899         (separate_attrs): Add new argument and check for an empty
6900         string.
6901         (expand_target_clones): Handle it.
6902         (ipa_target_clone): Make redirection just for target_clones
6903         functions.
6905 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
6906             Tom de Vries  <tom@codesourcery.com>
6908         PR middle-end/84955
6909         * omp-expand.c (expand_oacc_for): Add dummy false branch for
6910         tiled basic blocks without omp continue statements.
6912 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
6914         PR target/83660
6915         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
6916         vec_extract expression as having side effects to make sure it gets
6917         a cleanup point.
6919 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
6921         PR target/85403
6922         * config/i386/i386.c (get_builtin_code_for_version): Check
6923         error_mark_node.
6925 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
6927         PR target/84331
6928         * gcc/config.gcc: Support "skylake".
6929         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
6930         PROCESSOR_SKYLAKE.
6931         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
6932         (processor_target_table): Add "skylake".
6933         (ix86_option_override_internal): Add "skylake".
6934         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
6935         PROCESSOR_CANNONLAKE.
6936         (get_builtin_code_for_version): Fix priority for
6937         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
6938         PROCESSOR_SKYLAKE-AVX512.
6939         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
6940         (processor_type): Add PROCESSOR_SKYLAKE.
6942 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
6943             Jason Merrill  <jason@redhat.com>
6945         PR c++/85112
6946         * convert.c (convert_to_integer_1): Use direct recursion for
6947         enumeral types and types with a precision less than the number
6948         of bits in their mode.
6950 2018-04-16  Julia Koval  <julia.koval@intel.com>
6952         PR target/84413
6953         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
6954         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
6956 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
6958         PR target/85293
6959         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
6960         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
6961         and -mno-direct-move.
6963 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
6965         PR target/83402
6966         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
6967         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
6968         Ensure negative shifts result in {0}.
6970 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
6972         PR rtl-optimization/79916
6973         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
6974         regs (if any) to define how to gnerate SD moves when LRA is in
6975         progress.
6977 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
6979         PR rtl-optimization/85393
6980         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
6981         * except.c (expand_dw2_landing_pad_for_region): Make static.
6982         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
6983         a label and unconditional jump to old_bb, rather than
6984         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
6985         basic block.
6987         PR rtl-optimization/85376
6988         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
6989         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
6990         instead of a specific value.
6992 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
6993             Bin Cheng  <bin.cheng@arm.com>
6995         PR tree-optimization/82965
6996         PR tree-optimization/83991
6997         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
6998         by_profile_only parameter.
6999         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7000         information if the loop was predicted to iterate too many times.
7001         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7003 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7005         PR lto/71991
7006         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7007         always inline.
7009 2018-04-13  Martin Liska  <mliska@suse.cz>
7010             Jakub Jelinek  <jakub@redhat.com>
7012         PR middle-end/81657
7013         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7014         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7015         * builtins.c (expand_builtin_memory_copy_args): Use
7016         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7017         handle dest_addr == pc_rtx.
7019 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7021         PR target/85291
7022         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7023         asked to not generate direct moves.
7024         (fix_trunc<mode>si2_stfiwx): Similar.
7025         (fix_trunc<mode>si2_internal): Similar.
7027 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7029         PR debug/83157
7030         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7031         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7032         lookup if dest in some wider mode is known to be const0_rtx and
7033         if so, record permanent equivalence for it to be ZERO_EXTEND of
7034         the narrower mode destination.
7036 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7038         * lto-streamer-out.c (output_function): Revert 259346.
7039         * omp-expand.c (expand_oacc_for): Likewise.
7041 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7043         PR rtl-optimization/85354
7044         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7045         * sel-sched.c (sel_global_init): ... here.
7047 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7049         PR target/85238
7050         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7051         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7052         mode for PE-COFF targets.
7053         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7054         (i386_pe_asm_lto_end): Likewise.
7055         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7056         (TARGET_ASM_LTO_END): Likewise.
7057         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7058         (i386_pe_asm_lto_start): New function.
7059         (i386_pe_asm_lto_end): Likewise.
7061 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7062             Richard Biener  <rguenther@suse.de>
7064         PR middle-end/84955
7065         * lto-streamer-out.c (output_function): Fix CFG loop state before
7066         streaming out.
7067         * omp-expand.c (expand_oacc_for): Handle calls to internal
7068         functions like regular functions.
7070 2018-04-12  Richard Biener  <rguenther@suse.de>
7072         PR lto/85371
7073         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7074         for the early LTO debug to properly generate references to it
7075         during DIE emission.  Do not re-use that for the skeleton for
7076         split-dwarf.
7077         (dwarf2out_early_finish): Likewise.
7079 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7081         PR target/85328
7082         * config/i386/sse.md
7083         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7084         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7085         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7086         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7087         and output is a reg, avoid creating invalid lowpart subreg, but
7088         instead split into a 512-bit move.  Don't split if not AVX512VL,
7089         input is xmm16+ reg and output is a mem.
7090         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7091         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7092         xmm16+ reg and output is a mem.
7094 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7096         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7097         also for flag_dwarf2_cfi_asm.
7099 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7101         PR rtl-optimization/85342
7102         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7103         a bool scalar var inside of the loop instead.  Don't try to update
7104         recog_data.operand after failed apply_change_group.
7106 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7108         PR target/85296
7109         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7110         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7111         array with flexible array member as array without given dimension.
7112         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7113         argument for undefined param to true.
7115 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7117         PR target/85321
7118         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7119         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7120         from PowerPC section.
7121         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7122         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7123         help text that is too long.
7124         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7125         help text that is too long.
7126         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7127         help text that is too long.
7129 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7131         * config/alpha/alpha.md (stack_probe_internal): Rename
7132         from "probe_stack".  Update all callers.
7134 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7136         PR rtl-optimization/84566
7137         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7138         sched_macro_fuse_insns.
7140 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7142         PR target/84301
7143         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7144         (compute_block_dependences): ... from here.
7146 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7148         PR tree-optimization/85331
7149         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7150         from int to HOST_WIDE_INT.
7152 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7154         PR ipa/84149
7155         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7156         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7157         not the same as the source val.
7158         (cgraph_edge_brings_value_p): New parameter.
7159         (gather_edges_for_value): Pass destination value to
7160         cgraph_edge_brings_value_p.
7161         (perhaps_add_new_callers): Likewise.
7162         (get_info_about_necessary_edges): Likewise and exclude values brought
7163         only by self-recursive edges.
7164         (create_specialized_node): Redirect only clones of self-calling edges.
7165         (+self_recursive_pass_through_p): New function.
7166         (find_more_scalar_values_for_callers_subset): Use it.
7167         (find_aggregate_values_for_callers_subset): Likewise.
7168         (known_aggs_to_agg_replacement_list): Removed.
7169         (decide_whether_version_node): Re-calculate known constants for all
7170         remaining context clones.
7172 2018-04-11  Richard Biener  <rguenther@suse.de>
7174         PR lto/85339
7175         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7176         from early DWARF output.
7177         (dwarf2out_early_finish): Output line info unconditionally into
7178         early DWARF and add reference to it.
7180 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7182         PR target/85281
7183         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7184         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7185         other than V2DFmode using iptr mode attribute.
7186         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7188 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7190         PR rtl-optimization/84659
7191         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7193 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7195         PR debug/85302
7196         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7197         SIZEP is NULL.
7198         (output_loc_list): Pass address of a dummy size variable even in the
7199         locview handling loop.
7200         (index_location_lists): Add comment on why skip_loc_list_entry can't
7201         call size_of_locs.
7203 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7205         PR target/85261
7206         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7207         into register.
7209 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7211         PR target/85321
7212         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7213         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7214         and -mstring-compare-inline-limit.
7216 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7218         PR target/85287
7219         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7220         for stack clash protection in a register whenever we need it to be in
7221         a register.
7223 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7225         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7226         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7228 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7230         PR target/85321
7231         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7232         the help text.
7233         (mlong-double-): Ditto.
7234         * config/rs6000/sysv4.opt (msdata=): Ditto.
7235         (mtls-size=): Ditto.
7237 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7239         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7240         erroneous entries for
7241         "vector int vec_ldl (int, long int *)", and
7242         "vector unsigned int vec_ldl (int, unsigned long int *)".
7243         Add comments and entries for
7244         "vector bool char vec_ldl (int, bool char *)",
7245         "vector bool short vec_ldl (int, bool short *)",
7246         "vector bool int vec_ldl (int, bool int *)",
7247         "vector bool long long vec_ldl (int, bool long long *)",
7248         "vector pixel vec_ldl (int, pixel *)",
7249         "vector long long vec_ldl (int, long long *)",
7250         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7251         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7252         type tree bool_long_long_type_node and correct definition of
7253         bool_V2DI_type_node to make reference to this new type tree.
7254         (rs6000_mangle_type): Replace erroneous reference to
7255         bool_long_type_node with bool_long_long_type_node.
7256         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7257         comments to emphasize sign distinctions for char and int types and
7258         replace RS6000_BTI_bool_long constant with
7259         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7260         use of RS6000_BTI_pixel.
7261         (bool_long_type_node): Remove this macro definition.
7262         (bool_long_long_type_node): New macro definition
7264 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7266         PR rtl-optimization/85300
7267         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7268         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7269         simplify_unary_operation fails.
7271 2018-04-10  Martin Liska  <mliska@suse.cz>
7273         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7274         cgraph_edge and ipa_ref.
7276 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7278         PR target/85177
7279         PR target/85255
7280         * config/i386/sse.md
7281         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7282         computation of the VEC_MERGE selector from mask.
7283         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7284         Fix decoding of the VEC_MERGE selector into mask.
7286 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7288         PR tree-optimization/85286
7289         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7291 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7293         * final.c (final_1): Set insn_last_address as well as
7294         insn_current_address.
7296 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7298         PR target/85173
7299         * explow.c (emit_stack_probe): Call validize_mem on memory location
7300         before passing it to gen_probe_stack.  Create address operand and
7301         legitimize it for the probe_stack_address case.
7303 2018-04-09  Jan Hubicka  <jh@suse.cz>
7305         PR lto/85078
7306         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7307         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7308         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7309         walk basetypes.
7310         (free_lang_data): Rebuild type inheritance graph.
7312 2018-04-09  Martin Sebor  <msebor@redhat.com>
7314         * invoke.texi (-finline-small-functions): Mention other optimization
7315         options.
7316         (-findirect-inlining, -fpartial-inlining): Same.
7317         (-finline-functions-called-once): Same.
7318         (-freorder-blocks-and-partition): Same.
7320 2018-04-09  Jan Hubicka  <jh@suse.cz>
7322         PR rtl/84058
7323         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7324         jumps; choose last target that matches the criteria (i.e.
7325         no partition changes for non-crossing jumps).
7326         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7327         support for redirecting crossing jumps to non-crossing.
7329 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7331         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7332         also for naked functions.
7334 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7336         * config/arc/arc.md (add_shift): New pattern.
7337         (add_shift2): Likewise.
7338         (sub_shift): Likewise.
7339         (sub_shift_cmp0_noout): Likewise.
7340         (compare_si_ashiftsi): Likewise.
7341         (xbfu_cmp0_noout): New combine pattern.
7342         (xbfu_cmp0"): Likewise.
7343         (movsi_set_cc_insn): Place the predicable variant first.
7344         (commutative_binary_cmp0_noout): Remove clobber.
7345         (commutative_binary_cmp0): New pattern.
7346         (noncommutative_binary_cmp0): Likewise.
7347         (noncommutative_binary_cmp0_noout): Likewise.
7348         (noncommutative_binary_comparison_result_used): Removed.
7349         (rsub_cmp0): New pattern.
7350         (rsub_cmp0_noout): Likewise.
7351         (extzvsi): Changed, keep only meaningful variants.
7352         (SQH, SEZ): New iterators.
7353         (SQH_postfix): New mode attribute.
7354         (SEZ_prefix): New code attribute.
7355         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7356         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7357         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7358         of numerical value.
7359         (noncommutative_operator): Check the availability of barrel
7360         shifter option.
7362 2018-04-09  Richard Biener  <rguenther@suse.de>
7364         PR tree-optimization/85284
7365         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7366         Only use the niter constraining form of simple_iv when the exit
7367         is always executed.
7369 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7371         PR target/84041
7372         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7373         (define_expand "*memory_barrier"): New define_expand.
7374         (define_insn "memory_barrier"): New insn.
7376 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7378         PR rtl-optimization/80463
7379         PR rtl-optimization/83972
7380         PR rtl-optimization/83480
7382         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7383         correct producer for the insn.
7384         (tidy_control_flow): Fixup seqnos in case of debug insns.
7386 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7388         PR rtl-optimization/83913
7390         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7391         different sched-times when merging exprs.
7393 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7395         PR rtl-optimization/83962
7397         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7398         tidy_fallthru_edge and tidy_control_flow.
7400 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7402         PR rtl-optimization/83530
7404         * sel-sched.c (force_next_insn): New global variable.
7405         (remove_insn_for_debug): When force_next_insn is true, also leave only
7406         next insn in the ready list.
7407         (sel_sched_region): When the region wasn't scheduled, make another pass
7408         over it with force_next_insn set to 1.
7410 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7412         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7413         into tm_file.
7414         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7415         for interrupt control.
7416         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7417         functions for interrupt control.
7418         * config/nds32/nds32-intrinsic.md: Likewise.
7419         * config/nds32/nds32_intrinsic.h: Likewise.
7420         * config/nds32/nds32.h (nds32_builtins): Likewise.
7422 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7424         * config/nds32/nds32.c (nds32_init_machine_status,
7425         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7426         strict_aligned_p field.
7427         (nds32_expand_to_rtl_hook): New function.
7428         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7429         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7431 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7432             Chung-Ju Wu  <jasonwucj@gmail.com>
7434         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7435         * config/nds32/nds32-n7.md: New file.
7436         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7437         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7438         pipeline.
7439         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7440         * config/nds32/nds32.md (pipeline_model): Add n7.
7441         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7442         * config/nds32/pipelines.md: Include n7 settings.
7444 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7445             Chung-Ju Wu  <jasonwucj@gmail.com>
7447         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7448         * config/nds32/nds32-e8.md: New file.
7449         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7450         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7451         pipeline.
7452         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7453         * config/nds32/nds32.md (pipeline_model): Add e8.
7454         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7455         * config/nds32/pipelines.md: Include e8 settings.
7457 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7458             Chung-Ju Wu  <jasonwucj@gmail.com>
7460         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7461         * config/nds32/nds32-n8.md: New file.
7462         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7463         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7464         pipeline.
7465         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7466         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7467         * config/nds32/nds32.md (pipeline_model): Add n8.
7468         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7469         * config/nds32/pipelines.md: Include n8 settings.
7471 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7472             Chung-Ju Wu  <jasonwucj@gmail.com>
7474         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7475         * config/nds32/nds32-n9-2r1w.md: New file.
7476         * config/nds32/nds32-n9-3r2w.md: New file.
7477         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7478         nds32_register_ports): New or modify for cpu n9.
7479         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7480         pipeline.
7481         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7482         * config/nds32/nds32-utils.c: New file.
7483         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7484         TARGET_MUL_SLOW): Define.
7485         * config/nds32/nds32.md (pipeline_model): New attribute.
7486         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7487         New options that support cpu n9.
7488         * config/nds32/pipelines.md: Include n9 settings.
7489         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7491 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7493         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7494         information if necessary.
7495         (output_cond_branch_compare_zero): Likewise.
7496         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7497         (nds32_target_alignment): Refine for alignment.
7498         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7499         (FUNCTION_BOUNDARY): Modify.
7500         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7501         align case.
7502         * config/nds32/nds32.opt (malways-align, malign-functions): New.
7504 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7506         * config/nds32/constants.md (unspec_volatile_element): Add values for
7507         TLB operation and data prefetch.
7508         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7509         functions for TLB operation and data prefetch.
7510         * config/nds32/nds32-intrinsic.md: Likewise.
7511         * config/nds32/nds32_intrinsic.h: Likewise.
7512         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7513         (nds32_print_operand): Likewise.
7514         * config/nds32/nds32.h (nds32_builtins): Likewise.
7516 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
7517         Andrew Pinski <pinsika@gcc.gnu.org>
7519         PR middle-end/82976
7520         * match.pd: Use constant_boolean_node of correct type instead of
7521         boolean_true_node or boolean_false_node for simplifying
7522         pointer comparisons to zero.
7524 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7526         PR tree-optimization/80021
7527         * tree.c (verify_type_variant): Make error call in verify_variant_match
7528         translatable and remove final full stop.
7530 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7532         * config/nds32/constants.md (unspec_volatile_element): Add
7533         UNSPEC_VOLATILE_EH_RETURN.
7534         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7535         nds32_output_stack_pop): Support dwarf exception handling process.
7536         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7537         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7538         exception handling process.
7539         (nds32_compute_stack_frame): Likewise.
7540         (nds32_return_addr_rtx): Likewise.
7541         (nds32_initial_elimination_offset): Likewise.
7542         (nds32_expand_prologue): Likewise.
7543         (nds32_expand_epilogue): Likewise.
7544         (nds32_dynamic_chain_address): New function.
7545         * config/nds32/nds32.h (machine_function): Add fields for dwarf
7546         exception handling.
7547         (DYNAMIC_CHAIN_ADDRESS): Define.
7548         (EH_RETURN_DATA_REGNO): Define.
7549         (EH_RETURN_STACKADJ_RTX): Define.
7550         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7551         patterns for dwarf exception handling.
7553 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7555         * config/nds32/nds32.h: Clean up obsolete macros.
7557 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7559         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7560         Add enum values for particular instructions.
7561         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7562         particular intrinsic functions.
7563         * config/nds32/nds32-intrinsic.md: Likewise.
7564         * config/nds32/nds32_intrinsic.h: Likewise.
7565         * config/nds32/nds32.h (nds32_builtins): Likewise.
7566         * config/nds32/nds32.md (type): Add pbsad and pbsada.
7567         (btst, ave): New patterns for particular instructions.
7569 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7571         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7572         Add enum values for atomic load/store and memory sync.
7573         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7574         and memory sync.
7575         * config/nds32/nds32-intrinsic.md: Likewise.
7576         * config/nds32/nds32_intrinsic.h: Likewise.
7577         * config/nds32/nds32.h (nds32_builtins): Likewise.
7579 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7581         PR tree-optimization/85257
7582         * fold-const.c (native_encode_vector): If not all elts could fit
7583         and off is -1, return 0 rather than offset.
7584         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7585         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7586         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
7587         adjust buffer in native_interpret_expr call.
7589 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7591         * config/nds32/constants.md (unspec_volatile_element): Add cache
7592         control enum values.
7593         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7594         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7595         * config/nds32/nds32.c (nds32_cctl_names): New.
7596         (nds32_print_operand): Handle cache control register names.
7597         * config/nds32/nds32.h (nds32_builtins): New enum values.
7598         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7599         macros.
7600         * config/nds32/nds32.md (type): Add mmu.
7601         * config/nds32/pipelines.md (simple_insn): Add mmu.
7603 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7605         * config/nds32/nds32.md (type): Remove call.
7606         * config/nds32/pipelines.md (simple_insn): Likewise.
7608 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7610         * config/nds32/constants.md (unspec_volatile_element): Add
7611         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7612         UNSPEC_VOLATILE_FMFCFG.
7613         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7614         description for fmfcfg and fmfcsr.
7615         (bdesc_1arg): Add fmtcsr.
7616         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7617         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7618         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7619         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7620         unspec_fmfcfg): New patterns.
7621         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7622         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7623         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7624         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7625         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7626         __nds32__fmfcfg): Define.
7628 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7630         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7631         intrinsic register names.
7632         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7633         intrinsic register enum values and macros.
7635 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7637         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7638         for load/store addressing form.
7639         (nds32_print_operand_address): Likewise.
7641 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
7643         PR target/85196
7644         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7645         based on LABEL_REF.  Remove useless assertion.
7646         (pic_address_needs_scratch): Fix formatting.
7647         (sparc_legitimize_pic_address): Minor tweaks.
7648         (sparc_delegitimize_address): Adjust assertion accordingly.
7649         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7650         into symbolic_operand.
7651         (movsi_high_pic_label_ref): Likewise.
7652         (movsi_lo_sum_pic_label_ref): Likewise.
7653         (movdi_pic_label_ref): Likewise.
7654         (movdi_high_pic_label_ref): Likewise.
7655         (movdi_lo_sum_pic_label_ref): Likewise.
7657 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
7659         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7660         custom LIB_SPEC setup.
7662 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
7663             Kito Cheng  <kito.cheng@gmail.com>
7665         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7666         * config/riscv/freebsd.h: New.
7668 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7670         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7671         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7672         file.
7674 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7675             Kito Cheng  <kito.cheng@gmail.com>
7677         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7678         nds32_output_call, nds32_symbol_binds_local_p): New functions.
7679         * config/nds32/nds32-protos.h (nds32_output_call,
7680         nds32_output_return): Declare.
7681         * config/nds32/nds32.md: Refine all the call and return patterns.
7683 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7685         PR debug/85252
7686         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7687         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7689         PR rtl-optimization/84872
7690         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7691         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7692         EDGE_CROSSING edge.
7694 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
7696         * expr.c (copy_blkmode_to_reg): Revert 254862.
7697         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7699 2018-04-06  Richard Biener  <rguenther@suse.de>
7701         PR middle-end/85244
7702         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7703         after seeing a component reference with an adjacent field.  Treat
7704         refs to arrays at struct end of external decls similar to
7705         refs to unconstrained commons.
7707 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7709         PR sanitizer/85213
7710         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7711         look through SAVE_EXPRs with non-side-effects argument.  Adjust
7712         recursive calls.
7713         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7714         save_p here.
7716 2018-04-06  Richard Biener  <rguenther@suse.de>
7718         PR middle-end/85180
7719         * alias.c (find_base_term): New wrapper around find_base_term
7720         unwinding CSELIB_VAL_PTR changes.
7721         (find_base_term): Do not restore CSELIB_VAL_PTR during the
7722         recursion.
7724 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7726         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7727         instructions.
7728         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7729         constant definitions.
7730         ("nop"): lr 0,0 -> nopr r0
7731         ("nop_lr0", "nop_lr1"): New insn definitions.
7733 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7735         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7736         NDS32_V3PUSH_AVAILABLE_P macro.
7738 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
7739             Chung-Ju Wu  <jasonwucj@gmail.com>
7741         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7742         (nds32*-*-*): Add float and fpu_config into supported_defaults.
7743         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7744         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7745         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7746         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7747         * config/nds32/constraints.md: New constraints and checking for hard
7748         float configuration.
7749         * config/nds32/iterators.md: New mode iterator and attribute for hard
7750         float configuration.
7751         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7752         patterns.
7753         * config/nds32/nds32-fpu.md: New file.
7754         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7755         deal with hard float code generation.
7756         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7757         ARCH_V3S.
7758         (abi_type, float_reg_number): New enum type.
7759         * config/nds32/nds32-predicates.c: New predicates for hard float.
7760         * config/nds32/nds32-protos.h: Declare functions for hard float.
7761         * config/nds32/nds32.c: Implementation for hard float configuration.
7762         * config/nds32/nds32.h: Definitions for hard float configuration.
7763         * config/nds32/nds32.md: Include hard float machine description and
7764         modify patterns for hard float configuration.
7765         * config/nds32/nds32.opt: New options for hard float configuration.
7766         * config/nds32/predicates.md: New predicates for hard float
7767         configuration.
7769 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
7771         * common/config/nds32/nds32-common.c
7772         (nds32_option_optimization_table): Enable -mreleax-hint by default.
7774 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
7776         PR middle-end/85195
7777         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7778         CONSTRUCTOR_ELT (ctor, ...)->value.
7780 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
7782         PR target/85193
7783         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7785 2018-04-05  Tom de Vries  <tom@codesourcery.com>
7787         PR target/85204
7788         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7789         cond jump.
7791 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7792             Kito Cheng  <kito.cheng@gmail.com>
7794         * config/nds32/constraints.md (U33): Fine-tune checking condition.
7795         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7796         * config/nds32/nds32.h (nds32_16bit_address_type): Add
7797         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7799 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7800             Kito Cheng  <kito.cheng@gmail.com>
7802         * config/nds32/constraints.md (Ufe): New memory constraint.
7803         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7804         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7805         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7806         operands.
7807         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7808         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7810 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7812         * config/nds32/nds32.md: Use optimize_size in the condition for
7813         alu-shift instructions.
7815 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7817         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7819 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7821         * config/nds32/nds32.md (negsi2): Refine pattern.
7823 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7824             Chung-Ju Wu  <jasonwucj@gmail.com>
7826         * config/nds32/iterators.md (shift_rotate): New code iterator.
7827         (shift): New code attribute.
7828         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7829         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7830         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7831         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7832         bit-wise operations.
7833         (andsi3, *andsi3): Ditto.
7834         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7835         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7836         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7837         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7838         nds32_ior_operand, nds32_xor_operand): New predicates.
7840 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7842         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7843         (addsi3, subsi3): ... this.
7845 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7847         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7849 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7851         * config/nds32/nds32.md: Adjust indention.
7853 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7855         * config/nds32/nds32.md (feature): New attribute.
7857 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7859         * config/nds32/nds32.md (subtype): New attribute.
7861 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7863         PR target/85203
7864         * config/arm/arm-builtins.c (arm_expand_builtin): Change
7865         expansion to perform a bitwise AND of the argument followed by a
7866         boolean negation of the result.
7868 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
7870         PR rtl-optimization/84878
7871         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7872         the basic block.  Assert the use reference is not artificial and that
7873         it has an associated insn.
7875 2018-04-04  Michael Matz  <matz@suse.de>
7877         * builtins.c (compute_objsize): Pass correct operand
7878         to array_at_struct_end_p.
7880 2018-04-04  Richard Biener  <rguenther@suse.de>
7882         PR lto/85176
7883         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7884         from contexts for DINFO_LEVEL_TERSE and below.
7886 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7888         * config/nds32/nds32-doubleword.md (move_<mode>): Require
7889         resiter_operand condition.
7890         * config/nds32/nds32.md (*move<mode>): Ditto.
7892 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7893             Monk Chiang  <sh.chiang04@gmail.com>
7895         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7897 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7899         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
7901 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7902             Kito Cheng  <kito.cheng@gmail.com>
7904         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
7905         nds32_cond_code_str, output_cond_branch,
7906         output_cond_branch_compare_zero, nds32_expand_cbranch,
7907         nds32_expand_cstore, nds32_expand_movcc,
7908         nds32_output_cbranchsi4_equality_zero,
7909         nds32_output_cbranchsi4_equality_reg,
7910         nds32_output_cbranchsi4_equality_reg_or_const_int,
7911         nds32_output_cbranchsi4_greater_less_zero: New functions.
7912         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
7913         nds32_expand_cstore, nds32_expand_movcc,
7914         nds32_output_cbranchsi4_equality_zero,
7915         nds32_output_cbranchsi4_equality_reg,
7916         nds32_output_cbranchsi4_equality_reg_or_const_int,
7917         nds32_output_cbranchsi4_greater_less_zero): Declare.
7918         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
7919         nds32_rimm11s_operand): New predicates.
7920         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
7921         * config/nds32/nds32.md: Rewrite all the branch and conditional move
7922         patterns.
7924 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7926         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
7927         * config/nds32/nds32.md: Ditto.
7928         * config/nds32/pipelines.md: Ditto.
7930 2018-04-04  Richard Biener  <rguenther@suse.de>
7932         PR tree-optimization/85168
7933         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
7934         propagating abnormals.
7936 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7938         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
7940 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7941             Kito Cheng  <kito.cheng@gmail.com>
7943         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
7944         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
7945         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
7946         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
7947         * config/nds32/nds32.md (sibcall_internal): New.
7948         (sibcall_register): Remove.
7949         (sibcall_immediate): Remove.
7950         (sibcall_value_internal): New.
7951         (sibcall_value_register): Remove.
7952         (sibcall_value_immediate): Remove.
7953         * config/nds32/predicates.md (nds32_general_register_operand): New.
7954         (nds32_call_address_operand): New.
7956 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7958         PR rtl-optimization/85167
7959         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
7960         bb_defs if *split_p, instead preinitialize it to NULL.
7962         PR tree-optimization/85156
7963         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
7964         evaluating the argument multiple times.
7966 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
7968         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
7969         than vector.
7970         (_mm_cvtpd_ps): Likewise.
7971         (_mm_cvttpd_epi32): Likewise.
7972         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
7973         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
7974         vector, pixel, and bool following altivec.h include.
7976 2018-04-03  Martin Sebor  <msebor@redhat.com>
7978         * doc/extend.texi (Common Function Attributes): Clarify.
7979         (const attribute): Likewise.
7980         (pure attribute): Likewise.
7982 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7984         PR target/85169
7985         * config/i386/i386.c (ix86_expand_vector_set): Use
7986         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
7988 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
7990         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
7991         instructions when changing rounding bits to preserve precision bits
7992         in the x87 control word.
7994 2018-04-03  Martin Liska  <mliska@suse.cz>
7996         PR tree-optimization/82491
7997         * rtl.h (strip_offset_and_add): Replace += suboffset with
7998         poly_uint64 () + suboffset.
8000 2018-03-29  Martin Liska  <mliska@suse.cz>
8001             Martin Jambor  <mjambor@suse.cz>
8003         PR ipa/84947
8004         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8005         param_type is not an integral or pointer type.
8007 2018-04-03  Richard Biener  <rguenther@suse.de>
8009         * sese.h (recompute_all_dominators): Remove.
8011 2018-04-02  Martin Sebor  <msebor@redhat.com>
8013         * doc/invoke.texi (-Wrestrict): Fix typos.
8015 2018-04-02  Jim Wilson  <jimw@sifive.com>
8017         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8018         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8019         (<optab>di3, <optab>si3_extend): Likewise.
8020         (<optab>si3_mask, <optab>si3_mask_1): New.
8021         (<optab>di3_mask, <optab>di3_mask_1): New.
8022         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8023         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8024         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8026 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8028         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8029         example.
8031 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8033         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8034         (nds32_canonicalize_comparison): New function.
8036 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8037             Kito Cheng  <kito.cheng@gmail.com>
8038             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8040         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8041         * config/nds32/constants.md (unspec_volatile_element): Add
8042         UNSPEC_VOLATILE_RELAX_GROUP.
8043         * config/nds32/nds32-relax-opt.c: New file.
8044         * config/nds32/nds32-predicates.c
8045         (nds32_symbol_load_store_p): New function.
8046         * config/nds32/nds32-protos.h
8047         (nds32_symbol_load_store_p): Declare function.
8048         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8049         * config/nds32/nds32.c
8050         (nds32_register_pass): New function to register pass.
8051         (nds32_register_passes): New function to register passes.
8052         * config/nds32/nds32.md (relax_group): New pattern.
8053         * config/nds32/nds32.opt (mrelax-hint): New option.
8054         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8056 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8058         * config/nds32/t-nds32: Modify files dependency.
8060 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8062         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8063         (PROFILE_HOOK): Define its implementation.
8065 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8067         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8068         type and 32-bit size.
8070 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8072         PR middle-end/85090
8073         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8074         (V_128_256): New mode iterator.
8075         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8076         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8077         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8078         of V.
8079         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8080         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8082 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8084         PR target/83315
8085         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8086         NaN inputs correctly.
8088 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8090         PR target/80546
8091         * config/rs6000/vsx.md (??r): New mode attribute.
8092         (*vsx_mov<mode>_64bit): Use it.
8093         (*vsx_mov<mode>_32bit): Likewise.
8095 2018-03-30  Martin Sebor  <msebor@redhat.com>
8097         PR tree-optimization/84818
8098         * builtins.c (check_access): Use warning_n.
8100 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8102         PR target/83822
8103         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8104         condition.
8105         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8106         condition.
8108 2018-03-30  Julia Koval  <julia.koval@intel.com>
8110         PR target/84413
8111         * x86-tune.def (movx, partial_reg_dependency): Enable for
8112         m_SKYLAKE_AVX512.
8114 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8116         PR inline-asm/84985
8117         * lra-constraints.c (process_alt_operands): Move setting
8118         this_alternative_matches below.
8120 2018-03-29  Martin Liska  <mliska@suse.cz>
8122         PR lto/84995.
8123         * doc/invoke.texi: Document how LTO works with debug info.
8124         Describe auto-load support of binutils.  Mention 'x86-64'
8125         as valid option value of -march option.
8127 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8129         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8131         PR c/85094
8132         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8133         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8134         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8135         checking.
8137 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8139         PR target/84912
8140         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8141         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8142         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8143         for RS6000_BTM_POWERPC64.
8144         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8145         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8146         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8147         definition.
8148         (DIVDE): Use it.
8149         (DIVDEU): Likewise.
8151 2018-03-28 Carl Love  <cel@us.ibm.com>
8153         Revert
8154         2017-09-27  Carl Love  <cel@us.ibm.com>
8156         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8157         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8158         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8159         fctiw instruction.
8161 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8163         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8164         instead of __vector bool.
8165         (_mm_max_pu8): Likewise.
8166         (_mm_min_pi16): Likewise.
8168 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8170         PR target/84912
8171         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8172         (DIVWEUO): Likewise.
8173         (DIVDEO): Likewise.
8174         (DIVDEUO): Likewise.
8175         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8176         DIVWEUO and DIVDEUO.
8177         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8178         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8179         (div_extend): Likewise.
8180         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8181         builtin function.
8182         (__builtin_divweuo): Likewise.
8183         (__builtin_divdeo): Likewise.
8184         (__builtin_divdeuo): Likewise.
8186 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8188         PR target/85095
8189         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8190         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8192         PR tree-optimization/82004
8193         * gimple-match-head.c (optimize_pow_to_exp): New function.
8194         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8195         Don't fold to exp if optimize_pow_to_exp is false.
8197 2018-03-28  Martin Liska  <mliska@suse.cz>
8199         PR other/84819
8200         * calls.c (initialize_argument_information): Fix trailing space.
8201         * common.opt: Fix typo and provide better explanation for
8202         -fsanitize-coverage option.
8203         * config/i386/i386.opt: Fix typo.
8205 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8206             Martin Liska  <mliska@suse.cz>
8208         PR sanitizer/85081
8209         * gimplify.c (asan_poison_variable): Don't do the check for
8210         gimplify_omp_ctxp here.
8211         (gimplify_decl_expr): Do it here.
8212         (gimplify_target_expr): Likewise.
8214 2018-03-28  Martin Liska  <mliska@suse.cz>
8216         PR target/84988
8217         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8218         chkp_type_bounds_count if MPX is not enabled.
8220 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8222         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8224 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8226         PR target/84914
8227         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8228         function to create the function decl for complex long double
8229         multiply and divide for -mabi=ieeelongdouble.
8230         (init_float128_ieee): Call it.
8232 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8234         PR target/85044
8235         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8236         -fcf-protection=branch -mibt.
8237         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8239 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8241         PR target/81863
8242         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8243         arm_word_relocations.
8245 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8247         PR target/85056
8248         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8249         extern array declarations.
8251 2018-03-27  Richard Biener  <rguenther@suse.de>
8253         PR middle-end/84067
8254         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8255         explicit single_use checks.
8257 2018-03-27  Richard Biener  <rguenther@suse.de>
8259         PR tree-optimization/85082
8260         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8261         Valueize the VUSE.
8263 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8265         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8266         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8267         Turn on fasynchronous-unwind-tables and funwind-tables.
8269 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8271         PR target/85073
8272         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8273         (*bmi_blsr_<mode>_ccz): Ditto.
8275 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8277         PR tree-optimization/85063
8278         * omp-general.c (offloading_function_p): New function.  Factor out
8279         of ...
8280         * omp-offload.c (pass_omp_target_link::gate): ... here.
8281         * omp-general.h (offloading_function_p): Declare.
8282         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8283         with attribute omp declare target for offloading functions.
8285 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8287         PR tree-optimization/84005
8288         * tree-data-ref.h (get_base_for_alignment): Declare.
8289         * tree-data-ref.c (get_base_for_alignment_1): New function.
8290         (get_base_for_alignment): Likewise.
8291         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8292         get_base_for_alignment to find a suitable base object, instead
8293         of always using drb->base_address.
8295 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8297         PR inline-asm/85022
8298         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8299         known size by default.
8301 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8303         PR inline-asm/85030
8304         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8305         and non BLKmode operands.
8307 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8309         PR target/85026
8310         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8311         Clean up attributes.
8313 2018-03-23  Richard Biener  <rguenther@suse.de>
8315         PR debug/85020
8316         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8317         we are going to emit early debug for LTO.
8319 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8321         PR inline-asm/85034
8322         * function.c (match_asm_constraints_1): Don't optimize if input
8323         doesn't satisfy general_operand predicate for output's mode.
8325         PR inline-asm/85022
8326         * alias.c (write_dependence_p): Don't require for x_canonicalized
8327         non-VOIDmode if x has VOIDmode.
8329         PR sanitizer/85029
8330         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8331         just don't try to optimize it rather than assert it never happens.
8333 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8335         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8336         macro expansions for definition of ST_INTERNAL_<mode> and
8337         LD_INTERNAL_<mode> builtins.
8338         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8339         Remove prototype.
8340         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8341         function.
8342         (altivec_expand_st_builtin): Likewise.
8343         (altivec_expand_builtin): Remove calls to deleted functions.
8344         (rs6000_address_for_altivec): Delete this function.
8345         * config/rs6000/vector.md: Remove expands for
8346         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8348 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8350         PR target/84826
8351         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8352         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8353         re-computing once computed.
8354         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8355         (arm_init_machine_status): Initialize
8356         machine->static_chain_stack_bytes.
8358 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8360         PR target/84760
8361         * doc/extend.texi: Add four new prototypes for vec_ld.
8362         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8363         definitions for more logical presentation.
8364         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8365         entries for V1TI variants of __builtin_altivec_ld builtin.
8366         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8367         handling of V1TI variant of LVX icode pattern.
8368         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8369         (rs6000_gimple_fold_builtin): Likewise.
8370         (altivec_init_builtins): Add code to define
8371         __builtin_altivec_lvx_v1ti function.
8373 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8375         PR inline-asm/84941
8376         * function.c (match_asm_constraints_1): Don't do the optimization
8377         if input isn't a REG, SUBREG, MEM or constant.
8379 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8381         PR tree-optimization/84956
8382         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8383         bb_has_abnormal_pred.
8385 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8387         PR sanitizer/85018
8388         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8389         DECL_INITIAL (decl) to decl at the end.
8390         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8391         adjust the comment.
8393 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8395         * doc/extend.texi (__builtin_tgmath): Document when complex
8396         integer types are treated as _Complex _Float64.
8398 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8400         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8402 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8404         PR tree-optimization/84960
8405         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8406         if it is ENTRY block, move them into single succ of ENTRY in that case.
8408 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8410         PR tree-optimization/84811
8411         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8412         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8413         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8414         (known_subrange_p): Update accordingly.  Cast each value involved
8415         in the size comparison, rather than casting the result of the
8416         subtraction.
8418 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8420         PR tree-optimization/84982
8421         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8422         by flipping the least significant bit rather than all bits from
8423         bitpos to bitpos + bitsize - 1.
8425 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8427         * doc/extend.texi (Deprecated Features): Remove mention of
8428         long-deleted deprecations.
8430 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8432         PR jit/84288
8433         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8434         * configure: Regenerate.
8436 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8438         PR tree-optimization/83126
8439         * tree-parloops.c (num_phis): New function.
8440         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8442 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8444         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8445         mention anon-struct/union members and trailing attributes.
8447 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8449         PR tree-optimization/84969
8450         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8451         builtin memset partitions if they set different rhs values.
8453 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8455         PR rtl-optimization/84989
8456         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8457         VEC_DUPLICATE with scalar result mode.
8459 2018-03-21  Martin Liska  <mliska@suse.cz>
8461         PR ipa/84963
8462         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8463         not intended return statement.
8465 2018-03-21  Martin Liska  <mliska@suse.cz>
8467         PR target/84988
8468         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8469         (chkp_find_bound_slots_1): Limit number of iterations.
8471 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8473         PR target/84838
8474         * Minor grammar fixes for x86 options.
8476 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8478         PR debug/84875
8479         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8480         holding REG_CFA_RESTORE notes, instead turn them into a USE.
8482 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
8484         PR target/83789
8485         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8486         (altivec_lvx_<mode>_1op): Likewise.
8487         (altivec_stvx_<mode>_2op): Likewise.
8488         (altivec_stvx_<mode>_1op): Likewise.
8489         (altivec_lvx_<VM2:mode>): New define_expand.
8490         (altivec_stvx_<VM2:mode>): Likewise.
8491         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8492         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8493         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8494         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8495         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8496         (rs6000_gen_lvx): Likewise.
8497         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8498         (altivec_expand_stv_builtin): Likewise.
8499         (altivec_expand_builtin): Likewise.
8500         * config/rs6000/vector.md: Likewise.
8502 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8504         PR target/82518
8505         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8506         BYTES_BIG_ENDIAN.
8508 2018-03-20  Richard Biener  <rguenther@suse.de>
8510         PR target/84986
8511         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8512         sign-conversions as zero, fall back to standard scalar_stmt
8513         cost for the rest.
8515 2018-03-20  Martin Liska  <mliska@suse.cz>
8517         PR ipa/84825
8518         * predict.c (rebuild_frequencies): Handle case when we have
8519         PROFILE_ABSENT, but flag_guess_branch_prob is false.
8521 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8523         PR target/84990
8524         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8525         flag_section_anchors.
8526         * varasm.c (use_blocks_for_decl_p): Remove hack for
8527         dw2_force_const_mem.
8529         PR target/84845
8530         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8531         to ...
8532         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
8533         be created, use lowpart_subreg of operands[0] rather than operands[0]
8534         itself.
8535         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8536         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8537         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8538         and n constraint instead of aarch64_shift_imm_di and Usd.
8539         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8540         (*aarch64_<optab>_reg_minus<mode>3): ... this.
8542 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
8544         PR target/82989
8545         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8546         to favor GPR over NEON registers.
8547         (<shift>di3_neon): Likewise.
8549 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8551         PR target/84952
8552         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8553         (nvptx_process_pars): Emit bar.sync asap and alap.
8555 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8557         PR target/84954
8558         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8559         seen_label if seen_label is already set.
8561 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8563         PR target/84945
8564         * config/i386/i386.c (fold_builtin_cpu): For features above 31
8565         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8566         Use 1U instead of 1.  Formatting fixes.
8568         PR c/84953
8569         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8570         instead of TREE_TYPE (s1) for the return value.
8572 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
8574         PR tree-optimization/84946
8575         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8576         bitsize + bitsize in poly_uint64 rather than poly_int64.
8578         PR sanitizer/78651
8579         * dwarf2asm.c: Include fold-const.c.
8580         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8581         of decl rather than decl itself.
8583         PR rtl-optimization/84643
8584         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8586 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
8588         PR sanitizer/78651
8589         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8590         calling assemble_variable.
8592 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
8594         PR target/81647
8595         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8596         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8598 2018-03-19  Jim Wilson  <jimw@sifive.com>
8600         PR bootstrap/84856
8601         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8602         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8603         (riscv_first_stack_step): Likewise.
8604         (riscv_option_override): Use STACK_BOUNDARY instead of
8605         MIN_STACK_BOUNDARY.
8606         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8607         MIN_STACK_BOUNDARY.
8608         (BIGGEST_ALIGNMENT): Set to 128.
8609         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8610         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8611         STACK_BOUNDARY.
8613 2018-03-19  Richard Biener  <rguenther@suse.de>
8615         PR tree-optimization/84933
8616         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8617         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8619 2018-03-19  Richard Biener  <rguenther@suse.de>
8621         PR tree-optimization/84859
8622         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8623         (cond_if_else_store_replacement): Perform sinking operation on
8624         single-store BBs regardless of MAX_STORES_TO_SINK setting.
8625         Generalize what a BB with a single eligible store is.
8627 2018-03-19  Richard Biener  <rguenther@suse.de>
8629         PR tree-optimization/84929
8630         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8631         chrec_is_positive against non-chrec arg.
8633 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
8635         PR target/84711
8636         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8638 2018-03-18  Martin Liska  <mliska@suse.cz>
8640         PR rtl-optimization/84635
8641         * regrename.c (build_def_use): Use matches_mode only when
8642         matches >= 0.
8644 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
8646         PR tree-optimization/84913
8647         * tree-vect-loop.c (vectorizable_reduction): Don't try to
8648         vectorize chains of COND_EXPRs.
8650 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8652         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8654 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8656         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8658 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8660         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8662 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8663             Kito Cheng  <kito.cheng@gmail.com>
8665         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8666         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8667         (nds32_adjust_reg_alloc_order): New function.
8668         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8670 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
8672         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8673         nds32_print_operand, nds32_print_operand_address): Use
8674         HOST_WIDE_INT_PRINT_DEC instead.
8676 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8678         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8680 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
8682         PR target/84902
8683         * config/i386/i386.c (initial_ix86_tune_features,
8684         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8685         unsigned long long.
8686         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8687         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8688         rather than 1u << ix86_tune.  Formatting fix.
8689         (ix86_option_override_internal): Change ix86_arch_mask from
8690         unsigned int to unsigned HOST_WIDE_INT, initialize to
8691         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8692         (ix86_function_specific_restore): Likewise.
8694 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8696         PR target/84899
8697         * postreload.c (reload_combine_recognize_pattern): Perform
8698         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8699         truncate_int_for_mode the result for the destination's mode.
8701         PR c/84909
8702         * hsa-gen.c (mem_type_for_type): Fix comment typo.
8703         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8704         Likewise.
8705         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8706         Likewise.
8708 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
8710         PR target/84876
8711         * lra-assigns.c (lra_split_hard_reg_for): Don't use
8712         regno_allocno_class_array and sorted_pseudos.
8713         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8714         insns where regno is used.
8716 2018-03-16  Martin Liska  <mliska@suse.cz>
8718         PR ipa/84833
8719         * multiple_target.c (create_dispatcher_calls): Redirect
8720         reference in the symbol table.
8722 2018-03-16  Martin Liska  <mliska@suse.cz>
8724         PR ipa/84722
8725         * multiple_target.c (create_dispatcher_calls): Redirect also
8726         an alias.
8728 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8730         PR c++/79937
8731         PR c++/82410
8732         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8733         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8734         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8736 2018-03-16  Julia Koval  <julia.koval@intel.com>
8738         * doc/invoke.texi (Skylake Server): Add CLWB.
8739         Cannonlake): Remove CLWB.
8741 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8743         PR tree-optimization/84841
8744         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8745         1 << 3.
8746         (FLOAT_ONE_CONST_TYPE): Define.
8747         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8748         (sort_by_operand_rank): Put entries with higher constant_type last
8749         rather than first to match comments.
8751 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
8753         * config/nios2/nios2.md (movsi_internal): Fix thinko in
8754         split predicate.
8756 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8758         PR c++/79085
8759         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8760         check and use address of target always.
8762 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
8764         PR target/84574
8765         * config/i386/i386.c (indirect_thunk_needed): Update comments.
8766         (indirect_thunk_bnd_needed): Likewise.
8767         (indirect_thunks_used): Likewise.
8768         (indirect_thunks_bnd_used): Likewise.
8769         (indirect_return_needed): New.
8770         (indirect_return_bnd_needed): Likewise.
8771         (output_indirect_thunk_function): Add a bool argument for
8772         function return.
8773         (output_indirect_thunk_function): Don't generate alias for
8774         function return thunk.
8775         (ix86_code_end): Call output_indirect_thunk_function to generate
8776         function return thunks.
8777         (ix86_output_function_return): Set indirect_return_bnd_needed
8778         and indirect_return_needed instead of indirect_thunk_bnd_needed
8779         and indirect_thunk_needed.
8781 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
8783         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8784         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8785         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8787 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
8788             Paul Hua <paul.hua.gm@gmail.com>
8790         PR c/84852
8791         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8793 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
8795         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8796         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8797         resp. SFmode cases.
8799 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
8801         PR target/84711
8802         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8803         instead of GET_MODE_SIZE when comparing Units.
8805 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8807         PR target/68256
8808         * varasm.c (hash_section): Return an unchangeble hash value
8809         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8810         Return !aarch64_can_use_per_function_literal_pools_p ().
8812 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8814         PR target/84860
8815         * optabs.c (emit_conditional_move): Pass address of cmode's copy
8816         rather than address of cmode as last argument to prepare_cmp_insn.
8818 2018-03-15  Julia Koval  <julia.koval@intel.com>
8820         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8821         F_AVX512VNNI, F_AVX512BITALG): New.
8823 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
8825         PR target/83451
8826         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
8827         insn for floating-point loads and stores.
8829 2018-03-14  Carl Love  <cel@us.ibm.com>
8831         * config/rs6000/rs6000-c.c: Add macro definitions for
8832         ALTIVEC_BUILTIN_VEC_PERMXOR.
8833         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8834         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8835         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8836         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8837         UNSPEC_VPERMXOR.
8838         * config/doc/extend.texi: Add prototypes for vec_permxor.
8840 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
8842         PR c/84852
8843         * diagnostic-show-locus.c (class layout_point): Convert m_line
8844         from int to linenum_type.
8845         (line_span::comparator): Use linenum "compare" function when
8846         comparing line numbers.
8847         (test_line_span): New function.
8848         (layout_range::contains_point): Convert param "row" from int to
8849         linenum_type.
8850         (layout_range::intersects_line_p): Likewise.
8851         (layout::will_show_line_p): Likewise.
8852         (layout::print_source_line): Likewise.
8853         (layout::should_print_annotation_line_p): Likewise.
8854         (layout::print_annotation_line): Likewise.
8855         (layout::print_leading_fixits): Likewise.
8856         (layout::annotation_line_showed_range_p): Likewise.
8857         (struct line_corrections): Likewise for field m_row.
8858         (line_corrections::line_corrections): Likewise for param "row".
8859         (layout::print_trailing_fixits): Likewise.
8860         (layout::get_state_at_point): Likewise.
8861         (layout::get_x_bound_for_row): Likewise.
8862         (layout::print_line): Likewise.
8863         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8864         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8865         * input.c (selftest::test_linenum_comparisons): New function.
8866         (selftest::input_c_tests): Call it.
8867         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8868         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8869         * selftest.h (ASSERT_GT): New macro.
8870         (ASSERT_GT_AT): New macro.
8871         (ASSERT_LT): New macro.
8872         (ASSERT_LT_AT): New macro.
8874 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
8876         PR rtl-optimization/84780
8877         * combine.c (distribute_links): Don't make a link based on pc_rtx.
8879 2018-03-14  Martin Liska  <mliska@suse.cz>
8881         * tree.c (record_node_allocation_statistics): Use
8882         get_stats_node_kind.
8883         (get_stats_node_kind): New function extracted from
8884         record_node_allocation_statistics.
8885         (free_node): Use get_stats_node_kind.
8887 2018-03-14  Richard Biener  <rguenther@suse.de>
8889         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8890         that the value-set of ANTIC_IN doesn't grow.
8892         Revert
8893         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8894         member.
8895         (BB_VISITED_WITH_VISITED_SUCCS): New define.
8896         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8898 2018-03-14  Julia Koval  <julia.koval@intel.com>
8900         * config.gcc (icelake-client, icelake-server): New.
8901         (icelake): Remove.
8902         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8903         (initial_ix86_arch_features): Ditto.
8904         (PTA_SKYLAKE): Add SGX.
8905         (PTA_ICELAKE): Remove.
8906         (PTA_ICELAKE_CLIENT): New.
8907         (PTA_ICELAKE_SERVER): New.
8908         (ix86_option_override_internal): Split up icelake on icelake client and
8909         icelake server.
8910         (get_builtin_code_for_version): Ditto.
8911         (fold_builtin_cpu): Ditto.
8912         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
8913         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
8914         * config/i386/i386.h (processor_type): Ditto.
8915         * doc/invoke.texi: Ditto.
8917 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
8919         PR sanitizer/83392
8920         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
8921         INTEGER_CST offset, add it together with bitpos / 8 and
8922         sign extend based on POINTER_SIZE.
8924         PR target/84844
8925         Revert
8926         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
8928         PR target/78090
8929         * config/i386/constraints.md (Yc): New register constraint.
8930         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
8931         Use Yc constraint for alternative 2 of operand 0.  Remove
8932         preferred_for_speed attribute.
8934 2018-03-14  Richard Biener  <rguenther@suse.de>
8936         PR tree-optimization/84830
8937         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
8938         with the old one to avoid oscillations.
8940 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
8942         PR target/83712
8943         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
8944         pseudos.
8945         (assign_by_spills): Return a flag of reload assignment failure.
8946         Do not process the reload assignment failures.  Do not spill other
8947         reload pseudos if they has the same reg class.  Update n if
8948         necessary.
8949         (lra_assign): Add a return arg.  Set up from the result of
8950         assign_by_spills call.
8951         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8952         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8953         usage_insns if it is not NULL.
8954         (spill_hard_reg_in_range): New function.
8955         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8956         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8957         function prototypes.
8958         (lra_assign): Change prototype.
8959         * lra.c (lra): Add code to deal with fails by splitting hard reg
8960         live ranges.
8962 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
8964         * config/riscv/riscv.opt (mrelax): New option.
8965         * config/riscv/riscv.c (riscv_file_start): Emit ".option
8966         "norelax" when riscv_mrelax is disabled.
8967         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
8969 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8971         PR target/84743
8972         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
8973         reassociation for int modes.
8975 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8977         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
8978         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
8979         for big-endian.
8980         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
8981         * config/aarch64/aarch64-sve.md
8982         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
8983         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
8984         (*extend<mode><Vwide>2): Rename to...
8985         (aarch64_sve_extend<mode><Vwide>2): ...this.
8986         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
8987         renaming the old pattern to...
8988         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
8989         unsigned packs.
8990         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
8991         define_expand, renaming the old pattern to...
8992         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
8993         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
8994         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
8995         account when deciding which SVE instruction the optab should use.
8996         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
8998 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9000         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9001         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9002         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9003         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9004         (tlsdesc_small_<mode>): Turn a define_expand and use
9005         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9006         (tlsdesc_small_advsimd_<mode>): ...this.
9007         (tlsdesc_small_sve_<mode>): New pattern.
9009 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9011         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9012         (UNSPEC_UMUL_HIGHPART): New constants.
9013         (MUL_HIGHPART): New int iteraor.
9014         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9015         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9016         define_expand.
9017         (*<su>mul<mode>3_highpart): New define_insn.
9019 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9021         PR lto/84805
9022         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9023         incomplete types.
9025 2018-03-13  Martin Liska  <mliska@suse.cz>
9027         PR ipa/84658.
9028         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9029         vector.
9030         (sem_item_optimizer::~sem_item_optimizer): Release it.
9031         (sem_item_optimizer::merge_classes): Register variable aliases.
9032         (sem_item_optimizer::fixup_pt_set): New function.
9033         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9034         * ipa-icf.h: Declare new variables and functions.
9036 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9038         PR middle-end/84834
9039         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9040         integer_pow2p@2 and test integer_pow2p in condition.
9041         (A < 0 ? C : 0): Similarly for @1.
9043         PR middle-end/84831
9044         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9045         characters starting at p contain '\0' character, don't look beyond
9046         that.
9048         PR target/84827
9049         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9050         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9052         PR target/84828
9053         * reg-stack.c (change_stack): Change update_end var from int to
9054         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9055         also call set_block_for_insn on the newly added insns and rescan.
9057         PR target/84786
9058         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9059         on the last operand.
9061         PR c++/84704
9062         * tree.c (stabilize_reference_1): Return save_expr (e) for
9063         STATEMENT_LIST even if it doesn't have side-effects.
9065 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9067         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9069 2018-03-12  Renlin Li  <renlin.li@arm.com>
9071         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9072         aarch64_output_scalar_simd_mov_immediate.
9074 2018-03-12  Martin Sebor  <msebor@redhat.com>
9076         PR tree-optimization/83456
9077         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9078         for perfectly overlapping calls to memcpy.
9079         (gimple_fold_builtin_memory_chk): Same.
9080         (gimple_fold_builtin_strcpy): Handle no-warning.
9081         (gimple_fold_builtin_stxcpy_chk): Same.
9082         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9084 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9086         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9087         parameter.  Use it for SFmode.
9088         (rs6000_function_arg_advance_1): Adjust.
9089         (rs6000_function_arg): Adjust.
9090         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9092 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9094         PR rtl-optimization/84169
9095         PR rtl-optimization/84780
9096         * combine.c (can_combine_p): Check for a 2-insn combination whether
9097         the destination register is used between the two insns, too.
9099 2018-03-12  Richard Biener  <rguenther@suse.de>
9101         PR tree-optimization/84803
9102         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9103         for refs DR analysis didn't process.
9105 2018-03-12  Richard Biener  <rguenther@suse.de>
9107         PR tree-optimization/84777
9108         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9109         force-vectorize loops ignore whether we are optimizing for size.
9111 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9113         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9114         (TARGET_MD_ASM_ADJUST): Define.
9116 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9117             Kito Cheng  <kito.cheng@gmail.com>
9118             Chung-Ju Wu  <jasonwucj@gmail.com>
9120         * config/nds32/nds32.c (nds32_compute_stack_frame,
9121         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9122         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9123         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9124         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9125         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9126         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9127         * config/nds32/nds32.md (prologue, epilogue): Use macro
9128         NDS32_V3PUSH_AVAILABLE_P to do checking.
9130 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9132         PR debug/58150
9133         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9134         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9135         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9136         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9137         addition of most attributes on !orig_type_die or the attribute not
9138         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9140 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9141             Chung-Ju Wu  <jasonwucj@gmail.com>
9143         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9144         __NDS32_VH__ macro.
9145         * config/nds32/nds32.opt (mvh): New option.
9147 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9148             Chung-Ju Wu  <jasonwucj@gmail.com>
9150         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9151         function.
9152         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9153         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9154         definition.
9156 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9157             Chung-Ju Wu  <jasonwucj@gmail.com>
9159         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9160         function.
9161         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9162         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9164 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9165             Kito Cheng  <kito.cheng@gmail.com>
9166             Chung-Ju Wu  <jasonwucj@gmail.com>
9168         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9169         UNSPEC_FFMISM and UNSPEC_FLMISM.
9170         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9171         for ffb, ffmism and flmism.
9172         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9173         (unspec_ffmism): Ditto.
9174         (unspec_flmism): Ditto.
9175         (nds32_expand_builtin_impl): Check if string extension is available.
9176         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9177         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9179 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9181         Reverting patch:
9182         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9184         PR target/83712
9185         * lra-assigns.c (assign_by_spills): Return a flag of reload
9186         assignment failure.  Do not process the reload assignment
9187         failures.  Do not spill other reload pseudos if they has the same
9188         reg class.
9189         (lra_assign): Add a return arg.  Set up from the result of
9190         assign_by_spills call.
9191         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9192         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9193         usage_insns if it is not NULL.
9194         (spill_hard_reg_in_range): New function.
9195         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9196         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9197         function prototypes.
9198         (lra_assign): Change prototype.
9199         * lra.c (lra): Add code to deal with fails by splitting hard reg
9200         live ranges.
9202 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9204         PR target/84807
9205         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9207 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9209         PR debug/84620
9210         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9211         (dw_val_node): Add val_symbolic_view.
9212         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9213         (symview_upper_bound): New.
9214         (new_line_info_table): Initialize symviews_since_reset.
9215         (dwarf2out_source_line): Count symviews_since_reset and set
9216         symview_upper_bound.
9217         (dw_val_equal_p): Handle symview.
9218         (add_AT_symview): New.
9219         (print_dw_val): Handle symview.
9220         (attr_checksum, attr_checksum_ordered): Likewise.
9221         (same_dw_val_p, size_of_die): Likewise.
9222         (value_format, output_die): Likewise.
9223         (add_high_low_attributes): Use add_AT_symview for entry_view.
9224         (dwarf2out_finish): Reset symview_upper_bound, clear
9225         zero_view_p.
9227 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9229         PR target/83969
9230         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9231         Add strict argument and use it.
9232         (rs6000_split_multireg_move): Update for new strict argument.
9233         (mem_operand_gpr): Disallow all non-offsettable addresses.
9234         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9236 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9238         PR target/84772
9239         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9240         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9241         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9243         PR c++/84767
9244         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9245         decl, use remap_type if we want to use the type.
9247 2018-03-09  Martin Sebor  <msebor@redhat.com>
9249         PR tree-optimization/84526
9250         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9251         Remove dead code.
9252         (builtin_access::generic_overlap): Be prepared to handle non-array
9253         base objects.
9255 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9257         PR rtl-optimization/84682
9258         * lra-constraints.c (process_address_1): Check is_address flag
9259         for address constraints.
9260         (process_alt_operands): Likewise.
9261         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9262         preprocess_constraints.
9263         * recog.h (preprocess_constraints): Add oploc parameter.
9264         Adjust callers.
9265         * recog.c (preprocess_constraints): Test address_operand for
9266         CT_ADDRESS constraints.
9268 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9270         PR target/83712
9271         * lra-assigns.c (assign_by_spills): Return a flag of reload
9272         assignment failure.  Do not process the reload assignment
9273         failures.  Do not spill other reload pseudos if they has the same
9274         reg class.
9275         (lra_assign): Add a return arg.  Set up from the result of
9276         assign_by_spills call.
9277         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9278         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9279         usage_insns if it is not NULL.
9280         (spill_hard_reg_in_range): New function.
9281         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9282         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9283         function prototypes.
9284         (lra_assign): Change prototype.
9285         * lra.c (lra): Add code to deal with fails by splitting hard reg
9286         live ranges.
9288 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9290         PR target/83193
9291         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9292         Accept complain bool parameter.  Only emit errors if it is true.
9293         (arm_parse_cpu_option_name): Likewise.
9294         (arm_target_thumb_only): Adjust callers of the above.
9295         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9296         prototype to take a default true bool parameter.
9297         (arm_parse_arch_option_name): Likewise.
9299 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9300             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9302         PR jit/64089
9303         PR jit/84288
9304         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9305         * configure: Regenerate.
9306         * configure.ac ("linker --version-script option"): New.
9307         ("linker soname option"): New.
9309 2018-03-09  Richard Biener  <rguenther@suse.de>
9311         PR tree-optimization/84775
9312         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9313         immediate uses of predicate stmts and mark them modified.
9315         Revert
9316         PR tree-optimization/84178
9317         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9318         to caller.
9319         (version_loop_for_if_conversion): Delay update_ssa call.
9320         (tree_if_conversion): Delay update_ssa until after predicate
9321         insertion.
9323 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9325         PR target/84763
9326         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9327         when the function accesses prior frames.
9329 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9331         PR debug/84456
9332         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9333         gen_llsym, otherwise call maybe_gen_llsym.
9335         PR inline-asm/84742
9336         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9337         has ',' character inside of it.
9339 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9341         PR target/84748
9342         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9343         as clobbering CC_REGNUM.
9345 2018-03-08  Richard Biener  <rguenther@suse.de>
9347         PR middle-end/84552
9348         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9349         (follow_copies_to_constant): Do not follow SSA names registered
9350         for update.
9352 2018-03-08  Richard Biener  <rguenther@suse.de>
9354         PR tree-optimization/84178
9355         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9356         to caller.
9357         (version_loop_for_if_conversion): Delay update_ssa call.
9358         (tree_if_conversion): Delay update_ssa until after predicate
9359         insertion.
9361 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9363         PR tree-optimization/84178
9364         * tree-if-conv.c (release_bb_predicate): Remove the
9365         the assertion that the stmts have NULL use_ops.
9366         Discard the statements, asserting that they haven't
9367         yet been added to a BB.
9369 2018-03-08  Richard Biener  <rguenther@suse.de>
9371         PR tree-optimization/84746
9372         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9373         (phi_translate): Pass in destination ANTIC_OUT set.
9374         (phi_translate_1): Likewise.  For a simplified result lookup
9375         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9376         (phi_translate_set): Adjust.
9377         (do_pre_regular_insertion): Likewise.
9378         (do_pre_partial_partial_insertion): Likewise.
9380 2018-03-08  Martin Liska  <mliska@suse.cz>
9382         PR gcov-profile/84735
9383         * doc/gcov.texi: Document usage of profile files.
9384         * gcov-io.h: Document changes in the format.
9386 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9388         PR debug/84404
9389         PR debug/84408
9390         * dwarf2out.c (struct dw_line_info_table): Update comments for
9391         view == -1.
9392         (FORCE_RESET_NEXT_VIEW): New.
9393         (FORCE_RESETTING_VIEW_P): New.
9394         (RESETTING_VIEW_P): Check for -1 too.
9395         (ZERO_VIEW_P): Likewise.
9396         (new_line_info_table): Force-reset next view.
9397         (dwarf2out_begin_function): Likewise.
9398         (dwarf2out_source_line): Simplify zero_view_p initialization.
9399         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9400         view directly.  Omit view when omitting .loc at line 0.
9402 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9404         PR tree-optimization/84740
9405         * tree-switch-conversion.c (process_switch): Call build_constructors
9406         only if info.phi_count is non-zero.
9408         PR tree-optimization/84739
9409         * tree-tailcall.c (find_tail_calls): Check call arguments against
9410         DECL_ARGUMENTS (current_function_decl) rather than
9411         DECL_ARGUMENTS (func) when checking for tail recursion.
9413 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9415         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9416         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9417         Volker Reichelt's entry and add entries for people that perform
9418         GCC fuzzy testing and report numerous bugs.
9420 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9422         PR target/82411
9423         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9424         readonly data in sdata, if that is disabled.
9425         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9426         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9427         -mreadonly-in-sdata option.
9429 2018-03-07  Martin Sebor  <msebor@redhat.com>
9431         PR tree-optimization/84468
9432         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9433         basic block when looking for nul assignment.
9435 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9437         PR target/84277
9438         * except.h (output_function_exception_table): Adjust prototype.
9439         * except.c (output_function_exception_table): Remove FNNAME parameter
9440         and add SECTION parameter.  Ouput one part of the table at a time.
9441         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9442         the first part of the exception table and emit unwind directives.
9443         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9444         (i386_pe_seh_cold_init): Likewise.
9445         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9446         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9447         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9448         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9449         * config/i386/winnt.c: Include except.h.
9450         (struct seh_frame_state): Add reg_offset, after_prologue and
9451         in_cold_section fields.
9452         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9453         (i386_pe_seh_cold_init): New function.
9454         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9455         to seh->in_cold_section.
9456         (seh_emit_push): Record the offset of the push.
9457         (seh_emit_save): Record the offet of the save.
9458         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9459         Test seh->after_prologue to disregard the epilogue.
9460         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9461         (i386_pe_end_cold_function): New function.
9463 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9465         PR fortran/84565
9466         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9467         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9469         PR c++/84704
9470         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9471         on tmp_var.
9472         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9473         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9475         PR middle-end/84723
9476         * multiple_target.c: Include tree-inline.h and intl.h.
9477         (expand_target_clones): Diagnose and fail if node->definition and
9478         !tree_versionable_function_p (node->decl).
9480 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
9482         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9483         sprint_ul.
9484         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9485         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9486         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9488 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9490         PR target/84710
9491         * combine.c (try_combine): Use reg_or_subregno instead of handling
9492         just paradoxical SUBREGs and REGs.
9494 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
9496         * config/arc/arc.c (arc_finalize_pic): Remove function.
9497         (arc_must_save_register): We use single base PIC register, remove
9498         checks to save/restore the PIC register.
9499         (arc_expand_prologue): Likewise.
9500         * config/arc/arc-protos.h (arc_set_default_type_attributes):
9501         Remove.
9502         (arc_verify_short): Likewise.
9503         (arc_attr_type): Likewise.
9504         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9505         (walk_stores): Likewise.
9506         (arc_address_cost): Make it static.
9507         (arc_verify_short): Likewise.
9508         (branch_dest): Likewise.
9509         (arc_attr_type): Likewise.
9510         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9511         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9512         (arc_final_prescan_insn): Remove inserting the nops due to
9513         hardware hazards.  It is done in reorg step.
9514         (insn_length_variant_t): Remove.
9515         (insn_length_parameters_t): Likewise.
9516         (arc_insn_length_parameters): Likewise.
9517         (arc_get_insn_variants): Likewise.
9518         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9520 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9522         PR inline-asm/84683
9523         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9524         assertion failure.
9526         PR tree-optimization/84687
9527         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9528         on new_node->decl.
9529         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9531 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9533         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9534         Rename to ppc_speculation_barrier.
9535         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9536         __builtin_ppc_speculation_barrier.
9538 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9540         PR target/84700
9541         * combine.c (combine_simplify_rtx): Don't try to simplify if
9542         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9543         are equal to x.
9545 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
9547         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9548         to 32 bytes when compiling for POWER9.
9550 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9552         PR target/84564
9553         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9554         regparm >= 3 with no arg reg available also for calls with
9555         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
9557         PR target/84524
9558         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9559         orig,vex.
9560         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
9562 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
9564         PR target/84264
9565         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9567 2018-03-05  Richard Biener  <rguenther@suse.de>
9569         PR tree-optimization/84486
9570         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9571         When inserting a __builtin_assume_aligned call set the LHS
9572         SSA name alignment info accordingly.
9574 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
9576         PR tree-optimization/84114
9577         * config/aarch64/aarch64.c (aarch64_reassociation_width)
9578         Avoid reassociation of FLOAT_MODE addition.
9580 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
9582         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9583         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9584         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9585         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9586         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9587         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9588         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9589         and -mwbnoinvd.
9590         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9591         __builtin_ia32_wbinvd): New builtins.
9592         (SPECIAL_ARGS2): New.
9593         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9594         (SPECIAL_ARGS2): New.
9595         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9596         (ix86_valid_target_attribute_inner_p): Ditto.
9597         (ix86_init_mmx_sse_builtins): Add special_args2.
9598         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9599         TARGET_WBNOINVD_P): New.
9600         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9601         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9602         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9603         * config/i386/immintrin.h (_wbinvd): New intrinsic.
9604         * config/i386/pconfigintrin.h: New file.
9605         * config/i386/wbnoinvdintrin.h: Ditto.
9606         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9607         wbnoinvdintrin.h.
9608         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9610 2018-03-05  Richard Biener  <rguenther@suse.de>
9612         PR tree-optimization/84670
9613         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9614         member.
9615         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9616         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9617         (compute_antic_aux): Only assert the number of values in ANTIC_IN
9618         doesn't grow if all successors (recursively) were visited at least
9619         once.
9621 2018-03-05  Richard Biener  <rguenther@suse.de>
9623         PR tree-optimization/84650
9624         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9625         if executed in the loop pipeline.
9627 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
9629         * doc/configfiles.texi (Configuration Files): Move info about
9630         conditionalizing $target-protos.h to...
9631         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
9632         differs from $target-protos.h.
9634 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
9635             Chung-Ju Wu  <jasonwucj@gmail.com>
9637         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9638         * config/nds32/nds32-multiple.md (setmemsi): Define.
9639         * config/nds32/nds32-memory-manipulation.c
9640         (nds32_gen_dup_4_byte_to_word_value): New.
9641         (emit_setmem_word_loop): New.
9642         (emit_setmem_byte_loop): New.
9643         (nds32_expand_setmem_loop): New.
9644         (nds32_expand_setmem_loop_v3m): New.
9645         (nds32_expand_setmem_unroll): New.
9646         (nds32_expand_setmem): New.
9648 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9649             Chung-Ju Wu  <jasonwucj@gmail.com>
9651         * config/nds32/nds32-memory-manipulation.c
9652         (nds32_emit_load_store): New.
9653         (nds32_emit_post_inc_load_store): New.
9654         (nds32_emit_mem_move): New.
9655         (nds32_emit_mem_move_block): New.
9656         (nds32_expand_movmemsi_loop_unknown_size): New.
9657         (nds32_expand_movmemsi_loop_known_size): New.
9658         (nds32_expand_movmemsi_loop): New.
9659         (nds32_expand_movmemsi_unroll): New.
9660         (nds32_expand_movmemqi): Rename ...
9661         (nds32_expand_movmemsi): ... to this.
9662         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9663         (movmemsi): ... to this.
9664         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9665         (nds32_expand_movmemsi): ... to this.
9667 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9668             Monk Chiang  <sh.chiang04@gmail.com>
9669             Chung-Ju Wu  <jasonwucj@gmail.com>
9671         * config/nds32/nds32-protos.h
9672         (nds32_expand_load_multiple): New arguments.
9673         (nds32_expand_store_multiple): Ditto.
9674         (nds32_valid_multiple_load_store): Rename ...
9675         (nds32_valid_multiple_load_store_p): ... to this.
9676         * config/nds32/nds32-memory-manipulation.c
9677         (nds32_expand_load_multiple): Refine implementation.
9678         (nds32_expand_store_multiple): Ditto.
9679         * config/nds32/nds32-multiple.md
9680         (load_multiple): Update nds32_expand_load_multiple interface.
9681         (store_multiple): Update nds32_expand_store_multiple interface.
9682         * config/nds32/nds32-predicates.c
9683         (nds32_valid_multiple_load_store): Rename ...
9684         (nds32_valid_multiple_load_store_p): ... to this and refine
9685         implementation.
9686         * config/nds32/predicates.md
9687         (nds32_load_multiple_and_update_address_operation): New predicate.
9688         (nds32_store_multiple_and_update_address_operation): New predicate.
9690 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9691             Chung-Ju Wu  <jasonwucj@gmail.com>
9693         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9694         (combo): New attribute.
9695         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9697 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9699         * config/nds32/nds32.opt: Change -mcmodel= default value.
9701 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
9702             Monk Chiang  <sh.chiang04@gmail.com>
9703             Chung-Ju Wu  <jasonwucj@gmail.com>
9705         * config/nds32/constants.md (unspec_element): New enum.
9706         * config/nds32/constraints.md (Umw): New constraint.
9707         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9708         * config/nds32/nds32-intrinsic.md: Likewise.
9709         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9710         (nds32_valid_smw_lwm_base_p): New.
9711         (nds32_output_smw_single_word): New.
9712         (nds32_output_lmw_single_word): New.
9713         (nds32_expand_unaligned_load): New.
9714         (nds32_expand_unaligned_store): New.
9715         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9716         (nds32_output_smw_single_word): Declare.
9717         (nds32_output_lmw_single_word): Declare.
9718         (nds32_expand_unaligned_load): Declare.
9719         (nds32_expand_unaligned_store): Declare.
9720         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9721         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9722         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9723         NDS32_BUILTIN_UASTORE_DW.
9724         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9725         predicate.
9727 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
9728             Kito Cheng  <kito.cheng@gmail.com>
9729             Chung-Ju Wu  <jasonwucj@gmail.com>
9731         * config/nds32/nds32-intrinsic.c
9732         (nds32_expand_builtin_null_ftype_reg): Delete.
9733         (nds32_expand_builtin_reg_ftype_imm): Ditto.
9734         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9735         (nds32_read_argument): New.
9736         (nds32_legitimize_target): Ditto.
9737         (nds32_legitimize_argument): Ditto.
9738         (nds32_check_constant_argument): Ditto.
9739         (nds32_expand_unop_builtin): Ditto.
9740         (nds32_expand_unopimm_builtin): Ditto.
9741         (nds32_expand_binop_builtin): Ditto.
9742         (nds32_builtin_decl_impl): Ditto.
9743         (builtin_description): Ditto.
9744         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9745         (nds32_init_builtins_impl): Ditto.
9746         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9747         (nds32_builtin_decl): New.
9748         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9749         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9751 2018-03-02  Jeff Law  <law@redhat.com>
9753         * reorg.c (stop_search_p): Handle DEBUG_INSN.
9754         (redundant_insn, fill_simple_delay_slots): Likewise.
9755         (fill_slots_from_thread): Likewise.
9756         * resource.c (mark_referenced_resources): Likewise.
9757         (mark_set_resources, find_dead_or_set_registers): Likewise.
9759 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9761         * substring-locations.h (format_warning_va): Formatting fix for
9762         ATTRIBUTE_GCC_DIAG.
9763         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9764         argument.
9765         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9766         * substring-locations.c: Include intl.h.
9767         (format_warning_va): Turned into small wrapper around
9768         format_warning_n_va, renamed to ...
9769         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9770         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9771         use ngettext.
9772         (format_warning_at_substring_n): New function.
9773         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9774         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
9775         format_warning_at_substring with just a shorter name instead of
9776         const function pointer.
9777         (fmtwarn_n): New function.
9778         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9779         appropriate, get rid of all the fmtstr temporaries, move conditionals
9780         with G_() wrapped string literals directly into fmtwarn arguments,
9781         cast dir.len to (int), formatting fixes.
9783 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
9785         * doc/invoke.texi: Remove "Cilk Plus" references.
9787 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9788             Richard Biener  <rguenther@suse.de>
9790         PR ipa/84628
9791         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9792         for error or warning attributes if CALL_FROM_THUNK_P is set.
9793         Formatting fixes.
9795 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9797         PR target/56540
9798         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9799         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9801         PR target/56540
9802         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9803         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9805         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9806         instead of -1U in last predictors element's probability member.
9808 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9810         PR ipa/83983
9811         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9812         arguments if they are comparable.
9814 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9816         PR tree-optimization/84634
9817         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9818         masks and masked_loop_p with a single loop_masks, making sure it's
9819         null for bb vectorization.
9821 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9823         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9824         (vect_analyze_data_ref_access): Use loop->safe_len rather than
9825         loop->force_vectorize to check whether there is no alias.
9827 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9829         PR target/84614
9830         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9831         prototypes.
9832         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9833         comments.
9834         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9835         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9836         instead of a loop around prev_real_insn.
9837         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9838         prev_real_insn.
9840         PR inline-asm/84625
9841         * config/i386/i386.c (ix86_print_operand): Use conditional
9842         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9843         zero vector.
9845 2018-03-02  Richard Biener  <rguenther@suse.de>
9847         PR tree-optimization/84427
9848         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9849         (bitmap_set_subtract_values): Rewrite to handle multiple
9850         exprs per value.
9851         (clean): Likewise.
9852         (prune_clobbered_mems): Likewise.
9853         (phi_translate): Take edge instead of pred/phiblock.
9854         (phi_translate_1): Likewise.
9855         (phi_translate_set): Likewise.  Insert all translated
9856         exprs for a value into the set, keeping possibly multiple
9857         expressions per value.
9858         (compute_antic_aux): Adjust for phi_translate changes.
9859         When intersecting union the expressions and prune those
9860         not in the final value set, keeping possibly multiple
9861         expressions per value.  Do not use value-insertion
9862         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9863         all expressions.  Add verification that the value-sets
9864         only shrink during iteration.
9865         (compute_partial_antic_aux): Adjust for the phi_translate changes.
9866         (do_pre_regular_insertion): Likewise.
9867         (do_pre_partial_partial_insertion): Likewise.
9869 2018-03-02  Richard Biener  <rguenther@suse.de>
9871         PR target/82005
9872         * config/darwin.c (saved_debug_info_level): New static global.
9873         (darwin_asm_lto_start): Disable debug info generation for LTO out.
9874         (darwin_asm_lto_end): Restore debug info generation settings.
9876 2018-03-01  Martin Liska  <mliska@suse.cz>
9878         PR sanitizer/82484
9879         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9880         volatile arguments.
9882 2018-03-01  Richard Biener  <rguenther@suse.de>
9884         PR debug/84645
9885         * dwarf2out.c (gen_variable_die): Properly handle late VLA
9886         type annotation with LTO when debug was disabled at compile-time.
9888 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
9890         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9891         XINT with INTVAL.
9892         (mips_final_postscan_insn): Likewise.
9894 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
9896         PR rtl-optimization/84528
9897         * alias.c (init_alias_target): Add commentary.
9898         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9899         a unique base value if the frame pointer is not eliminated
9900         to the stack pointer.
9902 2018-03-01  Tom de Vries  <tom@codesourcery.com>
9904         PR rtl-optimization/83327
9905         * lra-int.h (hard_regs_spilled_into): Declare.
9906         * lra.c (hard_regs_spilled_into): Define.
9907         (init_reg_info): Init hard_regs_spilled_into.
9908         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
9909         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
9910         (process_bb_lives): Handle hard_regs_spilled_into.
9911         (lra_create_live_ranges_1): Before doing liveness propagation, clear
9912         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
9914 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
9916         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
9917         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
9918         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
9919         * config/rs6000/aix72.h: New file.
9921 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
9923         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
9924         instead of warning_at with conditional singular and plural messages
9925         where possible.
9927         PR target/52991
9928         * stor-layout.c (update_alignment_for_field): For
9929         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
9930         && !DECL_PACKED (field), do the alignment update, just use
9931         only desired_align instead of MAX (type_align, desired_align)
9932         as the alignment.
9933         (place_field): Don't do known_align < desired_align handling
9934         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
9935         is non-NULL, instead do it after rli->prev_field handling and
9936         only if not within a bitfield word.  For DECL_PACKED (field)
9937         use type_align of BITS_PER_UNIT.
9939 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
9941         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
9942         superfluous parentheses and trailing spaces.
9944 2018-02-28  Richard Biener  <rguenther@suse.de>
9946         PR tree-optimization/84584
9947         * graphite-scop-detection.c (scop_detection::add_scop): Discard
9948         SCoPs with fake exit edge.
9950 2018-02-28  Martin Liska  <mliska@suse.cz>
9952         PR testsuite/84597
9953         * timevar.c (timer::print): Fix format to properly print 100%
9954         values.
9956 2018-02-28  Richard Biener  <rguenther@suse.de>
9958         PR middle-end/84607
9959         * genmatch.c (capture_info::walk_match): Do not mark
9960         captured expressions without operands as expr_p given
9961         they act more like predicates and should be subject to
9962         "lost tail" side-effect preserving.
9964 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
9966         PR rtl-optimization/81611
9967         * auto-inc-dec.c (attempt_change): Move dead note from
9968         mem_insn if it's the next use of regno
9969         (find_address): Take address use of reg holding
9970         non-incremented value.  Add parm to limit search to the named
9971         reg only.
9972         (merge_in_block): Attempt to use a mem insn that is the next
9973         use of the original regno.
9975 2018-02-27  Martin Sebor  <msebor@redhat.com>
9977         PR c++/83871
9978         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
9979         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
9981 2018-02-27  Martin Sebor  <msebor@redhat.com>
9983         PR translation/84207
9984         * diagnostic-core.h (warning_n, error_n, inform_n): Change
9985         n argument to unsigned HOST_WIDE_INT.
9986         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
9987         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
9988         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
9989         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
9991 2018-02-27  Richard Biener  <rguenther@suse.de>
9993         PR tree-optimization/84512
9994         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
9995         Do not use the estimate returned from record_stmt_cost for
9996         the scalar iteration cost but sum properly using add_stmt_cost.
9998 2018-02-27  Richard Biener  <rguenther@suse.de>
10000         PR tree-optimization/84466
10001         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10002         Adjust last change to less strictly validate use operands.
10004 2018-02-27  Martin Liska  <mliska@suse.cz>
10006         PR gcov-profile/84548
10007         * gcov.c (process_file): Allow partial overlap and consider it
10008         also as group functions.
10009         (output_lines): Properly calculate range of lines for a group.
10011 2018-02-27  Martin Liska  <mliska@suse.cz>
10013         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10014         'ggc' suffixes.  Change first column width.
10015         (timer::print): Fix formatting of the column.
10017 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10019         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10020         preserve inline entry blocks for the sake of debug inline
10021         entry point markers alone.
10022         (remove_unused_locals): Suggest in comments a better place to
10023         force the preservation of inline entry blocks that are
10024         otherwise unused, but do not preserve them.
10026 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10028         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10030 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10032         PR target/84039
10033         * config/i386/constraints.md (Bs): Replace
10034         ix86_indirect_branch_register with
10035         TARGET_INDIRECT_BRANCH_REGISTER.
10036         (Bw): Likewise.
10037         * config/i386/i386.md (indirect_jump): Likewise.
10038         (tablejump): Likewise.
10039         (*sibcall_memory): Likewise.
10040         (*sibcall_value_memory): Likewise.
10041         Peepholes of indirect call and jump via memory: Likewise.
10042         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10043         (*sibcall_value_GOT_32): Likewise.
10044         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10045         (GOT_memory_operand): Likewise.
10046         (call_insn_operand): Likewise.
10047         (sibcall_insn_operand): Likewise.
10048         (GOT32_symbol_operand): Likewise.
10049         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10051 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10053         PR rtl-optimization/83496
10054         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10055         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10056         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10057         redundant insn, if any.
10058         (relax_delay_slots): Likewise.
10059         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10061 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10063         PR tree-optimization/83965
10064         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10065         that grouped statements are part of a reduction chain.  Return
10066         true if the statement is not marked as a reduction itself but
10067         is part of a group.
10068         (vect_recog_dot_prod_pattern): Don't check whether the statement
10069         is part of a group here.
10070         (vect_recog_sad_pattern): Likewise.
10071         (vect_recog_widen_sum_pattern): Likewise.
10073 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10075         PR debug/84545
10076         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10078 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10080         PR target/84530
10081         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10082         the bool argument.
10083         (ix86_output_indirect_function_return): New prototype.
10084         (ix86_split_simple_return_pop_internal): Likewise.
10085         * config/i386/i386.c (indirect_return_via_cx): New.
10086         (indirect_return_via_cx_bnd): Likewise.
10087         (indirect_thunk_name): Handle return va CX_REG.
10088         (output_indirect_thunk_function): Create alias for
10089         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10090         (ix86_output_indirect_jmp): Remove the bool argument.
10091         (ix86_output_indirect_function_return): New function.
10092         (ix86_split_simple_return_pop_internal): Likewise.
10093         * config/i386/i386.md (*indirect_jump): Don't pass false
10094         to ix86_output_indirect_jmp.
10095         (*tablejump_1): Likewise.
10096         (simple_return_pop_internal): Change it to define_insn_and_split.
10097         Call ix86_split_simple_return_pop_internal to split it for
10098         -mfunction-return=.
10099         (simple_return_indirect_internal): Call
10100         ix86_output_indirect_function_return instead of
10101         ix86_output_indirect_jmp.
10103 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10105         PR bootstrap/84405
10106         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10107         memset and value initialization afterwards.
10109 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10111         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10113 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10115         PR target/84521
10116         * common/config/aarch64/aarch64-common.c
10117         (aarch_option_optimization_table[]): Switch
10118         off fomit-frame-pointer
10120 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10121             Chung-Ju Wu  <jasonwucj@gmail.com>
10123         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10124         volatile memory.
10125         (store_multiple): Ditto.
10127 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10129         * config.gcc: Add --with-cpu support for nds32 target.
10130         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10131         * config/nds32/nds32.opt: Add -mcpu= option.
10133 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10135         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10136         isel=yes): Warn for these deprecated options.
10138 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10140         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10141         ISA_2_5_MASKS_EMBEDDED.
10143 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10145         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10146         p->max as pointers rather than using iterative_hash_expr.
10148 2018-02-23  Carl Love  <cel@us.ibm.com>
10150         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10151         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10152         BU_P8V_OVERLOAD_2.
10153         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10154         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10155         P8V_BUILTIN_VEC_VUNSIGNED2.
10157 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10159         PR target/81572
10160         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10161         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10162         LRA_UNKNOWN_ALT.
10163         * lra-constraints.c (curr_insn_transform): Set up
10164         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10165         LRA_UNKNOWN_ALT.
10166         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10167         * lra-eliminations.c (spill_pseudos): Ditto.
10168         (process_insn_for_elimination): Ditto.
10169         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10170         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10171         LRA_NON_CLOBBERED_ALT.
10173 2018-02-22  Martin Sebor  <msebor@redhat.com>
10175         PR tree-optimization/84480
10176         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10177         to maybe_diag_stxncpy_trunc.  Call it.
10178         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10179         from gimple_fold_builtin_strcpy.  Print inlining stack.
10180         (handle_builtin_stxncpy): Print inlining stack.
10181         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10183 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10185         PR target/84176
10186         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10187         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10188         and -fcheck-pointer-bounds are used together.
10189         (indirect_thunk_prefix): New enum.
10190         (indirect_thunk_need_prefix): New function.
10191         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10192         "_nt" instead of "_bnd" for NOTRACK prefix.
10193         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10194         (output_indirect_thunk_function): Likewise.
10195         (): Likewise.
10196         (ix86_code_end): Update output_indirect_thunk_function calls.
10197         (ix86_output_indirect_branch_via_reg): Replace
10198         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10199         (ix86_output_indirect_branch_via_push): Likewise.
10200         (ix86_output_function_return): Likewise.
10201         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10202         incompatible with -fcf-protection=branch and
10203         -fcheck-pointer-bounds.
10205 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10207         PR target/83335
10208         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10209         Change gcc_assert call to output_operand_lossage.
10211 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10213         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10215 2018-02-22  DJ Delorie  <dj@redhat.com>
10216             Sebastian Perta  <sebastian.perta@renesas.com>
10217             Oleg Endo  <olegendo@gcc.gnu.org>
10219         * config/rx/rx.c (rx_rtx_costs): New function.
10220         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10222 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10224         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10226 2018-02-22  Martin Liska  <mliska@suse.cz>
10228         PR driver/83193
10229         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10230         Add "native" as a possible value.
10232 2018-02-22  Martin Liska  <mliska@suse.cz>
10234         PR driver/83193
10235         * config/i386/i386.c (ix86_option_override_internal):
10236         Add "native" as a possible value for -march and -mtune.
10238 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10240         PR target/84502
10241         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10242         to all type variants.
10244         PR tree-optimization/84503
10245         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10246         width as info->bitpos + info->bitsize - start.
10247         (merged_store_group::merge_overlapping): Simplify width computation.
10248         (check_no_overlap): New function.
10249         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10250         start + width and last_order of the group, fail if check_no_overlap
10251         fails.
10252         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10253         to group if check_no_overlap fails.
10255 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10257         * config/rs6000/altivec.md: Delete contraint arguments to
10258         define_expand, define_split, and define_peephole2, and in
10259         define_insn_and_split if always unused.
10260         * config/rs6000/darwin.md: Ditto.
10261         * config/rs6000/dfp.md: Ditto.
10262         * config/rs6000/rs6000.md: Ditto.
10263         * config/rs6000/sync.md: Ditto.
10264         * config/rs6000/vector.md: Ditto.
10265         * config/rs6000/vsx.md: Ditto.
10267 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10269         * config/rs6000/altivec.md: Write output control strings as braced
10270         blocks instead of double-quoted strings.
10271         * config/rs6000/darwin.md: Ditto.
10272         * config/rs6000/rs6000.md: Ditto.
10273         * config/rs6000/vector.md: Ditto.
10274         * config/rs6000/vsx.md: Ditto.
10276 2018-02-21  Jason Merrill  <jason@redhat.com>
10278         PR c++/84314 - ICE with templates and fastcall attribute.
10279         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10281 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10283         * ipa-cp.c (determine_versionability): Fix comment typos.
10285 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10287         PR c/84229
10288         * ipa-cp.c (determine_versionability): Do not version functions caling
10289         va_arg_pack.
10291 2018-02-21  Martin Liska  <mliska@suse.cz>
10293         PR driver/83193
10294         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10295         Add "native" as a possible value.
10296         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10297         the macro when native cpu detection is available.
10299 2018-02-21  Martin Liska  <mliska@suse.cz>
10301         PR driver/83193
10302         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10303         Add "native" as a possible value.
10304         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10305         when native cpu detection is available.
10307 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10308             Martin Sebor  <msebor@redhat.com>
10310         PR tree-optimization/84478
10311         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10312         false.
10313         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10314         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10315         support which is conservatively correct, for 2 only stay conservative
10316         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10317         argument to the 2 argument get_range_strlen, adjust 6 arg
10318         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10319         false.
10320         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10321         (gimple_fold_builtin_strlen): Pass true as last argument to
10322         get_range_strlen.
10324 2018-02-20  Martin Sebor  <msebor@redhat.com>
10326         PR middle-end/84095
10327         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10328         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10329         (builtin_memref::builtin_memref): Factor out parts into
10330         set_base_and_offset and call it.
10332 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10334         PR middle-end/84406
10335         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10336         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10337         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10338         search at the associated MODE_INT.
10340 2018-02-20  Jeff Law  <law@redhat.com>
10342         PR middle-end/82123
10343         PR tree-optimization/81592
10344         PR middle-end/79257
10345         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10346         for range data rather than using global data.
10347         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10348         range data rather than using global data.
10349         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10350         pass it to children as needed.
10351         (struct directive::fmtresult): Similarly.
10352         (struct directive::set_width): Similarly.
10353         (struct directive::set_precision): Similarly.
10354         (format_integer, format_directive, parse_directive): Similarly.
10355         (format_none): Accept unnamed vr_values parameter.
10356         (format_percent, format_floating, format_character): Similarly.
10357         (format_string, format_plain): Similarly.
10358         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10359         the EVRP range analyzer for range data rather than using global data.
10360         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10361         gimple-ssa-evrp-analyze.h
10362         (class sprintf_dom_walker): Add after_dom_children member function.
10363         Add evrp_range_analyzer member.
10364         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10365         range analyzer as needed.
10366         (sprintf_dom_walker::after_dom_children): New member function.
10367         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10368         if not optimizing.
10369         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10370         (evrp_range_analyzer::pop_to_marker): Likewise.
10372 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10374         PR tree-optimization/84419
10375         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10376         with the required type if its current type is compatible but
10377         different.
10379 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10381         PR middle-end/82004
10382         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10383         after vectorization.
10385 2018-02-20  Martin Liska  <mliska@suse.cz>
10387         PR driver/83193
10388         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10389         possible values if we don't have a hint.
10391 2018-02-20  Martin Liska  <mliska@suse.cz>
10393         PR c/84310
10394         PR target/79747
10395         * final.c (shorten_branches): Build align_tab array with one
10396         more element.
10397         * opts.c (finish_options): Add alignment option limit check.
10398         (MAX_CODE_ALIGN): Likewise.
10399         (MAX_CODE_ALIGN_VALUE): Likewise.
10400         * doc/invoke.texi: Document maximum allowed option value for
10401         all -falign-* options.
10403 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10405         PR target/84146
10406         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10407         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10408         * var-tracking.c (emit_note_insn_var_location): Remove all references
10409         to NOTE_INSN_CALL_ARG_LOCATION.
10410         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10411         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10412         Use copy_rtx_if_shared.
10413         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10414         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10415         (dwarf2out_var_location): Remove handling of
10416         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10417         on call_insn.
10418         * final.c (final_scan_insn): Remove all references to
10419         NOTE_INSN_CALL_ARG_LOCATION.
10420         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10421         before dumping final insns.
10422         * except.c (emit_note_eh_region_end): Remove all references to
10423         NOTE_INSN_CALL_ARG_LOCATION.
10424         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10425         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10426         * config/arc/arc.c (hwloop_optimize): Likewise.
10427         * config/arm/arm.c (create_fix_barrier): Likewise.
10428         * config/s390/s390.c (s390_chunkify_start): Likewise.
10429         * config/sh/sh.c (find_barrier): Likewise.
10430         * config/i386/i386.c (rest_of_insert_endbranch,
10431         ix86_seh_fixup_eh_fallthru): Likewise.
10432         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10433         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10434         * config/frv/frv.c (frv_function_prologue): Likewise.
10435         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10436         reg note.
10437         (note_outside_basic_block_p): Remove all references to
10438         NOTE_INSN_CALL_ARG_LOCATION.
10439         * gengtype.c (adjust_field_rtx_def): Likewise.
10440         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10441         Likewise.
10442         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10443         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10445         PR c++/84444
10446         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10447         is ADDR_EXPR.
10449         PR tree-optimization/84452
10450         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10451         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10452         is NULL.
10454 2018-02-19  Martin Liska  <mliska@suse.cz>
10456         PR sanitizer/82183
10457         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10459 2018-02-19  Martin Liska  <mliska@suse.cz>
10460             Richard Sandiford  <richard.sandiford@linaro.org>
10462         PR tree-optimization/82491
10463         * gimple-fold.c (get_base_constructor): Make earlier bail out
10464         to prevent ubsan.
10466 2018-02-19  Carl Love  <cel@us.ibm.com>
10468         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10469         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10470         BU_P8V_OVERLOAD_1.
10471         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10472         P8V_BUILTIN_VEC_NEG.
10474 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
10476         * config/rl78/rl78.md (movdf): New define expand.
10478 2018-02-19  Martin Liska  <mliska@suse.cz>
10480         PR other/80589
10481         * doc/invoke.texi: Fix typo.
10482         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10484 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
10486         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10487         handle rs6000_single_float and rs6000_double_float specially for
10488         e500 family CPUs.
10490 2018-02-16  Jeff Law  <law@redhat.com>
10492         * config/rx/rx.c (add_pop_cfi_notes): New function.;
10493         (pop_regs): Use it.
10495 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10497         PR ipa/84425
10498         * ipa-inline.c (inline_small_functions): Fix a typo.
10500 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10502         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10504 2018-02-16  Carl Love  <cel@us.ibm.com>
10506         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10507         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10508         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10509         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10510         expansion to P8V_BUILTIN_VEC_FLOAT2.
10512 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
10514         PR rtl-optimization/70023
10515         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
10516         src_regno into account.
10518 2018-02-16  Carl Love  <cel@us.ibm.com>
10520         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10521         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10522         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10523         * config/rs6000/rs6000.c: Remove case statements for
10524         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10525         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10526         and P9V_BUILTIN_VEC_VINSERT4B.
10527         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10528         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10529         * config/rs6000/vsx.md:
10530         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10531         vec_insert4b.
10533 2018-02-16  Carl Love  <cel@us.ibm.com>
10535         * config/rs6000/altivec.h: Add builtin names vec_extract4b
10536         vec_insert4b.
10537         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10538         definitions.
10539         * config/rs6000/rs6000-c.c: Add the definitions for
10540         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10541         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10542         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10543         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
10544         definition for insert4b and define insn *insert3b_internal.
10545         * doc/extend.texi: Add documentation for vec_extract4b.
10547 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10549         * doc/extend.texi (Backwards Compatibility): Mention friend
10550         injection.  Note for-scope is deprecated.
10551         * doc/invoke.texi (-ffriend-injection): Deprecate.
10553 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
10555         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10556         that moved to I2, also allow destinations that are a paradoxical
10557         subreg (instead of a normal reg).
10559 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
10561         PR target/83831
10562         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10563         to QImode.
10565 2018-02-16  Richard Biener  <rguenther@suse.de>
10567         PR tree-optimization/84037
10568         PR tree-optimization/84016
10569         PR target/82862
10570         * config/i386/i386.c (ix86_builtin_vectorization_cost):
10571         Adjust vec_construct for the fact we need additional higher latency
10572         128bit inserts for AVX256 and AVX512 vector builds.
10573         (ix86_add_stmt_cost): Scale vector construction cost for
10574         elementwise loads.
10576 2018-02-16  Richard Biener  <rguenther@suse.de>
10578         PR tree-optimization/84417
10579         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10580         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10581         (non_rewritable_lvalue_p): Likewise, use poly-ints.
10583 2018-02-16  Martin Liska  <mliska@suse.cz>
10585         PR sanitizer/84307
10586         * internal-fn.def (ASAN_CHECK): Set proper flags.
10587         (ASAN_MARK): Likewise.
10589 2018-02-16  Julia Koval  <julia.koval@intel.com>
10591         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10592         from PTA_CANNONLAKE.
10594 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10596         PR target/84272
10597         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10598         Use ++iter rather than iter++ for std::list iterators.
10599         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
10600         defer deleting them until all nodes in the forest are processed.  Do
10601         free even leaf nodes.  Change to_process into auto_vec.
10603         PR bootstrap/84405
10604         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10605         * vec.h (vec_default_construct): Use memset instead of placement new
10606         if BROKEN_VALUE_INITIALIZATION is defined.
10607         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10608         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10609         is defined.
10611         PR rtl-optimization/83723
10612         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10613         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
10614         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
10615         recursive calls.
10616         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10617         callers.
10618         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10620 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
10622         PR rtl-optimization/81443
10623         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10624         from inner REGs to paradoxical SUBREGs.
10626 2018-02-16  Richard Biener  <rguenther@suse.de>
10628         PR tree-optimization/84399
10629         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10630         For operands we can analyze at their definition make sure we can
10631         analyze them at each use as well.
10633 2018-02-16  Richard Biener  <rguenther@suse.de>
10635         PR tree-optimization/84190
10636         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10637         volatile accesses if the decl isn't volatile.
10639 2018-02-15  Jason Merrill  <jason@redhat.com>
10641         PR c++/84314 - ICE with templates and fastcall attribute.
10642         * attribs.c (build_type_attribute_qual_variant): Don't clobber
10643         TYPE_CANONICAL on an existing type.
10645 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
10647         PR tree-optimization/84383
10648         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10649         dstoff nor call operand_equal_p if dstbase is NULL.
10651         PR tree-optimization/84334
10652         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10653         also a CONSTANT_CLASS_P, punt.
10655 2018-02-14  Jim Wilson  <jimw@sifive.com>
10657         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10658         first SMALL_OPERAND check.  New local min_second_step.  Move assert
10659         to where locals are set.  Add TARGET_RVC support.
10660         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10662 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
10664         * doc/invoke.texi: Correct -Wformat-overflow code sample.
10666 2018-02-14  Martin Sebor  <msebor@redhat.com>
10668         PR tree-optimization/83698
10669         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10670         arrays constrain the offset range to their bounds.
10671         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10672         (builtin_access::overlap): Avoid setting the size of overlap if it's
10673         already been set.
10674         (maybe_diag_overlap): Also consider arrays when deciding what values
10675         of offsets to include in diagnostics.
10677 2018-02-14  Martin Sebor  <msebor@redhat.com>
10679         PR c/84108
10680         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10681         that correspond to the kind of a declaration.
10683 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
10685         PR target/83984
10686         * config/pa/pa.md: Load address of PIC label using the linkage table
10687         if the label is nonlocal.
10689 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10691         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10692         warning message if user requests -maltivec=be.
10693         * doc/invoke.texi: Document deprecation of -maltivec=be.
10695 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
10697         PR target/84220
10698         * config/rs6000/rs6000-c.c: Update definitions for
10699         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10700         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10702 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10704         PR target/84239
10705         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10706         add _get_ssp intrinsics. Remove argument from
10707         __builtin_ia32_rdssp[d|q].
10708         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10709         * config/i386/i386-builtin.def: Remove argument from
10710         __builtin_ia32_rdssp[d|q].
10711         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10712         ix86_expand_special_args_builtin for _rdssp[d|q].
10713         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10714         Clear register before usage.
10715         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10716         Add documentation for new _get_ssp and _inc_ssp intrinsics.
10718 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
10720         PR tree-optimization/84357
10721         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10722         operand 1 of an ARRAY_REF too.
10724 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
10726         PR target/83831
10727         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10728         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10729         declarations.
10730         (set_of_reg): New struct.
10731         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10732         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10733         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10734         functions.
10735         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10736         Split into bitclr, bitset, bitinvert patterns if appropriate.
10737         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10738         use rx_fuse_in_memory_bitop.
10739         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10740         to named insn, correct maximum insn length.
10742 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
10744         PR target/79242
10745         * machmode.def: Define a complex mode for PARTIAL_INT.
10746         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10747         MODE_PARTIAL_INT.
10748         * doc/rtl.texi: Document CSPImode.
10749         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10750         handling.
10751         (msp430_hard_regno_nregs_with_padding): Likewise.
10753 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
10755         PR target/84279
10756         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10758 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
10760         PR rtl-optimization/84169
10761         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
10762         we generated a parallel as new i3 and we split that to new i2 and i3
10763         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
10764         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
10765         those to i2, not i1.  Partially rewrite this scan code.
10767 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10769         PR c/82210
10770         * stor-layout.c (place_field): For variable length fields, adjust
10771         offset_align afterwards not just based on the field's alignment,
10772         but also on the size.
10774         PR middle-end/84309
10775         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10776         of exps and logs in the use_exp2 case.
10778 2018-02-13  Jeff Law  <law@redhat.com>
10780         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10781         entry for "vector".
10783         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10784         ARGS as unused.
10786 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
10788         PR debug/84342
10789         PR debug/84319
10790         * common.opt (gas-loc-support, gas-locview-support): New.
10791         (ginline-points, ginternal-reset-location-views): New.
10792         * doc/invoke.texi: Document them.  Use @itemx where intended.
10793         (gvariable-location-views): Adjust.
10794         * target.def (reset_location_view): New.
10795         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10796         (TARGET_RESET_LOCATION_VIEW): New.
10797         * doc/tm.texi: Rebuilt.
10798         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10799         (dwarf2out_default_as_locview_support): New.
10800         (output_asm_line_debug_info): Use option variables.
10801         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10802         (output_loc_list): Likewise.
10803         (add_high_low_attributes): Check option variables.
10804         Don't output entry view attribute in strict mode.
10805         (gen_inlined_subroutine_die): Check option variables.
10806         (dwarf2out_inline_entry): Likewise.
10807         (init_sections_and_labels): Likewise.
10808         (dwarf2out_early_finish): Likewise.
10809         (maybe_reset_location_view): New, from...
10810         (dwarf2out_var_location): ... here.  Call it.
10811         * debug.h (dwarf2out_default_as_loc_support): Declare.
10812         (dwarf2out_default_as_locview_support): Declare.
10813         * hooks.c (hook_int_rtx_insn_0): New.
10814         * hooks.h (hook_int_rtx_insn_0): Declare.
10815         * toplev.c (process_options): Take -gas-loc-support and
10816         -gas-locview-support from dwarf2out.  Enable
10817         -gvariable-location-views by default only with locview
10818         assembler support.  Enable -ginternal-reset-location-views by
10819         default only if the target defines the corresponding hook.
10820         Enable -ginline-points by default if location views are
10821         enabled; force it disabled if statement frontiers are
10822         disabled.
10823         * tree-inline.c (expand_call_inline): Check option variables.
10824         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10826 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
10828         PR tree-optimization/84321
10829         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10830         handling.  Also check whether the anti-range contains any values
10831         that satisfy the mask; switch to a VR_RANGE if not.
10833 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
10835         PR sanitizer/84340
10836         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10838 2018-02-13  Martin Jambor  <mjambor@suse.cz>
10840         PR c++/83990
10841         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10842         of call statements, also set location of a load to a temporary.
10844 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
10846         * config/rl78/rl78.c (add_vector_labels): New function.
10847         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10848         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10849         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10850         which checks that no arguments are passed.
10851         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10852         * doc/extend.texi: Documentation for the new attribute.
10854 2018-02-13  Andreas Schwab  <schwab@suse.de>
10856         * config/riscv/linux.h (CPP_SPEC): Define.
10858 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10860         PR target/84335
10861         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10862         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10863         OPTION_MASK_ISA_AES as first argument to def_builtin_const
10864         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10865         instead of OPTION_MASK_ISA_PCLMUL as first argument to
10866         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10867         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10868         temporarily for AES and PCLMUL builtins.
10870         PR tree-optimization/84339
10871         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10872         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10873         Formatting fixes.
10875         PR middle-end/84309
10876         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10877         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10878         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10879         inline function.
10880         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10881         inline function.
10882         * omp-simd-clone.h: New file.
10883         * omp-simd-clone.c: Include omp-simd-clone.h.
10884         (expand_simd_clones): No longer static.
10885         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10886         cgraph.h and omp-simd-clone.h.
10887         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10888         (vect_recog_widen_shift_pattern): Formatting fix.
10889         (vect_pattern_recog_1): Don't check optab for calls.
10891         PR target/84336
10892         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10893         operands[2] into a REG before using gen_lowpart on it.
10895 2018-02-12  Jeff Law  <law@redhat.com>
10897         PR target/83760
10898         * config/sh/sh.c (find_barrier): Consider a sibling call
10899         a barrier as well.
10901         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10902         successfully back substituting a reg.
10904 2018-02-12  Richard Biener  <rguenther@suse.de>
10906         PR tree-optimization/84037
10907         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
10908         parameter, move visited init to caller.
10909         (vect_slp_analyze_operations): Separate cost from validity
10910         check, initialize visited once for all instances.
10911         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
10912         for all instances.
10913         * tree-vect-stmts.c (vect_model_simple_cost): Make early
10914         out an assert.
10915         (vect_model_promotion_demotion_cost): Likewise.
10916         (vectorizable_bswap): Guard cost modeling with !slp_node
10917         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
10918         SLP stmts.
10919         (vectorizable_call): Likewise.
10920         (vectorizable_conversion): Likewise.
10921         (vectorizable_assignment): Likewise.
10922         (vectorizable_shift): Likewise.
10923         (vectorizable_operation): Likewise.
10924         (vectorizable_store): Likewise.
10925         (vectorizable_load): Likewise.
10926         (vectorizable_condition): Likewise.
10927         (vectorizable_comparison): Likewise.
10929 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
10931         PR sanitizer/84307
10932         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
10933         (ASAN_MARK): Fix fnspec to account for return value, change pointer
10934         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
10936 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
10938         PR middle-end/83665
10939         * params.def (inline-min-speedup): Increase from 8 to 15.
10940         (max-inline-insns-auto): Decrease from 40 to 30.
10941         * ipa-split.c (consider_split): Add some buffer for function to
10942         be considered inlining candidate.
10943         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
10944         default values.
10946 2018-02-12  Richard Biener  <rguenther@suse.de>
10948         PR tree-optimization/84037
10949         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
10950         matched stmts if we cannot swap the non-matched ones.
10952 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10954         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
10955         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
10956         _mm_maskz_scalef_round_ss): New intrinsics.
10957         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
10958         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
10959         __builtin_ia32_scalefss_round): Remove.
10960         (__builtin_ia32_scalefsd_mask_round,
10961         __builtin_ia32_scalefss_mask_round): New intrinsics.
10962         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
10963         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
10964         ((match_operand:VF_128 2 "<round_nimm_predicate>"
10965         "<round_constraint>")): Changed to ...
10966         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
10967         "<round_scalar_constraint>")): ... this.
10968         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
10969         %0, %1, %2<round_op3>}"): Changed to ...
10970         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
10971         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
10972         %2<round_scalar_mask_op3>}"): ... this.
10973         * config/i386/subst.md (round_scalar_nimm_predicate): New.
10975 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10977         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
10978         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
10979         (_mm_maskz_sqrt_round_ss): New intrinsics.
10980         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
10981         (__builtin_ia32_sqrtsd_mask_round)
10982         (__builtin_ia32_sqrtss_mask_round): New builtins.
10983         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
10984         (__builtin_ia32_sqrtss_round): Remove.
10985         (__builtin_ia32_sqrtsd_mask_round)
10986         (__builtin_ia32_sqrtss_mask_round): New builtins.
10987         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
10988         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
10989         ((match_operand:VF_128 1 "vector_operand"
10990         "xBm,<round_constraint>")): Changed to ...
10991         ((match_operand:VF_128 1 "vector_operand"
10992         "xBm,<round_scalar_constraint>")): ... this.
10993         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
10994         %0, %2, %<iptr>1<round_op3>}): Changed to ...
10995         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
10996         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
10997         %<iptr>1<round_scalar_mask_op3>}): ... this.
10998         ((set_attr "prefix" "<round_prefix>")): Changed to ...
10999         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11001 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11003         PR target/84266
11004         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11005         Cast vec_cmpeq result to correct type.
11006         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11007         Cast vec_cmpgt result to correct type.
11009 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11011         * final.c (final_scan_insn_1): Renamed from...
11012         (final_scan_insn): ... this.  New wrapper, to recover
11013         seen from the outermost call in recursive ones.
11014         * config/sparc/sparc.c (output_return): Drop seen from call.
11015         (output_sibcall): Likewise.
11016         * config/visium/visium.c (output_branch): Likewise.
11018 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11020         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11021         function label.
11023 2018-02-10  Alan Modra  <amodra@gmail.com>
11025         PR target/84300
11026         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11027         Specify LR as an input.
11029 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11031         PR sanitizer/83987
11032         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11033         remove_member_access_dummy_vars): New functions.
11034         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11035         lower_omp_1, execute_lower_omp): Use them.
11037         PR rtl-optimization/84308
11038         * shrink-wrap.c (spread_components): Release todo vector.
11040 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11042         PR rtl-optimization/57193
11043         * ira-color.c (struct allocno_color_data): Add member
11044         conflict_allocno_hard_prefs.
11045         (update_conflict_allocno_hard_prefs): New.
11046         (bucket_allocno_compare_func): Add a preference based on
11047         conflict_allocno_hard_prefs.
11048         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11049         (color_allocnos): Remove a dead code.  Initiate
11050         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11052 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11054         PR target/84226
11055         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11056         constraint from =wa to wa.  Avoid a subreg on the output operand,
11057         instead use a pseudo and subreg it in a move.
11058         (p9_xxbrd_<mode>): Changed to ...
11059         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11060         (p9_xxbrd_v2df): New expander.
11061         (p9_xxbrw_<mode>): Changed to ...
11062         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11063         (p9_xxbrw_v4sf): New expander.
11065 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11067         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11069 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11071         PR target/83926
11072         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11073         multiply in 32-bit mode.
11074         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11075         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11076         mode.
11078 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11080         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11081         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11082         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11083         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11085 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11087         PR lto/84213
11088         * dwarf2out.c (is_trivial_indirect_ref): New function.
11089         (dwarf2out_late_global_decl): Do not generate a location
11090         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11091         and that are not defined in the current unit.
11093 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11095         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11096         instead of a libcall for UNORDERED.
11098 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11100         PR target/82641
11101         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11102         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11104 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11106         PR target/PR84295
11107         * config/s390/s390.c (s390_set_current_function): Invoke
11108         s390_indirect_branch_settings also if fndecl didn't change.
11110 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11112         * config/rs6000/rs6000.md (blockage): Set length to zero.
11114 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11116         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11118 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11120         PR sanitizer/84285
11121         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11122         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11123         -static-lib*san.
11125         PR debug/84252
11126         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11127         PARALLEL incoming that failed vt_get_decl_and_offset check.
11129         PR middle-end/84237
11130         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11131         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11132         TREE_READONLY bit.
11133         (get_variable_section): For decls in named .bss* sections pass true as
11134         second argument to bss_initializer_p.
11136 2018-02-09  Marek Polacek  <polacek@redhat.com>
11137             Jakub Jelinek  <jakub@redhat.com>
11139         PR c++/83659
11140         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11141         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11142         Sync some changes from cxx_fold_indirect_ref.
11144 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11146         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11147         markers.
11148         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11149         (BLOCK_INLINE_ENTRY_LABEL): New.
11150         (dwarf2out_var_location): Disregard inline entry markers.
11151         (inline_entry_data): New struct.
11152         (inline_entry_data_hasher): New hashtable type.
11153         (inline_entry_data_hasher::hash): New.
11154         (inline_entry_data_hasher::equal): New.
11155         (inline_entry_data_table): New variable.
11156         (add_high_low_attributes): Add DW_AT_entry_pc and
11157         DW_AT_GNU_entry_view attributes if a pending entry is found
11158         in inline_entry_data_table.  Add old entry_pc attribute only
11159         if debug nonbinding markers are disabled.
11160         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11161         markers are enabled.
11162         (block_within_block_p, dwarf2out_inline_entry): New.
11163         (dwarf2out_finish): Check that no entries remained in
11164         inline_entry_data_table.
11165         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11166         (final_scan_insn, notice_source_line): Likewise.
11167         (rest_of_clean_state): Skip inline entry markers.
11168         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11169         markers.
11170         * gimple.c (gimple_build_debug_inline_entry): New.
11171         * gimple.h (enum gimple_debug_subcode): Add
11172         GIMPLE_DEBUG_INLINE_ENTRY.
11173         (gimple_build_debug_inline_entry): Declare.
11174         (gimple_debug_inline_entry_p): New.
11175         (gimple_debug_nonbind_marker_p): Adjust.
11176         * insn-notes.def (INLINE_ENTRY): New.
11177         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11178         inline entry marker notes.
11179         (print_insn): Likewise.
11180         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11181         (INSN_DEBUG_MARKER_KIND): Likewise.
11182         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11183         * tree-inline.c (expand_call_inline): Build and insert
11184         debug_inline_entry stmt.
11185         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11186         inline entry blocks early, if nonbind markers are enabled.
11187         (dump_scope_block): Dump fragment info.
11188         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11189         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11190         (gimple_build_debug_inline_entry): New.
11191         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11192         Enable/disable inline entry points too.
11193         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11194         (DEBUG_INSN): Describe inline entry markers.
11196         * common.opt (gvariable-location-views): New.
11197         (gvariable-location-views=incompat5): New.
11198         * config.in: Rebuilt.
11199         * configure: Rebuilt.
11200         * configure.ac: Test assembler for view support.
11201         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11202         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11203         * dwarf2out.c (var_loc_view): New typedef.
11204         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11205         (dwarf2out_locviews_in_attribute): New.
11206         (dwarf2out_locviews_in_loclist): New.
11207         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11208         (enum dw_line_info_opcode): Add LI_adv_address.
11209         (struct dw_line_info_table): Add view.
11210         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11211         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11212         (zero_view_p): New variable.
11213         (ZERO_VIEW_P): New macro.
11214         (output_asm_line_debug_info): New.
11215         (struct var_loc_node): Add view.
11216         (add_AT_view_list, AT_loc_list): New.
11217         (add_var_loc_to_decl): Add view param.  Test it against last.
11218         (new_loc_list): Add view params.  Record them.
11219         (AT_loc_list_ptr): Handle loc and view lists.
11220         (view_list_to_loc_list_val_node): New.
11221         (print_dw_val): Handle dw_val_class_view_list.
11222         (size_of_die): Likewise.
11223         (value_format): Likewise.
11224         (loc_list_has_views): New.
11225         (gen_llsym): Set vl_symbol too.
11226         (maybe_gen_llsym, skip_loc_list_entry): New.
11227         (dwarf2out_maybe_output_loclist_view_pair): New.
11228         (output_loc_list): Output view list or entries too.
11229         (output_view_list_offset): New.
11230         (output_die): Handle dw_val_class_view_list.
11231         (output_dwarf_version): New.
11232         (output_compilation_unit_header): Use it.
11233         (output_skeleton_debug_sections): Likewise.
11234         (output_rnglists, output_line_info): Likewise.
11235         (output_pubnames, output_aranges): Update version comments.
11236         (output_one_line_info_table): Output view numbers in asm comments.
11237         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11238         Call maybe_gen_llsym.
11239         (loc_list_from_tree_1): Adjust.
11240         (add_AT_location_description): Create view list attribute if
11241         needed, check it's absent otherwise.
11242         (convert_cfa_to_fb_loc_list): Adjust.
11243         (maybe_emit_file): Call output_asm_line_debug_info for test.
11244         (dwarf2out_var_location): Reset views as needed.  Precompute
11245         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11246         attribute.  Set view.
11247         (new_line_info_table): Reset next view.
11248         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11249         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11250         the assembler, or select appropriate line info opcodes.
11251         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11252         (optimize_string_length): Catch it.  Adjust.
11253         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11254         dw_val_class_view_list, and remove it if no longer needed.
11255         (hash_loc_list): Hash view numbers.
11256         (loc_list_hasher::equal): Compare them.
11257         (optimize_location_lists): Check whether a view list symbol is
11258         needed, and whether the locview attribute is present, and
11259         whether they match.  Remove the locview attribute if no longer
11260         needed.
11261         (index_location_lists): Call skip_loc_list_entry for test.
11262         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11263         Use output_dwarf_version.
11264         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11265         (struct dw_val_node): Add val_view_list.
11266         * final.c (SEEN_NEXT_VIEW): New.
11267         (set_next_view_needed): New.
11268         (clear_next_view_needed): New.
11269         (maybe_output_next_view): New.
11270         (final_start_function): Rename to...
11271         (final_start_function_1): ... this.  Take pointer to FIRST,
11272         add SEEN parameter.  Emit param bindings in the initial view.
11273         (final_start_function): Reintroduce SEEN-less interface.
11274         (final): Rename to...
11275         (final_1): ... this.  Take SEEN parameter.  Output final pending
11276         next view at the end.
11277         (final): Reintroduce seen-less interface.
11278         (final_scan_insn): Output pending next view before switching
11279         sections or ending a block.  Mark the next view as needed when
11280         outputting variable locations.  Notify debug backend of section
11281         changes, and of location view changes.
11282         (rest_of_handle_final): Adjust.
11283         * toplev.c (process_options): Autodetect value for debug variable
11284         location views option.  Warn on incompat5 without -gdwarf-5.
11285         * doc/invoke.texi (gvariable-location-views): New.
11286         (gvariable-location-views=incompat5): New.
11287         (gno-variable-location-views): New.
11289 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11291         PR tree-optimization/84136
11292         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11293         that the result of find_edge is non-NULL.
11295 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11297         PR target/83008
11298         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11299         storing integer register in SImode.  Fix cost of 256 and 512
11300         byte aligned SSE register store.
11302 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11304         * config/i386/i386.c (ix86_multiplication_cost): Fix
11305         multiplication cost for TARGET_AVX512DQ.
11307 2018-02-08  Marek Polacek  <polacek@redhat.com>
11309         PR tree-optimization/84238
11310         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11311         get_range_strlen.
11313 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11315         PR tree-optimization/84265
11316         * tree-vect-stmts.c (vectorizable_store): Don't treat
11317         VMAT_CONTIGUOUS accesses as grouped.
11318         (vectorizable_load): Likewise.
11320 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11322         PR tree-optimization/81635
11323         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11324         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11325         (test_round_for_mask): New functions.
11326         (wide_int_cc_tests): Call test_round_for_mask.
11327         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11328         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11329         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11330         range returned by get_range_info.
11332 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11334         PR ipa/81360
11335         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11336         * symtab.c: Include builtins.h
11337         (symtab_node::output_to_lto_symbol_table_p): Move here
11338         from lto-streamer-out.c:output_symbol_p.
11339         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11340         (output_symbol_p): Move all logic to symtab.c
11341         (produce_symtab): Update.
11343 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11345         * config/s390/s390-opts.h (enum indirect_branch): Define.
11346         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11347         (s390_indirect_branch_via_thunk)
11348         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11349         (enum s390_indirect_branch_type): Define.
11350         * config/s390/s390.c (struct s390_frame_layout, struct
11351         machine_function): Remove.
11352         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11353         (indirect_branch_table_label_no, indirect_branch_table_name):
11354         Define variables.
11355         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11356         (enum s390_indirect_branch_option): Define.
11357         (s390_return_addr_from_memory): New function.
11358         (s390_handle_string_attribute): New function.
11359         (s390_attribute_table): Add new attribute handler.
11360         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11361         (s390_indirect_branch_via_thunk): New function.
11362         (s390_indirect_branch_via_inline_thunk): New function.
11363         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11364         sibling call optimization for non z10 compiles.
11365         (s390_emit_call): Force indirect branch target to be a single
11366         register.  Add r1 clobber for non-z10 compiles.
11367         (s390_emit_epilogue): Emit return jump via return_use expander.
11368         (s390_reorg): Handle JUMP_INSNs as execute targets.
11369         (s390_option_override_internal): Perform validity checks for the
11370         new command line options.
11371         (s390_indirect_branch_attrvalue): New function.
11372         (s390_indirect_branch_settings): New function.
11373         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11374         (s390_output_indirect_thunk_function):  New function.
11375         (s390_code_end): Implement target hook.
11376         (s390_case_values_threshold): Implement target hook.
11377         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11378         macros.
11379         * config/s390/s390.h (struct s390_frame_layout)
11380         (struct machine_function): Move here from s390.c.
11381         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11382         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11383         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11384         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11385         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11386         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11387         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11388         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11389         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11390         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11391         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11392         (mnemonic attribute): Add values which aren't recognized
11393         automatically.
11394         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11395         pattern for branch conversion.  Fix mnemonic attribute.
11396         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11397         indirect branch via thunk if requested.
11398         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11399         ("*indirect_jump"): Disable for branch conversion using out of
11400         line thunks.
11401         ("indirect_jump_via_thunk<mode>_z10")
11402         ("indirect_jump_via_thunk<mode>")
11403         ("indirect_jump_via_inlinethunk<mode>_z10")
11404         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11405         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11406         ("casesi_jump_via_inlinethunk<mode>_z10")
11407         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11408         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11409         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11410         ("*indirect2_jump"): Disable for branch conversion.
11411         ("casesi_jump"): Turn into expander and expand patterns for branch
11412         conversion.
11413         ("return_use"): New expander.
11414         ("*return"): Emit return via thunk and rename it to ...
11415         ("*return<mode>"): ... this one.
11416         * config/s390/s390.opt: Add new options and and enum for the
11417         option values.
11419 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11421         * lra-constraints.c (match_reload): Unconditionally use
11422         gen_lowpart_SUBREG, rather than selecting between that
11423         and equivalent gen_rtx_SUBREG code.
11425 2018-02-08  Richard Biener  <rguenther@suse.de>
11427         PR tree-optimization/84233
11428         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11429         changed flag instead of boguously re-using phi_inserted.
11431 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11433         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11434         static local variables.
11436 2018-02-08  Richard Biener  <rguenther@suse.de>
11438         PR tree-optimization/84278
11439         * tree-vect-stmts.c (vectorizable_store): When looking for
11440         smaller vector types to perform grouped strided loads/stores
11441         make sure the mode is supported by the target.
11442         (vectorizable_load): Likewise.
11444 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11446         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11447         Increase LDP/STP opportunities by adding adjacent callee-saves.
11449 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11451         PR rtl-optimization/84068
11452         PR rtl-optimization/83459
11453         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11455 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11457         PR tree-optimization/84224
11458         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11459         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11460         non-zero arguments.
11462 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11464         PR target/84113
11465         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11466         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11467         count, remove one USE.
11469 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11471         * doc/install.texi (Configuration): Document the
11472         --with-long-double-format={ibm,ieee} PowerPC configuration
11473         options.
11475         PR target/84154
11476         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11477         Convert from define_expand to be define_insn_and_split.  Rework
11478         float/double/_Float128 conversions to QI/HI/SImode to work with
11479         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
11480         conversions to QI/HImode types did a store and then a load to
11481         truncate the value.  For conversions to VSX registers, don't split
11482         the insn, instead emit the code directly.  Use the code iterator
11483         any_fix to combine signed and unsigned conversions.
11484         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11485         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11486         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11487         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11488         (fix_<mode>di2_hw): Likewise.
11489         (fixuns_<mode>di2_hw): Likewise.
11490         (fix_<mode>si2_hw): Likewise.
11491         (fixuns_<mode>si2_hw): Likewise.
11492         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11493         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11494         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11495         fix<uns>_trunc<SFDF:mode>si2_p8.
11496         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11497         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11498         (fix<uns>_<mode>_mem): Likewise.
11499         (fctiw<u>z_<mode>_mem): Likewise.
11500         (fix<uns>_<mode>_mem): Likewise.
11501         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11502         the register allocator from doing a direct move to the GPRs to do
11503         a store, and instead use the ISA 3.0 store byte/half-word from
11504         vector register instruction.  For IEEE 128-bit floating point,
11505         also optimize stores of 32-bit ints.
11506         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11508 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
11510         * genextract.c (push_pathstr_operand): New function to support
11511         [a-zA-Z].
11512         (walk_rtx): Call push_pathstr_operand.
11513         (print_path): Support [a-zA-Z].
11515 2018-02-07  Richard Biener  <rguenther@suse.de>
11517         PR tree-optimization/84037
11518         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11519         (cse_and_gimplify_to_preheader): Declare.
11520         (vect_get_place_in_interleaving_chain): Likewise.
11521         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11522         ivexpr_map.
11523         (_loop_vec_info::~_loop_vec_info): Delete it.
11524         (cse_and_gimplify_to_preheader): New function.
11525         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11526         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11527         (vectorizable_load): Likewise.  For grouped stores always base
11528         the IV on the first element.
11529         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11530         condition before gimplifying.
11532 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11534         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11535         *DIV_EXPR and *MOD_EXPR.
11537 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
11539         PR target/84248
11540         * config/i386/i386.c (ix86_option_override_internal): Mask out
11541         the CF_SET bit when checking -fcf-protection.
11543 2018-02-07  Tom de Vries  <tom@codesourcery.com>
11545         PR libgomp/84217
11546         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11547         enough.
11549 2018-02-07  Richard Biener  <rguenther@suse.de>
11551         PR tree-optimization/84204
11552         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11553         this place.
11555         PR tree-optimization/84205
11556         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11557         special-case isl_ast_op_zdiv_r.
11559         PR tree-optimization/84223
11560         * graphite-scop-detection.c (gather_bbs::before_dom_children):
11561         Only add conditions from within the region.
11562         (gather_bbs::after_dom_children): Adjust.
11564 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
11566         PR target/84209
11567         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11568         * config/avr/avr.md: Only post-reload split REG-REG moves if
11569         either register is GENERAL_REG_P.
11571 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11573         PR tree-optimization/84235
11574         * tree-ssa-scopedtables.c
11575         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11576         if the subtraction is performed in floating point type where NaNs are
11577         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11578         build 1.  Formatting fix.
11580 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
11582         PR target/84146
11583         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11584         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11585         and skip it regardless of bb boundaries.  Use CALL_P macro,
11586         don't test INSN_P (insn) together with CALL_P or JUMP_P check
11587         unnecessarily, formatting fix.
11589 2018-02-06  Michael Collison  <michael.collison@arm.com>
11591         * config/arm/thumb2.md:
11592         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11593         (*thumb_mov_notscc): Ditto.
11595 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
11597         PR target/84154
11598         * config/rs6000/rs6000.md (su code attribute): Use "u" for
11599         unsigned_fix, not "s".
11601 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11603         * configure.ac (gcc_fn_eh_frame_ro): New function.
11604         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11605         correct .eh_frame permissions.
11606         * configure: Regenerate.
11608 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
11610         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11611         irrelevant options.
11613 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11615         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11616         Display warning message for -mno-speculate-indirect-jumps.
11618 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
11620         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11621         Undocumented.
11622         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11624 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
11626         PR tree-optimization/84225
11627         * tree-eh.c (find_trapping_overflow): Only call
11628         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11630 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11632         PR target/84145
11633         * config/i386/i386.c: Reimplement the check of possible options
11634         -mibt/-mshstk conbination. Change error messages.
11635         * doc/invoke.texi: Fix a typo: remove extra '='.
11637 2018-02-06  Marek Polacek  <polacek@redhat.com>
11639         PR tree-optimization/84228
11640         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11642 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
11644         PR target/82641
11645         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11646         emitted arch directives.
11647         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11648         __ARM_FEATURE_COPROC before changing architectures.
11650 2018-02-06  Richard Biener  <rguenther@suse.de>
11652         * config/i386/i386.c (print_reg): Fix typo.
11653         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11655 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11657         * configure: Regenerate.
11659 2018-02-05  Martin Sebor  <msebor@redhat.com>
11661         PR tree-optimization/83369
11662         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11663         inlining context.
11665 2018-02-05  Martin Liska  <mliska@suse.cz>
11667         * doc/invoke.texi: Cherry-pick upstream r323995.
11669 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
11671         * ira.c (ira_init_register_move_cost): Adjust comment.
11673 2018-02-05  Martin Liska  <mliska@suse.cz>
11675         PR gcov-profile/84137
11676         * doc/gcov.texi: Fix typo in documentation.
11678 2018-02-05  Martin Liska  <mliska@suse.cz>
11680         PR gcov-profile/83879
11681         * doc/gcov.texi: Document necessity of --dynamic-list-data when
11682         using dlopen functionality.
11684 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
11686         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11687         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11688         _mm_maskz_range_ss, _mm_mask_range_round_ss,
11689         _mm_maskz_range_round_ss): New intrinsics.
11690         (__builtin_ia32_rangesd128_round)
11691         (__builtin_ia32_rangess128_round): Remove.
11692         (__builtin_ia32_rangesd128_mask_round,
11693         __builtin_ia32_rangess128_mask_round): New builtins.
11694         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11695         __builtin_ia32_rangess128_round): Remove.
11696         (__builtin_ia32_rangesd128_mask_round,
11697         __builtin_ia32_rangess128_mask_round): New builtins.
11698         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11699         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11700         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11701         "<round_saeonly_constraint>")): Changed to ...
11702         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11703         "<round_saeonly_scalar_constraint>")): ... this.
11704         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11705         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11706         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11707         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11708         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11710 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
11712         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11713         options.
11714         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11715         Remove all values except native, 8540 and 8548.
11717 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
11719         * config/i386/i386.c (ix86_output_function_return): Pass
11720         INVALID_REGNUM, instead of -1, as invalid register number to
11721         indirect_thunk_name and output_indirect_thunk.
11723 2018-02-02  Julia Koval  <julia.koval@intel.com>
11725         * config.gcc: Add -march=icelake.
11726         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11727         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11728         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11729         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11730         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11731         (processor_target_table): Add icelake.
11732         (ix86_option_override_internal): Handle new PTAs.
11733         (get_builtin_code_for_version): Handle icelake.
11734         (M_INTEL_COREI7_ICELAKE): New.
11735         (fold_builtin_cpu): Handle icelake.
11736         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11737         * doc/invoke.texi: Add -march=icelake.
11739 2018-02-02  Julia Koval  <julia.koval@intel.com>
11741         * config/i386/i386.c (ix86_option_override_internal): Change flags type
11742         to wide_int_bitmask.
11743         * wide-int-bitmask.h: New.
11745 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11747         PR target/84066
11748         * config/i386/i386.md: Replace Pmode with word_mode in
11749         builtin_setjmp_setup and builtin_longjmp to support x32.
11751 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
11753         PR target/56010
11754         PR target/83743
11755         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11756         #include "opts.h".
11757         (rs6000_supported_cpu_names): New static variable.
11758         (linux_cpu_translation_table): Likewise.
11759         (elf_platform) <cpu>: Define new static variable and use it.
11760         Translate kernel AT_PLATFORM name to canonical name if needed.
11761         Error if platform name is unknown.
11763 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
11765         PR target/84089
11766         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11768 2018-02-01  Jeff Law  <law@redhat.com>
11770         PR target/84128
11771         * config/i386/i386.c (release_scratch_register_on_entry): Add new
11772         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
11773         the scratch if RELEASE_VIA_POP is false.
11774         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11775         If we have to save a temporary register, decrement SIZE appropriately.
11776         Pass new arguments to release_scratch_register_on_entry.
11777         (ix86_adjust_stack_and_probe): Likewise.
11778         (ix86_emit_probe_stack_range): Pass new arguments to
11779         release_scratch_register_on_entry.
11781 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
11783         PR rtl-optimization/84157
11784         * combine.c (change_zero_ext): Use REG_P predicate in
11785         front of HARD_REGISTER_P predicate.
11787 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
11789         * config/avr/avr.c (avr_option_override): Move disabling of
11790         -fdelete-null-pointer-checks to...
11791         * common/config/avr/avr-common.c (avr_option_optimization_table):
11792         ...here.
11794 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11796         PR tree-optimization/81635
11797         * tree-data-ref.c (split_constant_offset_1): For types that
11798         wrap on overflow, try to use range info to prove that wrapping
11799         cannot occur.
11801 2018-02-01  Renlin Li  <renlin.li@arm.com>
11803         PR target/83370
11804         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11805         TAILCALL_ADDR_REGS.
11806         (aarch64_register_move_cost): Likewise.
11807         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11808         TAILCALL_ADDR_REGS.
11809         (REG_CLASS_NAMES): Likewise.
11810         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11811         TAILCALL_ADDR_REGS. Remove IP registers.
11812         * config/aarch64/aarch64.md (Ucs): Update register constraint.
11814 2018-02-01  Richard Biener  <rguenther@suse.de>
11816         * domwalk.h (dom_walker::dom_walker): Add additional constructor
11817         for specifying RPO order and allow NULL for that.
11818         * domwalk.c (dom_walker::dom_walker): Likewise.
11819         (dom_walker::walk): Handle NULL RPO order.
11820         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11821         in RPO order.
11822         (rewrite_update_dom_walker): Likewise.
11823         (mark_def_dom_walker): Likewise.
11825 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11827         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11828         (aarch64_maybe_expand_sve_subreg_move): Declare.
11829         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11830         * config/aarch64/predicates.md (aarch64_any_register_operand): New
11831         predicate.
11832         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11833         that are semantically a reverse operation.
11834         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11835         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11836         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11837         functions.
11838         (aarch64_can_change_mode_class): For big-endian, forbid changes
11839         between two SVE modes if they have different element sizes.
11841 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11843         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11844         the TImode handling for big-endian targets.
11846 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11848         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11849         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
11850         not just bytes.
11851         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11852         Remove BSWAP handing for big-endian targets and use the form of
11853         LD1RQ appropariate for the mode.
11855 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11857         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11858         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11859         duplicated element.
11861 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11863         PR tearget/83845
11864         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11865         check for operands that need to go through aarch64_sve_reload_be.
11867 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
11869         PR tree-optimization/81661
11870         PR tree-optimization/84117
11871         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11872         * tree-eh.c: Include gimplify.h.
11873         (find_trapping_overflow, replace_trapping_overflow,
11874         rewrite_to_non_trapping_overflow): New functions.
11875         * tree-vect-loop.c: Include tree-eh.h.
11876         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11877         * tree-data-ref.c: Include tree-eh.h.
11878         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11880 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
11882         PR rtl-optimization/84123
11883         * combine.c (change_zero_ext): Check if hard register satisfies
11884         can_change_dest_mode before calling gen_lowpart_SUBREG.
11886 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
11888         PR target/82444
11889         * ira.c (ira_init_register_move_cost): Remove assert.
11891 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11893         PR rtl-optimization/84071
11894         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11895         * doc/tm.texi: Regenerate.
11897 2018-01-31  Richard Biener  <rguenther@suse.de>
11899         PR tree-optimization/84132
11900         * tree-data-ref.c (analyze_miv_subscript): Properly
11901         check whether evolution_function_is_affine_multivariate_p
11902         before calling gcd_of_steps_may_divide_p.
11904 2018-01-31  Julia Koval  <julia.koval@intel.com>
11906         PR target/83618
11907         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
11908         * config/i386/i386.md (rdpid_rex64) New.
11909         (rdpid): Make 32bit only.
11911 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
11913         PR lto/84105
11914         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
11915         an IDENTIFIER_NODE for FUNCTION_TYPE's.
11917 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11919         Revert
11920         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11922         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11924 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11926         PR rtl-optimization/84071
11927         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
11928         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
11930 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11932         * config/arc/arc.c (arc_handle_aux_attribute): New function.
11933         (arc_attribute_table): Add 'aux' attribute.
11934         (arc_in_small_data_p): Consider aux like variables.
11935         (arc_is_aux_reg_p): New function.
11936         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
11937         (arc_get_aux_arg): New function.
11938         (prepare_move_operands): Handle aux-register access.
11939         (arc_handle_aux_attribute): New function.
11940         * doc/extend.texi (ARC Variable attributes): Add subsection.
11942 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11944         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
11945         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
11946         (arc_attribute_table): Add 'uncached' attribute.
11947         (arc_print_operand): Print '.di' flag for uncached memory
11948         accesses.
11949         (arc_in_small_data_p): Do not consider for small data the uncached
11950         types.
11951         (arc_is_uncached_mem_p): New function.
11952         * config/arc/predicates.md (compact_store_memory_operand): Check
11953         for uncached memory accesses.
11954         (nonvol_nonimm_operand): Likewise.
11955         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
11957 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
11959         PR c/84100
11960         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
11961         falign-loops=): Add Optimization flag.
11963 2018-01-30  Jeff Law  <law@redhat.com>
11965         PR target/84064
11966         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
11967         INT_REGISTERS_SAVED.  Check it prior to calling
11968         get_scratch_register_on_entry.
11969         (ix86_adjust_stack_and_probe): Similarly.
11970         (ix86_emit_probe_stack_range): Similarly.
11971         (ix86_expand_prologue): Corresponding changes.
11973 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11975         PR target/40411
11976         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
11977         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
11979 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
11981         PR target/84112
11982         * lra-constraints.c (curr_insn_transform): Process AND in the
11983         address.
11985 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
11987         PR rtl-optimization/83986
11988         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
11989         dependence against last_pending_memory_flush in addition to
11990         pending_jump_insns.
11992 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
11994         PR tree-optimization/81611
11995         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
11996         copies.
11998 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12000         PR target/83758
12001         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12002         a reg rtx.
12004 2018-01-30  Richard Biener  <rguenther@suse.de>
12005             Jakub Jelinek  <jakub@redhat.com>
12007         PR tree-optimization/84111
12008         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12009         inner loops added during recursion, as they don't have up-to-date
12010         SSA form.
12012 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12014         PR ipa/81360
12015         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12016         (can_inline_edge_by_limits_p): ... here.
12017         (can_early_inline_edge_p, check_callers,
12018         update_caller_keys, update_callee_keys, recursive_inlining,
12019         add_new_edges_to_heap, speculation_useful_p,
12020         inline_small_functions,
12021         inline_small_functions, flatten_function,
12022         inline_to_all_callers_1): Update.
12024 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12026         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12027         zeros correctly.
12029 2018-01-30  Richard Biener  <rguenther@suse.de>
12031         PR tree-optimization/83008
12032         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12033         invariant and constant vector uses in stmts when they need
12034         more than one stmt.
12036 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12038         PR bootstrap/84017
12039         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12040         * configure: Regenerate.
12042 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12044         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12045         pattern.
12046         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12047         Use gen_rtx_REG rather than gen_lowpart.
12049 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12051         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12052         rather than 0 when creating partial subregs.
12054 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12056         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12057         of usage.
12059 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12061         PR target/81550
12062         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12063         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12064         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12065         flags.  This restores the settings used before the 2017-07-24.
12066         Turning off pre increment/decrement/modify allows IVOPTS to
12067         optimize DF/SF loops where the index is an int.
12069 2018-01-29  Richard Biener  <rguenther@suse.de>
12070             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12072         PR bootstrap/80867
12073         * tree-vect-stmts.c (vectorizable_call): Don't call
12074         targetm.vectorize_builtin_md_vectorized_function if callee is
12075         NULL.
12077 2018-01-22  Carl Love  <cel@us.ibm.com>
12079         * doc/extend.tex: Fix typo in second arg in
12080         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12082 2018-01-29  Richard Biener  <rguenther@suse.de>
12084         PR tree-optimization/84086
12085         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12086         (flush_ssaname_freelist): When SSA names were released reset
12087         the SCEV hash table.
12089 2018-01-29  Richard Biener  <rguenther@suse.de>
12091         PR tree-optimization/84057
12092         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12093         removed paths when removing edges.
12095 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12097         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12098         -mfunction-return=@var{choice}.
12100 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12102         PR diagnostic/84034
12103         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12104         Handle CR like TAB.
12105         (layout::print_source_line): Likewise.
12106         (test_get_line_width_without_trailing_whitespace): Add test cases.
12108 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12110         PR middle-end/84040
12111         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12112         debug insns.
12114 2018-01-26  Jim Wilson  <jimw@sifive.com>
12116         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12118         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12119         specified.
12121 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12123         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12124         and CMP + SUB-immediate -> SUBS.
12126 2018-01-26  Martin Sebor  <msebor@redhat.com>
12128         PR tree-optimization/83896
12129         * tree-ssa-strlen.c (get_string_len): Rename...
12130         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12131         Avoid assuming length is constant.
12132         (handle_char_store): Use HOST_WIDE_INT for string length.
12134 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12136         PR target/81763
12137         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12138         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12140 2018-01-26  Richard Biener  <rguenther@suse.de>
12142         PR rtl-optimization/84003
12143         * dse.c (record_store): Only record redundant stores when
12144         the earlier store aliases at least all accesses the later one does.
12146 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12148         PR rtl-optimization/83985
12149         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12150         REG_CFA_RESTORE insns.
12151         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12152         REG_CFA_RESTORE insns here.
12154         PR c/83989
12155         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12156         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12158 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12160         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12161         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12162         (arc_init): Likewise.
12163         (arc_override_options): Likewise.
12164         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12165         value.
12166         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12167         support.
12168         * config/arc/arc.h (TARGET_DBNZ): Define.
12169         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12170         properly set the tune attribute.
12171         (dbnz): Use TARGET_DBNZ guard.
12172         * config/arc/arc.opt (mtune): Add core3 option.
12174 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12176         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12177         recognize new pic like addresses.
12178         (arc_delegitimize_address): Clean up.
12180 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12182         * config/arc/arc-arches.def: Option mrf16 valid for all
12183         architectures.
12184         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12185         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12186         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12187         * config/arc/arc-tables.opt: Regenerate.
12188         * config/arc/arc.c (arc_conditional_register_usage): Handle
12189         reduced register file case.
12190         (arc_file_start): Set must have build attributes.
12191         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12192         mrf16 option value.
12193         * config/arc/arc.opt (mrf16): Add new option.
12194         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12195         * config/arc/genmultilib.awk: Handle new mrf16 option.
12196         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12197         * config/arc/t-multilib: Regenerate.
12198         * doc/invoke.texi (ARC Options): Document mrf16 option.
12200 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12202         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12203         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12204         (arc_attribute_table): Add 'secure_call' attribute.
12205         (arc_print_operand): Print secure call operand.
12206         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12207         secure.
12208         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12209         (call_i): Add support for sjli instruction.
12210         (call_value_i): Likewise.
12211         * config/arc/constraints.md (Csc): New constraint.
12213 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12214             John Eric Martin  <John.Martin@emmicro-us.com>
12216         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12217         * config/arc/arc.c (_arc_jli_section): New struct.
12218         (arc_jli_section): New type.
12219         (rc_jli_sections): New static variable.
12220         (arc_handle_jli_attribute): New function.
12221         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12222         (arc_file_end): New function.
12223         (TARGET_ASM_FILE_END): Define.
12224         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12225         (arc_add_jli_section): New function.
12226         (jli_call_scan): Likewise.
12227         (arc_reorg): Call jli_call_scan.
12228         (arc_output_addsi): Remove 'S' from printing asm operand.
12229         (arc_is_jli_call_p): New function.
12230         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12231         operand.
12232         (movhi_insn): Likewise.
12233         (movsi_insn): Likewise.
12234         (movsi_set_cc_insn): Likewise.
12235         (loadqi_update): Likewise.
12236         (load_zeroextendqisi_update): Likewise.
12237         (load_signextendqisi_update): Likewise.
12238         (loadhi_update): Likewise.
12239         (load_zeroextendhisi_update): Likewise.
12240         (load_signextendhisi_update): Likewise.
12241         (loadsi_update): Likewise.
12242         (loadsf_update): Likewise.
12243         (movsicc_insn): Likewise.
12244         (bset_insn): Likewise.
12245         (bxor_insn): Likewise.
12246         (bclr_insn): Likewise.
12247         (bmsk_insn): Likewise.
12248         (bicsi3_insn): Likewise.
12249         (cmpsi_cc_c_insn): Likewise.
12250         (movsi_ne): Likewise.
12251         (movsi_cond_exec): Likewise.
12252         (clrsbsi2): Likewise.
12253         (norm_f): Likewise.
12254         (normw): Likewise.
12255         (swap): Likewise.
12256         (divaw): Likewise.
12257         (flag): Likewise.
12258         (sr): Likewise.
12259         (kflag): Likewise.
12260         (ffs): Likewise.
12261         (ffs_f): Likewise.
12262         (fls): Likewise.
12263         (call_i): Remove 'S' asm letter, add jli instruction.
12264         (call_value_i): Likewise.
12265         * config/arc/arc.op (mjli-always): New option.
12266         * config/arc/constraints.md (Cji): New constraint.
12267         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12268         operand.
12269         (subsf3_fpx): Likewise.
12270         (mulsf3_fpx): Likewise.
12271         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12272         asm operand.
12273         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12274         function attrbutes.
12275         * doc/invoke.texi (ARC): Document mjli-always option.
12277 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12279         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12280         avoid addition with 0 and use incw and decw where possible.
12282 2018-01-26  Richard Biener  <rguenther@suse.de>
12284         PR tree-optimization/81082
12285         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12286         association if it requires casting to unsigned.
12287         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12288         from fold_plusminus_mult_expr to catch important cases late when
12289         range info is available.
12291 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12293         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12294         * configure.ac (hidden_linkonce): New test.
12295         * configure: Regenerate.
12296         * config.in: Regenerate.
12298 2018-01-26  Julia Koval  <julia.koval@intel.com>
12300         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12301         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12302         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12303         _mm_mask_bitshuffle_epi64_mask): Fix type.
12304         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12305         USI_FTYPE_V4DI_V4DI_USI): Remove.
12306         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12307         __builtin_ia32_vpshufbitqmb256_mask,
12308         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12309         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12310         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12312 2018-01-26  Alan Modra  <amodra@gmail.com>
12314         PR target/84033
12315         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12316         UNSPEC_VBPERMQ.  Sort other unspecs.
12318 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12320         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12322 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12324         PR middle-end/83055
12325         * predict.c (drop_profile): Do not push/pop cfun; update also
12326         node->count.
12327         (handle_missing_profiles): Fix logic looking for zero profiles.
12329 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12331         PR middle-end/83977
12332         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12333         on functions with #pragma omp declare simd or functions with simd
12334         attribute.
12335         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12336         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12337         Remove trailing \n from warning_at calls.
12339 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12341         PR target/84028
12342         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12343         for neutered workers.
12345 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12347         PR target/68467
12348         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12349         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12351 2018-01-24  Jeff Law  <law@redhat.com>
12353         PR target/83994
12354         * i386.c (get_probe_interval): Move to earlier point.
12355         (ix86_compute_frame_layout): If -fstack-clash-protection and
12356         the frame is larger than the probe interval, then use pushes
12357         to save registers rather than reg->mem moves.
12358         (ix86_expand_prologue): Remove conditional for int_registers_saved
12359         assertion.
12361 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12363         PR target/84014
12364         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12365         min/max for never referenced object.
12367 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12369         PR middle-end/83977
12370         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12371         here.
12372         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12373         attributes from DECL_ATTRIBUTES (decl) without affecting
12374         DECL_ATTRIBUTES (current_function_decl).
12375         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12376         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12378 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12380         PR tree-optimization/83979
12381         * fold-const.c (fold_comparison): Use constant_boolean_node
12382         instead of boolean_{true,false}_node.
12384 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12386         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12387         with zero counts.
12389 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12391         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12392         Simplify the clause that sets the length attribute.
12393         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12394         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12395         clause that sets the length attribute.
12396         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12398 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12400         PR target/83589
12401         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12402         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12403         Add strict parameter.
12404         (prevent_branch_around_nothing): Insert dummy insn between branch to
12405         label and label with no ptx insn inbetween.
12406         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12408 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12410         PR target/81352
12411         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12412         for neutered threads in warp.
12413         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12415 2018-01-24  Richard Biener  <rguenther@suse.de>
12417         PR tree-optimization/83176
12418         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12419         operands.
12421 2018-01-24  Richard Biener  <rguenther@suse.de>
12423         PR tree-optimization/82819
12424         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12425         code generating pluses that are no-ops in the target precision.
12427 2018-01-24  Richard Biener  <rguenther@suse.de>
12429         PR middle-end/84000
12430         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12432 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12434         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12435         to merge probabilities.
12436         * predict.c (probably_never_executed): Also mark as cold functions
12437         with global 0 profile and guessed local profile.
12438         * profile-count.c (profile_probability::combine_with_count): New
12439         member function.
12440         * profile-count.h (profile_probability::operator*,
12441         profile_probability::operator*=, profile_probability::operator/,
12442         profile_probability::operator/=): Reduce precision to adjusted
12443         and set value to guessed on contradictory divisions.
12444         (profile_probability::combine_with_freq): Remove.
12445         (profile_probability::combine_wiht_count): Declare.
12446         (profile_count::force_nonzero):: Set to adjusted.
12447         (profile_count::probability_in):: Set quality to adjusted.
12448         * tree-ssa-tail-merge.c (replace_block_by): Use
12449         combine_with_count.
12451 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12452             Jim Wilson  <jimw@sifive.com>
12454         * config/riscv/riscv.c (riscv_stack_boundary): New.
12455         (riscv_option_override): Set riscv_stack_boundary.  Handle
12456         riscv_preferred_stack_boundary_arg.
12457         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12458         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12459         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12460         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12461         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12462         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12464 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12466         PR target/83905
12467         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12468         of struct ix86_frame.
12469         (ix86_expand_epilogue): Likewise.  Add a local variable for
12470         the reg_save_offset field in struct ix86_frame.
12472 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
12474         PR tree-optimization/82604
12475         * tree-loop-distribution.c (enum partition_kind): New enum item
12476         PKIND_PARTIAL_MEMSET.
12477         (partition_builtin_p): Support above new enum item.
12478         (generate_code_for_partition): Ditto.
12479         (compute_access_range): Differentiate cases that equality can be
12480         proven at all loops, the innermost loops or no loops.
12481         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12482         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
12483         (finalize_partitions, distribute_loop): Don't fuse partition of
12484         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12485         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12486         parloop is enabled.
12488 2018-01-23  Martin Liska  <mliska@suse.cz>
12490         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12491         order to ignore the predictor.
12492         (PRED_POLYMORPHIC_CALL): Likewise.
12493         (PRED_RECURSIVE_CALL): Likewise.
12495 2018-01-23  Martin Liska  <mliska@suse.cz>
12497         * tree-profile.c (tree_profiling): Print function header to
12498         aware reader which function we are working on.
12499         * value-prof.c (gimple_find_values_to_profile): Do not print
12500         not interesting value histograms.
12502 2018-01-23  Martin Liska  <mliska@suse.cz>
12504         * profile-count.h (enum profile_quality): Add
12505         profile_uninitialized as the first value. Do not number values
12506         as they are zero based.
12507         (profile_count::verify): Update sanity check.
12508         (profile_probability::verify): Likewise.
12510 2018-01-23  Nathan Sidwell  <nathan@acm.org>
12512         * doc/invoke.texi (ffor-scope): Deprecate.
12514 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12516         PR tree-optimization/83510
12517         * domwalk.c (set_all_edges_as_executable): New function.
12518         (dom_walker::dom_walker): Convert bool param
12519         "skip_unreachable_blocks" to enum reachability.  Move setup of
12520         edge flags to set_all_edges_as_executable and only do it when
12521         reachability is REACHABLE_BLOCKS.
12522         * domwalk.h (enum dom_walker::reachability): New enum.
12523         (dom_walker::dom_walker): Convert bool param
12524         "skip_unreachable_blocks" to enum reachability.
12525         (set_all_edges_as_executable): New decl.
12526         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
12527         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12528         "reachability".
12529         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12530         but converting true to REACHABLE_BLOCKS.
12531         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12532         * tree-vrp.c
12533         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12534         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12535         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12536         REACHABLE_BLOCKS.
12537         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12538         if check_all_array_refs will be called.
12540 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12542         * tree.c (selftest::test_location_wrappers): Add more test
12543         coverage.
12545 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12547         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12548         (selftest::test_bit_in_range): Likewise.
12550 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12552         PR testsuite/83888
12553         * doc/sourcebuild.texi (vect_float): Say that the selector
12554         only describes the situation when -funsafe-math-optimizations is on.
12555         (vect_float_strict): Document.
12557 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12559         PR tree-optimization/83965
12560         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12561         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12562         instead of checking only for a reduction.
12563         (vect_recog_widen_sum_pattern): Likewise.
12565 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12567         * predict.c (probably_never_executed): Only use precise profile info.
12568         (compute_function_frequency): Skip after inlining hack since we now
12569         have quality checking.
12571 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12573         * profile-count.h (profile_probability::very_unlikely,
12574         profile_probability::unlikely, profile_probability::even): Set
12575         precision to guessed.
12577 2018-01-23  Richard Biener  <rguenther@suse.de>
12579         PR tree-optimization/83963
12580         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12581         Properly terminate dominator walk when crossing the exit edge not
12582         when visiting its source block.
12584 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
12586         PR c++/83918
12587         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12588         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12590 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
12592         PR tree-optimization/83957
12593         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
12594         semicolon after for body surrounded by braces.
12596         PR tree-optimization/83081
12597         * profile-count.h (profile_probability::split): New method.
12598         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12599         Use profile_probability::split.
12600         (do_compare_rtx_and_jump): Fix adjustment of probabilities
12601         when splitting a single conditional jump into 2.
12603 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
12605         PR tree-optimization/69452
12606         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12607         decl.
12609 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12611         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12612         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12613         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12615 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12617         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12618         declaration.
12619         * config/rl78/rl78.md (movdi): New define_expand.
12620         * config/rl78/rl78.c (rl78_split_movdi): New function.
12622 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
12624         PR target/83862
12625         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12626         no longer used.
12627         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12628         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12629         128-bit to produce an UNSPEC move to get the double word with the
12630         signbit and then a shift directly to do signbit.
12631         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12632         implementation with a new version that just does either a direct
12633         move or a regular move.  Move memory interface to separate insns.
12634         Move insns so they are next to the expander.
12635         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12636         with signbit move.  Split big and little endian case.
12637         (signbit<mode>2_dm_mem_le): Likewise.
12638         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12639         (signbit<mode>2_dm2): Likewise.
12641 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12643         * config/rl78/rl78.md (anddi3): New define_expand.
12645 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12647         * config/rl78/rl78.md (umindi3): New define_expand.
12649 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12651         * config/rl78/rl78.md (smindi3): New define_expand.
12653 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12655         * config/rl78/rl78.md (smaxdi3): New define_expand.
12657 2018-01-22  Carl Love  <cel@us.ibm.com>
12659         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12660         LVX_V1TI): Add macro expansion.
12661         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12662         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12663         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12664         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12665         Change check to determine if the instruction is a byte reversing
12666         entry.  Fix typo in comment.
12667         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12668         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12669         Add def_builtin calls for new builtins.
12670         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12671         Add define_insn expansion.
12673 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12675         * config/rl78/rl78.md (umaxdi3): New define_expand.
12677 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12679         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12680         for non-QImode registers.
12682 2018-01-22  Richard Biener  <rguenther@suse.de>
12684         PR tree-optimization/83963
12685         * graphite-scop-detection.c (scop_detection::get_sese): Delay
12686         including the loop exit block.
12687         (scop_detection::merge_sese): Likewise.
12688         (scop_detection::add_scop): Do it here instead.
12690 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12692         * doc/sourcebuild.texi (arm_softfloat): Document.
12694 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
12696         PR gcc/77734
12697         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12698         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12699         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12701 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12702             David Edelsohn  <dje.gcc@gmail.com>
12704         PR target/83946
12705         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12706         Change "crset eq" to "crset 2".
12707         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12708         (*call_indirect_aix<mode>_nospec): Likewise.
12709         (*call_value_indirect_aix<mode>_nospec): Likewise.
12710         (*call_indirect_elfv2<mode>_nospec): Likewise.
12711         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12712         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12713         change assembly output from . to $.
12714         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12715         (indirect_jump<mode>_nospec): Change assembly output from . to $.
12716         (*tablejump<mode>_internal1_nospec): Likewise.
12718 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
12720         PR target/80870
12721         * config/sh/sh_optimize_sett_clrt.cc:
12722         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12724 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
12726         PR tree-optimization/83940
12727         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12728         offset_dt to vect_constant_def rather than vect_unknown_def_type.
12729         (vect_check_load_store_mask): Add a mask_dt_out parameter and
12730         use it to pass back the definition type.
12731         (vect_check_store_rhs): Likewise rhs_dt_out.
12732         (vect_build_gather_load_calls): Add a mask_dt argument and use
12733         it instead of a call to vect_is_simple_use.
12734         (vectorizable_store): Update calls to vect_check_load_store_mask
12735         and vect_check_store_rhs.  Use the dt returned by the latter instead
12736         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
12737         instead of calls to vect_is_simple_use.  Pass the scalar rather
12738         than the vector operand to vect_is_simple_use when handling
12739         second and subsequent copies of an rhs value.
12740         (vectorizable_load): Update calls to vect_check_load_store_mask
12741         and vect_build_gather_load_calls.  Use the cached mask_dt and
12742         gs_info.offset_dt instead of calls to vect_is_simple_use.
12744 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
12746         PR middle-end/83945
12747         * tree-emutls.c: Include gimplify.h.
12748         (lower_emutls_2): New function.
12749         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12750         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12751         it before further processing.
12753         PR target/83930
12754         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12755         UINTVAL (trueop1) instead of INTVAL (op1).
12757 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
12759         PR debug/81570
12760         PR debug/83728
12761         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12762         INCOMING_FRAME_SP_OFFSET if not defined.
12763         (scan_trace): Add ENTRY argument.  If true and
12764         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12765         emit a note to adjust the CFA offset.
12766         (create_cfi_notes): Adjust scan_trace callers.
12767         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12768         INCOMING_FRAME_SP_OFFSET in the CIE.
12769         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12770         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12771         Likewise.
12772         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12773         * doc/tm.texi: Regenerated.
12775 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12777         PR rtl-optimization/83147
12778         * lra-constraints.c (remove_inheritance_pseudos): Use
12779         lra_substitute_pseudo_within_insn.
12781 2018-01-19  Tom de Vries  <tom@codesourcery.com>
12782             Cesar Philippidis  <cesar@codesourcery.com>
12784         PR target/83920
12785         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12787 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
12789         PR target/83790
12790         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12791         spaces for function labels.
12793 2018-01-19  Martin Liska  <mliska@suse.cz>
12795         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12796         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12797         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12798         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12799         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12800         (PRED_CONST_RETURN): Change from 69 to 65.
12801         (PRED_NULL_RETURN): Change from 91 to 71.
12802         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12803         (PRED_LOOP_GUARD): Change from 66 to 73.
12805 2018-01-19  Martin Liska  <mliska@suse.cz>
12807         * predict.c (predict_insn_def): Add new assert.
12808         (struct branch_predictor): Change type to signed integer.
12809         (test_prediction_value_range): Amend test to cover
12810         PROB_UNINITIALIZED.
12811         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12812         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12813         (PRED_LOOP_ITERATIONS_MAX): Likewise.
12814         (PRED_LOOP_IV_COMPARE): Likewise.
12815         * predict.h (PROB_UNINITIALIZED): Define new constant.
12817 2018-01-19  Martin Liska  <mliska@suse.cz>
12819         * predict.c (dump_prediction): Add new format for
12820         analyze_brprob.py script which is enabled with -details
12821         suboption.
12822         * profile-count.h (precise_p): New function.
12824 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12826         PR tree-optimization/83922
12827         * tree-vect-loop.c (vect_verify_full_masking): Return false if
12828         there are no statements that need masking.
12829         (vect_active_double_reduction_p): New function.
12830         (vect_analyze_loop_operations): Use it when handling phis that
12831         are not in the loop header.
12833 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12835         PR tree-optimization/83914
12836         * tree-vect-loop.c (vectorizable_induction): Don't convert
12837         init_expr or apply the peeling adjustment for inductions
12838         that are nested within the vectorized loop.
12840 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12842         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12843         instead of NEG.
12845 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12847         PR sanitizer/81715
12848         PR testsuite/83882
12849         * function.h (gimplify_parameters): Add gimple_seq * argument.
12850         * function.c: Include gimple.h and options.h.
12851         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12852         for the added local temporaries if needed.
12853         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12854         if there are any parameter cleanups, wrap whole body into a
12855         try/finally with the cleanups.
12857 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
12859         PR target/82964
12860         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12861         Use GET_MODE_CLASS for scalar floating point.
12863 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12865         PR ipa/82256
12866         patch by PaX Team
12867         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12868         Fix call of call_cgraph_insertion_hooks.
12870 2018-01-18  Martin Sebor  <msebor@redhat.com>
12872         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12874 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12876         PR ipa/83619
12877         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12878         frequencies.
12880 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
12882         PR other/70268
12883         * common.opt: (-ffile-prefix-map): New option.
12884         * opts.c (common_handle_option): Defer it.
12885         * opts-global.c (handle_common_deferred_options): Handle it.
12886         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12887         * file-prefix-map.h: New file.
12888         (remap_debug_filename, add_debug_prefix_map): ...here.
12889         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12890         * final.c (debug_prefix_map, add_debug_prefix_map
12891         remap_debug_filename): Move to...
12892         * file-prefix-map.c: New file.
12893         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12894         generalize, get rid of alloca(), use strrchr() instead of strchr().
12895         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12896         Implement in terms of add_prefix_map().
12897         (remap_macro_filename, remap_debug_filename): Implement in term of
12898         remap_filename().
12899         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12900         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12901         * dbxout.c: Include file-prefix-map.h.
12902         * varasm.c: Likewise.
12903         * vmsdbgout.c: Likewise.
12904         * xcoffout.c: Likewise.
12905         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
12906         * doc/cppopts.texi (-fmacro-prefix-map): Document.
12907         * doc/invoke.texi (-ffile-prefix-map): Document.
12908         (-fdebug-prefix-map): Update description.
12910 2018-01-18  Martin Liska  <mliska@suse.cz>
12912         * config/i386/i386.c (indirect_thunk_name): Document that also
12913         lfence is emitted.
12914         (output_indirect_thunk): Document why both instructions
12915         (pause and lfence) are generated.
12917 2018-01-18  Richard Biener  <rguenther@suse.de>
12919         PR tree-optimization/83887
12920         * graphite-scop-detection.c
12921         (scop_detection::get_nearest_dom_with_single_entry): Remove.
12922         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
12923         (scop_detection::merge_sese): Re-implement with a flood-fill
12924         algorithm that properly finds a SESE region if it exists.
12926 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12928         PR c/61240
12929         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
12930         pointer_diff optimizations use view_convert instead of convert.
12932 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12934         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12935         Generate different code for -mno-speculate-indirect-jumps.
12936         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12937         (*call_indirect_aix<mode>): Disable for
12938         -mno-speculate-indirect-jumps.
12939         (*call_indirect_aix<mode>_nospec): New define_insn.
12940         (*call_value_indirect_aix<mode>): Disable for
12941         -mno-speculate-indirect-jumps.
12942         (*call_value_indirect_aix<mode>_nospec): New define_insn.
12943         (*sibcall_nonlocal_sysv<mode>): Generate different code for
12944         -mno-speculate-indirect-jumps.
12945         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12947 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12949         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
12950         long double type, set the flags for noting the default long double
12951         type, even if we don't pass or return a long double type.
12953 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
12955         PR ipa/83051
12956         * ipa-inline.c (flatten_function): Do not overwrite final inlining
12957         failure.
12959 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
12961         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
12962         support for merge[hl].
12963         (fold_mergehl_helper): New helper function.
12964         (tree-vector-builder.h): New #include for tree_vector_builder usage.
12965         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
12966         (altivec_vmrglw_direct): Add xxmrglw insn.
12968 2018-01-17  Andrew Waterman  <andrew@sifive.com>
12970         * config/riscv/riscv.c (riscv_conditional_register_usage): If
12971         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
12973 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
12975         PR lto/83121
12976         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
12977         call the lto_location_cache before reading the
12978         DECL_SOURCE_LOCATION of the types.
12980 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
12981             Richard Sandiford  <richard.sandiford@linaro.org>
12983         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
12984         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
12985         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
12986         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
12987         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
12988         Add declaration.
12989         * config/aarch64/constraints.md (aarch64_movti_operand):
12990         Limit immediates.
12991         * config/aarch64/predicates.md (Uti): Add new constraint.
12993 2018-01-17 Carl Love  <cel@us.ibm.com>
12995         * config/rs6000/vsx.md (define_expand xl_len_r,
12996         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
12997         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
12998         lxvll.
12999         (define_expand, define_insn): Move the shift left from  the
13000         define_insn to the define_expand for lxvl and stxvl instructions.
13001         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13002         and XL_LEN_R definitions to PURE.
13004 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13006         * config/i386/i386.c (indirect_thunk_name): Declare regno
13007         as unsigned int.  Compare regno with INVALID_REGNUM.
13008         (output_indirect_thunk): Ditto.
13009         (output_indirect_thunk_function): Ditto.
13010         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13011         in the call to output_indirect_thunk_function.
13013 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13015         PR middle-end/83884
13016         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13017         rather than the size of inner_type to determine the stack slot size
13018         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13020 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13022         PR target/83546
13023         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13024         to PTA_SILVERMONT.
13026 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13028         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13029         endian Linux systems to optionally enable multilibs for selecting
13030         the long double type if the user configured an explicit type.
13031         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13032         have no long double multilibs if not defined.
13033         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13034         warn if the user used -mabi={ieee,ibm}longdouble and we built
13035         multilibs for long double.
13036         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13037         appropriate multilib option.
13038         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13039         multilib options.
13040         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13041         for building long double multilibs.
13042         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13044 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13046         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13047         copies.
13049         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13050         64 bits.
13051         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13052         128 bits.
13054         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13055         variables.
13057         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13058         return value.
13060 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13062         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13063         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13065 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13067         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13068         different rtl trees depending on TARGET_64BIT.
13069         (rs6000_gen_lvx): Likewise.
13071 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13073         * config/visium/visium.md (nop): Tweak comment.
13074         (hazard_nop): Likewise.
13076 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13078         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13079         -mspeculate-indirect-jumps.
13080         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13081         for -mno-speculate-indirect-jumps.
13082         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13083         (*call_value_indirect_elfv2<mode>): Disable for
13084         -mno-speculate-indirect-jumps.
13085         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13086         (indirect_jump): Emit different RTL for
13087         -mno-speculate-indirect-jumps.
13088         (*indirect_jump<mode>): Disable for
13089         -mno-speculate-indirect-jumps.
13090         (*indirect_jump<mode>_nospec): New define_insn.
13091         (tablejump): Emit different RTL for
13092         -mno-speculate-indirect-jumps.
13093         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13094         (tablejumpsi_nospec): New define_expand.
13095         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13096         (tablejumpdi_nospec): New define_expand.
13097         (*tablejump<mode>_internal1): Disable for
13098         -mno-speculate-indirect-jumps.
13099         (*tablejump<mode>_internal1_nospec): New define_insn.
13100         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13101         option.
13103 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13105         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13106         callers updated.
13108 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13109             Richard Biener  <rguenth@suse.de>
13111         PR libgomp/83590
13112         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13113         return early, inline manually is_gimple_sizepos.  Make sure if we
13114         call gimplify_expr we don't end up with a gimple constant.
13115         * tree.c (variably_modified_type_p): Don't return true for
13116         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13117         * gimplify.h (is_gimple_sizepos): Remove.
13119 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13121         PR tree-optimization/83857
13122         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13123         vectorizable_live_operation for pure SLP statements.
13124         (vectorizable_live_operation): Handle PHIs.
13126 2018-01-16  Richard Biener  <rguenther@suse.de>
13128         PR tree-optimization/83867
13129         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13130         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13132 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13134         PR c/83844
13135         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13136         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13137         If off is not INTEGER_CST, issue a may not be aligned warning
13138         rather than isn't aligned.  Use isn%'t rather than isn't.
13139         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13140         into MULT_EXPR.
13141         <case MULT_EXPR>: Improve the case when bottom and one of the
13142         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13143         operand, in that case check if the other operand is multiple of
13144         bottom divided by the INTEGER_CST operand.
13146 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13148         PR target/83858
13149         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13150         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13151         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13152         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13153         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13154         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13155         (pa_function_arg_size): New function.
13157 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13159         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13160         in a separate statement.
13162 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13164         PR tree-optimization/83847
13165         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13166         group gathers and scatters.
13168 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13170         PR rtl-optimization/86620
13171         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13173         PR rtl-optimization/83213
13174         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13175         to last if both are JUMP_INSNs.
13177         PR tree-optimization/83843
13178         * gimple-ssa-store-merging.c
13179         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13180         store_immediate_info for bswap/nop orig_stores.
13182 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13184         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13185         !TARGET_MUL.
13186         <UDIV>: Increase cost if !TARGET_DIV.
13188 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13190         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13191         (define_attr "cr_logical_3op"): New.
13192         (cceq_ior_compare): Adjust.
13193         (cceq_ior_compare_complement): Adjust.
13194         (*cceq_rev_compare): Adjust.
13195         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13196         (is_cracked_insn): Adjust.
13197         (insn_must_be_first_in_group): Adjust.
13198         * config/rs6000/40x.md: Adjust.
13199         * config/rs6000/440.md: Adjust.
13200         * config/rs6000/476.md: Adjust.
13201         * config/rs6000/601.md: Adjust.
13202         * config/rs6000/603.md: Adjust.
13203         * config/rs6000/6xx.md: Adjust.
13204         * config/rs6000/7450.md: Adjust.
13205         * config/rs6000/7xx.md: Adjust.
13206         * config/rs6000/8540.md: Adjust.
13207         * config/rs6000/cell.md: Adjust.
13208         * config/rs6000/e300c2c3.md: Adjust.
13209         * config/rs6000/e500mc.md: Adjust.
13210         * config/rs6000/e500mc64.md: Adjust.
13211         * config/rs6000/e5500.md: Adjust.
13212         * config/rs6000/e6500.md: Adjust.
13213         * config/rs6000/mpc.md: Adjust.
13214         * config/rs6000/power4.md: Adjust.
13215         * config/rs6000/power5.md: Adjust.
13216         * config/rs6000/power6.md: Adjust.
13217         * config/rs6000/power7.md: Adjust.
13218         * config/rs6000/power8.md: Adjust.
13219         * config/rs6000/power9.md: Adjust.
13220         * config/rs6000/rs64.md: Adjust.
13221         * config/rs6000/titan.md: Adjust.
13223 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13225         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13226         ix86_indirect_branch_register logic.
13228 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13230         * config/i386/constraints.md (Bs): Update
13231         ix86_indirect_branch_register check.  Don't check
13232         ix86_indirect_branch_register with GOT_memory_operand.
13233         (Bw): Likewise.
13234         * config/i386/predicates.md (GOT_memory_operand): Don't check
13235         ix86_indirect_branch_register here.
13236         (GOT32_symbol_operand): Likewise.
13238 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13240         * config/i386/predicates.md (constant_call_address_operand):
13241         Rewrite ix86_indirect_branch_register logic.
13242         (sibcall_insn_operand): Likewise.
13244 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13246         * config/i386/constraints.md (Bs): Replace
13247         ix86_indirect_branch_thunk_register with
13248         ix86_indirect_branch_register.
13249         (Bw): Likewise.
13250         * config/i386/i386.md (indirect_jump): Likewise.
13251         (tablejump): Likewise.
13252         (*sibcall_memory): Likewise.
13253         (*sibcall_value_memory): Likewise.
13254         Peepholes of indirect call and jump via memory: Likewise.
13255         * config/i386/i386.opt: Likewise.
13256         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13257         (GOT_memory_operand): Likewise.
13258         (call_insn_operand): Likewise.
13259         (sibcall_insn_operand): Likewise.
13260         (GOT32_symbol_operand): Likewise.
13262 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13264         PR middle-end/83837
13265         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13266         type rather than type addr's type points to.
13267         (expand_omp_atomic_mutex): Likewise.
13268         (expand_omp_atomic): Likewise.
13270 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13272         PR target/83839
13273         * config/i386/i386.c (output_indirect_thunk_function): Use
13274         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13275         for  __x86_return_thunk.
13277 2018-01-15  Richard Biener  <rguenther@suse.de>
13279         PR middle-end/83850
13280         * expmed.c (extract_bit_field_1): Fix typo.
13282 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13284         PR target/83687
13285         * config/arm/iterators.md (VF): New mode iterator.
13286         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13287         Remove integer-related logic from pattern.
13288         (neon_vabd<mode>_3): Likewise.
13290 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13292         PR middle-end/82694
13293         * common.opt (fstrict-overflow): No longer an alias.
13294         (fwrapv-pointer): New option.
13295         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13296         also for pointer types based on flag_wrapv_pointer.
13297         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13298         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13299         opts->x_flag_wrapv got set.
13300         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13301         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13302         POINTER_TYPE_OVERFLOW_UNDEFINED.
13303         * match.pd: Likewise in address comparison pattern.
13304         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13306 2018-01-15  Richard Biener  <rguenther@suse.de>
13308         PR lto/83804
13309         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13310         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13311         Reset type names to their identifier if their TYPE_DECL doesn't
13312         have linkage (and thus is used for ODR and devirt).
13313         (save_debug_info_for_decl): Remove.
13314         (save_debug_info_for_type): Likewise.
13315         (add_tree_to_fld_list): Adjust.
13316         * tree-pretty-print.c (dump_generic_node): Make dumping of
13317         type names more robust.
13319 2018-01-15  Richard Biener  <rguenther@suse.de>
13321         * BASE-VER: Bump to 8.0.1.
13323 2018-01-14  Martin Sebor  <msebor@redhat.com>
13325         PR other/83508
13326         * builtins.c (check_access): Avoid warning when the no-warning bit
13327         is set.
13329 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13331         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13332         * ira-color (allocno_hard_regs_compare): Likewise.
13334 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13336         PR target/83013
13337         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13338         Use .pushsection/.popsection.
13340 2018-01-14  Martin Sebor  <msebor@redhat.com>
13342         PR c++/81327
13343         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13345 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13347         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13348         entry from extra_headers.
13349         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13350         extra_headers, make the list bitwise identical to the i?86-*-* one.
13352 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13354         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13355         -mcmodel=large with -mindirect-branch=thunk,
13356         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13357         -mfunction-return=thunk-extern.
13358         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13359         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13360         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13362 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13364         * config/i386/i386.c (print_reg): Print the name of the full
13365         integer register without '%'.
13366         (ix86_print_operand): Handle 'V'.
13367         * doc/extend.texi: Document 'V' modifier.
13369 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13371         * config/i386/constraints.md (Bs): Disallow memory operand for
13372         -mindirect-branch-register.
13373         (Bw): Likewise.
13374         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13375         (GOT_memory_operand): Likewise.
13376         (call_insn_operand): Likewise.
13377         (sibcall_insn_operand): Likewise.
13378         (GOT32_symbol_operand): Likewise.
13379         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13380         for -mindirect-branch-register.
13381         (tablejump): Likewise.
13382         (*sibcall_memory): Likewise.
13383         (*sibcall_value_memory): Likewise.
13384         Disallow peepholes of indirect call and jump via memory for
13385         -mindirect-branch-register.
13386         (*call_pop): Replace m with Bw.
13387         (*call_value_pop): Likewise.
13388         (*sibcall_pop_memory): Replace m with Bs.
13389         * config/i386/i386.opt (mindirect-branch-register): New option.
13390         * doc/invoke.texi: Document -mindirect-branch-register option.
13392 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13394         * config/i386/i386-protos.h (ix86_output_function_return): New.
13395         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13396         set function_return_type.
13397         (indirect_thunk_name): Add ret_p to indicate thunk for function
13398         return.
13399         (output_indirect_thunk_function): Pass false to
13400         indirect_thunk_name.
13401         (ix86_output_indirect_branch_via_reg): Likewise.
13402         (ix86_output_indirect_branch_via_push): Likewise.
13403         (output_indirect_thunk_function): Create alias for function
13404         return thunk if regno < 0.
13405         (ix86_output_function_return): New function.
13406         (ix86_handle_fndecl_attribute): Handle function_return.
13407         (ix86_attribute_table): Add function_return.
13408         * config/i386/i386.h (machine_function): Add
13409         function_return_type.
13410         * config/i386/i386.md (simple_return_internal): Use
13411         ix86_output_function_return.
13412         (simple_return_internal_long): Likewise.
13413         * config/i386/i386.opt (mfunction-return=): New option.
13414         (indirect_branch): Mention -mfunction-return=.
13415         * doc/extend.texi: Document function_return function attribute.
13416         * doc/invoke.texi: Document -mfunction-return= option.
13418 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13420         * config/i386/i386-opts.h (indirect_branch): New.
13421         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13422         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13423         with local indirect jump when converting indirect call and jump.
13424         (ix86_set_indirect_branch_type): New.
13425         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13426         (indirectlabelno): New.
13427         (indirect_thunk_needed): Likewise.
13428         (indirect_thunk_bnd_needed): Likewise.
13429         (indirect_thunks_used): Likewise.
13430         (indirect_thunks_bnd_used): Likewise.
13431         (INDIRECT_LABEL): Likewise.
13432         (indirect_thunk_name): Likewise.
13433         (output_indirect_thunk): Likewise.
13434         (output_indirect_thunk_function): Likewise.
13435         (ix86_output_indirect_branch_via_reg): Likewise.
13436         (ix86_output_indirect_branch_via_push): Likewise.
13437         (ix86_output_indirect_branch): Likewise.
13438         (ix86_output_indirect_jmp): Likewise.
13439         (ix86_code_end): Call output_indirect_thunk_function if needed.
13440         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13441         needed.
13442         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13443         (ix86_attribute_table): Add indirect_branch.
13444         * config/i386/i386.h (machine_function): Add indirect_branch_type
13445         and has_local_indirect_jump.
13446         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13447         to true.
13448         (tablejump): Likewise.
13449         (*indirect_jump): Use ix86_output_indirect_jmp.
13450         (*tablejump_1): Likewise.
13451         (simple_return_indirect_internal): Likewise.
13452         * config/i386/i386.opt (mindirect-branch=): New option.
13453         (indirect_branch): New.
13454         (keep): Likewise.
13455         (thunk): Likewise.
13456         (thunk-inline): Likewise.
13457         (thunk-extern): Likewise.
13458         * doc/extend.texi: Document indirect_branch function attribute.
13459         * doc/invoke.texi: Document -mindirect-branch= option.
13461 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13463         PR ipa/83051
13464         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13466 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13468         * ipa-inline.c (want_inline_small_function_p): Return false if
13469         inlining has already failed with CIF_FINAL_ERROR.
13470         (update_caller_keys): Call want_inline_small_function_p before
13471         can_inline_edge_p.
13472         (update_callee_keys): Likewise.
13474 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13476         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13477         New function.
13478         (rs6000_quadword_masked_address_p): Likewise.
13479         (quad_aligned_load_p): Likewise.
13480         (quad_aligned_store_p): Likewise.
13481         (const_load_sequence_p): Add comment to describe the outer-most loop.
13482         (mimic_memory_attributes_and_flags): New function.
13483         (rs6000_gen_stvx): Likewise.
13484         (replace_swapped_aligned_store): Likewise.
13485         (rs6000_gen_lvx): Likewise.
13486         (replace_swapped_aligned_load): Likewise.
13487         (replace_swapped_load_constant): Capitalize argument name in
13488         comment describing this function.
13489         (rs6000_analyze_swaps): Add a third pass to search for vector loads
13490         and stores that access quad-word aligned addresses and replace
13491         with stvx or lvx instructions when appropriate.
13492         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13493         New function prototype.
13494         (rs6000_quadword_masked_address_p): Likewise.
13495         (rs6000_gen_lvx): Likewise.
13496         (rs6000_gen_stvx): Likewise.
13497         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13498         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13499         when memory address is aligned.
13500         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13501         this split to select lvx instruction when memory address is aligned.
13502         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13503         instruction when memory address is aligned.
13504         (*vsx_le_perm_load_v16qi): Likewise.
13505         (four unnamed splitters): Modify to select the stvx instruction
13506         when memory is aligned.
13508 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
13510         * predict.c (determine_unlikely_bbs): Handle correctly BBs
13511         which appears in the queue multiple times.
13513 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13514             Alan Hayward  <alan.hayward@arm.com>
13515             David Sherwood  <david.sherwood@arm.com>
13517         * tree-vectorizer.h (vec_lower_bound): New structure.
13518         (_loop_vec_info): Add check_nonzero and lower_bounds.
13519         (LOOP_VINFO_CHECK_NONZERO): New macro.
13520         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13521         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13522         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13523         fields.  Make seg_len the distance travelled, not including the
13524         access size.
13525         (dr_direction_indicator): Declare.
13526         (dr_zero_step_indicator): Likewise.
13527         (dr_known_forward_stride_p): Likewise.
13528         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13529         tree-ssanames.h.
13530         (runtime_alias_check_p): Allow runtime alias checks with
13531         variable strides.
13532         (operator ==): Compare access_size and align.
13533         (prune_runtime_alias_test_list): Rework for new distinction between
13534         the access_size and seg_len.
13535         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
13536         segment lengths.
13537         (get_segment_min_max): New function.
13538         (create_intersect_range_checks): Use it.
13539         (dr_step_indicator): New function.
13540         (dr_direction_indicator): Likewise.
13541         (dr_zero_step_indicator): Likewise.
13542         (dr_known_forward_stride_p): Likewise.
13543         * tree-loop-distribution.c (data_ref_segment_size): Return
13544         DR_STEP * (niters - 1).
13545         (compute_alias_check_pairs): Update call to the dr_with_seg_len
13546         constructor.
13547         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13548         (vect_preserves_scalar_order_p): New function, split out from...
13549         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
13550         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13551         (vect_vfa_access_size): New function.
13552         (vect_vfa_align): Likewise.
13553         (vect_compile_time_alias): Take access_size_a and access_b arguments.
13554         (dump_lower_bound): New function.
13555         (vect_check_lower_bound): Likewise.
13556         (vect_small_gap_p): Likewise.
13557         (vectorizable_with_step_bound_p): Likewise.
13558         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13559         depencies if the vectorization factor is 1.  Convert the checks
13560         for nonzero steps into checks on the bounds of DR_STEP.  Try using
13561         a bunds check for variable steps if the minimum required step is
13562         relatively small. Update calls to the dr_with_seg_len
13563         constructor and to vect_compile_time_alias.
13564         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13565         function.
13566         (vect_loop_versioning): Call it.
13567         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13568         when retrying.
13569         (vect_estimate_min_profitable_iters): Account for any bounds checks.
13571 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13572             Alan Hayward  <alan.hayward@arm.com>
13573             David Sherwood  <david.sherwood@arm.com>
13575         * doc/sourcebuild.texi (vect_scatter_store): Document.
13576         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13577         optabs.
13578         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13579         Document.
13580         * genopinit.c (main): Add supports_vec_scatter_store and
13581         supports_vec_scatter_store_cached to target_optabs.
13582         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13583         IFN_MASK_SCATTER_STORE.
13584         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13585         functions.
13586         * internal-fn.h (internal_store_fn_p): Declare.
13587         (internal_fn_stored_value_index): Likewise.
13588         * internal-fn.c (scatter_store_direct): New macro.
13589         (expand_scatter_store_optab_fn): New function.
13590         (direct_scatter_store_optab_supported_p): New macro.
13591         (internal_store_fn_p): New function.
13592         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13593         IFN_MASK_SCATTER_STORE.
13594         (internal_fn_mask_index): Likewise.
13595         (internal_fn_stored_value_index): New function.
13596         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13597         for scatter stores.
13598         * optabs-query.h (supports_vec_scatter_store_p): Declare.
13599         * optabs-query.c (supports_vec_scatter_store_p): New function.
13600         * tree-vectorizer.h (vect_get_store_rhs): Declare.
13601         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13602         true for scatter stores.
13603         (vect_gather_scatter_fn_p): Handle scatter stores too.
13604         (vect_check_gather_scatter): Consider using scatter stores if
13605         supports_vec_scatter_store_p.
13606         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13607         scatter stores too.
13608         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13609         internal_fn_stored_value_index.
13610         (check_load_store_masking): Handle scatter stores too.
13611         (vect_get_store_rhs): Make public.
13612         (vectorizable_call): Use internal_store_fn_p.
13613         (vectorizable_store): Handle scatter store internal functions.
13614         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13615         when deciding whether the end of the group has been reached.
13616         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13617         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13618         (mask_scatter_store<mode>): New insns.
13620 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13621             Alan Hayward  <alan.hayward@arm.com>
13622             David Sherwood  <david.sherwood@arm.com>
13624         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13625         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13626         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13627         function.
13628         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13629         Use vect_truncate_gather_scatter_offset if we can't treat the
13630         operation as a normal gather load or scatter store.
13631         (get_group_load_store_type): Take the gather_scatter_info
13632         as argument.  Try using a gather load or scatter store for
13633         single-element groups.
13634         (get_load_store_type): Update calls to get_group_load_store_type
13635         and vect_use_strided_gather_scatters_p.
13637 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13638             Alan Hayward  <alan.hayward@arm.com>
13639             David Sherwood  <david.sherwood@arm.com>
13641         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13642         optional tree argument.
13643         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13644         null target hooks.
13645         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13646         but continue to use the current value as a fallback.
13647         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13648         to compare the updates.
13649         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13650         (get_load_store_type): Use it when handling a strided access.
13651         (vect_get_strided_load_store_ops): New function.
13652         (vect_get_data_ptr_increment): Likewise.
13653         (vectorizable_load): Handle strided gather loads.  Always pass
13654         a step to vect_create_data_ref_ptr and bump_vector_ptr.
13656 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13657             Alan Hayward  <alan.hayward@arm.com>
13658             David Sherwood  <david.sherwood@arm.com>
13660         * doc/md.texi (gather_load@var{m}): Document.
13661         (mask_gather_load@var{m}): Likewise.
13662         * genopinit.c (main): Add supports_vec_gather_load and
13663         supports_vec_gather_load_cached to target_optabs.
13664         * optabs-tree.c (init_tree_optimization_optabs): Use
13665         ggc_cleared_alloc to allocate target_optabs.
13666         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13667         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13668         functions.
13669         * internal-fn.h (internal_load_fn_p): Declare.
13670         (internal_gather_scatter_fn_p): Likewise.
13671         (internal_fn_mask_index): Likewise.
13672         (internal_gather_scatter_fn_supported_p): Likewise.
13673         * internal-fn.c (gather_load_direct): New macro.
13674         (expand_gather_load_optab_fn): New function.
13675         (direct_gather_load_optab_supported_p): New macro.
13676         (direct_internal_fn_optab): New function.
13677         (internal_load_fn_p): Likewise.
13678         (internal_gather_scatter_fn_p): Likewise.
13679         (internal_fn_mask_index): Likewise.
13680         (internal_gather_scatter_fn_supported_p): Likewise.
13681         * optabs-query.c (supports_at_least_one_mode_p): New function.
13682         (supports_vec_gather_load_p): Likewise.
13683         * optabs-query.h (supports_vec_gather_load_p): Declare.
13684         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13685         and memory_type field.
13686         (NUM_PATTERNS): Bump to 15.
13687         * tree-vect-data-refs.c: Include internal-fn.h.
13688         (vect_gather_scatter_fn_p): New function.
13689         (vect_describe_gather_scatter_call): Likewise.
13690         (vect_check_gather_scatter): Try using internal functions for
13691         gather loads.  Recognize existing calls to a gather load function.
13692         (vect_analyze_data_refs): Consider using gather loads if
13693         supports_vec_gather_load_p.
13694         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13695         (vect_get_gather_scatter_offset_type): Likewise.
13696         (vect_convert_mask_for_vectype): Likewise.
13697         (vect_add_conversion_to_patterm): Likewise.
13698         (vect_try_gather_scatter_pattern): Likewise.
13699         (vect_recog_gather_scatter_pattern): New pattern recognizer.
13700         (vect_vect_recog_func_ptrs): Add it.
13701         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13702         internal_fn_mask_index and internal_gather_scatter_fn_p.
13703         (check_load_store_masking): Take the gather_scatter_info as an
13704         argument and handle gather loads.
13705         (vect_get_gather_scatter_ops): New function.
13706         (vectorizable_call): Check internal_load_fn_p.
13707         (vectorizable_load): Likewise.  Handle gather load internal
13708         functions.
13709         (vectorizable_store): Update call to check_load_store_masking.
13710         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13711         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13712         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13713         (aarch64_gather_scale_operand_d): New predicates.
13714         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13715         (mask_gather_load<mode>): New insns.
13717 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13718             Alan Hayward  <alan.hayward@arm.com>
13719             David Sherwood  <david.sherwood@arm.com>
13721         * optabs.def (fold_left_plus_optab): New optab.
13722         * doc/md.texi (fold_left_plus_@var{m}): Document.
13723         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13724         * internal-fn.c (fold_left_direct): Define.
13725         (expand_fold_left_optab_fn): Likewise.
13726         (direct_fold_left_optab_supported_p): Likewise.
13727         * fold-const-call.c (fold_const_fold_left): New function.
13728         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13729         * tree-parloops.c (valid_reduction_p): New function.
13730         (gather_scalar_reductions): Use it.
13731         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13732         (vect_finish_replace_stmt): Declare.
13733         * tree-vect-loop.c (fold_left_reduction_fn): New function.
13734         (needs_fold_left_reduction_p): New function, split out from...
13735         (vect_is_simple_reduction): ...here.  Accept reductions that
13736         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13737         (vect_force_simple_reduction): Also store the reduction type in
13738         the assignment's STMT_VINFO_REDUC_TYPE.
13739         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13740         (merge_with_identity): New function.
13741         (vect_expand_fold_left): Likewise.
13742         (vectorize_fold_left_reduction): Likewise.
13743         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
13744         scalar phi in place for it.  Check for target support and reject
13745         cases that would reassociate the operation.  Defer the transform
13746         phase to vectorize_fold_left_reduction.
13747         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13748         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13749         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13751 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13753         * tree-if-conv.c (predicate_mem_writes): Remove redundant
13754         call to ifc_temp_var.
13756 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13757             Alan Hayward  <alan.hayward@arm.com>
13758             David Sherwood  <david.sherwood@arm.com>
13760         * target.def (legitimize_address_displacement): Take the original
13761         offset as a poly_int.
13762         * targhooks.h (default_legitimize_address_displacement): Update
13763         accordingly.
13764         * targhooks.c (default_legitimize_address_displacement): Likewise.
13765         * doc/tm.texi: Regenerate.
13766         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13767         as an argument, moving assert of ad->disp == ad->disp_term to...
13768         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
13769         Try calling targetm.legitimize_address_displacement before expanding
13770         the address rather than afterwards, and adjust for the new interface.
13771         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13772         Match the new hook interface.  Handle SVE addresses.
13773         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13774         new hook interface.
13776 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13778         * Makefile.in (OBJS): Add early-remat.o.
13779         * target.def (select_early_remat_modes): New hook.
13780         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13781         * doc/tm.texi: Regenerate.
13782         * targhooks.h (default_select_early_remat_modes): Declare.
13783         * targhooks.c (default_select_early_remat_modes): New function.
13784         * timevar.def (TV_EARLY_REMAT): New timevar.
13785         * passes.def (pass_early_remat): New pass.
13786         * tree-pass.h (make_pass_early_remat): Declare.
13787         * early-remat.c: New file.
13788         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13789         function.
13790         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13792 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13793             Alan Hayward  <alan.hayward@arm.com>
13794             David Sherwood  <david.sherwood@arm.com>
13796         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13797         vfm1 with a bound_epilog parameter.
13798         (vect_do_peeling): Update calls accordingly, and move the prologue
13799         call earlier in the function.  Treat the base bound_epilog as 0 for
13800         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
13801         this base when peeling for gaps.
13802         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13803         with fully-masked loops.
13804         (vect_estimate_min_profitable_iters): Handle the single peeled
13805         iteration in that case.
13807 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13808             Alan Hayward  <alan.hayward@arm.com>
13809             David Sherwood  <david.sherwood@arm.com>
13811         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13812         single-element interleaving even if the size is not a power of 2.
13813         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13814         accesses for single-element interleaving if the group size is
13815         not a power of 2.
13817 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13818             Alan Hayward  <alan.hayward@arm.com>
13819             David Sherwood  <david.sherwood@arm.com>
13821         * doc/md.texi (fold_extract_last_@var{m}): Document.
13822         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13823         * optabs.def (fold_extract_last_optab): New optab.
13824         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13825         * internal-fn.c (fold_extract_direct): New macro.
13826         (expand_fold_extract_optab_fn): Likewise.
13827         (direct_fold_extract_optab_supported_p): Likewise.
13828         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13829         * tree-vect-loop.c (vect_model_reduction_cost): Handle
13830         EXTRACT_LAST_REDUCTION.
13831         (get_initial_def_for_reduction): Do not create an initial vector
13832         for EXTRACT_LAST_REDUCTION reductions.
13833         (vectorizable_reduction): Leave the scalar phi in place for
13834         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
13835         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
13836         epilogue code for EXTRACT_LAST_REDUCTION and defer the
13837         transform phase to vectorizable_condition.
13838         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13839         split out from...
13840         (vect_finish_stmt_generation): ...here.
13841         (vect_finish_replace_stmt): New function.
13842         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13843         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13844         pattern.
13845         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13847 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13848             Alan Hayward  <alan.hayward@arm.com>
13849             David Sherwood  <david.sherwood@arm.com>
13851         * doc/md.texi (extract_last_@var{m}): Document.
13852         * optabs.def (extract_last_optab): New optab.
13853         * internal-fn.def (EXTRACT_LAST): New internal function.
13854         * internal-fn.c (cond_unary_direct): New macro.
13855         (expand_cond_unary_optab_fn): Likewise.
13856         (direct_cond_unary_optab_supported_p): Likewise.
13857         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13858         loops using EXTRACT_LAST.
13859         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13860         (extract_last_<mode>): ...this optab.
13861         (vec_extract<mode><Vel>): Update accordingly.
13863 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13864             Alan Hayward  <alan.hayward@arm.com>
13865             David Sherwood  <david.sherwood@arm.com>
13867         * target.def (empty_mask_is_expensive): New hook.
13868         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13869         * doc/tm.texi: Regenerate.
13870         * targhooks.h (default_empty_mask_is_expensive): Declare.
13871         * targhooks.c (default_empty_mask_is_expensive): New function.
13872         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13873         if the target says that empty masks are expensive.
13874         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13875         New function.
13876         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13878 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13879             Alan Hayward  <alan.hayward@arm.com>
13880             David Sherwood  <david.sherwood@arm.com>
13882         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13883         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13884         (vect_use_loop_mask_for_alignment_p): New function.
13885         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13886         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13887         niters_skip argument.  Make sure that the first niters_skip elements
13888         of the first iteration are inactive.
13889         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13890         Update call to vect_set_loop_masks_directly.
13891         (get_misalign_in_elems): New function, split out from...
13892         (vect_gen_prolog_loop_niters): ...here.
13893         (vect_update_init_of_dr): Take a code argument that specifies whether
13894         the adjustment should be added or subtracted.
13895         (vect_update_init_of_drs): Likewise.
13896         (vect_prepare_for_masked_peels): New function.
13897         (vect_do_peeling): Skip prologue peeling if we're using a mask
13898         instead.  Update call to vect_update_inits_of_drs.
13899         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13900         mask_skip_niters.
13901         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13902         alignment.  Do not include the number of peeled iterations in
13903         the minimum threshold in that case.
13904         (vectorizable_induction): Adjust the start value down by
13905         LOOP_VINFO_MASK_SKIP_NITERS iterations.
13906         (vect_transform_loop): Call vect_prepare_for_masked_peels.
13907         Take the number of skipped iterations into account when calculating
13908         the loop bounds.
13909         * tree-vect-stmts.c (vect_gen_while_not): New function.
13911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13912             Alan Hayward  <alan.hayward@arm.com>
13913             David Sherwood  <david.sherwood@arm.com>
13915         * doc/sourcebuild.texi (vect_fully_masked): Document.
13916         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
13917         default value to 0.
13918         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
13919         split out from...
13920         (vect_analyze_loop_2): ...here. Don't check the vectorization
13921         factor against the number of loop iterations if the loop is
13922         fully-masked.
13924 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13925             Alan Hayward  <alan.hayward@arm.com>
13926             David Sherwood  <david.sherwood@arm.com>
13928         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
13929         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
13930         (dump_groups): Update accordingly.
13931         (iv_use::mem_type): New member variable.
13932         (address_p): New function.
13933         (record_use): Add a mem_type argument and initialize the new
13934         mem_type field.
13935         (record_group_use): Add a mem_type argument.  Use address_p.
13936         Remove obsolete null checks of base_object.  Update call to record_use.
13937         (find_interesting_uses_op): Update call to record_group_use.
13938         (find_interesting_uses_cond): Likewise.
13939         (find_interesting_uses_address): Likewise.
13940         (get_mem_type_for_internal_fn): New function.
13941         (find_address_like_use): Likewise.
13942         (find_interesting_uses_stmt): Try find_address_like_use before
13943         calling find_interesting_uses_op.
13944         (addr_offset_valid_p): Use the iv mem_type field as the type
13945         of the addressed memory.
13946         (add_autoinc_candidates): Likewise.
13947         (get_address_cost): Likewise.
13948         (split_small_address_groups_p): Use address_p.
13949         (split_address_groups): Likewise.
13950         (add_iv_candidate_for_use): Likewise.
13951         (autoinc_possible_for_pair): Likewise.
13952         (rewrite_groups): Likewise.
13953         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
13954         (determine_group_iv_cost): Update after split of USE_ADDRESS.
13955         (get_alias_ptr_type_for_ptr_address): New function.
13956         (rewrite_use_address): Rewrite address uses in calls that were
13957         identified by find_address_like_use.
13959 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13960             Alan Hayward  <alan.hayward@arm.com>
13961             David Sherwood  <david.sherwood@arm.com>
13963         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
13964         TARGET_MEM_REFs.
13965         * gimple-expr.h (is_gimple_addressable: Likewise.
13966         * gimple-expr.c (is_gimple_address): Likewise.
13967         * internal-fn.c (expand_call_mem_ref): New function.
13968         (expand_mask_load_optab_fn): Use it.
13969         (expand_mask_store_optab_fn): Likewise.
13971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13972             Alan Hayward  <alan.hayward@arm.com>
13973             David Sherwood  <david.sherwood@arm.com>
13975         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
13976         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
13977         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
13978         (cond_umax@var{mode}): Document.
13979         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
13980         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
13981         (cond_umin_optab, cond_umax_optab): New optabs.
13982         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
13983         (COND_IOR, COND_XOR): New internal functions.
13984         * internal-fn.h (get_conditional_internal_fn): Declare.
13985         * internal-fn.c (cond_binary_direct): New macro.
13986         (expand_cond_binary_optab_fn): Likewise.
13987         (direct_cond_binary_optab_supported_p): Likewise.
13988         (get_conditional_internal_fn): New function.
13989         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
13990         Cope with reduction statements that are vectorized as calls rather
13991         than assignments.
13992         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
13993         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
13994         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
13995         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13996         (UNSPEC_COND_EOR): New unspecs.
13997         (optab): Add mappings for them.
13998         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
13999         (sve_int_op, sve_fp_op): New int attributes.
14001 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14002             Alan Hayward  <alan.hayward@arm.com>
14003             David Sherwood  <david.sherwood@arm.com>
14005         * optabs.def (while_ult_optab): New optab.
14006         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14007         * internal-fn.def (WHILE_ULT): New internal function.
14008         * internal-fn.h (direct_internal_fn_supported_p): New override
14009         that takes two types as argument.
14010         * internal-fn.c (while_direct): New macro.
14011         (expand_while_optab_fn): New function.
14012         (convert_optab_supported_p): Likewise.
14013         (direct_while_optab_supported_p): New macro.
14014         * wide-int.h (wi::udiv_ceil): New function.
14015         * tree-vectorizer.h (rgroup_masks): New structure.
14016         (vec_loop_masks): New typedef.
14017         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14018         and fully_masked_p.
14019         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14020         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14021         (vect_max_vf): New function.
14022         (slpeel_make_loop_iterate_ntimes): Delete.
14023         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14024         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14025         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14026         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14027         internal-fn.h, stor-layout.h and optabs-query.h.
14028         (vect_set_loop_mask): New function.
14029         (add_preheader_seq): Likewise.
14030         (add_header_seq): Likewise.
14031         (interleave_supported_p): Likewise.
14032         (vect_maybe_permute_loop_masks): Likewise.
14033         (vect_set_loop_masks_directly): Likewise.
14034         (vect_set_loop_condition_masked): Likewise.
14035         (vect_set_loop_condition_unmasked): New function, split out from
14036         slpeel_make_loop_iterate_ntimes.
14037         (slpeel_make_loop_iterate_ntimes): Rename to..
14038         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14039         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14040         (vect_do_peeling): Update call accordingly.
14041         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14042         loops.
14043         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14044         mask_compare_type, can_fully_mask_p and fully_masked_p.
14045         (release_vec_loop_masks): New function.
14046         (_loop_vec_info): Use it to free the loop masks.
14047         (can_produce_all_loop_masks_p): New function.
14048         (vect_get_max_nscalars_per_iter): Likewise.
14049         (vect_verify_full_masking): Likewise.
14050         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14051         retries, and free the mask rgroups before retrying.  Check loop-wide
14052         reasons for disallowing fully-masked loops.  Make the final decision
14053         about whether use a fully-masked loop or not.
14054         (vect_estimate_min_profitable_iters): Do not assume that peeling
14055         for the number of iterations will be needed for fully-masked loops.
14056         (vectorizable_reduction): Disable fully-masked loops.
14057         (vectorizable_live_operation): Likewise.
14058         (vect_halve_mask_nunits): New function.
14059         (vect_double_mask_nunits): Likewise.
14060         (vect_record_loop_mask): Likewise.
14061         (vect_get_loop_mask): Likewise.
14062         (vect_transform_loop): Handle the case in which the final loop
14063         iteration might handle a partial vector.  Call vect_set_loop_condition
14064         instead of slpeel_make_loop_iterate_ntimes.
14065         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14066         (check_load_store_masking): New function.
14067         (prepare_load_store_mask): Likewise.
14068         (vectorizable_store): Handle fully-masked loops.
14069         (vectorizable_load): Likewise.
14070         (supportable_widening_operation): Use vect_halve_mask_nunits for
14071         booleans.
14072         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14073         (vect_gen_while): New function.
14074         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14075         (aarch64_uqdec<mode>): New insn.
14077 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14078             Alan Hayward  <alan.hayward@arm.com>
14079             David Sherwood  <david.sherwood@arm.com>
14081         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14082         (reduc_xor_scal_optab): New optabs.
14083         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14084         (reduc_xor_scal_@var{m}): Document.
14085         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14086         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14087         internal functions.
14088         * fold-const-call.c (fold_const_call): Handle them.
14089         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14090         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14091         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14092         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14093         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14094         (UNSPEC_XORV): New unspecs.
14095         (optab): Add entries for them.
14096         (BITWISEV): New int iterator.
14097         (bit_reduc_op): New int attributes.
14099 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14100             Alan Hayward  <alan.hayward@arm.com>
14101             David Sherwood  <david.sherwood@arm.com>
14103         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14104         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14105         * optabs.def (vec_shl_insert_optab): New optab.
14106         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14107         (duplicate_and_interleave): Likewise.
14108         * tree-vect-loop.c: Include internal-fn.h.
14109         (neutral_op_for_slp_reduction): New function, split out from
14110         get_initial_defs_for_reduction.
14111         (get_initial_def_for_reduction): Handle option 2 for variable-length
14112         vectors by loading the neutral value into a vector and then shifting
14113         the initial value into element 0.
14114         (get_initial_defs_for_reduction): Replace the code argument with
14115         the neutral value calculated by neutral_op_for_slp_reduction.
14116         Use gimple_build_vector for constant-length vectors.
14117         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14118         but the first group_size elements have a neutral value.
14119         Use duplicate_and_interleave otherwise.
14120         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14121         Update call to get_initial_defs_for_reduction.  Handle SLP
14122         reductions for variable-length vectors by creating one vector
14123         result for each scalar result, with the elements associated
14124         with other scalar results stubbed out with the neutral value.
14125         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14126         Require IFN_VEC_SHL_INSERT for double reductions on
14127         variable-length vectors, or SLP reductions that have
14128         a neutral value.  Require can_duplicate_and_interleave_p
14129         support for variable-length unchained SLP reductions if there
14130         is no neutral value, such as for MIN/MAX reductions.  Also require
14131         the number of vector elements to be a multiple of the number of
14132         SLP statements when doing variable-length unchained SLP reductions.
14133         Update call to vect_create_epilog_for_reduction.
14134         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14135         and remove initial values.
14136         (duplicate_and_interleave): Make public.
14137         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14138         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14140 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14141             Alan Hayward  <alan.hayward@arm.com>
14142             David Sherwood  <david.sherwood@arm.com>
14144         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14145         (can_duplicate_and_interleave_p): New function.
14146         (vect_get_and_check_slp_defs): Take the vector of statements
14147         rather than just the current one.  Remove excess parentheses.
14148         Restriction rejectinon of vect_constant_def and vect_external_def
14149         for variable-length vectors to boolean types, or types for which
14150         can_duplicate_and_interleave_p is false.
14151         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14152         (duplicate_and_interleave): New function.
14153         (vect_get_constant_vectors): Use gimple_build_vector for
14154         constant-length vectors and suitable variable-length constant
14155         vectors.  Use duplicate_and_interleave for other variable-length
14156         vectors.  Don't defer the update when inserting new statements.
14158 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14159             Alan Hayward  <alan.hayward@arm.com>
14160             David Sherwood  <david.sherwood@arm.com>
14162         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14163         min_profitable_iters doesn't go negative.
14165 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14166             Alan Hayward  <alan.hayward@arm.com>
14167             David Sherwood  <david.sherwood@arm.com>
14169         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14170         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14171         * optabs.def (vec_mask_load_lanes_optab): New optab.
14172         (vec_mask_store_lanes_optab): Likewise.
14173         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14174         (MASK_STORE_LANES): Likewise.
14175         * internal-fn.c (mask_load_lanes_direct): New macro.
14176         (mask_store_lanes_direct): Likewise.
14177         (expand_mask_load_optab_fn): Handle masked operations.
14178         (expand_mask_load_lanes_optab_fn): New macro.
14179         (expand_mask_store_optab_fn): Handle masked operations.
14180         (expand_mask_store_lanes_optab_fn): New macro.
14181         (direct_mask_load_lanes_optab_supported_p): Likewise.
14182         (direct_mask_store_lanes_optab_supported_p): Likewise.
14183         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14184         parameter.
14185         (vect_load_lanes_supported): Likewise.
14186         * tree-vect-data-refs.c (strip_conversion): New function.
14187         (can_group_stmts_p): Likewise.
14188         (vect_analyze_data_ref_accesses): Use it instead of checking
14189         for a pair of assignments.
14190         (vect_store_lanes_supported): Take a masked_p parameter.
14191         (vect_load_lanes_supported): Likewise.
14192         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14193         vect_store_lanes_supported and vect_load_lanes_supported.
14194         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14195         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14196         parameter.  Don't allow gaps for masked accesses.
14197         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14198         and vect_load_lanes_supported.
14199         (get_load_store_type): Take a masked_p parameter and update
14200         call to get_group_load_store_type.
14201         (vectorizable_store): Update call to get_load_store_type.
14202         Handle IFN_MASK_STORE_LANES.
14203         (vectorizable_load): Update call to get_load_store_type.
14204         Handle IFN_MASK_LOAD_LANES.
14206 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14207             Alan Hayward  <alan.hayward@arm.com>
14208             David Sherwood  <david.sherwood@arm.com>
14210         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14211         modes for SVE.
14212         * config/aarch64/aarch64-protos.h
14213         (aarch64_sve_struct_memory_operand_p): Declare.
14214         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14215         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14216         (VPRED, vpred): Handle SVE structure modes.
14217         * config/aarch64/constraints.md (Utx): New constraint.
14218         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14219         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14220         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14221         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14222         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14223         structure modes.  Split into pieces after RA.
14224         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14225         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14226         New patterns.
14227         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14228         SVE structure modes.
14229         (aarch64_classify_address): Likewise.
14230         (sizetochar): Move earlier in file.
14231         (aarch64_print_operand): Handle SVE register lists.
14232         (aarch64_array_mode): New function.
14233         (aarch64_sve_struct_memory_operand_p): Likewise.
14234         (TARGET_ARRAY_MODE): Redefine.
14236 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14237             Alan Hayward  <alan.hayward@arm.com>
14238             David Sherwood  <david.sherwood@arm.com>
14240         * target.def (array_mode): New target hook.
14241         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14242         * doc/tm.texi: Regenerate.
14243         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14244         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14245         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14246         targetm.array_mode.
14247         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14248         type sizes.
14250 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14251             Alan Hayward  <alan.hayward@arm.com>
14252             David Sherwood  <david.sherwood@arm.com>
14254         * fold-const.c (fold_binary_loc): Check the argument types
14255         rather than the result type when testing for a vector operation.
14257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14259         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14260         * doc/tm.texi: Regenerate.
14262 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14263             Alan Hayward  <alan.hayward@arm.com>
14264             David Sherwood  <david.sherwood@arm.com>
14266         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14267         (sve): Document new AArch64 extension.
14268         * doc/md.texi (w): Extend the description of the AArch64
14269         constraint to include SVE vectors.
14270         (Upl, Upa): Document new AArch64 predicate constraints.
14271         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14272         enum.
14273         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14274         (msve-vector-bits=): New option.
14275         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14276         SVE when these are disabled.
14277         (sve): New extension.
14278         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14279         modes.  Adjust their number of units based on aarch64_sve_vg.
14280         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14281         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14282         aarch64_addr_query_type.
14283         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14284         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14285         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14286         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14287         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14288         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14289         (aarch64_simd_imm_zero_p): Delete.
14290         (aarch64_check_zero_based_sve_index_immediate): Declare.
14291         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14292         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14293         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14294         (aarch64_sve_float_mul_immediate_p): Likewise.
14295         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14296         rather than an rtx.
14297         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14298         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14299         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14300         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14301         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14302         (aarch64_regmode_natural_size): Likewise.
14303         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14304         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14305         left one place.
14306         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14307         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14308         for VG and the SVE predicate registers.
14309         (V_ALIASES): Add a "z"-prefixed alias.
14310         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14311         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14312         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14313         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14314         (REG_CLASS_NAMES): Add entries for them.
14315         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14316         and the predicate registers.
14317         (aarch64_sve_vg): Declare.
14318         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14319         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14320         (REGMODE_NATURAL_SIZE): Define.
14321         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14322         SVE macros.
14323         * config/aarch64/aarch64.c: Include cfgrtl.h.
14324         (simd_immediate_info): Add a constructor for series vectors,
14325         and an associated step field.
14326         (aarch64_sve_vg): New variable.
14327         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14328         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14329         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14330         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14331         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14332         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14333         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14334         (aarch64_get_mask_mode): New functions.
14335         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14336         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14337         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14338         predicate modes and predicate registers.  Explicitly restrict
14339         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14340         to store a vector mode if it is recognized by
14341         aarch64_classify_vector_mode.
14342         (aarch64_regmode_natural_size): New function.
14343         (aarch64_hard_regno_caller_save_mode): Return the original mode
14344         for predicates.
14345         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14346         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14347         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14348         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14349         functions.
14350         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14351         does not overlap dest if the function is frame-related.  Handle
14352         SVE constants.
14353         (aarch64_split_add_offset): New function.
14354         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14355         them aarch64_add_offset.
14356         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14357         and update call to aarch64_sub_sp.
14358         (aarch64_add_cfa_expression): New function.
14359         (aarch64_expand_prologue): Pass extra temporary registers to the
14360         functions above.  Handle the case in which we need to emit new
14361         DW_CFA_expressions for registers that were originally saved
14362         relative to the stack pointer, but now have to be expressed
14363         relative to the frame pointer.
14364         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14365         functions above.
14366         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14367         IP0 and IP1 values for SVE frames.
14368         (aarch64_expand_vec_series): New function.
14369         (aarch64_expand_sve_widened_duplicate): Likewise.
14370         (aarch64_expand_sve_const_vector): Likewise.
14371         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14372         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14373         into the register, rather than emitting a SET directly.
14374         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14375         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14376         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14377         (offset_9bit_signed_scaled_p): New functions.
14378         (aarch64_replicate_bitmask_imm): New function.
14379         (aarch64_bitmask_imm): Use it.
14380         (aarch64_cannot_force_const_mem): Reject expressions involving
14381         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14382         (aarch64_classify_index): Handle SVE indices, by requiring
14383         a plain register index with a scale that matches the element size.
14384         (aarch64_classify_address): Handle SVE addresses.  Assert that
14385         the mode of the address is VOIDmode or an integer mode.
14386         Update call to aarch64_classify_symbol.
14387         (aarch64_classify_symbolic_expression): Update call to
14388         aarch64_classify_symbol.
14389         (aarch64_const_vec_all_in_range_p): New function.
14390         (aarch64_print_vector_float_operand): Likewise.
14391         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14392         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14393         and the FP immediates 1.0 and 0.5.
14394         (aarch64_print_address_internal): Handle SVE addresses.
14395         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14396         (aarch64_regno_regclass): Handle predicate registers.
14397         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14398         data modes.
14399         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14400         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14401         (aarch64_convert_sve_vector_bits): New function.
14402         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14403         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14404         rather than an rtx.
14405         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14406         Handle SVE vector and predicate modes.  Accept VL-based constants
14407         that need only one temporary register, and VL offsets that require
14408         no temporary registers.
14409         (aarch64_conditional_register_usage): Mark the predicate registers
14410         as fixed if SVE isn't available.
14411         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14412         Return true for SVE vector and predicate modes.
14413         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14414         rather than an unsigned int.  Handle SVE modes.
14415         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14416         SVE modes.
14417         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14418         if SVE is enabled.
14419         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14420         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14421         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14422         (aarch64_sve_float_mul_immediate_p): New functions.
14423         (aarch64_sve_valid_immediate): New function.
14424         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14425         Explicitly reject structure modes.  Check for INDEX constants.
14426         Handle PTRUE and PFALSE constants.
14427         (aarch64_check_zero_based_sve_index_immediate): New function.
14428         (aarch64_simd_imm_zero_p): Delete.
14429         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14430         vector modes.  Accept constants in the range of CNT[BHWD].
14431         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14432         ask for an Advanced SIMD mode.
14433         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14434         (aarch64_simd_vector_alignment): Handle SVE predicates.
14435         (aarch64_vectorize_preferred_vector_alignment): New function.
14436         (aarch64_simd_vector_alignment_reachable): Use it instead of
14437         the vector size.
14438         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14439         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14440         functions.
14441         (MAX_VECT_LEN): Delete.
14442         (expand_vec_perm_d): Add a vec_flags field.
14443         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14444         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14445         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14446         for SVE modes.
14447         (aarch64_evpc_rev): Rename to...
14448         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14449         (aarch64_evpc_rev_global): New function.
14450         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14451         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14452         MAX_VECT_LEN.
14453         (aarch64_evpc_sve_tbl): New function.
14454         (aarch64_expand_vec_perm_const_1): Update after rename of
14455         aarch64_evpc_rev.  Handle SVE permutes too, trying
14456         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14457         than aarch64_evpc_tbl.
14458         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14459         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14460         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14461         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14462         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14463         (aarch64_expand_sve_vcond): New functions.
14464         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14465         of aarch64_vector_mode_p.
14466         (aarch64_dwarf_poly_indeterminate_value): New function.
14467         (aarch64_compute_pressure_classes): Likewise.
14468         (aarch64_can_change_mode_class): Likewise.
14469         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14470         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14471         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14472         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14473         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14474         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14475         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14476         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14477         constraints.
14478         (Dn, Dl, Dr): Accept const as well as const_vector.
14479         (Dz): Likewise.  Compare against CONST0_RTX.
14480         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14481         of "vector" where appropriate.
14482         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14483         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14484         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14485         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14486         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14487         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14488         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14489         (v_int_equiv): Extend to SVE modes.
14490         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14491         mode attributes.
14492         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14493         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14494         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14495         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14496         (SVE_COND_FP_CMP): New int iterators.
14497         (perm_hilo): Handle the new unpack unspecs.
14498         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14499         attributes.
14500         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14501         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14502         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14503         (aarch64_equality_operator, aarch64_constant_vector_operand)
14504         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14505         (aarch64_sve_nonimmediate_operand): Likewise.
14506         (aarch64_sve_general_operand): Likewise.
14507         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14508         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14509         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14510         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14511         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14512         (aarch64_sve_float_arith_immediate): Likewise.
14513         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14514         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14515         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
14516         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
14517         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14518         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14519         (aarch64_sve_float_arith_operand): Likewise.
14520         (aarch64_sve_float_arith_with_sub_operand): Likewise.
14521         (aarch64_sve_float_mul_operand): Likewise.
14522         (aarch64_sve_vec_perm_operand): Likewise.
14523         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14524         (aarch64_mov_operand): Accept const_poly_int and const_vector.
14525         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14526         as well as const_vector.
14527         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14528         in file.  Use CONST0_RTX and CONSTM1_RTX.
14529         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
14530         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14531         Use aarch64_simd_imm_zero.
14532         * config/aarch64/aarch64-sve.md: New file.
14533         * config/aarch64/aarch64.md: Include it.
14534         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14535         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14536         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14537         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14538         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14539         (sve): New attribute.
14540         (enabled): Disable instructions with the sve attribute unless
14541         TARGET_SVE.
14542         (movqi, movhi): Pass CONST_POLY_INT operaneds through
14543         aarch64_expand_mov_immediate.
14544         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14545         CNT[BHSD] immediates.
14546         (movti): Split CONST_POLY_INT moves into two halves.
14547         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14548         Split additions that need a temporary here if the destination
14549         is the stack pointer.
14550         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14551         (*add<mode>3_poly_1): New instruction.
14552         (set_clobber_cc): New expander.
14554 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14556         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14557         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
14558         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14559         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14560         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
14561         Change innermode from fixed_mode_size to machine_mode.
14562         (simplify_subreg): Update call accordingly.  Handle a constant-sized
14563         subreg of a variable-length CONST_VECTOR.
14565 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14566             Alan Hayward  <alan.hayward@arm.com>
14567             David Sherwood  <david.sherwood@arm.com>
14569         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14570         (add_offset_to_base): New function, split out from...
14571         (create_mem_ref): ...here.  When handling a scale other than 1,
14572         check first whether the address is valid without the offset.
14573         Add it into the base if so, leaving the index and scale as-is.
14575 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14577         PR c++/83778
14578         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14579         fold_for_warn before checking if arg2 is INTEGER_CST.
14581 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
14583         * config/rs6000/predicates.md (load_multiple_operation): Delete.
14584         (store_multiple_operation): Delete.
14585         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14586         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14587         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14588         guarded by TARGET_STRING.
14589         (rs6000_output_load_multiple): Delete.
14590         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14591         OPTION_MASK_STRING / TARGET_STRING handling.
14592         (print_operand) <'N', 'O'>: Add comment that these are unused now.
14593         (const rs6000_opt_masks) <"string">: Change mask to 0.
14594         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14595         (MASK_STRING): Delete.
14596         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14597         parts.  Simplify.
14598         (load_multiple): Delete.
14599         (*ldmsi8): Delete.
14600         (*ldmsi7): Delete.
14601         (*ldmsi6): Delete.
14602         (*ldmsi5): Delete.
14603         (*ldmsi4): Delete.
14604         (*ldmsi3): Delete.
14605         (store_multiple): Delete.
14606         (*stmsi8): Delete.
14607         (*stmsi7): Delete.
14608         (*stmsi6): Delete.
14609         (*stmsi5): Delete.
14610         (*stmsi4): Delete.
14611         (*stmsi3): Delete.
14612         (movmemsi_8reg): Delete.
14613         (corresponding unnamed define_insn): Delete.
14614         (movmemsi_6reg): Delete.
14615         (corresponding unnamed define_insn): Delete.
14616         (movmemsi_4reg): Delete.
14617         (corresponding unnamed define_insn): Delete.
14618         (movmemsi_2reg): Delete.
14619         (corresponding unnamed define_insn): Delete.
14620         (movmemsi_1reg): Delete.
14621         (corresponding unnamed define_insn): Delete.
14622         * config/rs6000/rs6000.opt (mno-string): New.
14623         (mstring): Replace by deprecation warning stub.
14624         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14626 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14628         * regrename.c (regrename_do_replace): If replacing the same
14629         reg multiple times, try to reuse last created gen_raw_REG.
14631         PR debug/81155
14632         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14633         main to workaround a bug in GDB.
14635 2018-01-12  Tom de Vries  <tom@codesourcery.com>
14637         PR target/83737
14638         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14640 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
14642         PR rtl-optimization/80481
14643         * ira-color.c (get_cap_member): New function.
14644         (allocnos_conflict_by_live_ranges_p): Use it.
14645         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14646         (setup_slot_coalesced_allocno_live_ranges): Ditto.
14648 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
14650         PR target/83628
14651         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14652         (*saddl_se_1): Ditto.
14653         (*ssubsi_1): Ditto.
14654         (*ssubl_se_1): Ditto.
14656 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14658         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14659         rather than wi::to_widest for DR_INITs.
14660         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14661         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14662         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14663         INTEGER_CSTs.
14664         (vect_analyze_group_access_1): Note that here.
14666 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14668         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14669         polynomial type sizes.
14671 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14673         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14674         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14675         (gimple_add_tmp_var): Likewise.
14677 2018-01-12  Martin Liska  <mliska@suse.cz>
14679         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14680         (gimple_alloc_sizes): Likewise.
14681         (dump_gimple_statistics): Use PRIu64 in printf format.
14682         * gimple.h: Change uint64_t to int.
14684 2018-01-12  Martin Liska  <mliska@suse.cz>
14686         * tree-core.h: Use uint64_t instead of int.
14687         * tree.c (tree_node_counts): Likewise.
14688         (tree_node_sizes): Likewise.
14689         (dump_tree_statistics): Use PRIu64 in printf format.
14691 2018-01-12  Martin Liska  <mliska@suse.cz>
14693         * Makefile.in: As qsort_chk is implemented in vec.c, add
14694         vec.o to linkage of gencfn-macros.
14695         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14696         passing the info to record_node_allocation_statistics.
14697         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14698         and pass the info.
14699         * ggc-common.c (struct ggc_usage): Add operator== and use
14700         it in operator< and compare function.
14701         * mem-stats.h (struct mem_usage): Likewise.
14702         * vec.c (struct vec_usage): Remove operator< and compare
14703         function. Can be simply inherited.
14705 2018-01-12  Martin Jambor  <mjambor@suse.cz>
14707         PR target/81616
14708         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14709         * tree-ssa-math-opts.c: Include domwalk.h.
14710         (convert_mult_to_fma_1): New function.
14711         (fma_transformation_info): New type.
14712         (fma_deferring_state): Likewise.
14713         (cancel_fma_deferring): New function.
14714         (result_of_phi): Likewise.
14715         (last_fma_candidate_feeds_initial_phi): Likewise.
14716         (convert_mult_to_fma): Added deferring logic, split actual
14717         transformation to convert_mult_to_fma_1.
14718         (math_opts_dom_walker): New type.
14719         (math_opts_dom_walker::after_dom_children): New method, body moved
14720         here from pass_optimize_widening_mul::execute, added deferring logic
14721         bits.
14722         (pass_optimize_widening_mul::execute): Moved most of code to
14723         math_opts_dom_walker::after_dom_children.
14724         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14725         * config/i386/i386.c (ix86_option_override_internal): Added
14726         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14728 2018-01-12  Richard Biener  <rguenther@suse.de>
14730         PR debug/83157
14731         * dwarf2out.c (gen_variable_die): Do not reset old_die for
14732         inline instance vars.
14734 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
14736         PR target/81819
14737         * config/rx/rx.c (rx_is_restricted_memory_address):
14738         Handle SUBREG case.
14740 2018-01-12  Richard Biener  <rguenther@suse.de>
14742         PR tree-optimization/80846
14743         * target.def (split_reduction): New target hook.
14744         * targhooks.c (default_split_reduction): New function.
14745         * targhooks.h (default_split_reduction): Declare.
14746         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14747         target requests first reduce vectors by combining low and high
14748         parts.
14749         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14750         (get_vectype_for_scalar_type_and_size): Export.
14751         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14752         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14753         * doc/tm.texi: Regenerate.
14754         * config/i386/i386.c (ix86_split_reduction): Implement
14755         TARGET_VECTORIZE_SPLIT_REDUCTION.
14757 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14759         PR target/83368
14760         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14761         in PIC mode except for TARGET_VXWORKS_RTP.
14762         * config/sparc/sparc.c: Include cfgrtl.h.
14763         (TARGET_INIT_PIC_REG): Define.
14764         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14765         (sparc_pic_register_p): New predicate.
14766         (sparc_legitimate_address_p): Use it.
14767         (sparc_legitimize_pic_address): Likewise.
14768         (sparc_delegitimize_address): Likewise.
14769         (sparc_mode_dependent_address_p): Likewise.
14770         (gen_load_pcrel_sym): Remove 4th parameter.
14771         (load_got_register): Adjust call to above.  Remove obsolete stuff.
14772         (sparc_expand_prologue): Do not call load_got_register here.
14773         (sparc_flat_expand_prologue): Likewise.
14774         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14775         (sparc_use_pseudo_pic_reg): New function.
14776         (sparc_init_pic_reg): Likewise.
14777         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14778         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14780 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
14782         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14783         Add item for branch_cost.
14785 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14787         PR rtl-optimization/83565
14788         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14789         not extend the result to a larger mode for rotate operations.
14790         (num_sign_bit_copies1): Likewise.
14792 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14794         PR target/40411
14795         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14796         -symbolic.
14797         Use values-Xc.o for -pedantic.
14798         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14800 2018-01-12  Martin Liska  <mliska@suse.cz>
14802         PR ipa/83054
14803         * ipa-devirt.c (final_warning_record::grow_type_warnings):
14804         New function.
14805         (possible_polymorphic_call_targets): Use it.
14806         (ipa_devirt): Likewise.
14808 2018-01-12  Martin Liska  <mliska@suse.cz>
14810         * profile-count.h (enum profile_quality): Use 0 as invalid
14811         enum value of profile_quality.
14813 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14815         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14816         -mext-string options.
14818 2018-01-12  Richard Biener  <rguenther@suse.de>
14820         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14821         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14822         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14823         Likewise.
14824         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14826 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14828         * configure.ac (--with-long-double-format): Add support for the
14829         configuration option to change the default long double format on
14830         PowerPC systems.
14831         * config.gcc (powerpc*-linux*-*): Likewise.
14832         * configure: Regenerate.
14833         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14834         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14835         used without modification.
14837 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14839         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14840         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14841         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14842         MISC_BUILTIN_SPEC_BARRIER.
14843         (rs6000_init_builtins): Likewise.
14844         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14845         enum value.
14846         (speculation_barrier): New define_insn.
14847         * doc/extend.texi: Document __builtin_speculation_barrier.
14849 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14851         PR target/83203
14852         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14853         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14854         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14855         iterators.
14856         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
14857         integral modes instead of "ss" and "sd".
14858         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14859         vectors with 32-bit and 64-bit elements.
14860         (vecdupssescalarmodesuffix): New mode attribute.
14861         (vec_dup<mode>): Use it.
14863 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
14865         PR target/83330
14866         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14867         frame if argument is passed on stack.
14869 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14871         PR target/82682
14872         * ree.c (combine_reaching_defs): Optimize also
14873         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14874         reg2=any_extend(exp); reg1=reg2;, formatting fix.
14876 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14878         PR middle-end/83189
14879         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14881 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14883         PR middle-end/83718
14884         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14885         after they are computed.
14887 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
14889         PR tree-optimization/83695
14890         * gimple-loop-linterchange.cc
14891         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14892         reset cached scev information after interchange.
14893         (pass_linterchange::execute): Remove call to scev_reset_htab.
14895 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14897         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14898         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14899         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14900         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14901         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14902         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14903         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
14904         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
14905         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
14906         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
14907         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
14908         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
14909         (V_lane_reg): Likewise.
14910         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
14911         New define_expand.
14912         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
14913         (vfmal_lane_low<mode>_intrinsic,
14914         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
14915         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
14916         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
14917         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
14918         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
14919         vfmsl_lane_high<mode>_intrinsic): New define_insns.
14921 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14923         * config/arm/arm-cpus.in (fp16fml): New feature.
14924         (ALL_SIMD): Add fp16fml.
14925         (armv8.2-a): Add fp16fml as an option.
14926         (armv8.3-a): Likewise.
14927         (armv8.4-a): Add fp16fml as part of fp16.
14928         * config/arm/arm.h (TARGET_FP16FML): Define.
14929         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
14930         when appropriate.
14931         * config/arm/arm-modes.def (V2HF): Define.
14932         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
14933         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
14934         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
14935         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
14936         vfmsl_low, vfmsl_high): New set of builtins.
14937         * config/arm/iterators.md (PLUSMINUS): New code iterator.
14938         (vfml_op): New code attribute.
14939         (VFMLHALVES): New int iterator.
14940         (VFML, VFMLSEL): New mode attributes.
14941         (V_reg): Define mapping for V2HF.
14942         (V_hi, V_lo): New mode attributes.
14943         (VF_constraint): Likewise.
14944         (vfml_half, vfml_half_selector): New int attributes.
14945         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
14946         define_expand.
14947         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
14948         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
14949         New define_insn.
14950         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
14951         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
14952         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
14953         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
14954         documentation.
14955         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
14956         Document new effective target and option set.
14958 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14960         * config/arm/arm-cpus.in (armv8_4): New feature.
14961         (ARMv8_4a): New fgroup.
14962         (armv8.4-a): New arch.
14963         * config/arm/arm-tables.opt: Regenerate.
14964         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
14965         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
14966         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
14967         Add matching rules for -march=armv8.4-a and extensions.
14968         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
14970 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
14972         PR target/81821
14973         * config/rx/rx.md (BW): New mode attribute.
14974         (sync_lock_test_and_setsi): Add mode suffix to insn output.
14976 2018-01-11  Richard Biener  <rguenther@suse.de>
14978         PR tree-optimization/83435
14979         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
14980         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
14981         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
14983 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14984             Alan Hayward  <alan.hayward@arm.com>
14985             David Sherwood  <david.sherwood@arm.com>
14987         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
14988         field.
14989         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
14990         (aarch64_print_address_internal): Use it to check for a zero offset.
14992 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14993             Alan Hayward  <alan.hayward@arm.com>
14994             David Sherwood  <david.sherwood@arm.com>
14996         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
14997         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
14998         Return a poly_int64 rather than a HOST_WIDE_INT.
14999         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15000         rather than a HOST_WIDE_INT.
15001         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15002         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15003         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15004         final_offset from HOST_WIDE_INT to poly_int64.
15005         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15006         to_constant when getting the number of units in an Advanced SIMD
15007         mode.
15008         (aarch64_builtin_vectorized_function): Check for a constant number
15009         of units.
15010         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15011         GET_MODE_SIZE.
15012         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15013         attribute instead of GET_MODE_NUNITS.
15014         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15015         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15016         GET_MODE_SIZE for fixed-size registers.
15017         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15018         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15019         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15020         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15021         (aarch64_print_operand, aarch64_print_address_internal)
15022         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15023         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15024         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15025         Handle polynomial GET_MODE_SIZE.
15026         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15027         wider than SImode without modification.
15028         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15029         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15030         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15031         passing and returning SVE modes.
15032         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15033         rather than GEN_INT.
15034         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15035         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15036         (aarch64_allocate_and_probe_stack_space): Likewise.
15037         (aarch64_layout_frame): Cope with polynomial offsets.
15038         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15039         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15040         polynomial offsets.
15041         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15042         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15043         poly_int64 rather than a HOST_WIDE_INT.
15044         (aarch64_get_separate_components, aarch64_process_components)
15045         (aarch64_expand_prologue, aarch64_expand_epilogue)
15046         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15047         (aarch64_anchor_offset): New function, split out from...
15048         (aarch64_legitimize_address): ...here.
15049         (aarch64_builtin_vectorization_cost): Handle polynomial
15050         TYPE_VECTOR_SUBPARTS.
15051         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15052         GET_MODE_NUNITS.
15053         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15054         number of elements from the PARALLEL rather than the mode.
15055         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15056         rather than GET_MODE_BITSIZE.
15057         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15058         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15059         (aarch64_expand_vec_perm_const_1): Handle polynomial
15060         d->perm.length () and d->perm elements.
15061         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15062         Apply to_constant to d->perm elements.
15063         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15064         polynomial CONST_VECTOR_NUNITS.
15065         (aarch64_move_pointer): Take amount as a poly_int64 rather
15066         than an int.
15067         (aarch64_progress_pointer): Avoid temporary variable.
15068         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15069         the mode attribute instead of GET_MODE.
15071 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15072             Alan Hayward  <alan.hayward@arm.com>
15073             David Sherwood  <david.sherwood@arm.com>
15075         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15076         x exists before using it.
15077         (aarch64_add_constant_internal): Rename to...
15078         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15079         src and dest rtxes.  Handle the case in which they're different,
15080         including when the offset is zero.  Replace scratchreg with an rtx.
15081         Use 2 additions if there is no spare register into which we can
15082         move a 16-bit constant.
15083         (aarch64_add_constant): Delete.
15084         (aarch64_add_offset): Replace reg with separate src and dest
15085         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15086         Use aarch64_add_offset_1.
15087         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15088         an rtx rather than an int.  Take the delta as a poly_int64
15089         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15090         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15091         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15092         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15093         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15094         and aarch64_add_sp.
15095         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15096         aarch64_add_constant.
15098 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15100         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15101         Use scalar_float_mode.
15103 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15105         * config/aarch64/aarch64-simd.md
15106         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15107         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15108         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15109         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15110         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15111         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15112         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15113         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15114         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15115         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15117 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15119         PR target/83514
15120         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15121         targ_options->x_arm_arch_string is non NULL.
15123 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15125         * config/aarch64/aarch64.h
15126         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15128 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15130         PR target/82096
15131         * expmed.c (emit_store_flag_force): Swap if const op0
15132         and change VOIDmode to mode of op0.
15134 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15136         PR rtl-optimization/83761
15137         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15138         than bytes to mode_for_size.
15140 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15142         PR middle-end/83189
15143         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15144         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15145         profile.
15147 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15149         PR middle-end/83575
15150         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15151         when in layout mode.
15152         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15153         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15154         partition fixup.
15156 2018-01-10  Michael Collison  <michael.collison@arm.com>
15158         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15159         * config/aarch64/aarch64-option-extension.def: Add
15160         AARCH64_OPT_EXTENSION of 'fp16fml'.
15161         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15162         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15163         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15164         * config/aarch64/constraints.md (Ui7): New constraint.
15165         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15166         (VFMLA_SEL_W): Ditto.
15167         (f16quad): Ditto.
15168         (f16mac1): Ditto.
15169         (VFMLA16_LOW): New int iterator.
15170         (VFMLA16_HIGH): Ditto.
15171         (UNSPEC_FMLAL): New unspec.
15172         (UNSPEC_FMLSL): Ditto.
15173         (UNSPEC_FMLAL2): Ditto.
15174         (UNSPEC_FMLSL2): Ditto.
15175         (f16mac): New code attribute.
15176         * config/aarch64/aarch64-simd-builtins.def
15177         (aarch64_fmlal_lowv2sf): Ditto.
15178         (aarch64_fmlsl_lowv2sf): Ditto.
15179         (aarch64_fmlalq_lowv4sf): Ditto.
15180         (aarch64_fmlslq_lowv4sf): Ditto.
15181         (aarch64_fmlal_highv2sf): Ditto.
15182         (aarch64_fmlsl_highv2sf): Ditto.
15183         (aarch64_fmlalq_highv4sf): Ditto.
15184         (aarch64_fmlslq_highv4sf): Ditto.
15185         (aarch64_fmlal_lane_lowv2sf): Ditto.
15186         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15187         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15188         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15189         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15190         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15191         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15192         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15193         (aarch64_fmlal_lane_highv2sf): Ditto.
15194         (aarch64_fmlsl_lane_highv2sf): Ditto.
15195         (aarch64_fmlal_laneq_highv2sf): Ditto.
15196         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15197         (aarch64_fmlalq_lane_highv4sf): Ditto.
15198         (aarch64_fmlsl_lane_highv4sf): Ditto.
15199         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15200         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15201         * config/aarch64/aarch64-simd.md:
15202         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15203         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15204         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15205         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15206         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15207         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15208         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15209         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15210         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15211         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15212         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15213         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15214         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15215         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15216         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15217         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15218         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15219         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15220         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15221         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15222         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15223         (vfmlsl_low_u32): Ditto.
15224         (vfmlalq_low_u32): Ditto.
15225         (vfmlslq_low_u32): Ditto.
15226         (vfmlal_high_u32): Ditto.
15227         (vfmlsl_high_u32): Ditto.
15228         (vfmlalq_high_u32): Ditto.
15229         (vfmlslq_high_u32): Ditto.
15230         (vfmlal_lane_low_u32): Ditto.
15231         (vfmlsl_lane_low_u32): Ditto.
15232         (vfmlal_laneq_low_u32): Ditto.
15233         (vfmlsl_laneq_low_u32): Ditto.
15234         (vfmlalq_lane_low_u32): Ditto.
15235         (vfmlslq_lane_low_u32): Ditto.
15236         (vfmlalq_laneq_low_u32): Ditto.
15237         (vfmlslq_laneq_low_u32): Ditto.
15238         (vfmlal_lane_high_u32): Ditto.
15239         (vfmlsl_lane_high_u32): Ditto.
15240         (vfmlal_laneq_high_u32): Ditto.
15241         (vfmlsl_laneq_high_u32): Ditto.
15242         (vfmlalq_lane_high_u32): Ditto.
15243         (vfmlslq_lane_high_u32): Ditto.
15244         (vfmlalq_laneq_high_u32): Ditto.
15245         (vfmlslq_laneq_high_u32): Ditto.
15246         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15247         (AARCH64_FL_FOR_ARCH8_4): New.
15248         (AARCH64_ISA_F16FML): New ISA flag.
15249         (TARGET_F16FML): New feature flag for fp16fml.
15250         (doc/invoke.texi): Document new fp16fml option.
15252 2018-01-10  Michael Collison  <michael.collison@arm.com>
15254         * config/aarch64/aarch64-builtins.c:
15255         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15256         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15257         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15258         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15259         (AARCH64_ISA_SHA3): New ISA flag.
15260         (TARGET_SHA3): New feature flag for sha3.
15261         * config/aarch64/iterators.md (sha512_op): New int attribute.
15262         (CRYPTO_SHA512): New int iterator.
15263         (UNSPEC_SHA512H): New unspec.
15264         (UNSPEC_SHA512H2): Ditto.
15265         (UNSPEC_SHA512SU0): Ditto.
15266         (UNSPEC_SHA512SU1): Ditto.
15267         * config/aarch64/aarch64-simd-builtins.def
15268         (aarch64_crypto_sha512hqv2di): New builtin.
15269         (aarch64_crypto_sha512h2qv2di): Ditto.
15270         (aarch64_crypto_sha512su0qv2di): Ditto.
15271         (aarch64_crypto_sha512su1qv2di): Ditto.
15272         (aarch64_eor3qv8hi): Ditto.
15273         (aarch64_rax1qv2di): Ditto.
15274         (aarch64_xarqv2di): Ditto.
15275         (aarch64_bcaxqv8hi): Ditto.
15276         * config/aarch64/aarch64-simd.md:
15277         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15278         (aarch64_crypto_sha512su0qv2di): Ditto.
15279         (aarch64_crypto_sha512su1qv2di): Ditto.
15280         (aarch64_eor3qv8hi): Ditto.
15281         (aarch64_rax1qv2di): Ditto.
15282         (aarch64_xarqv2di): Ditto.
15283         (aarch64_bcaxqv8hi): Ditto.
15284         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15285         (vsha512h2q_u64): Ditto.
15286         (vsha512su0q_u64): Ditto.
15287         (vsha512su1q_u64): Ditto.
15288         (veor3q_u16): Ditto.
15289         (vrax1q_u64): Ditto.
15290         (vxarq_u64): Ditto.
15291         (vbcaxq_u16): Ditto.
15292         * config/arm/types.md (crypto_sha512): New type attribute.
15293         (crypto_sha3): Ditto.
15294         (doc/invoke.texi): Document new sha3 option.
15296 2018-01-10  Michael Collison  <michael.collison@arm.com>
15298         * config/aarch64/aarch64-builtins.c:
15299         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15300         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15301         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15302         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15303         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15304         (AARCH64_ISA_SM4): New ISA flag.
15305         (TARGET_SM4): New feature flag for sm4.
15306         * config/aarch64/aarch64-simd-builtins.def
15307         (aarch64_sm3ss1qv4si): Ditto.
15308         (aarch64_sm3tt1aq4si): Ditto.
15309         (aarch64_sm3tt1bq4si): Ditto.
15310         (aarch64_sm3tt2aq4si): Ditto.
15311         (aarch64_sm3tt2bq4si): Ditto.
15312         (aarch64_sm3partw1qv4si): Ditto.
15313         (aarch64_sm3partw2qv4si): Ditto.
15314         (aarch64_sm4eqv4si): Ditto.
15315         (aarch64_sm4ekeyqv4si): Ditto.
15316         * config/aarch64/aarch64-simd.md:
15317         (aarch64_sm3ss1qv4si): Ditto.
15318         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15319         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15320         (aarch64_sm4eqv4si): Ditto.
15321         (aarch64_sm4ekeyqv4si): Ditto.
15322         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15323         (sm3part_op): Ditto.
15324         (CRYPTO_SM3TT): Ditto.
15325         (CRYPTO_SM3PART): Ditto.
15326         (UNSPEC_SM3SS1): New unspec.
15327         (UNSPEC_SM3TT1A): Ditto.
15328         (UNSPEC_SM3TT1B): Ditto.
15329         (UNSPEC_SM3TT2A): Ditto.
15330         (UNSPEC_SM3TT2B): Ditto.
15331         (UNSPEC_SM3PARTW1): Ditto.
15332         (UNSPEC_SM3PARTW2): Ditto.
15333         (UNSPEC_SM4E): Ditto.
15334         (UNSPEC_SM4EKEY): Ditto.
15335         * config/aarch64/constraints.md (Ui2): New constraint.
15336         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15337         * config/arm/types.md (crypto_sm3): New type attribute.
15338         (crypto_sm4): Ditto.
15339         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15340         (vsm3tt1aq_u32): Ditto.
15341         (vsm3tt1bq_u32): Ditto.
15342         (vsm3tt2aq_u32): Ditto.
15343         (vsm3tt2bq_u32): Ditto.
15344         (vsm3partw1q_u32): Ditto.
15345         (vsm3partw2q_u32): Ditto.
15346         (vsm4eq_u32): Ditto.
15347         (vsm4ekeyq_u32): Ditto.
15348         (doc/invoke.texi): Document new sm4 option.
15350 2018-01-10  Michael Collison  <michael.collison@arm.com>
15352         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15353         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15354         (AARCH64_FL_FOR_ARCH8_4): New.
15355         (AARCH64_FL_V8_4): New flag.
15356         (doc/invoke.texi): Document new armv8.4-a option.
15358 2018-01-10  Michael Collison  <michael.collison@arm.com>
15360         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15361         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15362         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15363         * config/aarch64/aarch64-option-extension.def: Add
15364         AARCH64_OPT_EXTENSION of 'sha2'.
15365         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15366         (crypto): Disable sha2 and aes if crypto disabled.
15367         (crypto): Enable aes and sha2 if enabled.
15368         (simd): Disable sha2 and aes if simd disabled.
15369         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15370         New flags.
15371         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15372         (TARGET_SHA2): New feature flag for sha2.
15373         (TARGET_AES): New feature flag for aes.
15374         * config/aarch64/aarch64-simd.md:
15375         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15376         conditional on TARGET_AES.
15377         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15378         (aarch64_crypto_sha1hsi): Make pattern conditional
15379         on TARGET_SHA2.
15380         (aarch64_crypto_sha1hv4si): Ditto.
15381         (aarch64_be_crypto_sha1hv4si): Ditto.
15382         (aarch64_crypto_sha1su1v4si): Ditto.
15383         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15384         (aarch64_crypto_sha1su0v4si): Ditto.
15385         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15386         (aarch64_crypto_sha256su0v4si): Ditto.
15387         (aarch64_crypto_sha256su1v4si): Ditto.
15388         (doc/invoke.texi): Document new aes and sha2 options.
15390 2018-01-10  Martin Sebor  <msebor@redhat.com>
15392         PR tree-optimization/83781
15393         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15394         as string arrays.
15396 2018-01-11  Martin Sebor  <msebor@gmail.com>
15397             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15399         PR tree-optimization/83501
15400         PR tree-optimization/81703
15402         * tree-ssa-strlen.c (get_string_cst): Rename...
15403         (get_string_len): ...to this.  Handle global constants.
15404         (handle_char_store): Adjust.
15406 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15407             Jim Wilson  <jimw@sifive.com>
15409         * config/riscv/riscv-protos.h (riscv_output_return): New.
15410         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15411         (riscv_attribute_table, riscv_output_return),
15412         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15413         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15414         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15415         function.
15416         (riscv_expand_prologue): Add early return for naked function.
15417         (riscv_expand_epilogue): Likewise.
15418         (riscv_function_ok_for_sibcall): Return false for naked function.
15419         (riscv_set_current_function): New.
15420         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15421         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15422         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15423         * doc/extend.texi (RISC-V Function Attributes): New.
15425 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15427         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15428         check for 128-bit long double before checking TCmode.
15429         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15430         128-bit long doubles before checking TFmode or TCmode.
15431         (FLOAT128_IBM_P): Likewise.
15433 2018-01-10  Martin Sebor  <msebor@redhat.com>
15435         PR tree-optimization/83671
15436         * builtins.c (c_strlen): Unconditionally return zero for the empty
15437         string.
15438         Use -Warray-bounds for warnings.
15439         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15440         for non-constant array indices with COMPONENT_REF, arrays of
15441         arrays, and pointers to arrays.
15442         (gimple_fold_builtin_strlen): Determine and set length range for
15443         non-constant character arrays.
15445 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15447         PR middle-end/81897
15448         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15449         empty blocks.
15451 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15453         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15455 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15457         PR target/83399
15458         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15459         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15460         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15461         indexed_or_indirect_operand predicate.
15462         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15463         (*vsx_le_perm_load_v8hi): Likewise.
15464         (*vsx_le_perm_load_v16qi): Likewise.
15465         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15466         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15467         (*vsx_le_perm_store_v8hi): Likewise.
15468         (*vsx_le_perm_store_v16qi): Likewise.
15469         (eight unnamed splitters): Likewise.
15471 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15473         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15474         * config/rs6000/emmintrin.h: Likewise.
15475         * config/rs6000/mmintrin.h: Likewise.
15476         * config/rs6000/xmmintrin.h: Likewise.
15478 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
15480         PR c++/43486
15481         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15482         "public_flag".
15483         * tree.c (tree_nop_conversion): Return true for location wrapper
15484         nodes.
15485         (maybe_wrap_with_location): New function.
15486         (selftest::check_strip_nops): New function.
15487         (selftest::test_location_wrappers): New function.
15488         (selftest::tree_c_tests): Call it.
15489         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15490         (maybe_wrap_with_location): New decl.
15491         (EXPR_LOCATION_WRAPPER_P): New macro.
15492         (location_wrapper_p): New inline function.
15493         (tree_strip_any_location_wrapper): New inline function.
15495 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
15497         PR target/83735
15498         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15499         stack_realign_offset for the largest alignment of stack slot
15500         actually used.
15501         (ix86_find_max_used_stack_alignment): New function.
15502         (ix86_finalize_stack_frame_flags): Use it.  Set
15503         max_used_stack_alignment if we don't realign stack.
15504         * config/i386/i386.h (machine_function): Add
15505         max_used_stack_alignment.
15507 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
15509         * config/arm/arm.opt (-mbranch-cost): New option.
15510         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15511         account.
15513 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
15515         PR target/83629
15516         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
15517         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15519 2018-01-10  Richard Biener  <rguenther@suse.de>
15521         PR debug/83765
15522         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15523         early out so it also covers the case where we have a non-NULL
15524         origin.
15526 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15528         PR tree-optimization/83753
15529         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15530         for non-strided grouped accesses if the number of elements is 1.
15532 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15534         PR target/81616
15535         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15536         * i386.h (TARGET_USE_GATHER): Define.
15537         * x86-tune.def (X86_TUNE_USE_GATHER): New.
15539 2018-01-10  Martin Liska  <mliska@suse.cz>
15541         PR bootstrap/82831
15542         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15543         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15544         partitioning.
15545         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15546         CLEANUP_NO_PARTITIONING is not set.
15548 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15550         * doc/rtl.texi: Remove documentation of (const ...) wrappers
15551         for vectors, as a partial revert of r254296.
15552         * rtl.h (const_vec_p): Delete.
15553         (const_vec_duplicate_p): Don't test for vector CONSTs.
15554         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15555         * expmed.c (make_tree): Likewise.
15557         Revert:
15558         * common.md (E, F): Use CONSTANT_P instead of checking for
15559         CONST_VECTOR.
15560         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15561         checking for CONST_VECTOR.
15563 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15565         PR middle-end/83575
15566         * predict.c (force_edge_cold): Handle in more sane way edges
15567         with no prediction.
15569 2018-01-09  Carl Love  <cel@us.ibm.com>
15571         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15572         V4SI, V4SF types.
15573         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15574         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15575         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15576         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
15577         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15578         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
15579         * config/rs6000/rs6000-protos.h: Add extern defition for
15580         rs6000_generate_float2_double_code.
15581         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15582         function.
15583         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15584         (float2_v2df): Add define_expand.
15586 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
15588         PR target/83628
15589         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15590         op_mode in the force_to_mode call.
15592 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15594         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15595         instead of checking each element individually.
15596         (aarch64_evpc_uzp): Likewise.
15597         (aarch64_evpc_zip): Likewise.
15598         (aarch64_evpc_ext): Likewise.
15599         (aarch64_evpc_rev): Likewise.
15600         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15601         instead of checking each element individually.  Return true without
15602         generating rtl if
15603         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15604         whether all selected elements come from the same input, instead of
15605         checking each element individually.  Remove calls to gen_rtx_REG,
15606         start_sequence and end_sequence and instead assert that no rtl is
15607         generated.
15609 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15611         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15612         order of HIGH and CONST checks.
15614 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15616         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15617         if the destination isn't an SSA_NAME.
15619 2018-01-09  Richard Biener  <rguenther@suse.de>
15621         PR tree-optimization/83668
15622         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15623         move prologue...
15624         (canonicalize_loop_form): ... here, renamed from ...
15625         (canonicalize_loop_closed_ssa_form): ... this and amended to
15626         swap successor edges for loop exit blocks to make us use
15627         the RPO order we need for initial schedule generation.
15629 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
15631         PR tree-optimization/64811
15632         * match.pd: When optimizing comparisons with Inf, avoid
15633         introducing or losing exceptions from comparisons with NaN.
15635 2018-01-09  Martin Liska  <mliska@suse.cz>
15637         PR sanitizer/82517
15638         * asan.c (shadow_mem_size): Add gcc_assert.
15640 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
15642         Don't save registers in main().
15644         PR target/83738
15645         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15646         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15647         * config/avr/avr.c (avr_set_current_function): Don't error if
15648         naked, OS_task or OS_main are specified at the same time.
15649         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15650         OS_main.
15651         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15652         attribute.
15653         * common/config/avr/avr-common.c (avr_option_optimization_table):
15654         Switch on -mmain-is-OS_task for optimizing compilations.
15656 2018-01-09  Richard Biener  <rguenther@suse.de>
15658         PR tree-optimization/83572
15659         * graphite.c: Include cfganal.h.
15660         (graphite_transform_loops): Connect infinite loops to exit
15661         and remove fake edges at the end.
15663 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15665         * ipa-inline.c (edge_badness): Revert accidental checkin.
15667 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15669         PR ipa/80763
15670         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15671         symbols; not inline clones.
15673 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
15675         PR target/83507
15676         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15677         hard registers.  Formatting fixes.
15679         PR preprocessor/83722
15680         * gcc.c (try_generate_repro): Pass
15681         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15682         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15683         do_report_bug.
15685 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
15686             Kito Cheng  <kito.cheng@gmail.com>
15688         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15689         (riscv_leaf_function_p): Delete.
15690         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15692 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15694         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15695         function.
15696         (do_ifelse): New function.
15697         (do_isel): New function.
15698         (do_sub3): New function.
15699         (do_add3): New function.
15700         (do_load_mask_compare): New function.
15701         (do_overlap_load_compare): New function.
15702         (expand_compare_loop): New function.
15703         (expand_block_compare): Call expand_compare_loop() when appropriate.
15704         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15705         option description.
15706         (-mblock-compare-inline-loop-limit): New option.
15708 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15710         PR target/83677
15711         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15712         Reverse order of second and third operands in first alternative.
15713         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15714         of first and second elements in UNSPEC_VPERMR vector.
15715         (altivec_expand_vec_perm_le): Likewise.
15717 2018-01-08  Jeff Law  <law@redhat.com>
15719         PR rtl-optimizatin/81308
15720         * tree-switch-conversion.c (cfg_altered): New file scoped static.
15721         (process_switch): If group_case_labels makes a change, then set
15722         cfg_altered.
15723         (pass_convert_switch::execute): If a switch is converted, then
15724         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
15726         PR rtl-optimization/81308
15727         * recog.c (split_all_insns): Conditionally cleanup the CFG after
15728         splitting insns.
15730 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
15732         PR target/83663 - Revert r255946
15733         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15734         generation for cases where splatting a value is not useful.
15735         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15736         across a vec_duplicate and a paradoxical subreg forming a vector
15737         mode to a vec_concat.
15739 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15741         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15742         -march=armv8.3-a variants.
15743         * config/arm/t-multilib: Likewise.
15744         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
15746 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15748         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15749         to generate rtl.
15750         (cceq_ior_compare_complement): Give it a name so I can use it, and
15751         change boolean_or_operator predicate to boolean_operator so it can
15752         be used to generate a crand.
15753         (eqne): New code iterator.
15754         (bd/bd_neg): New code_attrs.
15755         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15756         a single define_insn.
15757         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15758         decrement (bdnzt/bdnzf/bdzt/bdzf).
15759         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15760         with the new names of the branch decrement patterns, and added the
15761         names of the branch decrement conditional patterns.
15763 2018-01-08  Richard Biener  <rguenther@suse.de>
15765         PR tree-optimization/83563
15766         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15767         cache.
15769 2018-01-08  Richard Biener  <rguenther@suse.de>
15771         PR middle-end/83713
15772         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15774 2018-01-08  Richard Biener  <rguenther@suse.de>
15776         PR tree-optimization/83685
15777         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15778         references to abnormals.
15780 2018-01-08  Richard Biener  <rguenther@suse.de>
15782         PR lto/83719
15783         * dwarf2out.c (output_indirect_strings): Handle empty
15784         skeleton_debug_str_hash.
15785         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15787 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15789         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15790         (emit_store_direct): Likewise.
15791         (arc_trampoline_adjust_address): Likewise.
15792         (arc_asm_trampoline_template): New function.
15793         (arc_initialize_trampoline): Use asm_trampoline_template.
15794         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15795         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15796         * config/arc/arc.md (flush_icache): Delete pattern.
15798 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15800         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15801         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15802         munaligned-access.
15804 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15806         PR target/83681
15807         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15808         by not USED_FOR_TARGET.
15809         (make_pass_resolve_sw_modes): Likewise.
15811 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15813         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15814         USED_FOR_TARGET.
15816 2018-01-08  Richard Biener  <rguenther@suse.de>
15818         PR middle-end/83580
15819         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15821 2018-01-08  Richard Biener  <rguenther@suse.de>
15823         PR middle-end/83517
15824         * match.pd ((t * 2) / 2) -> t): Add missing :c.
15826 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
15828         PR middle-end/81897
15829         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15830         basic blocks with a small number of successors.
15831         (convert_control_dep_chain_into_preds): Improve handling of
15832         forwarder blocks.
15833         (dump_predicates): Split apart into...
15834         (dump_pred_chain): ...here...
15835         (dump_pred_info): ...and here.
15836         (can_one_predicate_be_invalidated_p): Add debugging printfs.
15837         (can_chain_union_be_invalidated_p): Improve check for invalidation
15838         of paths.
15839         (uninit_uses_cannot_happen): Avoid unnecessary if
15840         convert_control_dep_chain_into_preds yielded nothing.
15842 2018-01-06  Martin Sebor  <msebor@redhat.com>
15844         PR tree-optimization/83640
15845         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15846         subtracting negative offset from size.
15847         (builtin_access::overlap): Adjust offset bounds of the access to fall
15848         within the size of the object if possible.
15850 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
15852         PR rtl-optimization/83699
15853         * expmed.c (extract_bit_field_1): Restrict the vector usage of
15854         extract_bit_field_as_subreg to cases in which the extracted
15855         value is also a vector.
15857         * lra-constraints.c (process_alt_operands): Test for the equivalence
15858         substitutions when detecting a possible reload cycle.
15860 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
15862         PR debug/83480
15863         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15864         by default if flag_selective_schedling{,2}.  Formatting fixes.
15866         PR rtl-optimization/83682
15867         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15868         if it has non-VECTOR_MODE element mode.
15869         (vec_duplicate_p): Likewise.
15871         PR middle-end/83694
15872         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15873         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15875 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15877         PR target/83604
15878         * config/i386/i386-builtin.def
15879         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15880         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15881         Require also OPTION_MASK_ISA_AVX512F in addition to
15882         OPTION_MASK_ISA_GFNI.
15883         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15884         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15885         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15886         to OPTION_MASK_ISA_GFNI.
15887         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15888         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15889         OPTION_MASK_ISA_AVX512BW.
15890         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15891         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15892         addition to OPTION_MASK_ISA_GFNI.
15893         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15894         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15895         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15896         to OPTION_MASK_ISA_GFNI.
15897         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15898         a requirement for all ISAs rather than any of them with a few
15899         exceptions.
15900         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15901         processing.
15902         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15903         bitmasks to be enabled with 3 exceptions, instead of requiring any
15904         enabled ISA with lots of exceptions.
15905         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
15906         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
15907         Change avx512bw in isa attribute to avx512f.
15908         * config/i386/sgxintrin.h: Add license boilerplate.
15909         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
15910         to __AVX512F__ and __AVX512VL to __AVX512VL__.
15911         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
15912         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
15913         defined.
15914         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
15915         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
15916         temporarily sse2 rather than sse if not enabled already.
15918         PR target/83604
15919         * config/i386/sse.md (VI248_VLBW): Rename to ...
15920         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
15921         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
15922         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
15923         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
15924         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
15925         mode iterator instead of VI248_VLBW.
15927 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
15929         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
15930         (record_modified): Skip clobbers; add debug output.
15931         (param_change_prob): Use sreal frequencies.
15933 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15935         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
15936         punt for user-aligned variables.
15938 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15940         * tree-chrec.c (chrec_contains_symbols): Return true for
15941         POLY_INT_CST.
15943 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
15945         PR target/82439
15946         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
15947         of (x|y) == x for BICS pattern.
15949 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15951         PR tree-optimization/83605
15952         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
15953         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
15954         can throw.
15956 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15958         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
15959         * config/epiphany/rtems.h: New file.
15961 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15962             Uros Bizjak  <ubizjak@gmail.com>
15964         PR target/83554
15965         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
15966         QIreg_operand instead of register_operand predicate.
15967         * config/i386/i386.c (ix86_rop_should_change_byte_p,
15968         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
15969         comments instead of -fmitigate[-_]rop.
15971 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15973         PR bootstrap/81926
15974         * cgraphunit.c (symbol_table::compile): Switch to text_section
15975         before calling assembly_start debug hook.
15976         * run-rtl-passes.c (run_rtl_passes): Likewise.
15977         Include output.h.
15979 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15981         * tree-vrp.c (extract_range_from_binary_expr_1): Check
15982         range_int_cst_p rather than !symbolic_range_p before calling
15983         extract_range_from_multiplicative_op_1.
15985 2018-01-04  Jeff Law  <law@redhat.com>
15987         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
15988         redundant test in assertion.
15990 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15992         * doc/rtl.texi: Document machine_mode wrapper classes.
15994 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15996         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
15997         using tree_to_uhwi.
15999 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16001         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16002         the VEC_PERM_EXPR fold to fail.
16004 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16006         PR debug/83585
16007         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16008         to switched_sections.
16010 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16012         PR target/83680
16013         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16014         test for d.testing.
16016 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16018         PR target/83387
16019         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16020         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16022 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16024         PR debug/83666
16025         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16026         is BLKmode and bitpos not zero or mode change is needed.
16028 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16030         PR target/83675
16031         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16032         TARGET_VIS2.
16034 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16036         PR target/83628
16037         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16038         instead of MULT rtx.  Update all corresponding splitters.
16039         (*saddl_se): Ditto.
16040         (*ssub<modesuffix>): Ditto.
16041         (*ssubl_se): Ditto.
16042         (*cmp_sadd_di): Update split patterns.
16043         (*cmp_sadd_si): Ditto.
16044         (*cmp_sadd_sidi): Ditto.
16045         (*cmp_ssub_di): Ditto.
16046         (*cmp_ssub_si): Ditto.
16047         (*cmp_ssub_sidi): Ditto.
16048         * config/alpha/predicates.md (const23_operand): New predicate.
16049         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16050         Look for ASHIFT, not MULT inner operand.
16051         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16053 2018-01-04  Martin Liska  <mliska@suse.cz>
16055         PR gcov-profile/83669
16056         * gcov.c (output_intermediate_file): Add version to intermediate
16057         gcov file.
16058         * doc/gcov.texi: Document new field 'version' in intermediate
16059         file format. Fix location of '-k' option of gcov command.
16061 2018-01-04  Martin Liska  <mliska@suse.cz>
16063         PR ipa/82352
16064         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16066 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16068         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16070 2018-01-03  Martin Sebor  <msebor@redhat.com>
16072         PR tree-optimization/83655
16073         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16074         checking calls with invalid arguments.
16076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16078         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16079         (vectorizable_mask_load_store): Delete.
16080         (vectorizable_call): Return false for masked loads and stores.
16081         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16082         instead of gimple_assign_rhs1.
16083         (vectorizable_load): Handle IFN_MASK_LOAD.
16084         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16088         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16089         split out from..,
16090         (vectorizable_mask_load_store): ...here.
16091         (vectorizable_load): ...and here.
16093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16095         * tree-vect-stmts.c (vect_build_all_ones_mask)
16096         (vect_build_zero_merge_argument): New functions, split out from...
16097         (vectorizable_load): ...here.
16099 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16101         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16102         split out from...
16103         (vectorizable_mask_load_store): ...here.
16104         (vectorizable_store): ...and here.
16106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16108         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16109         split out from...
16110         (vectorizable_mask_load_store): ...here.
16112 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16114         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16115         (vect_model_store_cost): Take a vec_load_store_type instead of a
16116         vect_def_type.
16117         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16118         (vect_model_store_cost): Take a vec_load_store_type instead of a
16119         vect_def_type.
16120         (vectorizable_mask_load_store): Update accordingly.
16121         (vectorizable_store): Likewise.
16122         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16126         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16127         IFN_MASK_LOAD calls here rather than...
16128         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16130 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16131             Alan Hayward  <alan.hayward@arm.com>
16132             David Sherwood  <david.sherwood@arm.com>
16134         * expmed.c (extract_bit_field_1): For vector extracts,
16135         fall back to extract_bit_field_as_subreg if vec_extract
16136         isn't available.
16138 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16139             Alan Hayward  <alan.hayward@arm.com>
16140             David Sherwood  <david.sherwood@arm.com>
16142         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16143         they are variable or constant sized.
16144         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16145         slots for constant-sized data.
16147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16148             Alan Hayward  <alan.hayward@arm.com>
16149             David Sherwood  <david.sherwood@arm.com>
16151         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16152         handling COND_EXPRs with boolean comparisons, try to find a better
16153         basis for the mask type than the boolean itself.
16155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16157         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16158         is calculated and how it can be overridden.
16159         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16160         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16161         if defined.
16162         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16163         if nonzero.
16165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16166             Alan Hayward  <alan.hayward@arm.com>
16167             David Sherwood  <david.sherwood@arm.com>
16169         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16170         Remove the mode argument.
16171         (aarch64_simd_valid_immediate): Remove the mode and inverse
16172         arguments.
16173         * config/aarch64/iterators.md (bitsize): New iterator.
16174         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16175         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16176         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16177         aarch64_simd_valid_immediate.
16178         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16179         (aarch64_reg_or_bic_imm): Likewise.
16180         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16181         with an insn_type enum and msl with a modifier_type enum.
16182         Replace element_width with a scalar_mode.  Change the shift
16183         to unsigned int.  Add constructors for scalar_float_mode and
16184         scalar_int_mode elements.
16185         (aarch64_vect_float_const_representable_p): Delete.
16186         (aarch64_can_const_movi_rtx_p)
16187         (aarch64_simd_scalar_immediate_valid_for_move)
16188         (aarch64_simd_make_constant): Update call to
16189         aarch64_simd_valid_immediate.
16190         (aarch64_advsimd_valid_immediate_hs): New function.
16191         (aarch64_advsimd_valid_immediate): Likewise.
16192         (aarch64_simd_valid_immediate): Remove mode and inverse
16193         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16194         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16195         and aarch64_float_const_representable_p on the result.
16196         (aarch64_output_simd_mov_immediate): Remove mode argument.
16197         Update call to aarch64_simd_valid_immediate and use of
16198         simd_immediate_info.
16199         (aarch64_output_scalar_simd_mov_immediate): Update call
16200         accordingly.
16202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16203             Alan Hayward  <alan.hayward@arm.com>
16204             David Sherwood  <david.sherwood@arm.com>
16206         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16207         (mode_nunits): Likewise CONST_MODE_NUNITS.
16208         * machmode.def (ADJUST_NUNITS): Document.
16209         * genmodes.c (mode_data::need_nunits_adj): New field.
16210         (blank_mode): Update accordingly.
16211         (adj_nunits): New variable.
16212         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16213         parameter.
16214         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16215         listed in adj_nunits.
16216         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16217         listed in adj_nunits.  Don't emit case statements for such modes.
16218         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16219         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16220         nothing if adj_nunits is nonnull.
16221         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16222         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16223         (emit_mode_fbit): Update use of print_maybe_const_decl.
16224         (emit_move_size): Likewise.  Treat the array as non-const
16225         if adj_nunits.
16226         (emit_mode_adjustments): Handle adj_nunits.
16228 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16230         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16231         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16232         (VECTOR_MODES): Use it.
16233         (make_vector_modes): Take the prefix as an argument.
16235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16236             Alan Hayward  <alan.hayward@arm.com>
16237             David Sherwood  <david.sherwood@arm.com>
16239         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16240         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16241         for MODE_VECTOR_BOOL.
16242         * machmode.def (VECTOR_BOOL_MODE): Document.
16243         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16244         (make_vector_bool_mode): New function.
16245         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16246         MODE_VECTOR_BOOL.
16247         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16248         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16249         Likewise.
16250         * stor-layout.c (int_mode_for_mode): Likewise.
16251         * tree.c (build_vector_type_for_mode): Likewise.
16252         * varasm.c (output_constant_pool_2): Likewise.
16253         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16254         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16255         for MODE_VECTOR_BOOL.
16256         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16257         of mode class checks.
16258         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16259         instead of a list of mode class checks.
16260         (expand_vector_scalar_condition): Likewise.
16261         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16263 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16264             Alan Hayward  <alan.hayward@arm.com>
16265             David Sherwood  <david.sherwood@arm.com>
16267         * machmode.h (mode_size): Change from unsigned short to
16268         poly_uint16_pod.
16269         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16270         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16271         or if measurement_type is not polynomial.
16272         (fixed_size_mode::includes_p): Check for constant-sized modes.
16273         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16274         return a poly_uint16 rather than an unsigned short.
16275         (emit_mode_size): Change the type of mode_size from unsigned short
16276         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16277         (emit_mode_adjustments): Cope with polynomial vector sizes.
16278         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16279         for GET_MODE_SIZE.
16280         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16281         for GET_MODE_SIZE.
16282         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16283         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16284         * caller-save.c (setup_save_areas): Likewise.
16285         (replace_reg_with_saved_mem): Likewise.
16286         * calls.c (emit_library_call_value_1): Likewise.
16287         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16288         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16289         (gen_lowpart_for_combine): Likewise.
16290         * convert.c (convert_to_integer_1): Likewise.
16291         * cse.c (equiv_constant, cse_insn): Likewise.
16292         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16293         (cselib_subst_to_values): Likewise.
16294         * dce.c (word_dce_process_block): Likewise.
16295         * df-problems.c (df_word_lr_mark_ref): Likewise.
16296         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16297         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16298         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16299         (rtl_for_decl_location): Likewise.
16300         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16301         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16302         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16303         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16304         (expand_expr_real_1): Likewise.
16305         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16306         (pad_below): Likewise.
16307         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16308         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16309         * ira.c (get_subreg_tracking_sizes): Likewise.
16310         * ira-build.c (ira_create_allocno_objects): Likewise.
16311         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16312         (ira_sort_regnos_for_alter_reg): Likewise.
16313         * ira-costs.c (record_operand_costs): Likewise.
16314         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16315         (resolve_simple_move): Likewise.
16316         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16317         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16318         (lra_constraints): Likewise.
16319         (CONST_POOL_OK_P): Reject variable-sized modes.
16320         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16321         (add_pseudo_to_slot, lra_spill): Likewise.
16322         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16323         * optabs-query.c (get_best_extraction_insn): Likewise.
16324         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16325         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16326         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16327         * recog.c (offsettable_address_addr_space_p): Likewise.
16328         * regcprop.c (maybe_mode_change): Likewise.
16329         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16330         * regrename.c (build_def_use): Likewise.
16331         * regstat.c (dump_reg_info): Likewise.
16332         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16333         (find_reloads, find_reloads_subreg_address): Likewise.
16334         * reload1.c (eliminate_regs_1): Likewise.
16335         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16336         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16337         (simplify_binary_operation_1, simplify_subreg): Likewise.
16338         * targhooks.c (default_function_arg_padding): Likewise.
16339         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16340         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16341         (verify_gimple_assign_ternary): Likewise.
16342         * tree-inline.c (estimate_move_cost): Likewise.
16343         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16344         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16345         (get_address_cost_ainc): Likewise.
16346         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16347         (vect_supportable_dr_alignment): Likewise.
16348         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16349         (vectorizable_reduction): Likewise.
16350         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16351         (vectorizable_operation, vectorizable_load): Likewise.
16352         * tree.c (build_same_sized_truth_vector_type): Likewise.
16353         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16354         * var-tracking.c (emit_note_insn_var_location): Likewise.
16355         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16356         (ADDR_VEC_ALIGN): Likewise.
16358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16359             Alan Hayward  <alan.hayward@arm.com>
16360             David Sherwood  <david.sherwood@arm.com>
16362         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16363         unsigned short.
16364         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16365         or if measurement_type is polynomial.
16366         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16367         * combine.c (make_extraction): Likewise.
16368         * dse.c (find_shift_sequence): Likewise.
16369         * dwarf2out.c (mem_loc_descriptor): Likewise.
16370         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16371         (extract_bit_field, extract_low_bits): Likewise.
16372         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16373         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16374         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16375         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16376         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16377         * reload.c (find_reloads): Likewise.
16378         * reload1.c (alter_reg): Likewise.
16379         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16380         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16381         * tree-if-conv.c (predicate_mem_writes): Likewise.
16382         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16383         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16384         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16385         * valtrack.c (dead_debug_insert_temp): Likewise.
16386         * varasm.c (mergeable_constant_section): Likewise.
16387         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16389 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16390             Alan Hayward  <alan.hayward@arm.com>
16391             David Sherwood  <david.sherwood@arm.com>
16393         * expr.c (expand_assignment): Cope with polynomial mode sizes
16394         when assigning to a CONCAT.
16396 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16397             Alan Hayward  <alan.hayward@arm.com>
16398             David Sherwood  <david.sherwood@arm.com>
16400         * machmode.h (mode_precision): Change from unsigned short to
16401         poly_uint16_pod.
16402         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16403         short.
16404         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16405         or if measurement_type is not polynomial.
16406         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16407         in which the mode is already known to be a scalar_int_mode.
16408         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16409         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16410         initializer.
16411         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16412         for GET_MODE_PRECISION.
16413         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16414         for GET_MODE_PRECISION.
16415         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16416         as polynomial.
16417         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16418         (expand_field_assignment, make_extraction): Likewise.
16419         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16420         (get_last_value): Likewise.
16421         * convert.c (convert_to_integer_1): Likewise.
16422         * cse.c (cse_insn): Likewise.
16423         * expr.c (expand_expr_real_1): Likewise.
16424         * lra-constraints.c (simplify_operand_subreg): Likewise.
16425         * optabs-query.c (can_atomic_load_p): Likewise.
16426         * optabs.c (expand_atomic_load): Likewise.
16427         (expand_atomic_store): Likewise.
16428         * ree.c (combine_reaching_defs): Likewise.
16429         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16430         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16431         * tree.h (type_has_mode_precision_p): Likewise.
16432         * ubsan.c (instrument_si_overflow): Likewise.
16434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16435             Alan Hayward  <alan.hayward@arm.com>
16436             David Sherwood  <david.sherwood@arm.com>
16438         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16439         polynomial numbers of units.
16440         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16441         (valid_vector_subparts_p): New function.
16442         (build_vector_type): Remove temporary shim and take the number
16443         of units as a poly_uint64 rather than an int.
16444         (build_opaque_vector_type): Take the number of units as a
16445         poly_uint64 rather than an int.
16446         * tree.c (build_vector_from_ctor): Handle polynomial
16447         TYPE_VECTOR_SUBPARTS.
16448         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16449         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16450         (build_vector_from_val): If the number of units is variable,
16451         use build_vec_duplicate_cst for constant operands and
16452         VEC_DUPLICATE_EXPR otherwise.
16453         (make_vector_type): Remove temporary is_constant ().
16454         (build_vector_type, build_opaque_vector_type): Take the number of
16455         units as a poly_uint64 rather than an int.
16456         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16457         VECTOR_CST_NELTS.
16458         * cfgexpand.c (expand_debug_expr): Likewise.
16459         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16460         (store_constructor, expand_expr_real_1): Likewise.
16461         (const_scalar_mask_from_tree): Likewise.
16462         * fold-const-call.c (fold_const_reduction): Likewise.
16463         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16464         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16465         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16466         (fold_relational_const): Likewise.
16467         (native_interpret_vector): Likewise.  Change the size from an
16468         int to an unsigned int.
16469         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16470         TYPE_VECTOR_SUBPARTS.
16471         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16472         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16473         duplicating a non-constant operand into a variable-length vector.
16474         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16475         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16476         * ipa-icf.c (sem_variable::equals): Likewise.
16477         * match.pd: Likewise.
16478         * omp-simd-clone.c (simd_clone_subparts): Likewise.
16479         * print-tree.c (print_node): Likewise.
16480         * stor-layout.c (layout_type): Likewise.
16481         * targhooks.c (default_builtin_vectorization_cost): Likewise.
16482         * tree-cfg.c (verify_gimple_comparison): Likewise.
16483         (verify_gimple_assign_binary): Likewise.
16484         (verify_gimple_assign_ternary): Likewise.
16485         (verify_gimple_assign_single): Likewise.
16486         * tree-pretty-print.c (dump_generic_node): Likewise.
16487         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16488         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16489         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16490         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16491         (vect_shift_permute_load_chain): Likewise.
16492         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16493         (expand_vector_condition, optimize_vector_constructor): Likewise.
16494         (lower_vec_perm, get_compute_type): Likewise.
16495         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16496         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16497         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16498         (vect_recog_mask_conversion_pattern): Likewise.
16499         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16500         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16501         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16502         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16503         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16504         (vectorizable_shift, vectorizable_operation, vectorizable_store)
16505         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16506         (supportable_widening_operation): Likewise.
16507         (supportable_narrowing_operation): Likewise.
16508         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16509         Likewise.
16510         * varasm.c (output_constant): Likewise.
16512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16513             Alan Hayward  <alan.hayward@arm.com>
16514             David Sherwood  <david.sherwood@arm.com>
16516         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
16517         so that both the length == 3 and length != 3 cases set up their
16518         own permute vectors.  Add comments explaining why we know the
16519         number of elements is constant.
16520         (vect_permute_load_chain): Likewise.
16522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16523             Alan Hayward  <alan.hayward@arm.com>
16524             David Sherwood  <david.sherwood@arm.com>
16526         * machmode.h (mode_nunits): Change from unsigned char to
16527         poly_uint16_pod.
16528         (ONLY_FIXED_SIZE_MODES): New macro.
16529         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16530         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16531         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16532         New typedefs.
16533         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16534         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16535         or if measurement_type is not polynomial.
16536         * genmodes.c (ZERO_COEFFS): New macro.
16537         (emit_mode_nunits_inline): Make mode_nunits_inline return a
16538         poly_uint16.
16539         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16540         Use ZERO_COEFFS when emitting initializers.
16541         * data-streamer.h (bp_pack_poly_value): New function.
16542         (bp_unpack_poly_value): Likewise.
16543         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16544         for GET_MODE_NUNITS.
16545         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16546         for GET_MODE_NUNITS.
16547         * tree.c (make_vector_type): Remove temporary shim and make
16548         the real function take the number of units as a poly_uint64
16549         rather than an int.
16550         (build_vector_type_for_mode): Handle polynomial nunits.
16551         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16552         * emit-rtl.c (const_vec_series_p_1): Likewise.
16553         (gen_rtx_CONST_VECTOR): Likewise.
16554         * fold-const.c (test_vec_duplicate_folding): Likewise.
16555         * genrecog.c (validate_pattern): Likewise.
16556         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16557         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16558         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16559         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16560         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16561         * rtlanal.c (subreg_get_info): Likewise.
16562         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16563         (vect_grouped_load_supported): Likewise.
16564         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16565         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16566         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16567         (simplify_const_unary_operation, simplify_binary_operation_1)
16568         (simplify_const_binary_operation, simplify_ternary_operation)
16569         (test_vector_ops_duplicate, test_vector_ops): Likewise.
16570         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16571         instead of CONST_VECTOR_NUNITS.
16572         * varasm.c (output_constant_pool_2): Likewise.
16573         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16574         explicit-encoded elements in the XVEC for variable-length vectors.
16576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16578         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16581             Alan Hayward  <alan.hayward@arm.com>
16582             David Sherwood  <david.sherwood@arm.com>
16584         * coretypes.h (fixed_size_mode): Declare.
16585         (fixed_size_mode_pod): New typedef.
16586         * builtins.h (target_builtins::x_apply_args_mode)
16587         (target_builtins::x_apply_result_mode): Change type to
16588         fixed_size_mode_pod.
16589         * builtins.c (apply_args_size, apply_result_size, result_vector)
16590         (expand_builtin_apply_args_1, expand_builtin_apply)
16591         (expand_builtin_return): Update accordingly.
16593 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16595         * cse.c (hash_rtx_cb): Hash only the encoded elements.
16596         * cselib.c (cselib_hash_rtx): Likewise.
16597         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16598         CONST_VECTOR encoding.
16600 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16601             Jeff Law  <law@redhat.com>
16603         PR target/83641
16604         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16605         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16606         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16607         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16609         PR target/83641
16610         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16611         explicitly probe *sp in a noreturn function if there were any callee
16612         register saves or frame pointer is needed.
16614 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16616         PR debug/83621
16617         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16618         BLKmode for ternary, binary or unary expressions.
16620         PR debug/83645
16621         * var-tracking.c (delete_vta_debug_insn): New inline function.
16622         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16623         insns from get_insns () to NULL instead of each bb separately.
16624         Use delete_vta_debug_insn.  No longer static.
16625         (vt_debug_insns_local, variable_tracking_main_1): Adjust
16626         delete_vta_debug_insns callers.
16627         * rtl.h (delete_vta_debug_insns): Declare.
16628         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16629         instead of variable_tracking_main.
16631 2018-01-03  Martin Sebor  <msebor@redhat.com>
16633         PR tree-optimization/83603
16634         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16635         arguments past the endof the argument list in functions declared
16636         without a prototype.
16637         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16638         Avoid checking when arguments are null.
16640 2018-01-03  Martin Sebor  <msebor@redhat.com>
16642         PR c/83559
16643         * doc/extend.texi (attribute const): Fix a typo.
16644         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16645         issuing -Wsuggest-attribute for void functions.
16647 2018-01-03  Martin Sebor  <msebor@redhat.com>
16649         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16650         offset_int::from instead of wide_int::to_shwi.
16651         (maybe_diag_overlap): Remove assertion.
16652         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16653         * gimple-ssa-sprintf.c (format_directive): Same.
16654         (parse_directive): Same.
16655         (sprintf_dom_walker::compute_format_length): Same.
16656         (try_substitute_return_value): Same.
16658 2018-01-03  Jeff Law  <law@redhat.com>
16660         PR middle-end/83654
16661         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16662         non-constant residual for zero at runtime and avoid probing in
16663         that case.  Reorganize code for trailing problem to mirror handling
16664         of the residual.
16666 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16668         PR tree-optimization/83501
16669         * tree-ssa-strlen.c (get_string_cst): New.
16670         (handle_char_store): Call get_string_cst.
16672 2018-01-03  Martin Liska  <mliska@suse.cz>
16674         PR tree-optimization/83593
16675         * tree-ssa-strlen.c: Include tree-cfg.h.
16676         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16677         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16678         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16679         to false.
16680         (strlen_dom_walker::before_dom_children): Call
16681         gimple_purge_dead_eh_edges. Dump tranformation with details
16682         dump flags.
16683         (strlen_dom_walker::before_dom_children): Update call by adding
16684         new argument cleanup_eh.
16685         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16687 2018-01-03  Martin Liska  <mliska@suse.cz>
16689         PR ipa/83549
16690         * cif-code.def (VARIADIC_THUNK): New enum value.
16691         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16692         thunks.
16694 2018-01-03  Jan Beulich  <jbeulich@suse.com>
16696         * sse.md (mov<mode>_internal): Tighten condition for when to use
16697         vmovdqu<ssescalarsize> for TI and OI modes.
16699 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16701         Update copyright years.
16703 2018-01-03  Martin Liska  <mliska@suse.cz>
16705         PR ipa/83594
16706         * ipa-visibility.c (function_and_variable_visibility): Skip
16707         functions with noipa attribure.
16709 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16711         * gcc.c (process_command): Update copyright notice dates.
16712         * gcov-dump.c (print_version): Ditto.
16713         * gcov.c (print_version): Ditto.
16714         * gcov-tool.c (print_version): Ditto.
16715         * gengtype.c (create_file): Ditto.
16716         * doc/cpp.texi: Bump @copying's copyright year.
16717         * doc/cppinternals.texi: Ditto.
16718         * doc/gcc.texi: Ditto.
16719         * doc/gccint.texi: Ditto.
16720         * doc/gcov.texi: Ditto.
16721         * doc/install.texi: Ditto.
16722         * doc/invoke.texi: Ditto.
16724 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16726         * vector-builder.h (vector_builder::m_full_nelts): Change from
16727         unsigned int to poly_uint64.
16728         (vector_builder::full_nelts): Update prototype accordingly.
16729         (vector_builder::new_vector): Likewise.
16730         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16731         (vector_builder::operator ==): Likewise.
16732         (vector_builder::finalize): Likewise.
16733         * int-vector-builder.h (int_vector_builder::int_vector_builder):
16734         Take the number of elements as a poly_uint64 rather than an
16735         unsigned int.
16736         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16737         from unsigned int to poly_uint64.
16738         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16739         (vec_perm_indices::new_vector): Likewise.
16740         (vec_perm_indices::length): Likewise.
16741         (vec_perm_indices::nelts_per_input): Likewise.
16742         (vec_perm_indices::input_nelts): Likewise.
16743         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16744         number of elements per input as a poly_uint64 rather than an
16745         unsigned int.  Use the original encoding for variable-length
16746         vectors, rather than clamping each individual element.
16747         For the second and subsequent elements in each pattern,
16748         clamp the step and base before clamping their sum.
16749         (vec_perm_indices::series_p): Handle polynomial element counts.
16750         (vec_perm_indices::all_in_range_p): Likewise.
16751         (vec_perm_indices_to_tree): Likewise.
16752         (vec_perm_indices_to_rtx): Likewise.
16753         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16754         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16755         (tree_vector_builder::new_binary_operation): Handle polynomial
16756         element counts.  Return false if we need to know the number
16757         of elements at compile time.
16758         * fold-const.c (fold_vec_perm): Punt if the number of elements
16759         isn't known at compile time.
16761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16763         * vec-perm-indices.h (vec_perm_builder): Change element type
16764         from HOST_WIDE_INT to poly_int64.
16765         (vec_perm_indices::element_type): Update accordingly.
16766         (vec_perm_indices::clamp): Handle polynomial element_types.
16767         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16768         (vec_perm_indices::all_in_range_p): Likewise.
16769         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16770         than shwi trees.
16771         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16772         polynomial vec_perm_indices element types.
16773         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16774         * fold-const.c (fold_vec_perm): Likewise.
16775         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16776         * tree-vect-generic.c (lower_vec_perm): Likewise.
16777         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16778         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16779         element type to HOST_WIDE_INT.
16781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16782             Alan Hayward  <alan.hayward@arm.com>
16783             David Sherwood  <david.sherwood@arm.com>
16785         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16786         rather than an int.  Use plus_constant.
16787         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16788         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16791             Alan Hayward  <alan.hayward@arm.com>
16792             David Sherwood  <david.sherwood@arm.com>
16794         * calls.c (emit_call_1, expand_call): Change struct_value_size from
16795         a HOST_WIDE_INT to a poly_int64.
16797 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16798             Alan Hayward  <alan.hayward@arm.com>
16799             David Sherwood  <david.sherwood@arm.com>
16801         * calls.c (load_register_parameters): Cope with polynomial
16802         mode sizes.  Require a constant size for BLKmode parameters
16803         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
16804         forces a parameter to be padded at the lsb end in order to
16805         fill a complete number of words, require the parameter size
16806         to be ordered wrt UNITS_PER_WORD.
16808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16809             Alan Hayward  <alan.hayward@arm.com>
16810             David Sherwood  <david.sherwood@arm.com>
16812         * reload1.c (spill_stack_slot_width): Change element type
16813         from unsigned int to poly_uint64_pod.
16814         (alter_reg): Treat mode sizes as polynomial.
16816 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16817             Alan Hayward  <alan.hayward@arm.com>
16818             David Sherwood  <david.sherwood@arm.com>
16820         * reload.c (complex_word_subreg_p): New function.
16821         (reload_inner_reg_of_subreg, push_reload): Use it.
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         * lra-constraints.c (process_alt_operands): Reject matched
16828         operands whose sizes aren't ordered.
16829         (match_reload): Refer to this check here.
16831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16832             Alan Hayward  <alan.hayward@arm.com>
16833             David Sherwood  <david.sherwood@arm.com>
16835         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16836         that the mode size is in the set {1, 2, 4, 8, 16}.
16838 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16839             Alan Hayward  <alan.hayward@arm.com>
16840             David Sherwood  <david.sherwood@arm.com>
16842         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16843         Use plus_constant instead of gen_rtx_PLUS.
16845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16846             Alan Hayward  <alan.hayward@arm.com>
16847             David Sherwood  <david.sherwood@arm.com>
16849         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16850         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16851         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16852         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16853         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16854         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16855         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16856         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16857         * config/i386/i386.c (ix86_push_rounding): ...this new function.
16858         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16859         a poly_int64.
16860         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16861         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16862         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16863         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16864         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16865         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16866         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16867         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16868         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16869         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16870         function.
16871         * expr.c (emit_move_resolve_push): Treat the input and result
16872         of PUSH_ROUNDING as a poly_int64.
16873         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16874         (emit_push_insn): Likewise.
16875         * lra-eliminations.c (mark_not_eliminable): Likewise.
16876         * recog.c (push_operand): Likewise.
16877         * reload1.c (elimination_effects): Likewise.
16878         * rtlanal.c (nonzero_bits1): Likewise.
16879         * calls.c (store_one_arg): Likewise.  Require the padding to be
16880         known at compile time.
16882 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16883             Alan Hayward  <alan.hayward@arm.com>
16884             David Sherwood  <david.sherwood@arm.com>
16886         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16887         Use plus_constant instead of gen_rtx_PLUS.
16889 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16890             Alan Hayward  <alan.hayward@arm.com>
16891             David Sherwood  <david.sherwood@arm.com>
16893         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16894         rather than an int.
16896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16897             Alan Hayward  <alan.hayward@arm.com>
16898             David Sherwood  <david.sherwood@arm.com>
16900         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16901         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16902         via stack temporaries.  Treat the mode size as polynomial too.
16904 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16905             Alan Hayward  <alan.hayward@arm.com>
16906             David Sherwood  <david.sherwood@arm.com>
16908         * expr.c (expand_expr_real_2): When handling conversions involving
16909         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
16910         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
16911         as a poly_uint64 too.
16913 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16914             Alan Hayward  <alan.hayward@arm.com>
16915             David Sherwood  <david.sherwood@arm.com>
16917         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
16919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16920             Alan Hayward  <alan.hayward@arm.com>
16921             David Sherwood  <david.sherwood@arm.com>
16923         * combine.c (can_change_dest_mode): Handle polynomial
16924         REGMODE_NATURAL_SIZE.
16925         * expmed.c (store_bit_field_1): Likewise.
16926         * expr.c (store_constructor): Likewise.
16927         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
16928         and polynomial REGMODE_NATURAL_SIZE.
16929         (gen_lowpart_common): Likewise.
16930         * reginfo.c (record_subregs_of_mode): Likewise.
16931         * rtlanal.c (read_modify_subreg_p): Likewise.
16933 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16934             Alan Hayward  <alan.hayward@arm.com>
16935             David Sherwood  <david.sherwood@arm.com>
16937         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
16938         numbers of elements.
16940 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16941             Alan Hayward  <alan.hayward@arm.com>
16942             David Sherwood  <david.sherwood@arm.com>
16944         * match.pd: Cope with polynomial numbers of vector elements.
16946 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16947             Alan Hayward  <alan.hayward@arm.com>
16948             David Sherwood  <david.sherwood@arm.com>
16950         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
16951         in a POINTER_PLUS_EXPR.
16953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16954             Alan Hayward  <alan.hayward@arm.com>
16955             David Sherwood  <david.sherwood@arm.com>
16957         * omp-simd-clone.c (simd_clone_subparts): New function.
16958         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
16959         (ipa_simd_modify_function_body): Likewise.
16961 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16962             Alan Hayward  <alan.hayward@arm.com>
16963             David Sherwood  <david.sherwood@arm.com>
16965         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
16966         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
16967         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
16968         (expand_vector_condition, vector_element): Likewise.
16969         (subparts_gt): New function.
16970         (get_compute_type): Use subparts_gt.
16971         (count_type_subparts): Delete.
16972         (expand_vector_operations_1): Use subparts_gt instead of
16973         count_type_subparts.
16975 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16976             Alan Hayward  <alan.hayward@arm.com>
16977             David Sherwood  <david.sherwood@arm.com>
16979         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
16980         (vect_compile_time_alias): ...this new function.  Do the calculation
16981         on poly_ints rather than trees.
16982         (vect_prune_runtime_alias_test_list): Update call accordingly.
16984 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16985             Alan Hayward  <alan.hayward@arm.com>
16986             David Sherwood  <david.sherwood@arm.com>
16988         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
16989         numbers of units.
16990         (vect_schedule_slp_instance): Likewise.
16992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16993             Alan Hayward  <alan.hayward@arm.com>
16994             David Sherwood  <david.sherwood@arm.com>
16996         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
16997         constant and extern definitions for variable-length vectors.
16998         (vect_get_constant_vectors): Note that the number of units
16999         is known to be constant.
17001 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17002             Alan Hayward  <alan.hayward@arm.com>
17003             David Sherwood  <david.sherwood@arm.com>
17005         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17006         of units as polynomial.  Choose between WIDE and NARROW based
17007         on multiple_p.
17009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17010             Alan Hayward  <alan.hayward@arm.com>
17011             David Sherwood  <david.sherwood@arm.com>
17013         * tree-vect-stmts.c (simd_clone_subparts): New function.
17014         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17017             Alan Hayward  <alan.hayward@arm.com>
17018             David Sherwood  <david.sherwood@arm.com>
17020         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17021         vectors as polynomial.  Use build_index_vector for
17022         IFN_GOMP_SIMD_LANE.
17024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17025             Alan Hayward  <alan.hayward@arm.com>
17026             David Sherwood  <david.sherwood@arm.com>
17028         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17029         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17030         for variable-length vectors.
17031         (vectorizable_mask_load_store): Treat the number of units as
17032         polynomial, asserting that it is constant if the condition has
17033         already been enforced.
17034         (vectorizable_store, vectorizable_load): Likewise.
17036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17037             Alan Hayward  <alan.hayward@arm.com>
17038             David Sherwood  <david.sherwood@arm.com>
17040         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17041         of units as polynomial.  Punt if we can't tell at compile time
17042         which vector contains the final result.
17044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17045             Alan Hayward  <alan.hayward@arm.com>
17046             David Sherwood  <david.sherwood@arm.com>
17048         * tree-vect-loop.c (vectorizable_induction): Treat the number
17049         of units as polynomial.  Punt on SLP inductions.  Use an integer
17050         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17051         cast of such a series for variable-length floating-point
17052         reductions.
17054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17055             Alan Hayward  <alan.hayward@arm.com>
17056             David Sherwood  <david.sherwood@arm.com>
17058         * tree.h (build_index_vector): Declare.
17059         * tree.c (build_index_vector): New function.
17060         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17061         of units as polynomial, forcibly converting it to a constant if
17062         vectorizable_reduction has already enforced the condition.
17063         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17064         to create a {1,2,3,...} vector.
17065         (vectorizable_reduction): Treat the number of units as polynomial.
17066         Choose vectype_in based on the largest scalar element size rather
17067         than the smallest number of units.  Enforce the restrictions
17068         relied on above.
17070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17071             Alan Hayward  <alan.hayward@arm.com>
17072             David Sherwood  <david.sherwood@arm.com>
17074         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17075         number of units as polynomial.
17077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17078             Alan Hayward  <alan.hayward@arm.com>
17079             David Sherwood  <david.sherwood@arm.com>
17081         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17082         * target.def (autovectorize_vector_sizes): Return the vector sizes
17083         by pointer, using vector_sizes rather than a bitmask.
17084         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17085         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17086         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17087         Likewise.
17088         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17089         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17090         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17091         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17092         * omp-general.c (omp_max_vf): Likewise.
17093         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17094         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17095         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17096         * tree-vect-slp.c (vect_slp_bb): Likewise.
17097         * doc/tm.texi: Regenerate.
17098         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17099         to a poly_uint64.
17100         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17101         the vector size as a poly_uint64 rather than an unsigned int.
17102         (current_vector_size): Change from an unsigned int to a poly_uint64.
17103         (get_vectype_for_scalar_type): Update accordingly.
17104         * tree.h (build_truth_vector_type): Take the size and number of
17105         units as a poly_uint64 rather than an unsigned int.
17106         (build_vector_type): Add a temporary overload that takes
17107         the number of units as a poly_uint64 rather than an unsigned int.
17108         * tree.c (make_vector_type): Likewise.
17109         (build_truth_vector_type): Take the number of units as a poly_uint64
17110         rather than an unsigned int.
17112 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17113             Alan Hayward  <alan.hayward@arm.com>
17114             David Sherwood  <david.sherwood@arm.com>
17116         * target.def (get_mask_mode): Take the number of units and length
17117         as poly_uint64s rather than unsigned ints.
17118         * targhooks.h (default_get_mask_mode): Update accordingly.
17119         * targhooks.c (default_get_mask_mode): Likewise.
17120         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17121         * doc/tm.texi: Regenerate.
17123 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17124             Alan Hayward  <alan.hayward@arm.com>
17125             David Sherwood  <david.sherwood@arm.com>
17127         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17128         * omp-general.c (omp_max_vf): Likewise.
17129         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17130         (expand_omp_simd): Handle polynomial safelen.
17131         * omp-low.c (omplow_simd_context): Add a default constructor.
17132         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17133         (lower_rec_simd_input_clauses): Update accordingly.
17134         (lower_rec_input_clauses): Likewise.
17136 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17137             Alan Hayward  <alan.hayward@arm.com>
17138             David Sherwood  <david.sherwood@arm.com>
17140         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17141         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17142         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17143         (vect_analyze_slp_cost): Likewise.
17144         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17145         (vect_model_load_cost): Likewise.
17147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17148             Alan Hayward  <alan.hayward@arm.com>
17149             David Sherwood  <david.sherwood@arm.com>
17151         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17152         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17153         from an unsigned int * to a poly_uint64_pod *.
17154         (calculate_unrolling_factor): New function.
17155         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17158             Alan Hayward  <alan.hayward@arm.com>
17159             David Sherwood  <david.sherwood@arm.com>
17161         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17162         from an unsigned int to a poly_uint64.
17163         (_loop_vec_info::slp_unrolling_factor): Likewise.
17164         (_loop_vec_info::vectorization_factor): Change from an int
17165         to a poly_uint64.
17166         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17167         (vect_get_num_vectors): New function.
17168         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17169         (vect_get_num_copies): Use vect_get_num_vectors.
17170         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17171         to an unsigned int *.
17172         (vect_analyze_data_refs): Change min_vf from an int * to a
17173         poly_uint64 *.
17174         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17175         than an unsigned HOST_WIDE_INT.
17176         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17177         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17178         to an unsigned int *.
17179         (vect_analyze_data_ref_dependences): Likewise.
17180         (vect_compute_data_ref_alignment): Handle polynomial vf.
17181         (vect_enhance_data_refs_alignment): Likewise.
17182         (vect_prune_runtime_alias_test_list): Likewise.
17183         (vect_shift_permute_load_chain): Likewise.
17184         (vect_supportable_dr_alignment): Likewise.
17185         (dependence_distance_ge_vf): Take the vectorization factor as a
17186         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17187         (vect_analyze_data_refs): Change min_vf from an int * to a
17188         poly_uint64 *.
17189         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17190         vfm1 as a poly_uint64 rather than an int.  Make the same change
17191         for the returned bound_scalar.
17192         (vect_gen_vector_loop_niters): Handle polynomial vf.
17193         (vect_do_peeling): Likewise.  Update call to
17194         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17195         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17196         be constant.
17197         * tree-vect-loop.c (vect_determine_vectorization_factor)
17198         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17199         (vect_get_known_peeling_cost): Likewise.
17200         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17201         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17202         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17203         updating the upper bounds of the loop.
17204         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17205         rather than an int.
17206         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17207         polynomial unroll factors.
17208         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17209         (vect_make_slp_decision): Likewise.
17210         (vect_supported_load_permutation_p): Likewise, and polynomial
17211         vf too.
17212         (vect_analyze_slp_cost): Handle polynomial vf.
17213         (vect_slp_analyze_node_operations): Likewise.
17214         (vect_slp_analyze_bb_1): Likewise.
17215         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17216         than an unsigned HOST_WIDE_INT.
17217         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17218         (vectorizable_load): Handle polynomial vf.
17219         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17220         a poly_uint64.
17221         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17224             Alan Hayward  <alan.hayward@arm.com>
17225             David Sherwood  <david.sherwood@arm.com>
17227         * match.pd: Handle bit operations involving three constants
17228         and try to fold one pair.
17230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17232         * tree-vect-loop-manip.c: Include gimple-fold.h.
17233         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17234         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17235         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17236         Add a path that uses a step of VF instead of 1, but disable it
17237         for now.
17238         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17239         and niters_no_overflow parameters.  Update calls to
17240         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17241         Create a new SSA name if the latter choses to use a ste other
17242         than zero, and return it via niters_vector_mult_vf_var.
17243         * tree-vect-loop.c (vect_transform_loop): Update calls to
17244         vect_do_peeling, vect_gen_vector_loop_niters and
17245         slpeel_make_loop_iterate_ntimes.
17246         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17247         (vect_gen_vector_loop_niters): Update declarations after above changes.
17249 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17251         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17252         128-bit round to integer instructions.
17253         (ceil<mode>2): Likewise.
17254         (btrunc<mode>2): Likewise.
17255         (round<mode>2): Likewise.
17257 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17259         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17260         unaligned VSX load/store on P8/P9.
17261         (expand_block_clear): Allow the use of unaligned VSX
17262         load/store on P8/P9.
17264 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17266         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17267         New function.
17268         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17269         swap associated with both a load and a store.
17271 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17273         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17274         * config/riscv/riscv.md (clear_cache): Use it.
17276 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17278         * web.c: Remove out-of-date comment.
17280 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17282         * expr.c (fixup_args_size_notes): Check that any existing
17283         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17284         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17285         (emit_single_push_insn): ...here.
17287 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17289         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17290         (const_vector_encoded_nelts): New function.
17291         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17292         (const_vector_int_elt, const_vector_elt): Declare.
17293         * emit-rtl.c (const_vector_int_elt_1): New function.
17294         (const_vector_elt): Likewise.
17295         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17296         of CONST_VECTOR_ELT.
17298 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17300         * expr.c: Include rtx-vector-builder.h.
17301         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17302         directly on the tree encoding.
17303         (const_vector_from_tree): Likewise.
17304         * optabs.c: Include rtx-vector-builder.h.
17305         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17306         sequence of "u" values.
17307         * vec-perm-indices.c: Include rtx-vector-builder.h.
17308         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17309         directly on the vec_perm_indices encoding.
17311 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17313         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17314         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17315         * rtx-vector-builder.h: New file.
17316         * rtx-vector-builder.c: Likewise.
17317         * rtl.h (rtx_def::u2): Add a const_vector field.
17318         (CONST_VECTOR_NPATTERNS): New macro.
17319         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17320         (CONST_VECTOR_DUPLICATE_P): Likewise.
17321         (CONST_VECTOR_STEPPED_P): Likewise.
17322         (CONST_VECTOR_ENCODED_ELT): Likewise.
17323         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17324         (unwrap_const_vec_duplicate): Likewise.
17325         (const_vec_series_p): Check for a non-duplicated vector encoding.
17326         Say that the function only returns true for integer vectors.
17327         * emit-rtl.c: Include rtx-vector-builder.h.
17328         (gen_const_vec_duplicate_1): Delete.
17329         (gen_const_vector): Call gen_const_vec_duplicate instead of
17330         gen_const_vec_duplicate_1.
17331         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17332         (gen_const_vec_duplicate): Use rtx_vector_builder.
17333         (gen_const_vec_series): Likewise.
17334         (gen_rtx_CONST_VECTOR): Likewise.
17335         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17336         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17337         Build a new vector rather than modifying a CONST_VECTOR in-place.
17338         (handle_special_swappables): Update call accordingly.
17339         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17340         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17341         Build a new vector rather than modifying a CONST_VECTOR in-place.
17342         (handle_special_swappables): Update call accordingly.
17344 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17346         * simplify-rtx.c (simplify_const_binary_operation): Use
17347         CONST_VECTOR_ELT instead of XVECEXP.
17349 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17351         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17352         the selector elements to be different from the data elements
17353         if the selector is a VECTOR_CST.
17354         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17355         ssizetype for the selector.
17357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17359         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17360         before testing each element individually.
17361         * tree-vect-generic.c (lower_vec_perm): Likewise.
17363 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17365         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17366         * selftest-run-tests.c (selftest::run_tests): Call it.
17367         * vector-builder.h (vector_builder::operator ==): New function.
17368         (vector_builder::operator !=): Likewise.
17369         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17370         (vec_perm_indices::all_from_input_p): New function.
17371         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17372         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17373         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17374         instead of reading the VECTOR_CST directly.  Detect whether both
17375         vector inputs are the same before constructing the vec_perm_indices,
17376         and update the number of inputs argument accordingly.  Use the
17377         utility functions added above.  Only construct sel2 if we need to.
17379 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17381         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17382         the broadcast of the low byte.
17383         (expand_mult_highpart): Use an explicit encoding for the permutes.
17384         * optabs-query.c (can_mult_highpart_p): Likewise.
17385         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17386         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17387         (vectorizable_bswap): Likewise.
17388         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17389         explicit encoding for the power-of-2 permutes.
17390         (vect_permute_store_chain): Likewise.
17391         (vect_grouped_load_supported): Likewise.
17392         (vect_permute_load_chain): Likewise.
17394 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17396         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17397         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17398         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17399         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17400         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17401         (vect_gen_perm_mask_any): Likewise.
17403 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17405         * int-vector-builder.h: New file.
17406         * vec-perm-indices.h: Include int-vector-builder.h.
17407         (vec_perm_indices): Redefine as an int_vector_builder.
17408         (auto_vec_perm_indices): Delete.
17409         (vec_perm_builder): Redefine as a stand-alone class.
17410         (vec_perm_indices::vec_perm_indices): New function.
17411         (vec_perm_indices::clamp): Likewise.
17412         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17413         (vec_perm_indices::new_vector): New function.
17414         (vec_perm_indices::new_expanded_vector): Update for new
17415         vec_perm_indices class.
17416         (vec_perm_indices::rotate_inputs): New function.
17417         (vec_perm_indices::all_in_range_p): Operate directly on the
17418         encoded form, without computing elided elements.
17419         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17420         encoding.  Update for new vec_perm_indices class.
17421         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17422         the given vec_perm_builder.
17423         (expand_vec_perm_var): Update vec_perm_builder constructor.
17424         (expand_mult_highpart): Use vec_perm_builder instead of
17425         auto_vec_perm_indices.
17426         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17427         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17428         or double series encoding as appropriate.
17429         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17430         vec_perm_indices instead of auto_vec_perm_indices.
17431         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17432         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17433         (vect_permute_store_chain): Likewise.
17434         (vect_grouped_load_supported): Likewise.
17435         (vect_permute_load_chain): Likewise.
17436         (vect_shift_permute_load_chain): Likewise.
17437         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17438         (vect_transform_slp_perm_load): Likewise.
17439         (vect_schedule_slp_instance): Likewise.
17440         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17441         (vectorizable_mask_load_store): Likewise.
17442         (vectorizable_bswap): Likewise.
17443         (vectorizable_store): Likewise.
17444         (vectorizable_load): Likewise.
17445         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17446         vec_perm_indices instead of auto_vec_perm_indices.  Use
17447         tree_to_vec_perm_builder to read the vector from a tree.
17448         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17449         vec_perm_builder instead of a vec_perm_indices.
17450         (have_whole_vector_shift): Use vec_perm_builder and
17451         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17452         truncation to calc_vec_perm_mask_for_shift.
17453         (vect_create_epilog_for_reduction): Likewise.
17454         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17455         from auto_vec_perm_indices to vec_perm_indices.
17456         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17457         instead of changing individual elements.
17458         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17459         the vector in d.perm.
17460         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17461         from auto_vec_perm_indices to vec_perm_indices.
17462         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17463         instead of changing individual elements.
17464         (arm_vectorize_vec_perm_const): Use new_vector to install
17465         the vector in d.perm.
17466         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17467         Update vec_perm_builder constructor.
17468         (rs6000_expand_interleave): Likewise.
17469         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17470         (rs6000_expand_interleave): Likewise.
17472 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17474         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17475         to qimode could truncate the indices.
17476         * optabs.c (expand_vec_perm_var): Likewise.
17478 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17480         * Makefile.in (OBJS): Add vec-perm-indices.o.
17481         * vec-perm-indices.h: New file.
17482         * vec-perm-indices.c: Likewise.
17483         * target.h (vec_perm_indices): Replace with a forward class
17484         declaration.
17485         (auto_vec_perm_indices): Move to vec-perm-indices.h.
17486         * optabs.h: Include vec-perm-indices.h.
17487         (expand_vec_perm): Delete.
17488         (selector_fits_mode_p, expand_vec_perm_var): Declare.
17489         (expand_vec_perm_const): Declare.
17490         * target.def (vec_perm_const_ok): Replace with...
17491         (vec_perm_const): ...this new hook.
17492         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17493         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17494         * doc/tm.texi: Regenerate.
17495         * optabs.def (vec_perm_const): Delete.
17496         * doc/md.texi (vec_perm_const): Likewise.
17497         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17498         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17499         expand_vec_perm for constant permutation vectors.  Assert that
17500         the mode of variable permutation vectors is the integer equivalent
17501         of the mode that is being permuted.
17502         * optabs-query.h (selector_fits_mode_p): Declare.
17503         * optabs-query.c: Include vec-perm-indices.h.
17504         (selector_fits_mode_p): New function.
17505         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17506         is defined, instead of checking whether the vec_perm_const_optab
17507         exists.  Use targetm.vectorize.vec_perm_const instead of
17508         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
17509         fit in the vector mode before using a variable permute.
17510         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17511         vec_perm_indices instead of an rtx.
17512         (expand_vec_perm): Replace with...
17513         (expand_vec_perm_const): ...this new function.  Take the selector
17514         as a vec_perm_indices rather than an rtx.  Also take the mode of
17515         the selector.  Update call to shift_amt_for_vec_perm_mask.
17516         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
17517         Use vec_perm_indices::new_expanded_vector to expand the original
17518         selector into bytes.  Check whether the indices fit in the vector
17519         mode before using a variable permute.
17520         (expand_vec_perm_var): Make global.
17521         (expand_mult_highpart): Use expand_vec_perm_const.
17522         * fold-const.c: Includes vec-perm-indices.h.
17523         * tree-ssa-forwprop.c: Likewise.
17524         * tree-vect-data-refs.c: Likewise.
17525         * tree-vect-generic.c: Likewise.
17526         * tree-vect-loop.c: Likewise.
17527         * tree-vect-slp.c: Likewise.
17528         * tree-vect-stmts.c: Likewise.
17529         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17530         Delete.
17531         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17532         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17533         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17534         (aarch64_vectorize_vec_perm_const): ...this new function.
17535         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17536         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17537         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17538         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17539         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17540         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17541         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17542         into...
17543         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
17544         check for NEON modes.
17545         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17546         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17547         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17548         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17549         into...
17550         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
17551         the old VEC_PERM_CONST conditions.
17552         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17553         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17554         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17555         (ia64_vectorize_vec_perm_const_ok): Merge into...
17556         (ia64_vectorize_vec_perm_const): ...this new function.
17557         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17558         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17559         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17560         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17561         * config/mips/mips.c (mips_expand_vec_perm_const)
17562         (mips_vectorize_vec_perm_const_ok): Merge into...
17563         (mips_vectorize_vec_perm_const): ...this new function.
17564         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17565         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17566         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17567         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17568         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17569         (rs6000_expand_vec_perm_const): Delete.
17570         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17571         Delete.
17572         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17573         (altivec_expand_vec_perm_const_le): Take each operand individually.
17574         Operate on constant selectors rather than rtxes.
17575         (altivec_expand_vec_perm_const): Likewise.  Update call to
17576         altivec_expand_vec_perm_const_le.
17577         (rs6000_expand_vec_perm_const): Delete.
17578         (rs6000_vectorize_vec_perm_const_ok): Delete.
17579         (rs6000_vectorize_vec_perm_const): New function.
17580         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17581         an element count and rtx array.
17582         (rs6000_expand_extract_even): Update call accordingly.
17583         (rs6000_expand_interleave): Likewise.
17584         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17585         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17586         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17587         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17588         (rs6000_expand_vec_perm_const): Delete.
17589         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17590         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17591         (altivec_expand_vec_perm_const_le): Take each operand individually.
17592         Operate on constant selectors rather than rtxes.
17593         (altivec_expand_vec_perm_const): Likewise.  Update call to
17594         altivec_expand_vec_perm_const_le.
17595         (rs6000_expand_vec_perm_const): Delete.
17596         (rs6000_vectorize_vec_perm_const_ok): Delete.
17597         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
17598         reference to the SPE evmerge intructions.
17599         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17600         an element count and rtx array.
17601         (rs6000_expand_extract_even): Update call accordingly.
17602         (rs6000_expand_interleave): Likewise.
17603         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17604         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17605         new function.
17606         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17608 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17610         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17611         vector mode and that that mode matches the mode of the data
17612         being permuted.
17613         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17614         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
17615         directly using expand_vec_perm_1 when forcing selectors into
17616         registers.
17617         (expand_vec_perm_var): New function, split out from expand_vec_perm.
17619 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17621         * optabs-query.h (can_vec_perm_p): Delete.
17622         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17623         * optabs-query.c (can_vec_perm_p): Split into...
17624         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17625         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17626         particular selector is valid.
17627         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17628         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17629         (vect_grouped_load_supported): Likewise.
17630         (vect_shift_permute_load_chain): Likewise.
17631         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17632         (vect_transform_slp_perm_load): Likewise.
17633         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17634         (vectorizable_bswap): Likewise.
17635         (vect_gen_perm_mask_checked): Likewise.
17636         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
17637         implementations of variable permutation vectors into account
17638         when deciding which selector to use.
17639         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17640         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17641         with a false third argument.
17642         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17643         to test whether the constant selector is valid and can_vec_perm_var_p
17644         to test whether a variable selector is valid.
17646 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17648         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17649         * optabs-query.c (can_vec_perm_p): Likewise.
17650         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17651         instead of vec_perm_indices.
17652         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17653         (vect_gen_perm_mask_checked): Likewise,
17654         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17655         (vect_gen_perm_mask_checked): Likewise,
17657 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17659         * optabs-query.h (qimode_for_vec_perm): Declare.
17660         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17661         (qimode_for_vec_perm): ...this new function.
17662         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17664 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17666         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17667         does not have a conditional at the top.
17669 2018-01-02  Richard Biener  <rguenther@suse.de>
17671         * ipa-inline.c (big_speedup_p): Fix expression.
17673 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17675         PR target/81616
17676         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17677         for generic 4->6.
17679 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17681         PR target/81616
17682         Generic tuning.
17683         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17684         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17685         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17686         cond_taken_branch_cost 3->4.
17688 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
17690         PR tree-optimization/83581
17691         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17692         TODO_cleanup_cfg if any changes have been made.
17694         PR middle-end/83608
17695         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17696         convert_modes if target mode has the right side, but different mode
17697         class.
17699         PR middle-end/83609
17700         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17701         last argument when extracting from CONCAT.  If either from_real or
17702         from_imag is NULL, use expansion through memory.  If result is not
17703         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17704         the parts directly to inner mode, if even that fails, use expansion
17705         through memory.
17707         PR middle-end/83623
17708         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17709         check for bswap in mode rather than HImode and use that in expand_unop
17710         too.
17712 Copyright (C) 2018 Free Software Foundation, Inc.
17714 Copying and distribution of this file, with or without modification,
17715 are permitted in any medium without royalty provided the copyright
17716 notice and this notice are preserved.