* lto-section-out.c (lto_begin_section): Do not print section
[official-gcc.git] / gcc / ChangeLog
blob1c44a196cfe60358c1180c1f1d577b4c7d3ee761
1 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
3         * lto-section-out.c (lto_begin_section): Do not print section
4         name for noaddr and unnumbered dumps.
6 2018-06-25  Richard Biener  <rguenther@suse.de>
8         * tree-vectorizer.h (struct vec_info_shared): New structure
9         with parts split out from struct vec_info and loop_nest from
10         struct _loop_vec_info.
11         (struct vec_info): Adjust accordingly.
12         (struct _loop_vec_info): Likewise.
13         (LOOP_VINFO_LOOP_NEST): Adjust.
14         (LOOP_VINFO_DATAREFS): Likewise.
15         (LOOP_VINFO_DDRS): Likewise.
16         (struct _bb_vec_info): Likewise.
17         (BB_VINFO_DATAREFS): Likewise.
18         (BB_VINFO_DDRS): Likewise.
19         (struct _stmt_vec_info): Add dr_aux member.
20         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
21         (DR_MISALIGNMENT_UNINITIALIZED): New.
22         (set_dr_misalignment): Adjust.
23         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
24         (vect_analyze_loop): Adjust prototype.
25         (vect_analyze_loop_form): Likewise.
26         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
27         Compute dependences lazily.
28         (vect_record_base_alignments): Use shared datarefs/ddrs.
29         (vect_verify_datarefs_alignment): Likewise.
30         (vect_analyze_data_refs_alignment): Likewise.
31         (vect_analyze_data_ref_accesses): Likewise.
32         (vect_analyze_data_refs): Likewise.
33         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
34         constructor parameter for shared part.
35         (vect_analyze_loop_form): Pass in shared part and adjust.
36         (vect_analyze_loop_2): Pass in storage for the number of
37         stmts.  Move loop nest finding to the caller.  Compute
38         datarefs lazily.
39         (vect_analyze_loop): Pass in shared part.
40         (vect_transform_loop): Verify shared datarefs are unchanged.
41         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
42         constructor parameter for shared part.
43         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
44         (vect_slp_bb): Verify shared datarefs are unchanged before
45         transform.
46         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
47         change.
48         (new_stmt_vec_info): Initialize DR_AUX misalignment to
49         DR_MISALIGNMENT_UNINITIALIZED.
50         * tree-vectorizer.c (vec_info::vec_info): Add constructor
51         parameter for shared part.
52         (vec_info::~vec_info): Adjust.
53         (vec_info_shared::vec_info_shared): New.
54         (vec_info_shared::~vec_info_shared): Likewise.
55         (vec_info_shared::save_datarefs): Likewise.
56         (vec_info_shared::check_datarefs): Likewise.
57         (try_vectorize_loop_1): Construct shared part live for analyses
58         of a single loop for multiple vector sizes.
59         * tree-parloops.c (gather_scalar_reductions): Adjust.
61 2018-06-25  Richard Biener  <rguenther@suse.de>
63         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
64         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
65         (vect_analyze_data_refs): Remove similar code from here and
66         simplify accordingly.
68 2018-06-25  Richard Biener  <rguenther@suse.de>
70         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
71         for reverse storage order accesses rather than asserting
72         they cannot happen here.
74 2018-06-25  Tom de Vries  <tdevries@suse.de>
76         PR debug/86257
77         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
78         Use data16 instead of .byte for insn prefix.
80 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
82         PR C++/86082
83         * parser.c (make_char_string_pack): Pass this literal chars
84         through cpp_interpret_string.
85         (cp_parser_userdef_numeric_literal): Check the result of
86         make_char_string_pack.
88 2018-06-24  Maya Rashish  <coypu@sdf.org>
90         * ginclude/stddef.h: Simplify conditions around avoiding
91         re-definition of __size_t.
93 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
95         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
96         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
98 2018-06-22  Maya Rashish  <coypu@sdf.org>
100         * doc/invoke.texi (mno-fancy-math-387): Update for changes
101         made to OpenBSD and NetBSD through the years.
103 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
105         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
106         behavior of vec_pack (vector double, vector double) to match
107         behavior of vec_float2 (vector double, vector double).
109 2018-06-22  Olivier Hainque  <hainque@adacore.com>
111         * gimplify.c (gimplify_function_tree): Prevent creation
112         of a trampoline for the address of the current function
113         passed to entry/exit instrumentation hooks.
115 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
117         PR target/86222
118         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
119         correctly.
121 2018-06-22  Martin Liska  <mliska@suse.cz>
123         PR tree-optimization/86263
124         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
125         Bail out if is_enabled is false.
126         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
127         New declaration.
128         (jump_table_cluster::is_enabled): New function.
130 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
132         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
133         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
134         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
135         (lto_input_ts_binfo_tree_pointers): Likewise.
136         * tree-streamer-out.c (streamer_write_tree_bitfields,
137         write_ts_binfo_tree_pointers): Likewise.
138         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
140 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
142         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
144 2018-06-22  Martin Liska  <mliska@suse.cz>
146         * symbol-summary.h (get): Make it pure and inline move
147         functionality from ::get function.
148         (get): Remove and inline into ::get and ::get_create.
149         (get_create): Move code from ::get function.
151 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
153         PR target/85994
154         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
155         -x assembler-with-cpp.
157 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
159         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
160         _FILE_OFFSET_BITS=64 for C++.
162 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
164         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
165         conversion insn that shows up when pr85657-3.c is compiled using
166         IEEE 128-bit long double.
167         (neg<mode>2_internal): Use the correct mode to check whether the
168         mode is IBM extended.
169         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
170         multiply and divide external functions from being created more
171         than once.
173 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
175         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
176         functions.
177         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
178         the edge can be forwarded.
179         (cfg_layout_merge_blocks): Likewise.
181 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
183         * except.c (finish_eh_generation): Commit edge insertions only after
184         the EH edges have been redirected from post-landing to landing pads.
186 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
188         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
189         create_tmp_var_for to create the FRAME decl.
190         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
192 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
194         * tree-inline.c (copy_edges_for_bb): Minor tweak.
195         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
196         debug statement when resetting its value.
197         (expand_call_inline): Copy the locus of the call onto the assignment
198         of the return value, if any.  Use local variable in more cases.
200 2018-06-21  Martin Liska  <mliska@suse.cz>
202         * ipa-pure-const.c (propagate_nothrow): Use
203         funct_state_summaries->get.
204         (dump_malloc_lattice): Likewise.
205         (propagate_malloc): Likewise.
207 2018-06-21  Richard Biener  <rguenther@suse.de>
209         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
210         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
211         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
212         comment.
213         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
214         BLOCK_ABSTRACT_ORIGIN unconditionally.
216 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
218         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
219         deleting it.
220         * ipa-reference.c (ipa_reference_c_finalize): Delete
221         ipa_ref_opt_sum_summaries and set it to NULL.
223 2018-06-21  Tom de Vries  <tdevries@suse.de>
225         PR tree-optimization/85859
226         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
227         test with comment from bb_no_side_effects_p.
229 2018-06-21  Richard Biener  <rguenther@suse.de>
231         PR tree-optimization/86232
232         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
233         max for constant niter.
235 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
237         * config/aarch64/aarch64-simd.md
238         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
240 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
242         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
243         Make opernads of the unspec commutative.
245 2018-06-21  Richard Biener  <rguenther@suse.de>
247         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
248         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
249         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
250         (vect_analyze_data_ref_dependence): Re-order checks to deal with
251         NULL DR_STEP.
252         (vect_record_base_alignments): Do not record base alignment
253         for gathers or scatters.
254         (vect_compute_data_ref_alignment): Drop return value that is always
255         true.  Bail out early for gathers or scatters.
256         (vect_enhance_data_refs_alignment): Bail out early for gathers
257         or scatters.
258         (vect_find_same_alignment_drs): Likewise.
259         (vect_analyze_data_refs_alignment): Remove dead code.
260         (vect_slp_analyze_and_verify_node_alignment): Likewise.
261         (vect_analyze_data_refs): For possible gathers or scatters do
262         not create an alternate DR, just check their possible validity
263         and mark them.  Adjust DECL_NONALIASED handling to not rely
264         on DR_BASE_ADDRESS.
265         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
266         update inits of gathers or scatters.
267         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
268         Also copy gather/scatter flag to pattern vinfo.
270 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
272         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
273         behavior of vec_packsu (vector unsigned long long, vector unsigned
274         long long) to match behavior of vec_packs with same signature.
276 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
277             Thomas Schwinge <thomas@codesourcery.com>
278             Cesar Philippidis  <cesar@codesourcery.com>
280         * gimplify.c (gimplify_scan_omp_clauses): Add support for
281         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
282         (gimplify_adjust_omp_clauses): Likewise.
283         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
284         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
285         (gimplify_omp_target_update): Update handling of acc update and
286         enter/exit data.
287         * omp-low.c (install_var_field): Remove unused parameter
288         base_pointers_restrict.
289         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
290         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
291         FINALIZE}
292         (omp_target_base_pointers_restrict_p): Delete.
293         (scan_omp_target): Update call to scan_sharing_clauses.
294         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
295         FINALIZE}.
296         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
297         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
298         (convert_local_omp_clauses): Likewise.
299         * tree-pretty-print.c (dump_omp_clause): Likewise.
300         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
301         FINALIZE}.
302         (omp_clause_code_name): Likewise.
304 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
306         PR debug/86194
307         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
308         be narrowed.
310         PR tree-optimization/86231
311         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
312         anti-range don't overwrite *vr0min before using it to compute *vr0max.
314 2018-06-20  Tom de Vries  <tdevries@suse.de>
316         PR tree-optimization/86097
317         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
318         iv type if signedness of iv type is not the same as that of *nit.
320 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
322         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
323         EDGE_EH edges, verify they are all EDGE_EH.
325 2018-06-20  Maya Rashish  <coypu@sdf.org>
327         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
329 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
331         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
332         * config/aarch64/aarch64.c (xgene1_tunings): Add
333         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
334         (aarch64_mode_valid_for_sched_fusion_p):
335         Allow 16-byte modes.
336         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
337         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
338         128-bit modes.
339         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
340         New pattern.
341         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
342         * config/aarch64/iterators.md (VQ2): New mode iterator.
344 2018-06-20  Martin Liska  <mliska@suse.cz>
346         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
347         Change default ratio from 10 to 8.
349 2018-06-20  Martin Liska  <mliska@suse.cz>
351         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
352         New.
353         (bit_test_cluster::find_bit_tests): Likewise.
354         (switch_decision_tree::analyze_switch_statement): Find clusters.
355         * tree-switch-conversion.h (struct jump_table_cluster): Document
356         hierarchy.
358 2018-06-20  Martin Liska  <mliska@suse.cz>
360         * tree-switch-conversion.c (switch_conversion::collect):
361         Record m_uniq property.
362         (switch_conversion::expand): Bail out for special conditions.
363         (group_cluster::~group_cluster): New.
364         (group_cluster::group_cluster): Likewise.
365         (group_cluster::dump): Likewise.
366         (jump_table_cluster::emit): New.
367         (switch_decision_tree::fix_phi_operands_for_edges): New.
368         (struct case_node): Remove struct.
369         (jump_table_cluster::can_be_handled): New.
370         (case_values_threshold): Moved to header.
371         (reset_out_edges_aux): Likewise.
372         (jump_table_cluster::is_beneficial): New.
373         (bit_test_cluster::can_be_handled): Likewise.
374         (add_case_node): Remove.
375         (bit_test_cluster::is_beneficial): New.
376         (case_bit_test::cmp): New.
377         (bit_test_cluster::emit): New.
378         (expand_switch_as_decision_tree_p): Remove.
379         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
380         (fix_phi_operands_for_edge): Likewise.
381         (switch_decision_tree::analyze_switch_statement): New.
382         (compute_cases_per_edge): Move ...
383         (switch_decision_tree::compute_cases_per_edge): ... here.
384         (try_switch_expansion): Likewise.
385         (switch_decision_tree::try_switch_expansion): Likewise.
386         (record_phi_operand_mapping): Likewise.
387         (switch_decision_tree::record_phi_operand_mapping): Likewise.
388         (emit_case_decision_tree): Likewise.
389         (switch_decision_tree::emit): Likewise.
390         (balance_case_nodes): Likewise.
391         (switch_decision_tree::balance_case_nodes): Likewise.
392         (dump_case_nodes): Likewise.
393         (switch_decision_tree::dump_case_nodes): Likewise.
394         (emit_jump): Likewise.
395         (switch_decision_tree::emit_jump): Likewise.
396         (emit_cmp_and_jump_insns): Likewise.
397         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
398         (emit_case_nodes): Likewise.
399         (switch_decision_tree::emit_case_nodes): Likewise.
400         (conditional_probability): Remove.
401         * tree-switch-conversion.h (enum cluster_type): New.
402         (PRINT_CASE): New.
403         (struct cluster): Likewise.
404         (cluster::cluster): Likewise.
405         (struct simple_cluster): Likewise.
406         (simple_cluster::simple_cluster): Likewise.
407         (struct group_cluster): Likewise.
408         (struct jump_table_cluster): Likewise.
409         (struct bit_test_cluster): Likewise.
410         (struct min_cluster_item): Likewise.
411         (struct case_tree_node): Likewise.
412         (case_tree_node::case_tree_node): Likewise.
413         (jump_table_cluster::case_values_threshold): Likewise.
414         (struct case_bit_test): Likewise.
415         (struct switch_decision_tree): Likewise.
416         (struct switch_conversion): Likewise.
417         (switch_decision_tree::reset_out_edges_aux): Likewise.
419 2018-06-20  Martin Liska  <mliska@suse.cz>
421         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
422         (hoist_edge_and_branch_if_true): Likewise.
423         (expand_switch_using_bit_tests_p): Likewise.
424         (struct case_bit_test): Likewise.
425         (case_bit_test_cmp): Likewise.
426         (emit_case_bit_tests): Likewise.
427         (switch_conversion::switch_conversion): New class.
428         (struct switch_conv_info): Remove old struct.
429         (collect_switch_conv_info): More to ...
430         (switch_conversion::collect): ... this.
431         (check_range): Likewise.
432         (switch_conversion::check_range): Likewise.
433         (check_all_empty_except_final): Likewise.
434         (switch_conversion::check_all_empty_except_final): Likewise.
435         (check_final_bb): Likewise.
436         (switch_conversion::check_final_bb): Likewise.
437         (create_temp_arrays): Likewise.
438         (switch_conversion::create_temp_arrays): Likewise.
439         (free_temp_arrays): Likewise.
440         (gather_default_values): Likewise.
441         (switch_conversion::gather_default_values): Likewise.
442         (build_constructors): Likewise.
443         (switch_conversion::build_constructors): Likewise.
444         (constructor_contains_same_values_p): Likewise.
445         (switch_conversion::contains_same_values_p): Likewise.
446         (array_value_type): Likewise.
447         (switch_conversion::array_value_type): Likewise.
448         (build_one_array): Likewise.
449         (switch_conversion::build_one_array): Likewise.
450         (build_arrays): Likewise.
451         (switch_conversion::build_arrays): Likewise.
452         (gen_def_assigns): Likewise.
453         (switch_conversion::gen_def_assigns): Likewise.
454         (prune_bbs): Likewise.
455         (switch_conversion::prune_bbs): Likewise.
456         (fix_phi_nodes): Likewise.
457         (switch_conversion::fix_phi_nodes): Likewise.
458         (gen_inbound_check): Likewise.
459         (switch_conversion::gen_inbound_check): Likewise.
460         (process_switch): Use the newly created class.
461         (switch_conversion::expand): New.
462         (switch_conversion::~switch_conversion): New.
463         * tree-switch-conversion.h: New file.
465 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
467         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
468         tree-vect-patterns.c.
469         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
470         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
471         (vect_recog_sad_pattern): Likewise.
472         (vect_recog_widen_sum_pattern): Likewise.
473         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
474         (vect_recog_widen_shift_pattern): Remove the type_in argument.
475         (vect_recog_rotate_pattern): Likewise.
476         (vect_recog_mult_pattern): Likewise.
477         (vect_recog_vector_vector_shift_pattern): Likewise.
478         (vect_recog_divmod_pattern): Likewise.
479         (vect_recog_mixed_size_cond_pattern): Likewise.
480         (vect_recog_bool_pattern): Likewise.
481         (vect_recog_mask_conversion_pattern): Likewise.
482         (vect_try_gather_scatter_pattern): Likewise.
483         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
484         (vect_recog_over_widening_pattern): Likewise.
485         (vect_recog_gather_scatter_pattern): Likewise.
486         (vect_recog_func_ptr): Move from tree-vectorizer.h
487         (vect_vect_recog_func_ptrs): Move further down the file.
488         (vect_recog_func): Likewise.  Remove the third argument.
489         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
490         (vect_pattern_recog_1): Expect the pattern function to do any
491         necessary target tests.  Also expect it to provide a vector type.
492         Remove the type_in handling.
494 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
496         * tree-vect-patterns.c (vect_pattern_detected): New function.
497         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
498         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
499         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
500         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
501         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
502         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
503         (vect_recog_mask_conversion_pattern)
504         (vect_try_gather_scatter_pattern): Likewise.
506 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
508         * tree-vect-patterns.c (vect_get_internal_def): New function.
509         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
510         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
511         (search_type_for_mask_1): Use it.
513 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
515         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
516         redundant WIDEN_SUM_EXPR handling.
517         (vect_recog_sad_pattern): Likewise.
519 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
521         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
522         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
523         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
524         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
525         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
527 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
529         * tree-vect-stmts.c (vectorizable_call): Make sure that we
530         use the stmt_vec_info of the original bb statement for the
531         new zero assignment, even if the call is part of a pattern.
533 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
535         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
536         that the sequence is attached to the original statement rather
537         than the pattern statement.
538         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
539         PATTERN_DEF_SEQ from the original statement rather than
540         the main pattern statement.
541         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
542         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
543         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
545 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
547         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
548         definition statements before the early exit for statements that aren't
549         live or relevant.
550         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
551         split out from...
552         (vect_transform_loop): ...here.  Process pattern definition
553         statements without first checking whether the main pattern
554         statement is live or relevant.
556 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
558         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
559         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
560         
561 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
563         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
564         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
565         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
566         (expand_block_compare): Change select_block_compare_mode call.
567         (expand_strncmp_align_check): Use new functions, fix comment.
568         (emit_final_str_compare_gpr): New function.
569         (expand_strn_compare): Refactor and clean up code.
570         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
572 2018-06-19  Tony Reix  <tony.reix@atos.com>
573             Damien Bergamini  <damien.bergamini@atos.com>
574             David Edelsohn  <dje.gcc@gmail.com>
576         * collect2.c (static_obj): New variable.
577         (static_libs): New variable.
578         (is_in_list): Uncomment declaration.
579         (main): Track AIX libraries linked statically.
580         (is_in_list): Uncomment definition.
581         (scan_prog_file): Don't add AIX shared libraries initializer
582         to constructor list if linking statically.
584 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
586         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
587         constant.
588         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
590 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
592         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
593         blocks.
595 2018-06-19  Martin Liska  <mliska@suse.cz>
597         * config/i386/i386.c (ix86_can_inline_p): Do not use
598         ipa_fn_summaries::get_create.
599         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
600         get.
601         (devirtualization_time_bonus): Likewise.
602         (ipcp_propagate_stage): Likewise.
603         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
604         (edge_set_predicate): Likewise.
605         (evaluate_conditions_for_known_args): Likewise.
606         (evaluate_properties_for_edge): Likewise.
607         (ipa_call_summary::reset): Tranform to ...
608         (ipa_call_summary::~ipa_call_summary): ... this.
609         (ipa_fn_summary::reset): Transform to ...
610         (ipa_fn_summary::~ipa_fn_summary): ... this.
611         (ipa_fn_summary_t::remove): Rename to ...
612         (ipa_fn_summary_t::remove_callees): ... this.
613         (ipa_fn_summary_t::duplicate): Use placement new
614         instead of memory copy.
615         (ipa_call_summary_t::duplicate): Likewise.
616         (ipa_call_summary_t::remove): Remove.
617         (dump_ipa_call_summary): Change get_create to get.
618         (ipa_dump_fn_summary): Dump only when summary exists.
619         (analyze_function_body): Use symbol_summary::get instead
620         of get_create.
621         (compute_fn_summary): Likewise.
622         (estimate_edge_devirt_benefit): Likewise.
623         (estimate_edge_size_and_time): Likewise.
624         (inline_update_callee_summaries): Likewise.
625         (remap_edge_change_prob): Likewise.
626         (remap_edge_summaries): Likewise.
627         (ipa_merge_fn_summary_after_inlining): Likewise.
628         (write_ipa_call_summary): Likewise.
629         (ipa_fn_summary_write): Likewise.
630         (ipa_free_fn_summary): Likewise.
631         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
632         (struct ipa_call_summary): Likewise.
633         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
634         of get_create.
635         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
636         (estimate_size_after_inlining): Likewise.
637         (estimate_growth): Likewise.
638         (growth_likely_positive): Likewise.
639         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
640         (inline_call): Likewise.
641         * ipa-inline.c (caller_growth_limits): Likewise.
642         (can_inline_edge_p): Likewise.
643         (can_inline_edge_by_limits_p): Likewise.
644         (compute_uninlined_call_time): Likewise.
645         (compute_inlined_call_time): Likewise.
646         (want_inline_small_function_p): Likewise.
647         (edge_badness): Likewise.
648         (update_caller_keys): Likewise.
649         (update_callee_keys): Likewise.
650         (inline_small_functions): Likewise.
651         (inline_to_all_callers_1): Likewise.
652         (dump_overall_stats): Likewise.
653         (early_inline_small_functions): Likewise.
654         (early_inliner): Likewise.
655         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
656         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
657         * ipa-pure-const.c (malloc_candidate_p): Likewise.
658         * ipa-split.c (execute_split_functions): Likewise.
659         * symbol-summary.h: Likewise.
660         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
662 2018-06-19  Richard Biener  <rguenther@suse.de>
664         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
665         (vectorize_loops): ... here.  Fix dbgcnt handling.
666         (try_vectorize_loop): Wrap try_vectorize_loop_1.
668 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
670         PR target/86197
671         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
672         ieee128 argument takes up only one (vector) register, not two (floating
673         point) registers.
675 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
677         * gimplify.c (gimplify_init_constructor): Really never clear for an
678         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
680 2018-06-19  Richard Biener  <rguenther@suse.de>
682         PR tree-optimization/86179
683         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
684         after failed recognition.
686 2018-06-18  Martin Sebor  <msebor@redhat.com>
688         PR middle-end/85602
689         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
690         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
691         Handle integer subtraction.
692         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
693         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
695 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
697         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
698         param from rtx to rtx_insn *.
699         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
700         param.
701         (frv_ifcvt_modify_insn): Likwise.
702         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
703         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
704         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
705         as_a <rtx_insn *> cast to local "unprotected_region" once
706         it's been established that it's not NULL or pc_rtx.
707         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
708         param "sethi" from rtx to rtx_insn *.
709         (nds32_group_float_insns): Likewise for param "insn".
710         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
711         param.
712         (vax_output_int_subtract): Likewise.
713         * config/vax/vax.c (vax_output_int_add): Likewise for param
714         "insn".
715         (vax_output_int_subtract): Likewise.
716         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
717         (emit_pattern_after): Likewise for param "after".
718         (emit_insn_after): Likewise.
719         (emit_jump_insn_after): Likewise.
720         (emit_call_insn_after): Likewise.
721         (emit_debug_insn_after): Likewise.
722         (emit_pattern_before): Likewise for param "before".
723         (emit_insn_before): Likewise.
724         (emit_jump_insn_before): Likewise.
725         * final.c (get_insn_template): Likewise for param "insn", removing
726         a cast.
727         * output.h (get_insn_template): Likewise for 2nd param.
728         * rtl.h (emit_insn_before): Likewise.
729         (emit_jump_insn_before): Likewise.
730         (emit_debug_insn_before_noloc): Likewise.
731         (emit_insn_after): Likewise.
732         (emit_jump_insn_after): Likewise.
733         (emit_call_insn_after): Likewise.
734         (emit_debug_insn_after): Likewise.
735         (set_insn_deleted): Likewise for param.
737 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
739         PR target/85358
740         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
741         floating point modes, so that IFmode is numerically greater than
742         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
743         to declare the ordering.  This prevents IFmode from being
744         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
745         machine.  Include rs6000-modes.h to share the fractional values
746         between genmodes* and the rest of the compiler.
747         (IFmode): Likewise.
748         (KFmode): Likewise.
749         (TFmode): Likewise.
750         * config/rs6000/rs6000-modes.h: New file.
751         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
752         meaning of rs6000_long_double_size so that 126..128 selects an
753         appropriate 128-bit floating point type.
754         (rs6000_option_override_internal): Likewise.
755         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
756         (TARGET_LONG_DOUBLE_128): Change the meaning of
757         rs6000_long_double_size so that 126..128 selects an appropriate
758         128-bit floating point type.
759         (LONG_DOUBLE_TYPE_SIZE): Update comment.
760         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
761         source and destination to match the standard usage.
762         (truncifkf2): Likewise.
763         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
764         ISA 2.07 to use an explicit clobber, instead of passing in a
765         temporary.
766         (copysign<mode>3_soft): Likewise.
768 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
770         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
771         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
772         (vect_slp_analyze_instance_dependence): Likewise.
773         (vect_enhance_data_refs_alignment): Likewise.
774         (vect_analyze_data_refs_alignment): Likewise.
775         (vect_slp_analyze_and_verify_instance_alignment
776         (vect_analyze_data_ref_accesses): Likewise.
777         (vect_prune_runtime_alias_test_list): Likewise.
778         (vect_analyze_data_refs): Likewise.
779         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
780         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
781         (vect_analyze_scalar_cycles_1): Likewise.
782         (vect_get_loop_niters): Likewise.
783         (vect_analyze_loop_form_1): Likewise.
784         (vect_update_vf_for_slp): Likewise.
785         (vect_analyze_loop_operations): Likewise.
786         (vect_analyze_loop): Likewise.
787         (vectorizable_induction): Likewise.
788         (vect_transform_loop): Likewise.
789         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
790         * tree-vect-slp.c (vect_analyze_slp): Likewise.
791         (vect_make_slp_decision): Likewise.
792         (vect_detect_hybrid_slp): Likewise.
793         (vect_slp_analyze_operations): Likewise.
794         (vect_slp_bb): Likewise.
795         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
796         (vectorizable_bswap): Likewise.
797         (vectorizable_call): Likewise.
798         (vectorizable_simd_clone_call): Likewise.
799         (vectorizable_conversion): Likewise.
800         (vectorizable_assignment): Likewise.
801         (vectorizable_shift): Likewise.
802         (vectorizable_operation): Likewise.
803         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
805 2018-06-18  Martin Sebor  <msebor@redhat.com>
807         PR tree-optimization/81384
808         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
809         * builtins.c (expand_builtin_strnlen): New function.
810         (expand_builtin): Call it.
811         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
812         * builtins.def (BUILT_IN_STRNLEN): New.
813         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
814         Warn for bounds in excess of maximum object size.
815         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
816         single-value ranges.  Handle strnlen.
817         (handle_builtin_strlen): Handle strnlen.
818         (strlen_check_and_optimize_stmt): Same.
819         * doc/extend.texi (Other Builtins): Document strnlen.
821 2018-06-18  Maya Rashish  <coypu@sdf.org>
823         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
824         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
825         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
827         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
828         here to ...
829         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
831 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
833         * tree.c (escaped_string::escape): Replace cast to char * by
834         const_cast<char *> (unescaped).
836 2018-06-18  Nick Clifton  <nickc@redhat.com>
838         PR 84195
839         * tree.c (escaped_string): New class.  Converts an unescaped
840         string into its escaped equivalent.
841         (warn_deprecated_use): Use the new class to convert the
842         deprecation message, if present.
843         (test_escaped_strings): New self test.
844         (test_c_tests): Add test_escaped_strings.
845         * doc/extend.texi (deprecated): Add a note that the
846         deprecation message is affected by the -fmessage-length
847         option, and that control characters will be escaped.
848         (#pragma GCC error): Document this pragma.
849         (#pragma GCC warning): Likewise.
850         * doc/invoke.texi (-fmessage-length): Document this option's
851         effect on the #warning and #error preprocessor directives and
852         the deprecated attribute.
854 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
856         * tree.c (decl_value_expr_lookup): Revert latest change.
857         (decl_value_expr_insert): Likewise.
859 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
861         * gimplify.c (nonlocal_vlas): Delete.
862         (nonlocal_vla_vars): Likewise.
863         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
864         referenced VLAs.
865         (gimplify_body): Do not create and destroy nonlocal_vlas.
866         * tree-nested.c: Include diagnostic.h.
867         (use_pointer_in_frame): Tweak.
868         (lookup_field_for_decl): Add assertion and declare the transformation.
869         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
870         internal error when the reference is in a wrong context.  Do not
871         create a debug decl by default.
872         (note_nonlocal_block_vlas): Delete.
873         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
874         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
875         create a debug decl by default.
876         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
877         call is in a wrong context.
878         (fixup_vla_decls): New function.
879         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
880         debug variables were created.
881         * tree.c (decl_value_expr_lookup): Add checking assertion.
882         (decl_value_expr_insert): Likewise.
884 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
886         PR middle-end/82479
887         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
888         * tree-scalar-evolution.c (interpret_expr): Likewise.
889         (expression_expensive_p): Likewise.
890         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
891         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
892         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
893         (ssa_defined_by_minus_one_stmt_p): New.
895 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
897         PR middle-end/64946
898         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
899         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
900         * dojump.c (do_jump): Likewise.
901         * expr.c (expand_expr_real_2): Check operand type's sign.
902         * fold-const.c (const_unop): Handle ABSU_EXPR.
903         (fold_abs_const): Likewise.
904         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
905         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
906         (strip_sign_op_1): Likesise.
907         * match.pd: Add new pattern to generate ABSU_EXPR.
908         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
909         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
910         * tree-eh.c (operation_could_trap_helper_p): Likewise.
911         * tree-inline.c (estimate_operator_cost): Likewise.
912         * tree-pretty-print.c (dump_generic_node): Likewise.
913         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
914         * tree.def (ABSU_EXPR): New.
916 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
918         PR middle-end/86095
919         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
920         documented as preserved for backward compatibility only.
921         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
923         PR rtl-optimization/86108
924         * bb-reorder.c (create_forwarder_block): Renamed to ...
925         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
926         jump from new landing pad to the second part.
927         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
928         Adjust callers.
930 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
932         PR middle-end/85878
933         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
934         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
935         Only call store_expr for halves if the mode is the same.
937         PR middle-end/86123
938         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
939         Fix up comment formatting.
941 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
943         * typed-splay-tree.h (typed_splay_tree::remove): New function.
944         (typed_splay_tree::closure,
945         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
946         (typed_splay_tree::typed_splay_tree,
947         typed_splay_tree::operator =): Declared private.
948         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
949         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
950         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
951         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
952         typed_splay_tree::splay_tree_splay,
953         typed_splay_tree::splay_tree_foreach_helper,
954         typed_splay_tree::splay_tree_insert,
955         typed_splay_tree::splay_tree_remove,
956         typed_splay_tree::splay_tree_lookup,
957         typed_splay_tree::splay_tree_predecessor,
958         typed_splay_tree::splay_tree_successor,
959         typed_splay_tree::splay_tree_min,
960         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
961         (typed_splay_tree::root, typed_splay_tree::comp,
962         typed_splay_tree::delete_key,
963         typed_splay_tree::delete_value): New data members.
964         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
965         typed_splay_tree::remove.
967 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
969         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
970         -mginv and -mno-ginv to the assembler.
971         * config/mips/mips.opt (-mcrc): New option.
972         (-mginv): Likewise.
973         * doc/invoke.text (-mcrc): Document.
974         (-mginv): Likewise.
976 2018-06-15  Nick Clifton  <nickc@redhat.com>
978         PR 84195
979         * tree.c (escaped_string): New class.  Converts an unescaped
980         string into its escaped equivalent.
981         (warn_deprecated_use): Use the new class to convert the
982         deprecation message, if present.
983         (test_escaped_strings): New self test.
984         (test_c_tests): Add test_escaped_strings.
985         * doc/extend.texi (deprecated): Add a note that the
986         deprecation message is affected by the -fmessage-length
987         option, and that control characters will be escaped.
988         (#pragma GCC error): Document this pragma.
989         (#pragma GCC warning): Likewise.
990         * doc/invoke.texi (-fmessage-length): Document this option's
991         effect on the #warning and #error preprocessor directives and
992         the deprecated attribute.
994 2018-06-15  Richard Biener  <rguenther@suse.de>
996         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
997         here, also noting vector size used.
998         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
999         size used in MSG_OPTIMIZED_LOCATIONS dump.
1000         (pass_slp_vectorize::execute): Adjust.
1002 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1004         PR target/85968
1005         * config/arc/arc.c (arc_return_address_register): Fix
1006         if-condition.
1008 2018-06-15  Richard Biener  <rguenther@suse.de>
1010         PR middle-end/86159
1011         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1012         leave useless conversion stripping to force_gimple_operand_gsi.
1013         (gimplify_build2): Likewise.
1014         (gimplify_build1): Likewise.
1016 2018-06-15  Richard Biener  <rguenther@suse.de>
1018         PR middle-end/86076
1019         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1020         before adjusting their block.
1022 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1024         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1025         multilibs for *-*-rtems*.
1026         * config/riscv/t-rtems: New file.
1028 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1030         PR middle-end/86122
1031         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1032         unsigned_type_for returns NULL.
1034         PR target/85945
1035         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1036         subregs of multi-word pseudos unless the float mode has word size.
1038 2018-06-14  Richard Biener  <rguenther@suse.de>
1040         PR middle-end/86139
1041         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1042         duplicate and harmful type_hash_canon.
1043         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1045 2018-06-14  Richard Biener  <rguenther@suse.de>
1047         PR ipa/86124
1048         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1049         NULL cgraph_node.
1051 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1053         * config/rtems.h (STDINT_LONG32): Define.
1055 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1056             Prachi Godbole  <prachi.godbole@imgtec.com>
1058         * config/mips/mips-cpus.def: Define P6600.
1059         * config/mips/mips-tables.opt: Regenerate.
1060         * config/mips/mips.c (mips_ucbranch_type): New enum.
1061         (mips_rtx_cost_data): Add support for P6600.
1062         (mips_issue_rate): Likewise.
1063         (mips_multipass_dfa_lookahead): Likewise.
1064         (mips_avoid_hazard): Likewise.
1065         (mips_reorg_process_insns): Likewise.
1066         (mips_classify_branch_p6600): New function.
1067         * config/mips/mips.h (TUNE_P6600): New define.
1068         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1069         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1070         * config/mips/mips.md: Include p6600.md.
1071         (processor): Add p6600.
1072         * config/mips/p6600.md: New file.
1073         * doc/invoke.texi: Add p6600 to supported architectures.
1075 2018-06-13  Martin Sebor  <msebor@redhat.com>
1077         PR tree-optimization/86114
1078         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1079         of integer types.
1080         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1082 2018-06-13  Richard Biener  <rguenther@suse.de>
1084         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1085         Properly set vector type of the intermediate stmt.
1086         * tree-vect-stmts.c (vectorizable_operation): The destination
1087         var always has vectype_out type.
1089 2018-06-13  Jeff Law  <law@redhat.com>
1091         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1092         integer 0 for argument to print_rtl_with_bb.
1093         (rl78_reorg): Likewise.
1095 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1097         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1098         from rtx to rtx_insn *.
1099         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1100         "label".
1101         (add_sched_insns_for_speculation): Likewise for local "target",
1102         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1103         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1104         from rtx_insn ** to rtx_code_label **.
1105         (reorg_emit_nops): Likewise.
1106         (c6x_reorg): Likewise for local "call_labels".
1107         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1108         rtx to rtx_insn *.
1109         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1110         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1111         the loops over LABEL_REFS.
1112         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1113         braf_label.
1114         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1115         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1116         (split_branches): Strengthen local "olabel" from rtx to
1117         rtx_insn *, adding a safe_as_a cast.
1118         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1119         to "rtx_insn *".
1120         (add_insn_after): Likewise for first two params.
1121         (add_insn_before): Likewise.
1122         (remove_insn): Likewise for param.
1123         (emit_pattern_before_noloc): Likewise for second and third params.
1124         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1125         (emit_call_insn_before_noloc): Likewise.
1126         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1127         to "rtx_insn *".
1128         (emit_barrier_before): Likewise.
1129         (emit_label_before): Strengthen "label" param from "rtx" to
1130         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1131         "rtx_insn *".
1132         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1133         "rtx_insn *".
1134         (emit_pattern_after_noloc): Likewise.
1135         (emit_insn_after_noloc): Likewise.
1136         (emit_jump_insn_after_noloc): Likewise.
1137         (emit_call_insn_after_noloc): Likewise.
1138         (emit_debug_insn_after_noloc): Likewise.
1139         (emit_barrier_after): Likewise.
1140         (emit_label_after): Likewise for both params.
1141         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1142         "loc" param from "int" to "location_t".
1143         (emit_insn_after_setloc): Likewise.
1144         (emit_jump_insn_after_setloc): Likewise.
1145         (emit_call_insn_after_setloc): Likewise.
1146         (emit_debug_insn_after_setloc): Likewise.
1147         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1148         "loc" param from "int" to "location_t".
1149         (emit_pattern_before): Convert NULL_RTX to NULL.
1150         (emit_insn_before_setloc): Convert "loc" param from "int" to
1151         "location_t".
1152         (emit_jump_insn_before_setloc): Likewise.
1153         (emit_call_insn_before_setloc): Likewise.
1154         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1155         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1156         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1157         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1158         Convert 3rd param from "int" to "location_t".
1159         (emit_barrier_before, emit_barrier_after, next_real_insn):
1160         Strengthen param from rtx to rtx_insn *.
1161         (emit_label_before): Strengthen 1st param from "rtx" to
1162         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1163         "rtx_insn *".
1164         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1165         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1166         Strengthen 2nd param from "rtx" to "rtx_insn *".
1167         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1168         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1169         Likewise. Convert 3rd param from "int" to "location_t".
1170         (emit_label_after): Strengthen 1st param from "rtx" to
1171         "rtx_code_label *".
1172         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1173         "rtx_insn *".
1174         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1175         from "rtx" to "rtx_insn *".
1177 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1179         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1180         bodies streamed in with -Q.
1181         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1182         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1183         * gimple-streamer-out.c: Include gimple-pretty-print.h
1184         (output_bb): Dump stmts streamed.
1185         * lto-section-out.c: Include print-tree.h
1186         (lto_begin_section): Dump sections created.
1187         (lto_output_decl_index): Dump decl encoded.
1188         * lto-streamer-out.c: Include print-tree.h
1189         (create_output_block): Dump output block created.
1190         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1191         (output_function): Dump function output.
1192         (output_constructor): Dump constructor streamed.
1193         (write_global_stream): Output indexes encoded.
1194         (produce_asm_for_decls): Dump streams encoded.
1195         * lto-streamer.c (streamer_dump_file): New global var.
1196         * lto-streamer.h (streamer_dump_file): Declare.
1197         * passes.c (ipa_write_summaries): Initialize streamer dump.
1198         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1199         in.
1201 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1203         PR target/86048
1204         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1205         offsets for register save directives.  Emit a second batch of save
1206         directives, if need be, when the function accesses prior frames.
1208 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1210         * config/arc/fpu.md (fmasf4): Force operand to register.
1211         (fnmasf4): Likewise.
1213 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1215         * config/arc/arc-protos.h (arc_pad_return): Remove.
1216         * config/arc/arc.c (machine_function): Remove force_short_suffix
1217         and size_reason.
1218         (arc_print_operand): Adjust printing of '&'.
1219         (arc_verify_short): Remove conditional printing of short suffix.
1220         (arc_final_prescan_insn): Remove reference to size_reason.
1221         (pad_return): New function.
1222         (arc_reorg): Call pad_return.
1223         (arc_pad_return): Remove.
1224         (arc_init_machine_status): Remove reference to force_short_suffix.
1225         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1226         (attr length): When attribute iscompact is true force to 2
1227         regardless; in the case of maybe check if we want to force the
1228         instruction to have 4 bytes length.
1229         (nopv): Change it to generate 4 byte long nop as well.
1230         (blockage): New pattern.
1231         (simple_return): Remove call to arc_pad_return.
1232         (p_return_i): Likewise.
1234 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1236         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1238 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1240         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1241         ARC cores.
1243 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1245         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1246         for ARC700 and ARCv2.
1248 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1250         PR target/86076
1251         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1252         operands[2] instead of operands[1].
1255 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1257         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1258         case, check whether the outer register overlaps an unallocatable
1259         register, not just whether it fits the required class.
1261 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1263         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1264         are poly_ints.
1265         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1266         (memrefs_conflict_p): Likewise.
1267         (init_alias_analysis): Likewise.
1268         * cfgexpand.c (expand_debug_expr): Likewise.
1269         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1270         * cse.c (fold_rtx): Likewise.
1271         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1272         * expr.c (emit_block_move_hints): Likewise.
1273         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1274         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1275         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1276         (emit_group_store): Likewise.
1277         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1278         to read the PRE/POST_MODIFY increment.
1279         * calls.c (store_one_arg): Use strip_offset.
1280         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1281         poly_int_rtx_p.
1282         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1283         by a VEC_SELECT.
1284         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1285         (simplify_binary_operation_1): Extend CONST_INT handling to
1286         poly_int_rtx_p.
1287         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1288         than a HOST_WIDE_INT.
1289         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1290         poly_int64.
1291         (adjust_mems, add_stores): Update accodingly.
1292         (vt_canonicalize_addr): Track polynomial offsets.
1293         (emit_note_insn_var_location): Likewise.
1294         (vt_add_function_parameter): Likewise.
1295         (vt_initialize): Likewise.
1297 2018-06-12  Jeff Law  <law@redhat.com>
1299         * config.gcc (alpha*-*-freebsd*): Remove.
1300         * config/alpha/freebsd.h: Remove.
1302 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1304         PR other/69968
1305         * spellcheck-tree.c (levenshtein_distance): Rename to...
1306         (get_edit_distance): ...this, and update for underlying renaming.
1307         * spellcheck-tree.h (levenshtein_distance): Rename to...
1308         (get_edit_distance): ...this.
1309         * spellcheck.c (levenshtein_distance): Rename to...
1310         (get_edit_distance): ...this.  Convert from Levenshtein distance
1311         to Damerau-Levenshtein distance by supporting transpositions of
1312         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1313         "v_one_ago".
1314         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1315         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1316         update for underlying renaming.
1317         (selftest::levenshtein_distance_unit_test): Rename to...
1318         (selftest::test_get_edit_distance_unit): ...this, and update for
1319         underlying renaming.
1320         (selftest::test_find_closest_string): Add example from PR 69968
1321         where transposition helps
1322         (selftest::test_metric_conditions): Update for renaming.
1323         (selftest::test_metric_conditions): Likewise.
1324         (selftest::spellcheck_c_tests): Likewise.
1325         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1326         (get_edit_distance): ...this.
1327         (best_match::consider): Update for renaming.
1329 2018-06-12  Martin Sebor  <msebor@redhat.com>
1331         PR tree-optimization/85259
1332         * builtins.c (compute_objsize): Handle constant offsets.
1333         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1334         true iff a warning has been issued.
1335         * gimple.h (gimple_nonartificial_location): New function.
1336         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1337         gimple_nonartificial_location and handle -Wno-system-headers.
1338         (handle_builtin_stxncpy): Same.
1340 2018-06-12  Martin Sebor  <msebor@redhat.com>
1342         PR c/85931
1343         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1345 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1347         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1348         BUILTIN_VEC_XST entries for pointer to double and long long.
1350 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1352         PR target/85990
1353         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1354         Update comments.
1355         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1356         Likewise.
1358 2018-06-12  Martin Liska  <mliska@suse.cz>
1360         * doc/options.texi: Document IntegerRange.
1362 2018-06-12  Martin Liska  <mliska@suse.cz>
1364         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1365         * opt-functions.awk: Handle Deprecated flag.
1366         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1367         and report error.
1368         (read_cmdline_option): Report warning for a deprecated option.
1369         * opts.h (struct cl_option): Add new field cl_deprecated.
1370         (CL_ERR_DEPRECATED): New.
1372 2018-06-12  Martin Liska  <mliska@suse.cz>
1374         * doc/options.texi: Document Deprecated option flag.
1376 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1378         * config/arc/arc-arch.h (arc_extras): New enum.
1379         (arc_cpu_t):Add field extra.
1380         (arc_cpu_types): Consider the extras.
1381         * config/arc/arc-cpus.def: Add extras info.
1382         * config/arc/arc-opts.h (processor_type): Consider extra field.
1383         * config/arc/arc.c (arc_override_options): Handle extra field.
1385 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1387         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1388         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1389         field.
1390         * config/arc/arc.c (arc_init): Update pic warning.
1391         (irq_range): Update irq range parsing warnings.
1392         (arc_override_options): Update various warning messages.
1393         (arc_handle_aux_attribute): Likewise.
1395 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1397         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1399 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1401         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1402         compiler messages directives.
1404 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1406         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1407         * config/mips/mips-tables.opt: Regenerate.
1408         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1409         mips64r6.
1410         * doc/invoke.texi: Document -march=i6500.
1412 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1414         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1415         (i6400_gpmul): Add cpu_unit.
1416         (i6400_gpdiv): Likewise.
1417         (i6400_msa_add_d): Update reservations.
1418         (i6400_msa_int_add) Likewise.
1419         (i6400_msa_short_logic3) Likewise.
1420         (i6400_msa_short_logic2) Likewise.
1421         (i6400_msa_short_logic) Likewise.
1422         (i6400_msa_move) Likewise.
1423         (i6400_msa_cmp) Likewise.
1424         (i6400_msa_short_float2) Likewise.
1425         (i6400_msa_div_d) Likewise.
1426         (i6400_msa_long_logic1) Likewise.
1427         (i6400_msa_long_logic2) Likewise.
1428         (i6400_msa_mult) Likewise.
1429         (i6400_msa_long_float2) Likewise.
1430         (i6400_msa_long_float4) Likewise.
1431         (i6400_msa_long_float5) Likewise.
1432         (i6400_msa_long_float8) Likewise.
1433         (i6400_fpu_fadd): Include frint type.
1434         (i6400_fpu_store): New define_insn_reservation.
1435         (i6400_fpu_load): Likewise.
1436         (i6400_fpu_move): Likewise.
1437         (i6400_fpu_fcmp): Likewise.
1438         (i6400_fpu_fmadd): Likewise.
1439         (i6400_int_mult): Include imul3nc type and update reservation.
1440         (i6400_int_div): Include idiv3 type and update reservation.
1441         (i6400_int_load): Update to check type not move_type.
1442         (i6400_int_store): Likewise.
1443         (i6400_int_prefetch): Set zero latency.
1445 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1447         * gcc.c: Document new %@{...} sequence.
1448         (LINK_COMMAND_SPEC): Use it for the -L switches.
1449         (cpp_unique_options): Use it for the -I switches.
1450         (at_file_argbuf): New global variable.
1451         (in_at_file): Likewise.
1452         (alloc_args): Create at_file_argbuf.
1453         (clear_args): Truncate at_file_argbuf.
1454         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1455         (open_at_file): New function.
1456         (close_at_file): Likewise.
1457         (create_at_file): Delete.
1458         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1459         <'o'>: Likewise.
1460         <'@'>: New case.
1461         (validate_switches_from_spec): Deal with %@{...} sequence.
1462         (validate_switches): Likewise.
1463         (driver::finalize): Call clear_args.
1465 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1467         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1469 2018-06-11  Martin Sebor  <msebor@redhat.com>
1471         * doc/invoke.texi (-Wall): List -Wc++17-compat.
1472         (Wno-class-memaccess): Add @opindex.
1473         (Wno-templates, Wno-multiple-inheritance): Same.
1474         (Wno-virtual-inheritance, Wno-namespaces): Same.
1475         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1476         (Wno-format-overflow, Wno-format-truncation): Same.
1477         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1478         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1479         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1480         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1481         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1482         (Wno-misspelled-isr): Same.
1484 2018-06-11  Martin Sebor  <msebor@redhat.com>
1486         * PR tree-optimization/86083
1487         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1489 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1491         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1493 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
1495         PR target/85755
1496         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1497         on the correct operand.
1498         (*movdi_internal64): Ditto.
1500 2018-06-11  Martin Liska  <mliska@suse.cz>
1502         PR tree-optimization/86089
1503         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1505 2018-06-11  Julia Koval  <julia.koval@intel.com>
1507         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1508         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1509         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
1511 2018-06-11  Olivier Hainque  <hainque@adacore.com>
1513         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1514         for Ada with strict dwarf2.
1516 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
1518         PR target/85755
1519         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1520         addresses.
1522 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
1524         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1526 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
1528         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1529         TARGET_ELF.
1531 2018-06-08  Martin Liska  <mliska@suse.cz>
1533         * tree-cfg.h (debug_function): Fix argument type to match
1534         implementation.
1536 2018-06-08  Martin Liska  <mliska@suse.cz>
1538         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1539         Remove usage of MPX-related (and removed) fields.
1540         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1542 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
1544         * cfg.c (debug): Use TDF_NONE rather than 0.
1545         * cfghooks.c (debug): Likewise.
1546         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1547         (struct dump_option_value_info): Convert to...
1548         (struct kv_pair): ...this template type.
1549         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1550         rather than 0.
1551         (optinfo_verbosity_options): Likewise.
1552         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1553         OPTGROUP_NONE.
1554         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1555         than int for "optgroup_flags" param.
1556         (dump_generic_expr_loc): Use dump_flags_t rather than int for
1557         "dump_kind" param.
1558         (dump_dec): Likewise.
1559         (dump_finish): Use TDF_NONE rather than 0.
1560         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1561         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
1562         than 0.  Update for change to option_ptr.
1563         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1564         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
1565         0.  Update for changes to optinfo_verbosity_options and
1566         optgroup_options.
1567         (opt_info_switch_p): Convert optgroup_flags from int to
1568         optgroup_flags_t.
1569         (dump_basic_block): Use dump_flags_t rather than int
1570         for "dump_kind" param.
1571         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1572         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1573         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1574         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1575         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1576         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1577         TDF_NONE): Convert from macros to...
1578         (enum dump_flag): ...this new enum.
1579         (dump_flags_t): Update to use enum.
1580         (operator|, operator&, operator~, operator|=, operator&=):
1581         Implement for dump_flags_t.
1582         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1583         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1584         Convert from macros to...
1585         (enum optgroup_flag): ...this new enum.
1586         (optgroup_flags_t): New typedef.
1587         (operator|, operator|=): Implement for optgroup_flags_t.
1588         (struct dump_file_info): Convert field "alt_flags" to
1589         dump_flags_t.  Convert field "optgroup_flags" to
1590         optgroup_flags_t.
1591         (dump_basic_block): Use dump_flags_t rather than int for param.
1592         (dump_generic_expr_loc): Likewise.
1593         (dump_dec): Likewise.
1594         (dump_register): Convert param "optgroup_flags" to
1595         optgroup_flags_t.
1596         (opt_info_enable_passes): Likewise.
1597         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1598         than 0.
1599         * gimple-pretty-print.c (debug): Likewise.
1600         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1601         (merged_store_group::apply_stores): Likewise.
1602         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1603         * gimple.c (verify_gimple_pp): Likewise.
1604         * graphite-poly.c (print_pbb_body): Likewise.
1605         * passes.c (pass_manager::register_one_dump_file): Convert
1606         local "optgroup_flags" to optgroup_flags_t.
1607         * print-tree.c (print_node): Use TDF_NONE rather than 0.
1608         (debug): Likewise.
1609         (debug_body): Likewise.
1610         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1611         to optgroup_flags_t.
1612         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1613         than 0.
1614         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1615         (convert_mult_to_fma): Likewise.
1616         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1617         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1618         * tree-vect-data-refs.c (dump_lower_bound): Convert param
1619         "dump_kind" to dump_flags_t.
1621 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1623         * config/rs6000/rs6000.c (min, max): Delete.
1625 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1627         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1628         -mabi=spe and -mabi=no-spe.
1630 2018-06-08  Martin Liska  <mliska@suse.cz>
1632         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1633         where we expect an existing summary.
1635 2018-06-08  Martin Liska  <mliska@suse.cz>
1637         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1638         * ipa-inline.h (estimate_edge_growth): Likewise.
1640 2018-06-08  Martin Liska  <mliska@suse.cz>
1642         * cgraph.c (function_version_hasher::hash): Use
1643         cgraph_node::get_uid ().
1644         (function_version_hasher::equal):
1645         * cgraph.h (cgraph_node::get_uid): New method.
1646         * ipa-inline.c (update_caller_keys): Use
1647         cgraph_node::get_uid ().
1648         (update_callee_keys): Likewise.
1649         * ipa-utils.c (searchc): Likewise.
1650         (ipa_reduced_postorder): Likewise.
1651         * lto-cgraph.c (input_node): Likewise.
1652         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1653         * symbol-summary.h (symtab_insertion): Likewise.
1654         (symtab_removal): Likewise.
1655         (symtab_duplication): Likewise.
1656         * tree-pretty-print.c (dump_function_header): Likewise.
1657         * tree-sra.c (convert_callers_for_node): Likewise.
1659 2018-06-08  Martin Liska  <mliska@suse.cz>
1661         * cgraph.c (symbol_table::create_edge): Always assign a new
1662         unique number.
1663         (symbol_table::free_edge): Do not recycle numbers.
1664         * cgraph.h (cgraph_edge::get): New method.
1665         * symbol-summary.h (symtab_removal): Use it.
1666         (symtab_duplication): Likewise.
1667         (call_summary::hashable_uid): Remove.
1669 2018-06-08  Martin Liska  <mliska@suse.cz>
1671         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1672         (initialize_growth_caches): Remove.
1673         (free_growth_caches): Likewise.
1674         (do_estimate_edge_time): Use edge_growth_cache.
1675         (do_estimate_edge_size): Likewise.
1676         (do_estimate_edge_hints): Likewise.
1677         * ipa-inline.c (reset_edge_caches): Likewise.
1678         (recursive_inlining): Likewise.
1679         (inline_small_functions): Likewise.
1680         * ipa-inline.h (initialize_growth_caches): Remove.
1681         (estimate_edge_size): Likewise.
1682         (estimate_edge_time): Likewise.
1683         (estimate_edge_hints): Likewise.
1684         (reset_edge_growth_cache): Likewise.
1685         * symbol-summary.h (call_summary::remove): New method.
1687 2018-06-08  Martin Liska  <mliska@suse.cz>
1689         * ipa-cp.c (class edge_clone_summary): New summary.
1690         (grow_edge_clone_vectors): Remove.
1691         (ipcp_edge_duplication_hook): Remove.
1692         (class edge_clone_summary_t): New call_summary class.
1693         (ipcp_edge_removal_hook): Remove.
1694         (edge_clone_summary_t::duplicate): New function.
1695         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1696         (create_specialized_node): Likewise.
1697         (ipcp_driver): Initialize edge_clone_summaries and do not
1698         register hooks.
1700 2018-06-08  Martin Liska  <mliska@suse.cz>
1702         * symbol-summary.h (get): New function.
1703         (call_summary::m_initialize_when_cloning): New class member.
1705 2018-06-08  Martin Liska  <mliska@suse.cz>
1707         * cgraph.c (cgraph_node::remove): Do not recycle uid.
1708         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1709         (symbol_table::allocate_cgraph_symbol): Do not set uid.
1710         * passes.c (uid_hash_t): Record removed_nodes by their uids.
1711         (remove_cgraph_node_from_order): Use the removed_nodes set.
1712         (do_per_function_toporder): Likwise.
1713         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1714         instead of summary_uid.
1715         (symtab_removal): Likewise.
1716         (symtab_duplication): Likewise.
1718 2018-06-08  Martin Liska  <mliska@suse.cz>
1720         * ipa-cp.c (ipcp_store_bits_results): Use
1721         ipcp_transformation_sum.
1722         (ipcp_store_vr_results): Likewise.
1723         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1724         to ...
1725         (ipcp_transformation_initialize): ... this.
1726         (ipa_set_node_agg_value_chain):
1727         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1728         (write_ipcp_transformation_info): Likewise.
1729         (read_ipcp_transformation_info): Likewise.
1730         (ipcp_update_bits): Likewise.
1731         (ipcp_update_vr): Likewise.
1732         (ipcp_transform_function): Likewise.
1733         * ipa-prop.h: Rename ipcp_transformation_summary to
1734         ipcp_transformation.
1735         (class ipcp_transformation_t): New function summary.
1736         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1737         (ipa_get_agg_replacements_for_node): Likewise.
1739 2018-06-08  Martin Liska  <mliska@suse.cz>
1741         * ipa-pure-const.c (struct funct_state_d): Do it class instead
1742         of struct.
1743         (class funct_state_summary_t): New function_summary class.
1744         (has_function_state): Remove.
1745         (get_function_state): Likewise.
1746         (set_function_state): Likewise.
1747         (add_new_function): Likewise.
1748         (funct_state_summary_t::insert): New function.
1749         (duplicate_node_data): Remove.
1750         (remove_node_data): Remove.
1751         (funct_state_summary_t::duplicate): New function.
1752         (register_hooks): Create new funct_state_summaries.
1753         (pure_const_generate_summary): Use it.
1754         (pure_const_write_summary): Likewise.
1755         (pure_const_read_summary): Likewise.
1756         (propagate_pure_const): Likewise.
1757         (propagate_nothrow): Likewise.
1758         (dump_malloc_lattice): Likewise.
1759         (propagate_malloc): Likewise.
1760         (execute): Do not register hooks, just remove summary
1761         instead.
1762         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1763         constructor.
1765 2018-06-08  Martin Liska  <mliska@suse.cz>
1767         * ipa-reference.c (remove_node_data): Remove.
1768         (duplicate_node_data): Likewise.
1769         (class ipa_ref_var_info_summary_t): New class.
1770         (class ipa_ref_opt_summary_t): Likewise.
1771         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1772         (get_reference_optimization_summary): Use
1773         ipa_ref_opt_sum_summaries.
1774         (set_reference_vars_info): Remove.
1775         (set_reference_optimization_summary): Likewise.
1776         (ipa_init): Create summaries.
1777         (init_function_info): Use function summary.
1778         (ipa_ref_opt_summary_t::duplicate): New function.
1779         (ipa_ref_opt_summary_t::remove): New function.
1780         (get_read_write_all_from_node): Fix GNU coding style.
1781         (propagate): Use function summary.
1782         (write_node_summary_p): Fix GNU coding style.
1783         (stream_out_bitmap): Likewise.
1784         (ipa_reference_read_optimization_summary): Use function summary.
1785         (ipa_reference_c_finalize): Do not release hooks.
1787 2018-06-08  Martin Liska  <mliska@suse.cz>
1789         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1790         (analyze_function_body): Extract multiple calls of get_create.
1791         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1792         * ipa-inline.c (recursive_inlining): Use ::get method.
1793         * ipa-inline.h (estimate_edge_growth): Likewise.
1795 2018-06-08  Martin Liska  <mliska@suse.cz>
1797         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1798         HSA_INVALID.
1799         (hsa_function_summary::hsa_function_summary): Use the new enum
1800         value.
1801         (hsa_gpu_implementation_p): Use hsa_summaries::get.
1802         * hsa-gen.c (hsa_get_host_function): Likewise.
1803         (get_brig_function_name): Likewise.
1804         * ipa-hsa.c (process_hsa_functions): Likewise.
1805         (ipa_hsa_write_summary): Likewise.
1806         * symbol-summary.h (symtab_duplication): Use ::get function/
1807         (get): New function.
1809 2018-06-08  Martin Liska  <mliska@suse.cz>
1811         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1812         of get.
1813         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1814         (hsa_register_kernel): Likewise.
1815         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1816         * hsa-gen.c (hsa_get_host_function): Likewise.
1817         (get_brig_function_name): Likewise.
1818         (generate_hsa): Likewise.
1819         (pass_gen_hsail::execute): Likewise.
1820         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1821         (devirtualization_time_bonus): Likewise.
1822         (ipcp_propagate_stage): Likewise.
1823         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1824         (edge_set_predicate): Likewise.
1825         (evaluate_conditions_for_known_args): Likewise.
1826         (evaluate_properties_for_edge): Likewise.
1827         (ipa_fn_summary::reset): Likewise.
1828         (ipa_fn_summary_t::duplicate): Likewise.
1829         (dump_ipa_call_summary): Likewise.
1830         (ipa_dump_fn_summary): Likewise.
1831         (analyze_function_body): Likewise.
1832         (compute_fn_summary): Likewise.
1833         (estimate_edge_devirt_benefit): Likewise.
1834         (estimate_edge_size_and_time): Likewise.
1835         (estimate_calls_size_and_time): Likewise.
1836         (estimate_node_size_and_time): Likewise.
1837         (inline_update_callee_summaries): Likewise.
1838         (remap_edge_change_prob): Likewise.
1839         (remap_edge_summaries): Likewise.
1840         (ipa_merge_fn_summary_after_inlining): Likewise.
1841         (ipa_update_overall_fn_summary): Likewise.
1842         (read_ipa_call_summary): Likewise.
1843         (inline_read_section): Likewise.
1844         (write_ipa_call_summary): Likewise.
1845         (ipa_fn_summary_write): Likewise.
1846         (ipa_free_fn_summary): Likewise.
1847         * ipa-hsa.c (process_hsa_functions): Likewise.
1848         (ipa_hsa_write_summary): Likewise.
1849         (ipa_hsa_read_section): Likewise.
1850         * ipa-icf.c (sem_function::merge): Likewise.
1851         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1852         (do_estimate_edge_time): Likewise.
1853         (estimate_size_after_inlining): Likewise.
1854         (estimate_growth): Likewise.
1855         (growth_likely_positive): Likewise.
1856         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1857         (inline_call): Likewise.
1858         * ipa-inline.c (caller_growth_limits): Likewise.
1859         (can_inline_edge_p): Likewise.
1860         (can_inline_edge_by_limits_p): Likewise.
1861         (compute_uninlined_call_time): Likewise.
1862         (compute_inlined_call_time): Likewise.
1863         (want_inline_small_function_p): Likewise.
1864         (edge_badness): Likewise.
1865         (update_caller_keys): Likewise.
1866         (update_callee_keys): Likewise.
1867         (recursive_inlining): Likewise.
1868         (inline_small_functions): Likewise.
1869         (inline_to_all_callers_1): Likewise.
1870         (dump_overall_stats): Likewise.
1871         (early_inline_small_functions): Likewise.
1872         (early_inliner): Likewise.
1873         * ipa-inline.h (estimate_edge_growth): Likewise.
1874         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1875         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1876         * ipa-prop.h (IPA_NODE_REF): Likewise.
1877         (IPA_EDGE_REF): Likewise.
1878         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1879         (propagate_malloc): Likewise.
1880         * ipa-split.c (execute_split_functions): Likewise.
1881         * symbol-summary.h: Rename get to get_create.
1882         (get): Likewise.
1883         (get_create): Likewise.
1884         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1886 2018-06-08  Martin Liska  <mliska@suse.cz>
1888         * symbol-summary.h (release): Move definition out of class
1889         declaration.
1890         (symtab_removal): Likewise.
1891         (symtab_duplication): Likewise.
1893 2018-06-08  Martin Liska  <mliska@suse.cz>
1895         * symbol-summary.h (function_summary): Move constructor
1896         implementation out of class declaration.
1897         (release): Likewise.
1898         (symtab_insertion): Likewise.
1899         (symtab_removal): Likewise.
1900         (symtab_duplication): Likewise.
1901         (get): Likewise.
1903 2018-06-08  Martin Liska  <mliska@suse.cz>
1905         * Makefile.in: Remove support for MPX (macros, related functions,
1906         fields in cgraph_node, ...).
1907         * builtin-types.def (BT_BND): Likewise.
1908         (BT_FN_BND_CONST_PTR): Likewise.
1909         (BT_FN_CONST_PTR_BND): Likewise.
1910         (BT_FN_VOID_PTR_BND): Likewise.
1911         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
1912         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
1913         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
1914         (expand_builtin_mempcpy_with_bounds): Likewise.
1915         (expand_builtin_memset_with_bounds): Likewise.
1916         (expand_builtin_memset_args): Likewise.
1917         (std_expand_builtin_va_start): Likewise.
1918         (expand_builtin): Likewise.
1919         (expand_builtin_with_bounds): Likewise.
1920         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
1921         (DEF_LIB_BUILTIN_CHKP): Likewise.
1922         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
1923         (DEF_CHKP_BUILTIN): Likewise.
1924         (BUILT_IN_MEMCPY): Likewise.
1925         (BUILT_IN_MEMMOVE): Likewise.
1926         (BUILT_IN_MEMPCPY): Likewise.
1927         (BUILT_IN_MEMSET): Likewise.
1928         (BUILT_IN_STPCPY): Likewise.
1929         (BUILT_IN_STRCAT): Likewise.
1930         (BUILT_IN_STRCHR): Likewise.
1931         (BUILT_IN_STRCPY): Likewise.
1932         (BUILT_IN_STRLEN): Likewise.
1933         (BUILT_IN_MEMCPY_CHK): Likewise.
1934         (BUILT_IN_MEMMOVE_CHK): Likewise.
1935         (BUILT_IN_MEMPCPY_CHK): Likewise.
1936         (BUILT_IN_MEMSET_CHK): Likewise.
1937         (BUILT_IN_STPCPY_CHK): Likewise.
1938         (BUILT_IN_STRCAT_CHK): Likewise.
1939         (BUILT_IN_STRCPY_CHK): Likewise.
1940         * calls.c (store_bounds): Likewise.
1941         (emit_call_1): Likewise.
1942         (special_function_p): Likewise.
1943         (maybe_warn_nonstring_arg): Likewise.
1944         (initialize_argument_information): Likewise.
1945         (finalize_must_preallocate): Likewise.
1946         (compute_argument_addresses): Likewise.
1947         (expand_call): Likewise.
1948         * cfgexpand.c (expand_call_stmt): Likewise.
1949         (expand_return): Likewise.
1950         (expand_gimple_stmt_1): Likewise.
1951         (pass_expand::execute): Likewise.
1952         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
1953         (cgraph_node::remove): Likewise.
1954         (cgraph_node::dump): Likewise.
1955         (cgraph_node::verify_node): Likewise.
1956         * cgraph.h (chkp_function_instrumented_p): Likewise.
1957         (symtab_node::get_alias_target): Likewise.
1958         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
1959         (cgraph_local_p): Likewise.
1960         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
1961         (cgraph_edge::rebuild_references): Likewise.
1962         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
1963         (walk_polymorphic_call_targets): Likewise.
1964         (cgraph_node::expand_thunk): Likewise.
1965         (symbol_table::output_weakrefs): Likewise.
1966         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
1967         (ix86_handle_option): Likewise.
1968         * config/i386/constraints.md: Likewise.
1969         * config/i386/i386-builtin-types.def (BND): Likewise.
1970         (VOID): Likewise.
1971         (PVOID): Likewise.
1972         (ULONG): Likewise.
1973         * config/i386/i386-builtin.def (BDESC_END): Likewise.
1974         (BDESC_FIRST): Likewise.
1975         (BDESC): Likewise.
1976         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
1977         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
1978         * config/i386/i386.c (enum reg_class): Likewise.
1979         (ix86_target_string): Likewise.
1980         (ix86_option_override_internal): Likewise.
1981         (ix86_conditional_register_usage): Likewise.
1982         (ix86_valid_target_attribute_inner_p): Likewise.
1983         (ix86_set_indirect_branch_type): Likewise.
1984         (ix86_set_current_function): Likewise.
1985         (ix86_function_arg_regno_p): Likewise.
1986         (init_cumulative_args): Likewise.
1987         (ix86_function_arg_advance): Likewise.
1988         (ix86_function_arg): Likewise.
1989         (ix86_pass_by_reference): Likewise.
1990         (ix86_function_value_regno_p): Likewise.
1991         (ix86_function_value_1): Likewise.
1992         (ix86_function_value_bounds): Likewise.
1993         (ix86_return_in_memory): Likewise.
1994         (ix86_setup_incoming_vararg_bounds): Likewise.
1995         (ix86_va_start): Likewise.
1996         (indirect_thunk_need_prefix): Likewise.
1997         (print_reg): Likewise.
1998         (ix86_print_operand): Likewise.
1999         (ix86_expand_call): Likewise.
2000         (ix86_output_function_return): Likewise.
2001         (reg_encoded_number): Likewise.
2002         (BDESC_VERIFYS): Likewise.
2003         (ix86_init_mpx_builtins): Likewise.
2004         (ix86_init_builtins): Likewise.
2005         (ix86_emit_cmove): Likewise.
2006         (ix86_emit_move_max): Likewise.
2007         (ix86_expand_builtin): Likewise.
2008         (ix86_builtin_mpx_function): Likewise.
2009         (ix86_get_arg_address_for_bt): Likewise.
2010         (ix86_load_bounds): Likewise.
2011         (ix86_store_bounds): Likewise.
2012         (ix86_load_returned_bounds): Likewise.
2013         (ix86_store_returned_bounds): Likewise.
2014         (ix86_class_likely_spilled_p): Likewise.
2015         (ix86_hard_regno_mode_ok): Likewise.
2016         (x86_order_regs_for_local_alloc): Likewise.
2017         (ix86_mitigate_rop): Likewise.
2018         (ix86_bnd_prefixed_insn_p): Likewise.
2019         (ix86_mpx_bound_mode): Likewise.
2020         (ix86_make_bounds_constant): Likewise.
2021         (ix86_initialize_bounds): Likewise.
2022         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2023         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2024         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2025         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2026         (TARGET_CHKP_BOUND_MODE): Likewise.
2027         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2028         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2029         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2030         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2031         * config/i386/i386.h (TARGET_MPX): Likewise.
2032         (TARGET_MPX_P): Likewise.
2033         (VALID_BND_REG_MODE): Likewise.
2034         (FIRST_BND_REG): Likewise.
2035         (LAST_BND_REG): Likewise.
2036         (enum reg_class): Likewise.
2037         (BND_REG_P): Likewise.
2038         (BND_REGNO_P): Likewise.
2039         (BNDmode): Likewise.
2040         (ADJUST_INSN_LENGTH): Likewise.
2041         * config/i386/i386.md: Likewise.
2042         * config/i386/i386.opt: Likewise.
2043         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2044         (defined): Likewise.
2045         (LINK_MPX): Likewise.
2046         (MPX_SPEC): Likewise.
2047         (LIBMPX_SPEC): Likewise.
2048         (LIBMPXWRAPPERS_SPEC): Likewise.
2049         (CHKP_SPEC): Likewise.
2050         * config/i386/predicates.md: Likewise.
2051         * dbxout.c (dbxout_type): Likewise.
2052         * doc/extend.texi: Likewise.
2053         * doc/invoke.texi: Likewise.
2054         * doc/md.texi: Likewise.
2055         * doc/tm.texi: Likewise.
2056         * doc/tm.texi.in: Likewise.
2057         * dwarf2out.c (is_base_type): Likewise.
2058         (gen_formal_types_die): Likewise.
2059         (gen_subprogram_die): Likewise.
2060         (gen_type_die_with_usage): Likewise.
2061         (gen_decl_die): Likewise.
2062         (dwarf2out_late_global_decl): Likewise.
2063         * expr.c (expand_assignment): Likewise.
2064         (emit_storent_insn): Likewise.
2065         (store_expr_with_bounds): Likewise.
2066         (store_expr): Likewise.
2067         (expand_expr_real_1): Likewise.
2068         * expr.h (store_expr_with_bounds): Likewise.
2069         * function.c (use_register_for_decl): Likewise.
2070         (struct bounds_parm_data): Likewise.
2071         (assign_parms_augmented_arg_list): Likewise.
2072         (assign_parm_find_entry_rtl): Likewise.
2073         (assign_parm_is_stack_parm): Likewise.
2074         (assign_parm_load_bounds): Likewise.
2075         (assign_bounds): Likewise.
2076         (assign_parms): Likewise.
2077         (expand_function_start): Likewise.
2078         * gcc.c (CHKP_SPEC): Likewise.
2079         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2080         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2081         (wrestrict_dom_walker::check_call): Likewise.
2082         * gimple.c (gimple_build_call_from_tree): Likewise.
2083         * gimple.h (enum gf_mask): Likewise.
2084         (gimple_call_with_bounds_p): Likewise.
2085         (gimple_call_set_with_bounds): Likewise.
2086         * gimplify.c (gimplify_init_constructor): Likewise.
2087         * ipa-cp.c (initialize_node_lattices): Likewise.
2088         (propagate_constants_across_call): Likewise.
2089         (find_more_scalar_values_for_callers_subset): Likewise.
2090         * ipa-hsa.c (process_hsa_functions): Likewise.
2091         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2092         * ipa-icf.c (sem_function::merge): Likewise.
2093         * ipa-inline.c (early_inliner): Likewise.
2094         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2095         (warn_function_cold): Likewise.
2096         (propagate_pure_const): Likewise.
2097         * ipa-ref.h (enum GTY): Likewise.
2098         * ipa-split.c (find_retbnd): Likewise.
2099         (consider_split): Likewise.
2100         (split_function): Likewise.
2101         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2102         * ipa.c (walk_polymorphic_call_targets): Likewise.
2103         (symbol_table::remove_unreachable_nodes): Likewise.
2104         (process_references): Likewise.
2105         (cgraph_build_static_cdtor_1): Likewise.
2106         * lto-cgraph.c (lto_output_node): Likewise.
2107         (output_refs): Likewise.
2108         (compute_ltrans_boundary): Likewise.
2109         (input_overwrite_node): Likewise.
2110         (input_node): Likewise.
2111         (input_cgraph_1): Likewise.
2112         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2113         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2114         (class pass_chkp_instrumentation_passes): Likewise.
2115         (make_pass_chkp_instrumentation_passes): Likewise.
2116         * passes.def: Likewise.
2117         * rtl.h (struct GTY): Likewise.
2118         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2119         * stor-layout.c (layout_type): Likewise.
2120         * symtab.c: Likewise.
2121         * target.def: Likewise.
2122         * targhooks.c (default_chkp_bound_type): Likewise.
2123         (default_chkp_bound_mode): Likewise.
2124         (default_builtin_chkp_function): Likewise.
2125         (default_chkp_function_value_bounds): Likewise.
2126         (default_chkp_make_bounds_constant): Likewise.
2127         (default_chkp_initialize_bounds): Likewise.
2128         * targhooks.h (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         * toplev.c (compile_file): Likewise.
2135         (process_options): Likewise.
2136         * tree-core.h (DEF_BUILTIN): Likewise.
2137         (DEF_BUILTIN_CHKP): Likewise.
2138         * tree-inline.c (declare_return_variable): Likewise.
2139         (remap_gimple_stmt): Likewise.
2140         (copy_bb): Likewise.
2141         (initialize_inlined_parameters): Likewise.
2142         (expand_call_inline): Likewise.
2143         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2144         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2145         (make_pass_ipa_chkp_produce_thunks): Likewise.
2146         (make_pass_chkp): Likewise.
2147         (make_pass_chkp_opt): Likewise.
2148         (make_pass_chkp_instrumentation_passes): Likewise.
2149         * tree-pretty-print.c (dump_generic_node): Likewise.
2150         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2151         * tree-ssa-dce.c (propagate_necessity): Likewise.
2152         (eliminate_unnecessary_stmts): Likewise.
2153         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2154         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2155         * tree-ssa-sccvn.h: Likewise.
2156         * tree-ssa-strlen.c (get_string_length): Likewise.
2157         (valid_builtin_call): Likewise.
2158         (adjust_last_stmt): Likewise.
2159         (handle_builtin_strchr): Likewise.
2160         (handle_builtin_strcpy): Likewise.
2161         (handle_builtin_stxncpy): Likewise.
2162         (handle_builtin_memcpy): Likewise.
2163         (handle_builtin_strcat): Likewise.
2164         (strlen_check_and_optimize_stmt): Likewise.
2165         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2166         * tree-streamer-in.c: Likewise.
2167         * tree-streamer.c (record_common_node): Likewise.
2168         * tree.c (tree_code_size): Likewise.
2169         (wide_int_to_tree_1): Likewise.
2170         (type_contains_placeholder_1): Likewise.
2171         (build_common_tree_nodes): Likewise.
2172         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2173         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2174         (POINTER_BOUNDS_P): Likewise.
2175         (BOUNDED_TYPE_P): Likewise.
2176         (BOUNDED_P): Likewise.
2177         (CALL_WITH_BOUNDS_P): Likewise.
2178         (pointer_bounds_type_node): Likewise.
2179         * value-prof.c (gimple_ic): Likewise.
2180         * var-tracking.c (vt_add_function_parameters): Likewise.
2181         * varasm.c (make_decl_rtl): Likewise.
2182         (assemble_start_function): Likewise.
2183         (output_constant): Likewise.
2184         (maybe_assemble_visibility): Likewise.
2185         * varpool.c (ctor_for_folding): Likewise.
2186         * chkp-builtins.def: Remove.
2187         * ipa-chkp.c: Remove.
2188         * ipa-chkp.h: Remove.
2189         * rtl-chkp.c: Remove.
2190         * rtl-chkp.h: Remove.
2191         * tree-chkp-opt.c: Remove.
2192         * tree-chkp.c: Remove.
2193         * tree-chkp.h: Remove.
2195 2018-06-07  Carl Love  <cel@us.ibm.com>
2197         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2198         vextract_fp_from_shortl): Add BE support.
2200 2018-06-07  Paul Koning  <ni1d@arrl.net>
2202         * compare-elim.c (try_merge_compare): Don't merge compare if
2203         address contains a side effect.
2204         (try_eliminate_compare): Likewise.
2206 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2208         * config.gcc: Support "tremont".
2209         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2210         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2211         PROCESSOR_TREMONT.
2212         * config/i386/i386.c (m_TREMONT): Define.
2213         (processor_target_table): Add "tremont".
2214         (PTA_TREMONT): Define.
2215         (ix86_lea_outperforms): Add TARGET_TREMONT.
2216         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2217         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2218         and M_INTEL_GOLDMONT_PLUS.
2219         (fold_builtin_cpu): Add "tremont".
2220         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2221         (ix86_option_override_internal): Add "tremont".
2222         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2223         (processor_type): Add PROCESSOR_TREMONT.
2224         * config/i386/x86-tune.def: Add m_TREMONT.
2225         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2227 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2229         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2230         symbol defined for msp430i* devices to be lower case.
2232         gcc/testsuite/gcc.target/msp430/
2233         * msp430i-device-symbol.c: New test.
2234         * msp430f-device-symbol.c: New test.
2235         * msp430.h: New test header file.
2237 2018-06-07  Richard Biener  <rguenther@suse.de>
2239         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2240         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2241         Properly wrap signed arithmetic if overflow wraps.
2243 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2245         PR tree-optimization/69615
2246         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2247         of a cast from a same precision integral SSA_NAME in a bb dominated
2248         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2249         cast to utype if rhs2 has already a compatible type.
2251 2018-06-07  Richard Biener  <rguenther@suse.de>
2253         PR tree-optimization/85935
2254         * graphite-scop-detection.c (find_params_in_bb): Analyze
2255         condition operands with respect to the correct loop.  Assert
2256         the analysis doesn't fail.
2258 2018-06-04  Carl Love  <cel@us.ibm.com>
2260         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2261         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2262         as it is slightly cheaper.
2263         (first_match_or_eos_index_<mode>):
2264         Calculate index using natural element order.
2265         (first_match_index_<mode>):
2266         Calculate index using natural element order.
2267         (first_match_or_eos_index_<mode>):
2268         Calculate index using natural order.
2269         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2270         for BE and LE modes.
2271         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2272         P9V_BUILTIN_VCLZLSBB_V16QI.
2273         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2274         specific.
2276 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2278         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2279         indentation and line wrap for many prototypes.  Add missing
2280         @smallexample directives around block of prototypes for vec_xl and
2281         vec_xst.
2283 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2285         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2286         track if we pass or return IEEE 128-bit floating point.
2287         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2288         C++ mangling that is compatible with GCC 8.1.
2289         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2290         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2291         floating point types.
2292         (rs6000_function_arg_advance_1): Likewise.
2293         (rs6000_mangle_type): Optionally generate mangled names that match
2294         what GCC 8.1 generated for IEEE 128-bit floating point types.
2295         (rs6000_globalize_decl_name): If we have an external function that
2296         passes or returns IEEE 128-bit types, generate a weak reference
2297         from the mangled name used in GCC 8.1 to the current mangled
2298         name.
2299         (rs6000_init_builtins): Make __ibm128 use the long double type if
2300         long double is IBM extended double.  Make __float128 use the long
2301         double type if long double is IEEE 128-bit.
2303         PR target/85657
2304         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2305         macro for __ibm128 built-in functions.
2306         (PACK_IF): Add __ibm128 pack/unpack functions.
2307         (UNPACK_IF): Likewise.
2308         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2309         enable long double built-in functions if long double is IEEE
2310         128-bit floating point.
2311         (rs6000_invalid_builtin): Update long double built-in function
2312         error message.
2313         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2314         functions, adjust the built-in function to use the long double
2315         built-in function if __ibm128 and long double are the same type.
2316         * doc/extend.texi (PowerPC builtins): Update documention for
2317         __builtin_{,un}pack_longdouble.  Add documentation for
2318         __builtin_{,un}pack_ibm128.
2320 2018-06-06  Jim Wilson  <jimw@sifive.com>
2322         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2323         (struct machine_function): New field interrupt_mode.
2324         (riscv_handle_type_attribute): New function.  Add forward declaration.
2325         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2326         (riscv_expand_epilogue): Check interrupt_mode field.
2327         (riscv_set_current_function): Check interrupt attribute args and
2328         set interrupt_mode field.
2329         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2330         (riscv_sret, riscv_uret): New.
2331         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2332         new arguments to interrupt attribute.
2334 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2336         PR target/63177
2337         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2338         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2340 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2342         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2343         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2344         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2345         several redundant entries.
2347 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2349         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2350         type from "rtx" to "rtx_insn *".
2351         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2352         for local "call_insn", removing cast.
2353         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2355 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2357         PR tree-optimization/86066
2358         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2359         for BIT_INSERT_EXPR stores.
2361 2018-06-06  Richard Biener  <rguenther@suse.de>
2363         PR tree-optimization/86062
2364         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2365         component refs ontop
2366         of to be offsetted base.
2368 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2370         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2371         to be static and remove check on interrupt attribute name.
2373         gcc/testsuite/gcc.target/msp430/
2374         * function-attributes-4.c: New test.
2375         * static-interrupts.c: New test.
2377 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2379         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2380         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2382 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2384         PR target/79924
2385         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2386         second argument.
2387         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2388         Remove second argument, change how error is called.
2389         (aarch64_layout_arg): Remove second argument from
2390         aarch64_err_no_fpadvsimd call.
2391         (aarch64_init_cumulative_args): Ditto.
2392         (aarch64_gimplify_va_arg_expr): Ditto.
2393         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2395 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2397         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2398         (*simple_return_indirect_internal<mode>): Rename from
2399         simple_return_indirect_internal.  Use W mode iterator.
2400         (rstorssp): New expander.
2401         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2402         (clrssbsy): New expander.
2403         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2405 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2407         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2408         __typeof__.
2409         (cmse_check_pointed_object): Likewise.
2411 2018-06-05  Martin Liska  <mliska@suse.cz>
2413         PR gcov-profile/47618
2414         * doc/invoke.texi: Document how -fprofile-dir format
2415         is extended.
2417 2018-06-05  Richard Biener  <rguenther@suse.de>
2419         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2420         removal pretend DOM info isn't available so we do not update
2421         it and only remove edges, not dominated blocks.  Actually free
2422         DOM info in case we removed something.  Remove unreachable blocks.
2423         (mfb_keep_latches): Work with either DOM info or marked backedges.
2424         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2425         first.  Mark backedges if DOM info isn't available.
2426         (Re-)compute DOM info after cleanup_control_flow_pre.
2428 2018-06-05  Richard Biener  <rguenther@suse.de>
2430         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2431         (locus_discrim_hasher::hash): Adjust.
2432         (locus_discrim_hasher::equal): Likewise.
2433         (next_discriminator_for_locus): Work on line directly.
2434         (same_line_p): Pass in expanded locus1 as well.
2435         (assign_discriminators): Avoid redundant location expansions.
2437 2018-06-05  Richard Biener  <rguenther@suse.de>
2439         PR tree-optimization/86046
2440         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2441         if required after clearing TREE_ADDRESSABLE.
2443 2018-06-05  Richard Biener  <rguenther@suse.de>
2445         PR tree-optimization/86047
2446         * tree-ssa-loop.c (for_each_index): Glob handling of all
2447         decls and constants and really handle all of them.
2449 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2451         PR target/81497
2452         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2453         qualifier_void_pointer and qualifier_const_void_pointer.
2454         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2455         (arm_init_builtins): Handle the above.
2456         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2457         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2458         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2459         void intrinsics.
2461 2018-06-05  Martin Liska  <mliska@suse.cz>
2463         * auto-profile.c (read_autofdo_file): Do not use
2464         gcov_ctr_summary struct.
2465         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2466         * coverage.c (struct counts_entry): Likewise.
2467         (read_counts_file): Read just single summary entry.
2468         (get_coverage_counts): Use gcov_summary struct.
2469         * coverage.h (get_coverage_counts): Likewise.
2470         * gcov-dump.c (dump_working_sets): Likewise.
2471         (tag_summary): Dump just single summary.
2472         * gcov-io.c (gcov_write_summary): Write just histogram
2473         summary.
2474         (gcov_read_summary): Read just single summary.
2475         (compute_working_sets): Use gcov_summary struct.
2476         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2477         of GCOV_COUNTERS_SUMMABLE.
2478         (GCOV_COUNTERS_SUMMABLE): Remove.
2479         (GCOV_FIRST_VALUE_COUNTER): Replace with
2480         GCOV_COUNTER_V_INTERVAL.
2481         (struct gcov_ctr_summary): Remove.
2482         (struct gcov_summary): Directly use fields of former
2483         gcov_ctr_summary.
2484         (compute_working_sets): Use gcov_summary struct.
2485         * gcov.c (read_count_file): Do not use ctrs fields.
2486         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2487         struct.
2488         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2489         struct.
2490         * profile.c: Likewise.
2491         * profile.h: Likewise.
2493 2018-06-05  Martin Liska  <mliska@suse.cz>
2495         PR gcov-profile/84846
2496         * gcov.c (output_lines): Print working directory only
2497         in intermediate format.
2499 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
2501         * config/s390/s390-builtin-types.def: Add void function type.
2502         * config/s390/s390-builtins.def: Use the function type for the
2503         tbeginc builtin.
2505 2018-06-04  Jim Wilson  <jimw@sifive.com>
2507         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2508         to int.
2509         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
2510         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
2511         handle EH_RETURN_DATA_REGNO registers properly.
2512         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2513         (riscv_expand_epilogue): Update comment.  Change argument name and
2514         type.  Update code to use new name and type.  Pass new args to
2515         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
2516         EXCEPTION_RETURN.
2517         * config/riscv/riscv.md (NORMAL_RETURN): New.
2518         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2519         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2520         (eh_return): Call gen_eh_return_internal and emit barrier.
2521         (eh_return_internal): Call riscv_expand_epilogue.
2523 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
2525         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2526         bit_insertion field and declare can_be_merged_into method.
2527         (merged_store_group::can_be_merged_into): New method.
2528         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2529         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
2530         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2532 2018-06-04  Richard Biener  <rguenther@suse.de>
2534         PR tree-optimization/85955
2535         * builtins.c (fold_builtin_sincos): Convert pointers to
2536         destination to appropriate type before dereferencing.
2538 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
2540         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2542 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
2544         * expr.c (expand_expr_real_1): Force the operand into memory if
2545         its TYPE_MODE is BLKmode and if there is no integer mode for
2546         the number of bits being extracted.
2548 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2550         PR target/85832
2551         PR target/86036
2552         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2553         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2555 2018-06-04  Richard Biener  <rguenther@suse.de>
2557         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2558         (cleanup_tree_cfg_noloop): ... single caller.  Do
2559         start_recording_case_labels later.
2561 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
2563         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2564         to _IMMINTRIN_H_INCLUDED.
2565         * config/i386/pconfigintrin.h: Ditto.
2566         * config/i386/waitpkgintrin.h: Ditto.
2567         * config/i386/immintrin.h: Add includes for sgxintrin.h,
2568         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2569         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2570         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2571         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2572         waitpkgintrin.h and cldemoteintrin.h.
2574 2018-06-04  Richard Biener  <rguenther@suse.de>
2576         PR tree-optimization/86038
2577         * tracer.c (find_best_successor): Check probability for
2578         being initialized, bail out if not.
2580 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
2582         PR target/86003
2583         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2584         of bits to ignore when comparing architectures.
2586 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2588         PR tree-optimization/69615
2589         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2590         maximum or minimum of the type, try to merge it also as if
2591         range1 is + [-, x - 1] or + [x + 1, -].
2593         PR c++/86025
2594         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2596 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2598         PR tree-optimization/86034
2599         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2600         the unsigned bitfield type in a bit insertion sequence if it does not
2601         have a larger precision than the bitfield size.
2602         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2604 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
2606         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2608 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2610         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2611         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2612         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2613         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2615 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2617         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2618         Disable -fdelete-null-pointer-checks for ELF toolchain.
2620 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2621             Kito Cheng  <kito.cheng@gmail.com>
2623         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2624         (nds32le-*-*, nds32be-*-*): Integrate checking process.
2625         (nds32*-*-*): Add glibc and uclibc conditions.
2626         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2627         (TARGET_EXCEPT_UNWIND_INFO): Define.
2628         * config/nds32/elf.h: New file.
2629         * config/nds32/linux.h: New file.
2630         * config/nds32/nds32-elf.opt: New file.
2631         * config/nds32/nds32-linux.opt: New file.
2632         * config/nds32/nds32-fp-as-gp.c
2633         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2634         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2635         TARGET_LINUX_ABI.
2636         (nds32_asm_file_end): Ditto.
2637         (nds32_print_operand): Ditto.
2638         (nds32_insert_attributes): Ditto.
2639         (nds32_init_libfuncs): New function.
2640         (TARGET_HAVE_TLS): Define.
2641         (TARGET_INIT_LIBFUNCS): Define.
2642         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2643         spec content.
2644         (TARGET_ELF): Apply different mcmodel setting.
2645         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2646         been migrated into elf.h and linux.h files.
2647         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2648         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2649         (mcmodel): The content has been migrated into nds32-elf.opt and
2650         nds32-linux.opt files.
2651         * config/nds32/t-elf: New file.
2652         * config/nds32/t-linux: New file.
2654 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2655             Shiva Chen  <shiva0217@gmail.com>
2657         * config/nds32/constants.md (unspec_volatile_element): Add
2658         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2659         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2660         optimization.
2661         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2662         (make_pass_nds32_fp_as_gp): Declare.
2663         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2664         optmization pass.
2665         (nds32_asm_function_end_prologue): Remove unused asm output.
2666         (nds32_asm_function_begin_epilogue): Remove unused asm output.
2667         (nds32_asm_file_start): Output necessary fp_as_gp information.
2668         (nds32_option_override): Adjust register usage.
2669         (nds32_expand_prologue): Consider fp_as_gp situation.
2670         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2671         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2672         (epilogue): Ditto.
2673         (return): Ditto.
2674         (simple_return): Ditto.
2675         (omit_fp_begin): Output special directive for fp_as_gp.
2676         (omit_fp_end): Output special directive for fp_as_gp.
2677         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2678         mforbid-fp-as-gp): New options.
2680 2018-06-01  Mark Wielaard  <mark@klomp.org>
2682         * dwarf2out.c (dwarf2out_finish): Remove generation of
2683         DW_AT_loclists_base.
2685 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2687         * gimple-ssa-store-merging.c: Include gimple-fold.h.
2688         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2689         (struct merged_store_group): Add bit_insertion field.
2690         (dump_char_array): Use standard hexadecimal format.
2691         (merged_store_group::merged_store_group): Set bit_insertion to false.
2692         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
2693         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
2694         also print the mask in the dump file.
2695         (pass_store_merging::gate): Minor tweak.
2696         (imm_store_chain_info::coalesce_immediate): Fix wrong association
2697         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
2698         stores with INTEGER_CST stores.
2699         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2700         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2701         and use it throughout.  Generate bit insertion sequences if need be.
2702         (pass_store_merging::process_store): Remove redundant condition.
2703         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2705 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
2707         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2708         the 128-bit floating point types.  Fix function comment.
2710 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2712         * config/aarch64/aarch64-simd.md
2713         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2714         mnemonics.
2715         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2716         mnemonics.
2718 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2720         PR tree-optimization/85989
2721         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2722         variable.
2723         (backprop::intersect_uses): Check it when deciding whether this
2724         is a backedge reference.
2725         (backprop::process_block): Add each phi to m_visited_phis
2726         after visiting it, then clear it at the end.
2728 2018-06-01  Richard Biener  <rguenther@suse.de>
2730         * tree-vectorizer.h (vect_dr_stmt): New function.
2731         (vect_get_load_cost): Adjust.
2732         (vect_get_store_cost): Likewise.
2733         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2734         Use vect_dr_stmt instead of DR_SMTT.
2735         (vect_record_base_alignments): Likewise.
2736         (vect_calculate_target_alignment): Likewise.
2737         (vect_compute_data_ref_alignment): Likewise and make static.
2738         (vect_update_misalignment_for_peel): Likewise.
2739         (vect_verify_datarefs_alignment): Likewise.
2740         (vector_alignment_reachable_p): Likewise.
2741         (vect_get_data_access_cost): Likewise.  Pass down
2742         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2743         (vect_get_peeling_costs_all_drs): Likewise.
2744         (vect_peeling_hash_get_lowest_cost): Likewise.
2745         (vect_enhance_data_refs_alignment): Likewise.
2746         (vect_find_same_alignment_drs): Likewise.
2747         (vect_analyze_data_refs_alignment): Likewise.
2748         (vect_analyze_group_access_1): Likewise.
2749         (vect_analyze_group_access): Likewise.
2750         (vect_analyze_data_ref_access): Likewise.
2751         (vect_analyze_data_ref_accesses): Likewise.
2752         (vect_vfa_segment_size): Likewise.
2753         (vect_small_gap_p): Likewise.
2754         (vectorizable_with_step_bound_p): Likewise.
2755         (vect_prune_runtime_alias_test_list): Likewise.
2756         (vect_analyze_data_refs): Likewise.
2757         (vect_supportable_dr_alignment): Likewise.
2758         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2759         (vect_gen_prolog_loop_niters): Likewise.
2760         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2761         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2762         modify DR_STMT.
2763         (vect_recog_mask_conversion_pattern): Likewise.
2764         (vect_try_gather_scatter_pattern): Likewise.
2765         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2766         to vect_get_store_cost.
2767         (vect_get_store_cost): Get stmt_info instead of DR.
2768         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2769         (vect_get_load_cost): Get stmt_info instead of DR.
2771 2018-06-01  Richard Biener  <rguenther@suse.de>
2773         PR middle-end/86017
2774         * gimple-fold.c (var_decl_component_p): Also allow offsetted
2775         vars wrapped in MEM_REFs.
2777 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2779         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2780         Fix subreg tests so that we only return a choice between
2781         GENERAL_REGS and FP_REGS if the original classes included both.
2783 2018-06-01  Richard Biener  <rguenther@suse.de>
2785         PR ipa/85960
2786         * tree-ssa-structalias.c (get_function_part_constraint):
2787         Handle NULL fi->decl.
2788         (find_func_aliases_for_call): Properly handle indirect
2789         fi from direct call.
2790         (find_func_clobbers): Likewise.
2791         (ipa_pta_execute): Likewise.
2792         (create_variable_info_for): For functions that are ifunc_resolver
2793         resolve to a varinfo that contains the result of the resolver call.
2794         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2795         aliases.
2797 2018-05-31  Michael Collison  <michael.collison@arm.com>
2799         * config/aarch64/aarch64.md:
2800         (*fix_to_zero_extenddfdi2): New pattern.
2801         * gcc.target/aarch64/fix_extend1.c: New testcase.
2803 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
2805         PR middle-end/78809
2806         PR middle-end/83026
2807         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2808         and BUILT_IN_STRNCMP_EQ.
2809         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2810         BUILT_IN_STRNCMP_EQ.
2811         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2812         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2813         (gimple_fold_builtin): Likewise.
2814         * tree-ssa-strlen.c (compute_string_length): New function.
2815         (determine_min_obsize): New function.
2816         (handle_builtin_string_cmp): New function to handle calls to
2817         string compare functions.
2818         (strlen_optimize_stmt): Add handling to builtin string compare
2819         calls.
2820         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2821         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2822         * tree.c (build_common_builtin_nodes): Add new defines of
2823         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2825 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
2827         PR target/85984
2828         * bb-reorder.c (pass_partition_blocks::gate): Return false for
2829         functions with naked attribute.
2831 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
2833         * config/i386/sse.md (avx_vec_concat<mode>):
2834         Substitute concat_tg_mode mode attribute with xtg_mode.
2835         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2836         (concat_tg_mode): Remove mode attribute.
2838 2018-05-31  Martin Sebor  <msebor@redhat.com>
2840         PR c/82063
2841         * calls.c (alloc_max_size): Correct a logic error/typo.
2842         Treat excessive arguments as infinite.  Warn for invalid arguments.
2843         * doc/invoke.texi (-Walloc-size-larger-than): Update.
2845 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
2847         PR target/85829
2848         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2849         and movx for Haswell.
2851 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
2852             Cesar Philippidis  <cesar@codesourcery.com>
2854         PR middle-end/85879
2855         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2856         when emitting error on private/firstprivate reductions.
2857         * omp-low.c (lower_omp_target): Avoid reference-type processing
2858         on pointers for firstprivate clause.
2860 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2862         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2863         (st1x2): Likewise.
2864         (st1x3): Likewise.
2865         * config/aarch64/aarch64-simd.md
2866         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2867         (aarch64_ld1_x3_<mode>): Likewise
2868         (aarch64_st1x2<VALLDIF:mode>): Likewise
2869         (aarch64_st1_x2_<mode>): Likewise
2870         (aarch64_st1x3<VALLDIF:mode>): Likewise
2871         (aarch64_st1_x3_<mode>): Likewise
2872         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2873         (vld1_s8_x3): Likewise.
2874         (vld1_u16_x3): Likewise.
2875         (vld1_s16_x3): Likewise.
2876         (vld1_u32_x3): Likewise.
2877         (vld1_s32_x3): Likewise.
2878         (vld1_u64_x3): Likewise.
2879         (vld1_s64_x3): Likewise.
2880         (vld1_f16_x3): Likewise.
2881         (vld1_f32_x3): Likewise.
2882         (vld1_f64_x3): Likewise.
2883         (vld1_p8_x3): Likewise.
2884         (vld1_p16_x3): Likewise.
2885         (vld1_p64_x3): Likewise.
2886         (vld1q_u8_x3): Likewise.
2887         (vld1q_s8_x3): Likewise.
2888         (vld1q_u16_x3): Likewise.
2889         (vld1q_s16_x3): Likewise.
2890         (vld1q_u32_x3): Likewise.
2891         (vld1q_s32_x3): Likewise.
2892         (vld1q_u64_x3): Likewise.
2893         (vld1q_s64_x3): Likewise.
2894         (vld1q_f16_x3): Likewise.
2895         (vld1q_f32_x3): Likewise.
2896         (vld1q_f64_x3): Likewise.
2897         (vld1q_p8_x3): Likewise.
2898         (vld1q_p16_x3): Likewise.
2899         (vld1q_p64_x3): Likewise.
2900         (vst1_s64_x2): Likewise.
2901         (vst1_u64_x2): Likewise.
2902         (vst1_f64_x2): Likewise.
2903         (vst1_s8_x2): Likewise.
2904         (vst1_p8_x2): Likewise.
2905         (vst1_s16_x2): Likewise.
2906         (vst1_p16_x2): Likewise.
2907         (vst1_s32_x2): Likewise.
2908         (vst1_u8_x2): Likewise.
2909         (vst1_u16_x2): Likewise.
2910         (vst1_u32_x2): Likewise.
2911         (vst1_f16_x2): Likewise.
2912         (vst1_f32_x2): Likewise.
2913         (vst1_p64_x2): Likewise.
2914         (vst1q_s8_x2): Likewise.
2915         (vst1q_p8_x2): Likewise.
2916         (vst1q_s16_x2): Likewise.
2917         (vst1q_p16_x2): Likewise.
2918         (vst1q_s32_x2): Likewise.
2919         (vst1q_s64_x2): Likewise.
2920         (vst1q_u8_x2): Likewise.
2921         (vst1q_u16_x2): Likewise.
2922         (vst1q_u32_x2): Likewise.
2923         (vst1q_u64_x2): Likewise.
2924         (vst1q_f16_x2): Likewise.
2925         (vst1q_f32_x2): Likewise.
2926         (vst1q_f64_x2): Likewise.
2927         (vst1q_p64_x2): Likewise.
2928         (vst1_s64_x3): Likewise.
2929         (vst1_u64_x3): Likewise.
2930         (vst1_f64_x3): Likewise.
2931         (vst1_s8_x3): Likewise.
2932         (vst1_p8_x3): Likewise.
2933         (vst1_s16_x3): Likewise.
2934         (vst1_p16_x3): Likewise.
2935         (vst1_s32_x3): Likewise.
2936         (vst1_u8_x3): Likewise.
2937         (vst1_u16_x3): Likewise.
2938         (vst1_u32_x3): Likewise.
2939         (vst1_f16_x3): Likewise.
2940         (vst1_f32_x3): Likewise.
2941         (vst1_p64_x3): Likewise.
2942         (vst1q_s8_x3): Likewise.
2943         (vst1q_p8_x3): Likewise.
2944         (vst1q_s16_x3): Likewise.
2945         (vst1q_p16_x3): Likewise.
2946         (vst1q_s32_x3): Likewise.
2947         (vst1q_s64_x3): Likewise.
2948         (vst1q_u8_x3): Likewise.
2949         (vst1q_u16_x3): Likewise.
2950         (vst1q_u32_x3): Likewise.
2951         (vst1q_u64_x3): Likewise.
2952         (vst1q_f16_x3): Likewise.
2953         (vst1q_f32_x3): Likewise.
2954         (vst1q_f64_x3): Likewise.
2955         (vst1q_p64_x3): Likewise.
2957 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2959         * config/msp430/msp430.c (msp430_output_labelref): Prepend
2960         user_label_prefix to name.
2962         * tree-core.h: Update comment about the format of NAME string
2963         passed to handler in attribute_spec.
2965         * config/msp430/msp430.md: Remove erroneous subreg expression from
2966         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
2967         zero_extend{q,h}isi2.
2969 2018-05-30  Borislav Petkov  <bp@suse.de>
2971         * doc/extend.texi: Document some architecture specific
2972         constraints and sort entries.
2974 2018-05-30  Martin Sebor  <msebor@redhat.com>
2976         PR middle-end/85369
2977         * builtins.c (expand_builtin_stpcpy_1): New function.
2978         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
2979         only if the former succeeds.
2981 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2983         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
2984         in saphira.
2986 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2988         * doc/invoke.texi (-flinker-output): Document
2990 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
2992         * passes.c (ipa_write_summaries): Only modify statements if body
2993         is in memory.
2994         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
2995         incrementally linking.
2996         (ipa_passes): Likewise.
2997         * lto-cgraph.c (lto_output_node): When incrementally linking do not
2998         pass down resolution info.
2999         * common.opt (flag_incremental_link): Update info.
3000         * gcc.c (plugin specs): Turn flinker-output=* to
3001         -plugin-opt=-linker-output-known
3002         * toplev.c (compile_file): Also cut compilation when doing incremental
3003         link.
3004         * flag-types. (enum lto_partition_model): Add
3005         LTO_LINKER_OUTPUT_NOLTOREL.
3006         (invoke.texi): Add -flinker-output docs.
3007         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3008         link same way as WPA; do not stream in dead initializers.
3010         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3011         darf2out_register_external_decl): Support incremental link.
3013 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3015         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3017 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3019         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3020         it down to simple_object_copy_lto_debug_sections.
3021         (run_gcc): Determine incremental LTO link time and configure
3022         lto1 into non-wpa mode, disable renaming of debug sections.
3024 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3026         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3027         descriptions of various incorrectly documented functions.
3029 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3031         Revert:
3032         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3033         address check not strict.
3035 2018-05-30  Richard Biener  <rguenther@suse.de>
3037         PR tree-optimization/85964
3038         * tracer.c (better_p): Drop initialized count check, we only
3039         call the function with initialized counts now.
3040         (find_best_successor): Do find a best edge if one
3041         has uninitialized count.
3042         (find_best_predecessor): Likewise.  Do BB frequency check only
3043         if count is initialized.
3045 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3047         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3048         (aarch64_ldrstr_offset_compare): New.
3049         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3050         load/store orderings.
3051         (aarch64_gen_adjusted_ldpstp): Likewise.
3053 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3055         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3056         Check for subset of GENERAL_REGS and FP_REGS.
3057         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3058         r=w alternative.
3060 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3062         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3063         and wi::to_poly_offset.  Add the current offset and then check
3064         whether the sum fits, rather than using an unchecked addition of
3065         a checked term.  Check for a shwi rather than a uhwi.
3066         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3067         (store_constructor): Use poly_int_tree_p.
3068         (expand_expr_real_1): Likewise.
3069         * function.c (assign_temp): Likewise.
3070         * fold-const.c (const_binop): Use poly_int_tree_p and
3071         wi::to_poly_offset.
3072         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3073         division.
3074         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3075         to_poly_offset for MEM offsets.
3076         * ipa-icf.c (sem_variable::equals): Likewise.
3077         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3078         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3079         wi::to_poly_offset for BIT_FIELD_REF offsets.
3080         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3081         wi::to_poly_offset.
3082         * var-tracking.c (emit_note_insn_var_location): Use
3083         tree_to_poly_uint64.
3085 2018-05-29  Jim Wilson  <jimw@sifive.com>
3087         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3089 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3091         PR target/85950
3092         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3093         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3094         sequence.
3095         (sse4_1_round<mode>2): Use nonimmediate_operand
3096         for operand 1 predicate.
3098 2018-05-29  Martin Sebor  <msebor@redhat.com>
3099             Richard Biener  <rguenther@suse.de>
3101         PR testsuite/85888
3102         * calls.c (get_size_range): Call determine_value_range instead
3103         of get_value_range..
3104         * tree-vrp.h (determine_value_range): Declared new function.
3105         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3107 2018-05-29  Richard Biener  <rguenther@suse.de>
3109         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3110         sure to use non-pattern stmts for get_earlier_stmt arguments.
3111         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3112         called on pattern stmts.
3113         (get_later_stmt): Likewise.
3115 2018-05-29  Martin Liska  <mliska@suse.cz>
3117         PR gcov-profile/85759
3118         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3119         env variables.
3121 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3123         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3124         VEC_UNPACK_*_EXPR.
3125         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3126         VEC_PACK_*_EXPR.
3128         PR target/85918
3129         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3130         VEC_PACK_FLOAT_EXPR): New tree codes.
3131         * tree-pretty-print.c (op_code_prio): Handle
3132         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3133         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3134         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3135         * tree-inline.c (estimate_operator_cost): Likewise.
3136         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3137         * fold-const.c (const_binop): Likewise.
3138         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3139         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3140         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3141         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3142         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3143         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3144         * expr.c (expand_expr_real_2): Likewise.
3145         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3146         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3147         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3148         optabs.
3149         * optabs.c (expand_widen_pattern_expr): For
3150         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3151         sign from result type rather than operand's type.
3152         (expand_binop_directly): For vec_packu_float_optab and
3153         vec_packs_float_optab allow result type to be different from operand's
3154         type.
3155         * optabs-tree.c (optab_for_tree_code): Handle
3156         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3157         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3158         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3159         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3160         VEC_PACK_FLOAT_EXPR.
3161         * tree-vect-stmts.c (supportable_widening_operation): Handle
3162         FIX_TRUNC_EXPR.
3163         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3164         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3165         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3166         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3167         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3168         mode attributes.
3169         (vec_pack<floatprefix>_float_<mode>): New expander.
3170         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3171         attributes.
3172         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3173         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3174         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3175         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3176         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3177         Document.
3178         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3179         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3180         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3181         VEC_PACK_FLOAT_EXPR): Document.
3183 2018-05-29  Richard Biener  <rguenther@suse.de>
3185         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3186         member.
3187         (stmt_vec_info_vec): Make pointer.
3188         (init_stmt_vec_info_vec): Remove.
3189         (free_stmt_vec_info_vec): Likewise.
3190         (set_stmt_vec_info_vec): New function.
3191         (free_stmt_vec_infos): Likewise.
3192         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3193         (set_vinfo_for_stmt): Likewise.
3194         (get_earlier_stmt): Likewise.
3195         (get_later_stmt): Likewise.
3196         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3197         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3198         (vec_info::~vec_info): Free stmt_vec_infos.
3199         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3200         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3201         (pass_slp_vectorize::execute): Likewise.
3202         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3203         (free_stmt_vec_info_vec): Likewise.
3204         (set_stmt_vec_info_vec): New function.
3205         (free_stmt_vec_infos): Likewise.
3206         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3207         the global stmt_vec_info_vec.
3208         * tree-parloops.c (gather_scalar_reductions): Use
3209         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3210         vector.
3212 2018-05-29  Richard Biener  <rguenther@suse.de>
3214         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3216 2018-05-29  Martin Liska  <mliska@suse.cz>
3217             David Malcolm  <dmalcolm@redhat.com>
3219         * vec.c (test_reverse): New.
3220         (vec_c_tests): Add new test.
3221         * vec.h (vl_ptr>::reverse): New function.
3223 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3225         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3227         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3228         and later.
3230 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3232         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3234 2018-05-28  Richard Biener  <rguenther@suse.de>
3236         PR tree-optimization/85933
3237         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3238         look at stmts marked as vectorizable.
3240 2018-05-28  Richard Biener  <rguenther@suse.de>
3242         PR tree-optimization/85934
3243         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3244         vector boolean check before scalar optimization.
3246 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3248         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3249         for armv5te.
3251 2018-05-28  Mark Wielaard  <mark@klomp.org>
3253         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3254         if it is an expression containing a minus sign.
3256 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3258         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3260 2018-05-27  Paul Koning  <ni1d@arrl.net>
3262         * config/pdp11/pdp11.md (truncsihi2): Remove.
3264 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3265             Chung-Ju Wu  <jasonwucj@gmail.com>
3267         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3268         implementation.
3269         (unaligned_store_dw): Ditto.
3270         * config/nds32/nds32-memory-manipulation.c
3271         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3272         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3273         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3274         (emit_setmem_word_loop): Rename to ...
3275         (emit_setmem_doubleword_loop): ... this.
3276         (nds32_gen_dup_4_byte_to_word_value): New function.
3277         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3278         (nds32_expand_setmem_loop): Refine implementation.
3279         (nds32_expand_setmem_loop_v3m): Ditto.
3280         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3281         pattern.
3283 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3285         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3287 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3289         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3290         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3291         machine->attr_no_prologue_p.
3292         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3293         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3294         (nds32_expand_epilogue): Consider attr_naked_p.
3295         (nds32_expand_epilogue_v3pop): Likewise.
3296         (nds32_can_use_return_insn): Likewise.
3297         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3298         attr_no_prologue_p fields.
3299         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3301 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3303         PR target/85918
3304         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3305         attributes.
3306         * config/i386/sse.md
3307         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3308         Rename to ...
3309         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3310         ... this.
3311         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3312         Rename to ...
3313         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3314         ... this.
3315         (*<floatsuffix>floatv2div2sf2): Rename to ...
3316         (*float<floatunssuffix>v2div2sf2): ... this.
3317         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3318         (float<floatunssuffix>v2div2sf2_mask): ... this.
3319         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3320         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3321         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3322         to ...
3323         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3324         ... this.
3325         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3326         Rename to ...
3327         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3328         ... this.
3329         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3330         Rename to ...
3331         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3332         ... this.
3333         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3334         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3335         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3336         gen_ufix_truncv8dfv8si2.
3337         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3338         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3339         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3340         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3341         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3342         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3343         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3344         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3346 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3348         PR target/85900
3349         PR target/85345
3350         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3352 2018-05-25  Jim Wilson  <jimw@sifive.com>
3354         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3355         * config/riscv/riscv.c (struct machine_function): Add
3356         interrupt_handler_p and attribute_checked_p fields.
3357         (riscv_attribute_table): Add interrupt.
3358         (riscv_interrupt_type_p): New.
3359         (riscv_save_reg_p): Save extra regs for interrupt handler.
3360         (riscv_use_save_libcall): Return false  for interrupt handler.
3361         (riscv_first_stack_step): Add forward declaration.
3362         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3363         for interrupt handler with large frame.  Use it for saved reg list.
3364         (riscv_expand_prologue): Move flag_stack_usage_info support to
3365         eliminate duplication.
3366         (riscv_expand_epilogue): Generate mret for interrupt handler.
3367         (riscv_epilogue_uses): New.
3368         (riscv_can_use_return_insn): Return false for interrupt handler.
3369         (riscv_function_ok_for_sibcall): Likewise.
3370         (riscv_set_current_function): Add interrupt handler support.
3371         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3372         * config/riscv/riscv.md (UNSPECV_MRET): New.
3373         (GP_REGNUM): New.
3374         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3375         (riscv_mret): New.
3376         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3378 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3380         PR tree-optimization/85712
3381         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3382         this candidate has already been replaced in-situ by a copy.
3384 2018-05-25  Jason Merrill  <jason@redhat.com>
3386         PR c++/80485 - inline function non-zero address.
3387         * symtab.c (nonzero_address): Check DECL_COMDAT.
3389 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3391         PR target/83628
3392         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3393         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3394         extension of SImode operation.  Use const123_operand predicate.
3395         (*saddsi_1): Remove.
3396         (*saddl_se_1): Ditto.
3397         (*ssubsi_1): Ditto.
3398         (*ssubl_se_1): Ditto.
3399         * config/alpha/predicates.md (const123_operand): New predicate.
3400         * config/alpha/constraints.md (P): Use IN_RANGE.
3402 2018-05-25  Richard Biener  <rguenther@suse.de>
3404         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3405         defaulted to true.
3406         (ref_maybe_used_by_stmt_p): Likewise.
3407         (stmt_may_clobber_ref_p): Likewise.
3408         (stmt_may_clobber_ref_p_1): Likewise.
3409         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3410         and pass it along.
3411         (ref_maybe_used_by_stmt_p): Likewise.
3412         (stmt_may_clobber_ref_p): Likewise.
3413         (stmt_may_clobber_ref_p_1): Likewise.
3414         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3415         the alias oracle to disambiguate DRs with stmts DR analysis
3416         couldn't handle.
3417         (vect_analyze_data_refs): Do not give up on not analyzable
3418         DRs for BB vectorization.  Remove code truncating the dataref
3419         vector.
3421 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3423         PR target/85832
3424         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3425         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3426         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3428 2018-05-25  Richard Biener  <rguenther@suse.de>
3430         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3431         function, combining stmt data ref gathering and fatal analysis
3432         parts.
3433         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3434         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3435         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3436         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3437         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3439 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3441         PR tree-optimization/85720
3442         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3443         SCC if all partitions are builtins.
3444         (version_loop_by_alias_check): New parameter.  Generate cancelable
3445         runtime alias check if all partitions are builtins.
3446         (distribute_loop): Update call to above function.
3448 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3450         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3451         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3452         (parm_default_def_partition_arg): Ditto.
3453         (set_parm_default_def_partition): Ditto.
3454         (get_parm_default_def_partitions): Ditto and make it static.
3455         (get_undefined_value_partitions): Ditto and make it static.
3456         (remove_ssa_form): Refactor call to init_var_map here.
3457         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3458         computation for loop region.
3459         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3460         (register_default_def): Delete.
3461         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3462         (parm_default_def_partition_arg): Ditto.
3463         (set_parm_default_def_partition): Ditto.
3464         (get_parm_default_def_partitions): Ditto and make it static.
3465         (get_undefined_value_partitions): Ditto and make it static.
3466         (coalesce_with_default, coalesce_with_default): Update comment.
3467         (create_coalesce_list_for_region): New func factored out from
3468         create_outofssa_var_map.
3469         (populate_coalesce_list_for_outofssa): New func factored out from
3470         create_outofssa_var_map and coalesce_ssa_name.
3471         (create_outofssa_var_map): Delete.
3472         (coalesce_ssa_name): Refactor to support live range computation.
3473         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3474         (get_parm_default_def_partitions): Delete.
3475         (get_undefined_value_partitions): Ditto.
3476         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3477         computation for loop region.
3478         (new_tree_live_info, loe_visit_block): Ditto.
3479         (live_worklist, set_var_live_on_entry): Ditto.
3480         (calculate_live_on_exit, verify_live_on_entry): Ditto.
3481         * tree-ssa-live.h (struct _var_map): New fields.
3482         (init_var_map): Change decl.
3483         (region_contains_p): New.
3485 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3487         * tree-ssa-live.h (live_merge_and_clear): Delete.
3489 2018-05-25  Richard Biener  <rguenther@suse.de>
3491         PR c++/85912
3492         * tree-dump.c (dequeue_and_dump): Remove access to removed
3493         operand 2 of a SWITCH_EXPR.
3495 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3497         * doc/sourcebuild.texi (vect_double_cond_arith): Include
3498         multiplication and division.
3499         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3500         (cond_udiv@var{m}, cond_umod@var{m}): Document.
3501         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3502         (cond_udiv_optab, cond_umod_optab): New optabs.
3503         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3504         (IFN_COND_RDIV): New internal functions.
3505         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3506         TRUNC_MOD_EXPR and RDIV_EXPR.
3507         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3508         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3509         New unspecs.
3510         (SVE_INT_BINARY): Include mult.
3511         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3512         (optab, sve_int_op): Handle mult.
3513         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3514         UNSPEC_COND_DIV.
3515         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3516         for SVE_INT_BINARY_SD.
3518 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3520         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3521         (optab, sve_int_op): Handle div and udiv.
3522         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3523         for SVE_INT_BINARY_SD.
3524         (*<optab><mode>3): New insn for the same.
3526 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3528         * tree-vect-patterns.c: Include predict.h.
3529         (vect_recog_divmod_pattern): Restrict check for division support
3530         to when optimizing for size.
3532 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3534         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3535         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3536         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3537         (gimple_match_op::set_op): Likewise.
3538         (gimple_resimplify4): Declare.
3539         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3540         (expr::gen_transform): Likewise.
3541         (decision_tree::gen): Generate a simplification routine for 4 operands.
3542         * gimple-match-head.c (gimple_simplify): Add an overload for
3543         4 operands.  In the top-level function, handle up to 4 call
3544         arguments and call gimple_resimplify4.
3545         (gimple_resimplify4): New function.
3546         (build_call_internal): Pass a fourth operand.
3547         (maybe_push_to_seq): Likewise.
3548         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3549         Fold VEC_COND_EXPRs of an operation and a default value into
3550         an IFN_COND_* function if possible.
3551         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3552         New unspecs.
3553         (SVE_COND_FP_BINARY): Include them.
3554         (optab, sve_fp_op): Handle them.
3555         (SVE_INT_BINARY_REV): New code iterator.
3556         (SVE_COND_FP_BINARY_REV): New int iterator.
3557         (commutative): New int attribute.
3558         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3559         Declare.
3560         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3561         function.
3562         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3563         (*cond_<optab><mode>): New patterns for reversed operands.
3565 2018-05-25  Richard Biener  <rguenther@suse.de>
3567         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3568         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3569         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3570         (STMT_VINFO_GROUPED_ACCESS): Adjust.
3571         * tree-vect-data-refs.c (everywhere): Adjust users.
3572         * tree-vect-loop.c (everywhere): Likewise.
3573         * tree-vect-slp.c (everywhere): Likewise.
3574         * tree-vect-stmts.c (everywhere): Likewise.
3575         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3577 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3579         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3580         Rename to...
3581         (gcc_cv_as_section_exclude): ... this.
3582         Try Solaris as #exclude syntax.
3583         * configure: Regenerate.
3584         * config.in: Regenerate.
3585         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3586         SECTION_EXCLUDE.
3587         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3588         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3590         * varasm.c (default_elf_asm_named_section): Don't check if
3591         HAVE_GAS_SECTION_EXCLUDE is defined.
3593 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3595         * doc/md.texi: Update the documentation of the cond_* optabs
3596         to mention the new final operand.  Fix GET_MODE_NUNITS call.
3597         Describe the scalar case too.
3598         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3599         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3600         instead of 2.
3601         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3602         (get_conditional_internal_fn): Update comment.
3603         * tree-vect-loop.c (vectorizable_reduction): Pass the original
3604         accumulator value as a final argument to conditional functions.
3605         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3606         a define_expand and add an "else" operand.  Assert for now that
3607         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
3608         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3609         (*cond_<optab><mode>): New patterns.
3610         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3611         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3612         (UNSPEC_COND_EOR): Delete.
3613         (optab): Remove associated mappings.
3614         (SVE_INT_BINARY): New code iterator.
3615         (sve_int_op): Remove int attribute and add "minus" to the code
3616         attribute.
3617         (SVE_COND_INT_OP): Delete.
3618         (SVE_COND_FP_OP): Rename to...
3619         (SVE_COND_FP_BINARY): ...this.
3621 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3623         * optabs.c (can_reuse_operands_p): New function.
3624         (maybe_legitimize_operands): Try to reuse the results for
3625         earlier operands.
3627 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3629         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3630         Add {q} suffix to insn mnemonic.
3632 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3634         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3635         (msp430_warn_func_return): New.
3637 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
3639         * fold-const.c (tree_nonzero_bits): New function.
3640         * fold-const.h (tree_nonzero_bits): Likewise.
3641         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3642         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3644 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3646         PR target/85900
3647         PR target/85345
3648         * varasm.c (assemble_alias): Check ifunc_resolver only on
3649         FUNCTION_DECL.
3651 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3653         PR target/85903
3654         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3655         when memory input operand is handled.
3657 2018-05-24  Luis Machado  <luis.machado@linaro.org>
3659         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3660         global.
3661         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3663 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3665         * match.pd: Delay FMA folds until after vectorization.
3667 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3669         PR target/83009
3670         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3671         address check not strict.
3673 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3675         * gimple-match.h (gimple_match_op): New class.
3676         (mprts_hook): Replace parameters with a gimple_match_op *.
3677         (maybe_build_generic_op): Likewise.
3678         (gimple_simplified_result_is_gimple_val): Replace parameters with
3679         a const gimple_match_op *.
3680         (gimple_simplify): Replace code_helper * and tree * parameters with
3681         a gimple_match_op * parameter.
3682         (gimple_resimplify1): Replace code_helper *, tree and tree *
3683         parameters with a gimple_match_op * parameter.
3684         (gimple_resimplify2): Likewise.
3685         (gimple_resimplify3): Likewise.
3686         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3687         parameters with a gimple_match_op * parameter.
3688         * gimple-match-head.c (gimple_simplify): Change prototypes of
3689         auto-generated functions to take a gimple_match_op * instead of
3690         separate code_helper * and tree * parameters.  Make the same
3691         change in the top-level overload and update calls to the
3692         gimple_resimplify routines.  Update calls to the auto-generated
3693         functions and to maybe_push_res_to_seq in the publicly-facing
3694         operation-specific gimple_simplify overloads.
3695         (gimple_match_op::MAX_NUM_OPS): Define.
3696         (gimple_resimplify1): Replace rcode and ops with a single res_op
3697         parameter.  Update call to gimple_simplify.
3698         (gimple_resimplify2): Likewise.
3699         (gimple_resimplify3): Likewise.
3700         (mprts_hook): Replace parameters with a gimple_match_op *.
3701         (maybe_build_generic_op): Likewise.
3702         (build_call_internal): Replace type, nargs and ops with
3703         a gimple_match_op *.
3704         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3705         with a single gimple_match_op *.  Update calls to mprts_hook,
3706         build_call_internal and gimple_simplified_result_is_gimple_val.
3707         Factor out code that is common to the tree_code and combined_fn cases.
3708         * genmatch.c (expr::gen_transform): Replace tem_code and
3709         tem_ops with a gimple_match_op called tem_op.  Update calls
3710         to the gimple_resimplify functions and maybe_push_res_to_seq.
3711         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3712         res_ops.  Update call to the gimple_resimplify functions.
3713         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3714         (decision_tree::gen): Make the functions take a gimple_match_op *
3715         called res_op instead of separate res_code and res_ops parameters.
3716         Update call accordingly.
3717         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3718         and ops with a single res_op parameter.  Update calls to
3719         maybe_build_generic_op and maybe_push_res_to_seq.
3720         (fold_stmt_1): Update calls to gimple_simplify and
3721         replace_stmt_with_simplification.
3722         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3723         and gimple_simplified_result_is_gimple_val.
3724         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3725         gimple_simplify.
3726         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3727         with a gimple_match_op *.
3728         (vn_nary_build_or_lookup): Likewise.  Update call to
3729         vn_nary_build_or_lookup_1.
3730         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3731         gimple_match_op *.  Update calls to the gimple_resimplify routines
3732         and to gimple_simplified_result_is_gimple_val.
3733         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3734         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3735         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3736         (visit_nary_op): Likewise.
3737         (visit_reference_op_load): Likewise.
3739 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3741         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3742         modifier for printing the step amount.
3744 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
3746         PR target/78849
3747         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3748         types.
3750 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
3752         * doc/sourcebuild.texi (Endianness): New subsubsection.
3754 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3756         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3757         <prefetch_dynamic_strides>: New const bool field.
3758         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3759         prefetch_dynamic_strides.
3760         (exynosm1_prefetch_tune): Likewise.
3761         (thunderxt88_prefetch_tune): Likewise.
3762         (thunderx_prefetch_tune): Likewise.
3763         (thunderx2t99_prefetch_tune): Likewise.
3764         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3765         false.
3766         (aarch64_override_options_internal): Update to set
3767         PARAM_PREFETCH_DYNAMIC_STRIDES.
3768         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3769         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3770         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3771         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3772         prefetch-dynamic-strides setting.
3774 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3776         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3777         <minimum_stride>: New const int field.
3778         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3779         minimum_stride field defaulting to -1.
3780         (exynosm1_prefetch_tune): Likewise.
3781         (thunderxt88_prefetch_tune): Likewise.
3782         (thunderx_prefetch_tune): Likewise.
3783         (thunderx2t99_prefetch_tune): Likewise.
3784         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3785         <default_opt_level>: Set to 3.
3786         (aarch64_override_options_internal): Update to set
3787         PARAM_PREFETCH_MINIMUM_STRIDE.
3788         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3789         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3790         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3791         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3792         stride is constant and is below the minimum stride threshold.
3794 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3796         * config/arm/arm-cpus.in (mode26): Delete.
3797         (armv4): Delete mode26 reference.
3798         * config/arm/arm.c (arm_configure_build_target): Delete use of
3799         isa_bit_mode26.
3801 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3803         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3804         New insn pattern.
3805         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3806         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
3807         for non-SSE modes.
3808         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
3809         (floatunsdidf2): Ditto.
3811 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3813         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3814         (fixuns_trunc<mode>si2_avx512f): Ditto.
3815         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3816         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3817         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3819 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3821         PR rtl-optimization/79985
3822         * df-scan.c (df_insn_refs_collect): Remove special case for
3823         global registers and asm statements.
3825 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3827         * extend.texi (Global Register Variables): Rewrite the bullet list.
3828         Note that the register is available for allocation. Note that access
3829         via inline asm must use constraints. Add note about async-signal
3830         handlers. Remove paragraph about automagic register selection.
3832 2018-05-23  Richard Biener  <rguenther@suse.de>
3834         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3835         of fixed offset from memset VN.
3837 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
3839         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3840         first_interp field.
3841         (alloc_cand_and_find_basis): Initialize first_interp field.
3842         (slsr_process_mul): Modify first_interp field.
3843         (slsr_process_add): Likewise.
3844         (slsr_process_cast): Modify first_interp field for each new
3845         interpretation.
3846         (slsr_process_copy): Likewise.
3847         (dump_candidate): Dump first_interp field.
3848         (replace_mult_candidate): Process all interpretations, not just
3849         subsequent ones.
3850         (replace_rhs_if_not_dup): Likewise.
3851         (replace_one_candidate): Likewise.
3853 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
3855         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3856         Add new boolean.
3857         (aarch64_needs_frame_chain): New function.
3858         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3860 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
3862         PR target/84882
3863         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3864         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3865         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3866         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3867         as true for strict-align.
3868         (aarch64_can_inline_p): Perform checks even when callee has no
3869         attributes to check for strict alignment.
3870         * doc/extend.texi (AArch64 Function Attributes): Document
3871         no-strict-align.
3872         * doc/invoke.texi: (AArch64 Options): Likewise.
3874 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
3876         PR tree-optimization/85853
3877         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3878         the handling of the root of the node to...
3879         (vect_slp_analyze_node_operations_1): ...this new function,
3880         and run the whole thing with the child nodes' def types
3881         set according to their SLP node's def type.
3883 2018-05-23  Richard Biener  <rguenther@suse.de>
3885         PR middle-end/85874
3886         * tree-data-ref.c (create_runtime_alias_checks): Defer
3887         and ignore overflow warnings.
3889 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
3891         PR tree-optimization/85822
3892         * tree-vrp.c (is_masked_range_test): Fix handling of negative
3893         constants.
3895 2018-05-23  Richard Biener  <rguenther@suse.de>
3897         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3898         memset constants via native_interpret_expr.
3900 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
3902         PR target/85345
3903         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
3904         attribute.
3905         (cgraph_node::create_alias): Likewise.
3906         (cgraph_node::get_availability): Check ifunc_resolver instead
3907         of looking up ifunc attribute.
3908         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3909         * varasm.c (do_assemble_alias): Likewise.
3910         (assemble_alias): Likewise.
3911         (default_binds_local_p_3): Likewise.
3912         * cgraph.h (cgraph_node): Add ifunc_resolver.
3913         (cgraph_node::only_called_directly_or_aliased_p): Return false
3914         for IFUNC resolver.
3915         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
3916         attribute.
3917         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
3918         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
3919         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
3920         instead of looking up ifunc attribute.
3922 2018-05-22  Luis Machado  <luis.machado@linaro.org>
3924         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
3926 2018-05-22  Martin Sebor  <msebor@redhat.com>
3928         PR middle-end/85359
3929         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
3930         only when expasion succeeds.
3931         (expand_builtin_strcmp): Same.
3932         (expand_builtin_strncmp): Same.
3934 2018-05-22  Martin Sebor  <msebor@redhat.com>
3936         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
3938 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3939             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3941         * config/aarch64/aarch64-ldpstp.md: Replace uses of
3942         aarch64_mem_pair_operand with memory_operand and delete operand swapping
3943         code.
3944         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3945         Add check for legitimate_address.
3946         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
3947         (aarch64_swap_ldrstr_operands): New.
3948         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
3949         Define prototype.
3951 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3952             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3954         * config/aarch64/aarch64.md: New patterns to generate stp
3955         and ldp.
3956         (store_pair_sw, store_pair_dw): New patterns to generate stp for
3957         single words and double words.
3958         (load_pair_sw, load_pair_dw): Likewise.
3959         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
3960         Delete.
3961         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
3962         Delete.
3963         * config/aarch64/aarch64-ldpstp.md: Modify peephole
3964         for different mode ldpstp and add peephole for merged zero stores.
3965         Likewise for loads.
3966         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3967         Add size check.
3968         (aarch64_gen_store_pair): Rename calls to match new patterns.
3969         (aarch64_gen_load_pair): Rename calls to match new patterns.
3970         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
3971         (load_pair<DREG:mode><DREG2:mode>): ... This.
3972         (store_pair<mode>): Rename to...
3973         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
3974         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
3975         New mode iterators.
3976         (V_INT_EQUIV): Handle SImode.
3977         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
3978         New predicate.
3980 2018-05-22  Martin Sebor  <msebor@redhat.com>
3982         PR c/85623
3983         * calls.c (maybe_warn_nonstring_arg): Use string length to set
3984         or ajust the presumed bound on an operation to avoid unnecessary
3985         warnings.
3987 2018-05-22  Martin Sebor  <msebor@redhat.com>
3989         PR tree-optimization/85826
3990         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
3991         assuming that a DECL necesarily has a constant size.
3993 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
3995         PR middle-end/85862
3996         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
3998 2018-05-22  Richard Biener  <rguenther@suse.de>
4000         PR tree-optimization/85834
4001         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4002         non-constant and non-zero memset arguments.
4004 2018-05-22  Martin Liska  <mliska@suse.cz>
4006         PR ipa/85607
4007         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4009 2018-05-22  Richard Biener  <rguenther@suse.de>
4011         PR tree-optimization/85863
4012         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4013         comparisons when vectype is specified.
4014         (vectorizable_condition): Do not specify vectype for
4015         vect_is_simple_cond when SLP vectorizing.
4017 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4019         PR target/85657
4020         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4021         define __ibm128 as long double.
4022         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4023         as a distinct type when IEEE 128-bit support is enabled.
4024         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4025         128-bit types to use the correct functions.
4026         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4027         convert between 128-bit floating point types that have different
4028         modes but the same representation, instead of using gen_lowpart to
4029         makean alias.
4030         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4031         KFmode.
4032         (IFKF_reg): New attributes to give the register constraints for
4033         IFmode and KFmode.
4034         (extend<mode>tf2_internal): New insns to mark an explicit
4035         conversion between 128-bit floating point types that have a
4036         different mode but share the same representation.
4038 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4040         PR tree-optimization/85814
4041         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4042         a null return from get_strinfo when unsharing the next
4043         strinfo in the chain.
4045 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4047         PR gcc/84923
4048         * varasm.c (weak_finish): Clean up weak_decls.
4050 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4052         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4053         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4054         UNSPEC_UADALP values.
4055         * config/aarch64/iterators.md (ABAL): New int iterator.
4056         (ABDL2): Likewise.
4057         (ADALP): Likewise.
4058         (sur): Add mappings for the above.
4059         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4060         New define_insn.
4061         (aarch64_<sur>abal<mode>_4): Likewise.
4062         (aarch64_<sur>adalp<mode>_3): Likewise.
4063         (<sur>sadv16qi): New define_expand.
4065 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4067         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4068         (*movdf_internal): Ditto.
4069         (*rcpsf2_sse): Ditto.
4070         (*rsqrtsf2_sse): Ditto.
4071         (*sqrt<mode>2_sse): Ditto.
4073 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4075         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4076         eor3q<mode>4.
4077         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4078         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4079         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4080         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4081         vbcaxq_s64): New.
4082         * config/aarch64/arm_neon.h: Likewise.
4083         * config/aarch64/iterators.md (VQ_I): New.
4085 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4087         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4088         arc*-*-linux*.
4089         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4090         MULTILIB_DIRNAMES
4092 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4094         * config/nds32/constraints.md (S): New constraint.
4095         * config/nds32/nds32.md (call_internal): Use constraint S.
4096         (call_value_internal): Likewise.
4097         (sibcall_internal): Likewise.
4098         (sibcall_value_internal): Likewise.
4100 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4101             Chung-Ju Wu  <jasonwucj@gmail.com>
4103         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4104         into consideration.
4106 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4107             Chung-Ju Wu  <jasonwucj@gmail.com>
4109         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4110         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4111         (nds32_rtx_costs_impl): Simplify.
4112         (nds32_address_cost_impl): Simplify.
4113         (nds32_init_rtx_costs): New function.
4114         (nds32_rtx_costs_speed_prefer): Likewise.
4115         (nds32_rtx_costs_size_prefer): Likewise.
4116         (nds32_address_cost_speed_prefer): Likewise.
4117         (nds32_address_cost_speed_fwprop): Likewise.
4118         (nds32_address_cost_size_prefer): Likewise.
4119         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4120         * config/nds32/nds32.c (nds32_option_override): Use
4121         nds32_init_rtx_costs function.
4123 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4125         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4126         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4127         (TARGET_PIPELINE_N8): Likewise.
4128         (TARGET_PIPELINE_N10): Likewise.
4129         (TARGET_PIPELINE_N13): Likewise.
4130         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4132 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4134         * config/nds32/nds32-fpu.md: Update copyright year.
4136 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4138         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4140 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4142         * config/nds32/nds32.c
4143         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4144         * config/nds32/nds32.opt (minline-asm-r15): New option.
4146 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4148         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4149         MASK_HW_ABS.
4150         * config/nds32/nds32.md (abssi2): New pattern.
4152 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4154         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4155         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4156         Merge insn pattern from sse_cvtsi2ss<round_name> and
4157         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4158         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4159         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4160         using SWI48 mode iterator.
4161         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4162         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4163         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4164         pattern from sse_cvttss2si<round_saeonly_name>
4165         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4166         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4167         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4168         using SWI48 mode iterator.
4169         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4170         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4171         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4172         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4173         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4174         using SWI48 mode iterator.
4175         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4176         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4177         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4178         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4179         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4180         SWI48 mode iterator.
4181         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4182         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4183         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4184         pattern from sse_cvttsd2si<round_saeonly_name>
4185         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4187 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4189         * config/nds32/nds32-md-auxiliary.c
4190         (nds32_valid_smw_lwm_base_p): Refine.
4191         (nds32_output_smw_single_word): Refine.
4192         (nds32_output_smw_double_word): New.
4193         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4195 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4197         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4198         (nds32_output_stack_pop): Refine.
4199         (nds32_expand_unaligned_load): Refine.
4200         (nds32_expand_unaligned_store): Refine.
4202 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4203             Chung-Ju Wu  <jasonwucj@gmail.com>
4205         * config/nds32/constants.md: Add TP_REGNUM constant.
4206         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4207         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4208         UNSPEC_ADD32.
4209         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4210         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4211         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4212         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4213         and PIC code generation.
4214         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4215         code generation.
4216         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4217         optimization.
4218         * config/nds32/nds32.md: Support TLS and PIC.
4219         * config/nds32/nds32.c: Support TLS and PIC.
4220         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4221         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4222         predicate.
4224 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4226         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4227         mode with E_ prefix.
4229 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4230             Chung-Ju Wu  <jasonwucj@gmail.com>
4232         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4233         * config/nds32/nds32-md-auxiliary.c
4234         (symbolic_reference_mentioned_p): New.
4235         (nds32_legitimize_ict_address): New.
4236         (nds32_expand_ict_move): New.
4237         (nds32_indirect_call_referenced_p): New.
4238         (nds32_symbol_binds_local_p): Delete.
4239         (nds32_long_call_p): Modify.
4240         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4241         * config/nds32/nds32-protos.h
4242         (symbolic_reference_mentioned_p): Declare.
4243         (nds32_legitimize_ict_address): Declare.
4244         (nds32_expand_ict_move): Declare.
4245         (nds32_indirect_call_referenced_p): Declare.
4246         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4247         (nds32_relax_group): Use nds32_ict_const_p as condition.
4248         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4249         (nds32_asm_file_start): Output ict_model directive in asm code.
4250         (nds32_legitimate_address_p): Consider indirect call.
4251         (nds32_print_operand): Consider indirect call.
4252         (nds32_print_operand_address): Consider indirect call.
4253         (nds32_insert_attributes): Handle "indirect_call" attribute.
4254         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4255         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4256         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4257         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4258         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4259         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4260         (TARGET_ICT_MODEL_SMALL): Define.
4261         (TARGET_ICT_MODEL_LARGE): Define.
4262         * config/nds32/nds32.md (movsi): Consider ict model.
4263         (call, call_value): Consider ict model.
4264         (sibcall, sibcall_value): Consider ict model.
4265         * config/nds32/nds32.opt (mict-model): New option.
4266         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4267         model.
4269 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4270             Monk Chiang  <sh.chiang04@gmail.com>
4271             Jim Wilson <jimw@sifive.com>
4273         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4274         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4275         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4276         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4277         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4278         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4279         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4280         compute save_libcall_adjustment properly.
4281         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4282         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4283         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4284         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4285         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4286         (ABI_SPEC): Handle mabi=ilp32e.
4287         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4288         (RVE): Add RVE mask.
4289         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4290         <-march>: Add rv32e as an example.
4292 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4294         PR c++/82899
4295         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4296         (intra_create_variable_infos): Handle C++ constructors.
4298 2018-05-18  Martin Liska  <mliska@suse.cz>
4300         * passes.def: Remove a redundant pass.
4302 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4304         PR bootstrap/85838
4305         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4307 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4309         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4310         (ARMv4): Update.
4311         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4312         (ARMv6m): Update.
4313         (armv2, armv2a, armv3, armv3m): Delete architectures.
4314         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4315         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4316         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4317         Delete cpus.
4318         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4319         (*mulsidi3adddi): Likewise.
4320         (mulsidi3): Likewise.
4321         (*mulsidi3_nov6): Likewise.
4322         (umulsidi3): Likewise.
4323         (umulsidi3_nov6): Likewise.
4324         (umaddsidi4): Likewise.
4325         (*umulsidi3adddi): Likewise.
4326         (smulsi3_highpart): Likewise.
4327         (*smulsi3_highpart_nov6): Likewise.
4328         (umulsi3_highpart): Likewise.
4329         (*umulsi3_highpart_nov6): Likewise.
4330         * config/arm/arm.h (arm_arch3m): Delete.
4331         * config/arm/arm.c (arm_arch3m): Delete.
4332         (arm_option_override_internal): Update armv3-related comment.
4333         (arm_configure_build_target): Delete use of isa_bit_mode32.
4334         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4335         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4336         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4337         (mulsa3): Likewise.
4338         (mulusa3): Likewise.
4339         * config/arm/arm-protos.h (arm_arch3m): Delete.
4340         * config/arm/arm-tables.opt: Regenerate.
4341         * config/arm/arm-tune.md: Likewise.
4342         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4343         deleted architectures.
4345 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4347         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4348         (armv5t, armv5te): New features.
4349         (ARMv5, ARMv5e): Delete fgroups.
4350         (ARMv5t, ARMv5te): Adjust for above changes.
4351         (ARMv6m): Likewise.
4352         (armv5, armv5e): Delete arches.
4353         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4354         arm_arch5.
4355         (*call_reg_arm): Likewise.
4356         (*call_value_reg_armv5): Likewise.
4357         (*call_value_reg_arm): Likewise.
4358         (*call_symbol): Likewise.
4359         (*call_value_symbol): Likewise.
4360         (*sibcall_insn): Likewise.
4361         (*sibcall_value_insn): Likewise.
4362         (clzsi2): Likewise.
4363         (prefetch): Likewise.
4364         (define_split and define_peephole2 dependent on arm_arch5):
4365         Likewise.
4366         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4367         arm_arch5e.
4368         (TARGET_ARM_QBIT): Likewise.
4369         (TARGET_DSP_MULTIPLY): Likewise.
4370         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4371         (arm_arch5, arm_arch5e): Delete.
4372         (arm_arch5t, arm_arch5te): Declare.
4373         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4374         (arm_arch5t): Declare.
4375         (arm_option_reconfigure_globals): Update for the above.
4376         (arm_options_perform_arch_sanity_checks): Update comment, replace
4377         use of arm_arch5 with arm_arch5t.
4378         (use_return_insn): Likewise.
4379         (arm_emit_call_insn): Likewise.
4380         (output_return_instruction): Likewise.
4381         (arm_final_prescan_insn): Likewise.
4382         (arm_coproc_builtin_available): Likewise.
4383         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4384         arm_arch5e with arm_arch5t and arm_arch5te.
4385         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4386         (arm_arch5t, arm_arch5te): Declare.
4387         * config/arm/arm-tables.opt: Regenerate.
4388         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4389         * config/arm/t-multilib: Likewise.
4390         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4391         instead of arm_arch5.
4392         (*call_reg_thumb1): Likewise.
4393         (*call_value_reg_thumb1_v5): Likewise.
4394         (*call_value_reg_thumb1): Likewise.
4395         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4396         unreachable path.
4397         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4399 2018-05-18  Martin Liska  <mliska@suse.cz>
4401         PR gcov-profile/84846
4402         * doc/gcov.texi: Document -t option of gcov tool.
4404 2018-05-18  Martin Liska  <mliska@suse.cz>
4406         PR gcov-profile/84846
4407         * gcov.c (print_usage): Add new -t option.
4408         (process_args): Handle the option.
4409         (generate_results): Use stdout as output when requested by
4410         the option.
4412 2018-05-18  Martin Liska  <mliska@suse.cz>
4414         PR gcov-profile/84846
4415         * coverage.c (coverage_init): Write PWD to .gcno file.
4416         * doc/gcov.texi: Document how working directory is printed.
4417         * gcov-dump.c (dump_gcov_file): Print PWD.
4418         * gcov.c (output_intermediate_file): Likewise.
4419         (read_graph_file): Read PWD string.
4420         (output_lines): Print PWD.
4422 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4424         PR middle-end/85817
4425         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4426         for retval and return false if all args to phi are zero.
4428 2018-05-18  Richard Biener  <rguenther@suse.de>
4430         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4431         method.
4432         (evrp_dom_walker::before_dom_children): Call it.
4434 2018-05-18  Richard Biener  <rguenther@suse.de>
4436         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4437         results when processing array refs with variable index.
4439 2018-05-18  Toon Moene  <toon@moene.org>
4441         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4442         directly after that of -floop-interchange. Indicate that both
4443         options are enabled by default when specifying -O3.
4445 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4447         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4448         iterator.  Delete separate integer-mode vec_set<mode> expander.
4449         (aarch64_simd_vec_setv2di): Delete.
4450         (vec_setv2di): Delete.
4451         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4452         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4453         the "w, r" alternative.
4455 2018-05-18  Martin Liska  <mliska@suse.cz>
4457         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4458         * tree-pass.h (make_pass_lower_switch_O0): New function.
4459         * tree-switch-conversion.c (node_has_low_bound): Remove.
4460         (node_has_high_bound): Likewise.
4461         (node_is_bounded): Likewise.
4462         (class pass_lower_switch): Make it a template type and create
4463         two instances.
4464         (pass_lower_switch::execute): Add template argument.
4465         (make_pass_lower_switch): New function.
4466         (make_pass_lower_switch_O0): New function.
4467         (do_jump_if_equal): Remove.
4468         (emit_case_nodes): Simplify to just handle all 3 cases and leave
4469         all the hard work to tree optimization passes.
4471 2018-05-18  Martin Liska  <mliska@suse.cz>
4473         * dbgcnt.c (limit_low): Renamed from limit.
4474         (limit_high): New variable.
4475         (dbg_cnt_is_enabled): Check for upper limit.
4476         (dbg_cnt): Adjust dumping.
4477         (dbg_cnt_set_limit_by_index): Add new argument for high
4478         value.
4479         (dbg_cnt_set_limit_by_name): Likewise.
4480         (dbg_cnt_process_single_pair): Parse new format.
4481         (dbg_cnt_process_opt): Use strtok.
4482         (dbg_cnt_list_all_counters): Remove 'value' and add
4483         'limit_high'.
4484         * doc/invoke.texi: Document changes.
4486 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4488         * doc/sourcebuild.texi (scalar_all_fma): Document.
4489         * tree.def (FMA_EXPR): Delete.
4490         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4491         * internal-fn.c (ternary_direct): New macro.
4492         (expand_ternary_optab_fn): Likewise.
4493         (direct_ternary_optab_supported_p): Likewise.
4494         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4495         * builtins.c (fold_builtin_fma): Delete.
4496         (fold_builtin_3): Don't call it.
4497         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4498         * expr.c (expand_expr_real_2): Likewise.
4499         * fold-const.c (operand_equal_p): Likewise.
4500         (fold_ternary_loc): Likewise.
4501         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4502         * gimple.c (DEFTREECODE): Likewise.
4503         * gimplify.c (gimplify_expr): Likewise.
4504         * optabs-tree.c (optab_for_tree_code): Likewise.
4505         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4506         * tree-eh.c (operation_could_trap_p): Likewise.
4507         (stmt_could_throw_1_p): Likewise.
4508         * tree-inline.c (estimate_operator_cost): Likewise.
4509         * tree-pretty-print.c (dump_generic_node): Likewise.
4510         (op_code_prio): Likewise.
4511         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4512         * tree-ssa-operands.c (get_expr_operands): Likewise.
4513         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4514         * fold-const-call.h (fold_fma): Delete.
4515         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4516         CFN_FNMA and CFN_FNMS.
4517         (fold_fma): Delete.
4518         * genmatch.c (combined_fn): New enum.
4519         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4520         (commutative_op): New function.
4521         (commutate): Use it.  Handle more than 2 operands.
4522         (dt_operand::gen_gimple_expr): Use commutative_op.
4523         (parser::parse_expr): Allow :c to be used with non-binary
4524         operators if the commutative operand is known.
4525         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4526         CFN_FMS, CFN_FNMA and CFN_FNMS.
4527         (backprop::process_assign_use): Remove FMA_EXPR handling.
4528         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4529         (gen_hsa_fma): New function.
4530         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4531         IFN_FNMA and IFN_FNMS.
4532         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4533         * gimple-fold.h (follow_all_ssa_edges): Declare.
4534         * gimple-fold.c (follow_all_ssa_edges): New function.
4535         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4536         gimple_build interface and use follow_all_ssa_edges to fold the result.
4537         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4538         instead of checking for optabs directly.
4539         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4540         rather than FMA_EXPRs.
4541         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4542         call to IFN_FMA instead of an FMA_EXPR.
4544 2018-05-17  Jim Wilson  <jimw@sifive.com>
4546         * expr.c (do_tablejump): When converting index to Pmode, if we have a
4547         sign extended promoted subreg, and the range does not have the sign bit
4548         set, then do a sign extend.
4550         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4551         test, check for sign extended subreg and/or constant operands, and
4552         do a sign extend in that case.
4554 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
4556         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4557         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4558         Add untyped.
4559         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4560         Change logics_shift_reg to logics_shift_imm.
4561         (thunderx2t99_fp_loadpair_basic): Delete.
4562         (thunderx2t99_fp_storepair_basic): Delete.
4563         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4564         (thunderx2t99_asimd_polynomial): Delete.
4565         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4566         and neon_fp_mul_d_scalar_q.
4567         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4568         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4569         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4570         (thunderx2t99_asimd_lut): Add missing tbl types.
4571         (thunderx2t99_asimd_ext): Delete.
4572         (thunderx2t99_asimd_load1_1_mult): Delete.
4573         (thunderx2t99_asimd_load1_2_mult): Delete.
4574         (thunderx2t99_asimd_load1_ldp): New.
4575         (thunderx2t99_asimd_load1): New.
4576         (thunderx2t99_asimd_load2): Add missing *load2* types.
4577         (thunderx2t99_asimd_load3): New.
4578         (thunderx2t99_asimd_load4): New.
4579         (thunderx2t99_asimd_store1_1_mult): Delete.
4580         (thunderx2t99_asimd_store1_2_mult): Delete.
4581         (thunderx2t99_asimd_store2_mult): Delete.
4582         (thunderx2t99_asimd_store2_onelane): Delete.
4583         (thunderx2t99_asimd_store_stp): New.
4584         (thunderx2t99_asimd_store1): New.
4585         (thunderx2t99_asimd_store2): New.
4586         (thunderx2t99_asimd_store3): New.
4587         (thunderx2t99_asimd_store4): New.
4589 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
4591         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4592         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
4594 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
4595             Segher Boessenkool  <segher@kernel.crashing.org>
4597         PR target/85698
4598         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4599         operand.
4601 2018-05-17  Richard Biener  <rguenther@suse.de>
4603         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4604         for pruning loop and prune defs feeding only already visited PHIs.
4606 2018-05-17  Richard Biener  <rguenther@suse.de>
4608         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4610 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
4611             Richard Biener  <rguenther@suse.de>
4613         PR tree-optimization/85793
4614         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4615         for VMAT_ELEMENTWISE.
4617 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4619         * internal-fn.h (lookup_internal_fn): Declare
4620         * internal-fn.c (lookup_internal_fn): New function.
4621         * gimple.c (gimple_build_call_from_tree): Handle calls to
4622         internal functions.
4623         * gimple-pretty-print.c (dump_gimple_call): Print "." before
4624         internal function names.
4625         * tree-pretty-print.c (dump_generic_node): Likewise.
4626         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4628 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4630         * gimple-fold.h (gimple_build): Make the function forms take
4631         combined_fn rather than built_in_function.
4632         (gimple_simplify): Likewise.
4633         * gimple-match-head.c (gimple_simplify): Likewise.
4634         * gimple-fold.c (gimple_build): Likewise.
4635         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4636         rather than gimple_build_call_internal.
4637         (get_initial_defs_for_reduction): Likewise.
4638         (vect_create_epilog_for_reduction): Likewise.
4639         (vectorizable_live_operation): Likewise.
4641 2018-05-17  Martin Liska  <mliska@suse.cz>
4643         * gimple-ssa-sprintf.c (format_directive): Do not use
4644         space in between 'G_' and '('.
4646 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
4648         PR target/85323
4649         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4650         even if the mask is not all ones.
4652         PR target/85323
4653         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4654         vector.
4655         (ix86_gimple_fold_builtin): Likewise.
4657         PR target/85323
4658         * config/i386/i386.c: Include tree-vector-builder.h.
4659         (ix86_vector_shift_count): New function.
4660         (ix86_fold_builtin): Fold shift builtins by scalar count.
4661         (ix86_gimple_fold_builtin): Likewise.
4663         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4664         _mm512_setzero): New intrinsics.
4666 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4667             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4669         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4670         code generation for cases where splatting a value is not useful.
4671         * simplify-rtx.c (simplify_ternary_operation): Simplify
4672         vec_merge across a vec_duplicate and a paradoxical subreg forming
4673         a vector mode to a vec_concat.
4675 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
4677         * config.gcc: Support "goldmont-plus".
4678         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4679         "goldmont-plus".
4680         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4681         PROCESSOR_GOLDMONT_PLUS.
4682         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4683         (processor_target_table): Add "goldmont-plus".
4684         (PTA_GOLDMONT_PLUS): Define.
4685         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4686         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4687         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4688         (fold_builtin_cpu): Add "goldmont-plus".
4689         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4690         (ix86_option_override_internal): Add "goldmont-plus".
4691         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4692         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4693         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4694         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4696 2018-05-17  Richard Biener  <rguenther@suse.de>
4698         PR tree-optimization/85757
4699         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4700         remove defs that only feed that PHI from further processing.
4702 2018-05-16  Jim Wilson  <jimw@sifive.com>
4704         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4705         asterisk to name.
4706         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4708 2018-05-16  Mark Wielaard  <mark@klomp.org>
4710         * dwarf2out.c (count_index_strings): New function.
4711         (output_indirect_strings): Call count_index_strings and generate
4712         header for dwarf_version >= 5.
4714 2018-05-16  Mark Wielaard  <mark@klomp.org>
4716         * dwarf2out.c (dwarf_FORM): New function.
4717         (set_indirect_string): Use dwarf_FORM.
4718         (reset_indirect_string): Likewise.
4719         (size_of_die): Likewise.
4720         (value_format): Likewise.
4721         (output_die): Likewise.
4722         (add_skeleton_AT_string): Likewise.
4723         (output_macinfo_op): Likewise.
4724         (index_string): Likewise.
4725         (output_index_string_offset): Likewise.
4726         (output_index_string): Likewise.
4727         (count_index_strings): Likewise.
4729 2018-05-16  Carl Love  <cel@us.ibm.com>
4731         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4732         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4734 2018-05-16  Martin Jambor  <mjambor@suse.cz>
4736         * ipa-prop.c (ipa_free_all_edge_args): Remove.
4737         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4739 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
4741         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4742         (fnma<mode>4): Likewise.
4743         (fms<mode>4): Likewise.
4744         (fnms<mode>4): Likewise.
4745         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4746         (aarch64_fnma<mode>4): Likewise.
4747         (aarch64_fms<mode>4): Likewise.
4748         (aarch64_fnms<mode>4): Likewise.
4749         (aarch64_fnmadd<mode>4): Likewise.
4751 2018-05-16  Jason Merrill  <jason@redhat.com>
4753         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
4755 2018-05-16  Richard Biener  <rguenther@suse.de>
4757         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4758         (dump_stmt_cost): Declare.
4759         (add_stmt_cost): Dump cost we add.
4760         (add_stmt_costs): New function.
4761         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4762         No longer exported.
4763         (vect_analyze_stmt): Adjust prototype.
4764         (vectorizable_condition): Likewise.
4765         (vectorizable_live_operation): Likewise.
4766         (vectorizable_reduction): Likewise.
4767         (vectorizable_induction): Likewise.
4768         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4769         cost vector to pass to vectorizable_ and record afterwards.
4770         (vect_model_reduction_cost): Take cost vector argument and adjust.
4771         (vect_model_induction_cost): Likewise.
4772         (vectorizable_reduction): Likewise.
4773         (vectorizable_induction): Likewise.
4774         (vectorizable_live_operation): Likewise.
4775         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4776         SLP_TREE_NUMBER_OF_VEC_STMTS.
4777         (vect_analyze_slp_cost_1): Remove.
4778         (vect_analyze_slp_cost): Likewise.
4779         (vect_slp_analyze_node_operations): Take visited args and
4780         a target cost vector.  Avoid processing already visited stmt sets.
4781         (vect_slp_analyze_operations): Use a local cost vector to gather
4782         costs and register those of non-discarded instances.
4783         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4784         (vect_schedule_slp_instance): Remove copying of
4785         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
4786         zero.
4787         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4788         adding cost.  Record cost entry location.
4789         (vect_prologue_cost_for_slp_op): Function to compute cost of
4790         a constant or invariant generated for SLP vect in the prologue,
4791         split out from vect_analyze_slp_cost_1.
4792         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
4793         (vect_model_promotion_demotion_cost): Likewise.
4794         (vect_model_store_cost): Likewise, make static.
4795         (vect_model_load_cost): Likewise.
4796         (vectorizable_bswap): Add cost vector arg and adjust.
4797         (vectorizable_call): Likewise.
4798         (vectorizable_simd_clone_call): Likewise.
4799         (vectorizable_conversion): Likewise.
4800         (vectorizable_assignment): Likewise.
4801         (vectorizable_shift): Likewise.
4802         (vectorizable_operation): Likewise.
4803         (vectorizable_store): Likewise.
4804         (vectorizable_load): Likewise.
4805         (vectorizable_condition): Likewise.
4806         (vectorizable_comparison): Likewise.
4807         (can_vectorize_live_stmts): Likewise.
4808         (vect_analyze_stmt): Likewise.
4809         (vect_transform_stmt): Adjust calls to vectorizable_*.
4810         * tree-vectorizer.c: Include gimple-pretty-print.h.
4811         (dump_stmt_cost): New function.
4813 2018-05-16  Richard Biener  <rguenther@suse.de>
4815         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4816         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4817         * tree-ssa-dse.c: Include tree-ssa-loop.h.
4818         (check_name): New callback.
4819         (dse_classify_store): Track cycles via a visited bitmap of PHI
4820         defs and simplify handling of in-loop and across loop dead stores
4821         and properly fail for loop-variant refs.  Handle byte-tracking with
4822         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4823         limiting the walk.
4825 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
4827         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4828         (vect_get_mask_type_for_stmt): Likewise.
4829         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4830         split out from...
4831         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
4832         to determine the statement's vector type and the vector type that
4833         should be used for calculating nunits.  Deal with cases in which
4834         the type has to be deferred.
4835         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4836         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4837         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4838         (vect_determine_vf_for_stmt): New functions, split out from...
4839         (vect_determine_vectorization_factor): ...here.
4840         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4841         (vect_get_mask_type_for_stmt): New functions, split out from
4842         vect_determine_vectorization_factor.
4844 2018-05-16  Richard Biener  <rguenther@suse.de>
4846         * tree-cfg.c (verify_gimple_assign_ternary): Properly
4847         verify the [VEC_]COND_EXPR embedded comparison.
4849 2018-05-15  Martin Sebor  <msebor@redhat.com>
4851         PR tree-optimization/85753
4852         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4853         RECORD_TYPE in addition to ARRAY_TYPE.
4855 2018-05-15  Martin Sebor  <msebor@redhat.com>
4857         PR middle-end/85643
4858         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4860 2018-05-15  Richard Biener  <rguenther@suse.de>
4862         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4863         add by_clobber_p one.  Change algorithm to collect all defs
4864         representing uses we need to walk and try reducing them to
4865         a single one before failing.
4866         (dse_dom_walker::dse_optimize_stmt): Adjust.
4868 2018-05-13  Mark Wielaard  <mark@klomp.org>
4870         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4871         (size_of_loc_descr): Likewise.
4872         (output_loc_operands): Likewise.
4873         (output_loc_operands_raw): Likewise.
4874         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4875         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4876         (hash_loc_operands): Likewise.
4877         (compare_loc_operands): Likewise.
4879 2018-05-14  Mark Wielaard  <mark@klomp.org>
4881         * dwarf2out.c (count_index_addrs): New function.
4882         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4884 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4886         PR tree-optimization/83648
4887         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4888         return value as malloc candidate.
4890 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4892         PR ipa/85734
4893         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4894         param as true in call to suggest_attribute.
4896 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
4898         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
4899         -mreadonly-in-sdata.
4901 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4903         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
4904         New pattern.
4905         (aarch64_crypto_aesd_fused): Likewise.
4907 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
4909         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
4910         (movsi_aarch64): Likewise.
4911         (load_pairsi): Likewise.
4912         (load_pairdi): Likewise.
4913         (store_pairsi): Likewise.
4914         (store_pairdi): Likewise.
4915         (load_pairsf): Likewise.
4916         (load_pairdf): Likewise.
4917         (store_pairsf): Likewise.
4918         (store_pairdf): Likewise.
4919         (zero_extend): Likewise.
4920         (trunc): Swap alternatives.
4921         (fcvt_target): Add '?' to prefer w over r.
4923 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
4925         PR target/85756
4926         * config/i386/i386.md: Disallow non-commutative arithmetics in
4927         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4928         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
4929         in the peephole2 before it.
4931 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
4933         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
4934         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
4935         (ix86_handle_option): Handle -mcldemote.
4936         * config.gcc: New header.
4937         * config/i386/cldemoteintrin.h: New file.
4938         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
4939         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4940         -mcldemote.
4941         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4942         OPTION_MASK_ISA_CLDEMOTE.
4943         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
4944         (ix86_valid_target_attribute_inner_p): Ditto.
4945         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
4946         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
4947         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
4948         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
4949         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
4950         (cldemote): New.
4951         * config/i386/i386.opt: Add -mcldemote.
4952         * config/i386/x86intrin.h: New header.
4953         * doc/invoke.texi: Add -mcldemote.
4955 2018-05-14  Richard Biener  <rguenther@suse.de>
4957         * doc/match-and-simplify.texi: Adjust :s documentation.
4959 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
4961         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
4962         intended memcpy size.
4963         (REORDER_45): Likewise.
4965 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
4967         * sort.cc: New file.
4968         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
4969         * vec.c (qsort_chk): Use gcc_qsort.
4970         * Makefile.in (OBJS-libcommon): Add sort.o.
4971         (build/sort.o): New target.  Use it...
4972         (BUILD_RTL): ... here, and...
4973         (build/gencfn-macros): ... here, and...
4974         (build/genmatch): ... here.
4976 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4977             Chung-Ju Wu  <jasonwucj@gmail.com>
4979         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
4980         * config/nds32/nds32-graywolf.md: New file.
4981         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
4982         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
4983         pipeline.
4984         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
4985         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
4986         * config/nds32/nds32.md (pipeline_model): Add graywolf.
4987         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
4988         * config/nds32/pipelines.md: Include n15 settings.
4990 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
4991             Chung-Ju Wu  <jasonwucj@gmail.com>
4993         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
4994         * config/nds32/nds32-n13.md: New file.
4995         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
4996         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
4997         pipeline.
4998         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
4999         * config/nds32/nds32.md (pipeline_model): Add n13.
5000         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5001         * config/nds32/pipelines.md: Include n13 settings.
5003 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5004             Chung-Ju Wu  <jasonwucj@gmail.com>
5006         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5007         * config/nds32/nds32-n10.md: New file.
5008         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5009         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5010         pipeline.
5011         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5012         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5013         * config/nds32/nds32.md (pipeline_model): Add n10.
5014         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5015         * config/nds32/pipelines.md: Include n10 settings.
5017 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5018             Kito Cheng  <kito.cheng@gmail.com>
5019             Chung-Ju Wu  <jasonwucj@gmail.com>
5021         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5022         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5023         Add enum values for DSP extension instructions.
5024         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5025         New constraints.
5026         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5027         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5028         New code iterators.
5029         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5030         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5031         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5032         * config/nds32/nds32-intrinsic.md: Likewise.
5033         * config/nds32/nds32_intrinsic.h: Likewise.
5034         * config/nds32/nds32-md-auxiliary.c: Likewise.
5035         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5036         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5037         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5038         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5039         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5040         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5041         TYPE_DMAC in switch statement.
5042         * config/nds32/nds32.c: New checking and implementation for DSP
5043         extension instructions.
5044         * config/nds32/nds32.h: Likewise.
5045         * config/nds32/nds32.md: Likewise.
5046         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5047         * config/nds32/predicates.md: Implement new predicates for DSP
5048         extension.
5050 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5052         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5053         Reformat alternatives and attributes so it is easier to identify
5054         which constraints/attributes go with which instruction.
5055         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5056         (mov<mode>_softfloat32, FMOVE64): Likewise.
5057         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5058         (mov<mode>_softfloat64, FMOVE64): Likewise.
5060 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5062         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5063         subsection.
5064         (Basic PowerPC Built-in Functions): The new name of the
5065         subsection previously known as "PowerPC Built-in Functions".
5066         (Basic PowerPC Built-in Functions Available on all Configurations):
5067         New subsubsection.
5068         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5069         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5070         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5071         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5073 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5075         PR ipa/85655
5076         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5077         single const.
5079 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5081         PR target/85733
5082         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5084 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5086         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5087         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5088         (ix86_handle_option): Handle -mwaitpkg.
5089         * config.gcc: New header.
5090         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5091         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5092         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5093         function type.
5094         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5095         OPTION_MASK_ISA_WAITPKG.
5096         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5097         (ix86_option_override_internal): Add PTA_WAITPKG.
5098         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5099         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5100         IX86_BUILTIN_TPAUSE.
5101         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5102         __builtin_ia32_umwait and __builtin_ia32_tpause.
5103         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5104         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5105         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5106         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5107         UNSPECV_TPAUSE): New.
5108         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5109         * config/i386/i386.opt: Add -mwaitpkg.
5110         * config/i386/waitpkgintrin.h: New file.
5111         * config/i386/x86intrin.h: New header.
5112         * doc/invoke.texi: Add -mwaitpkg.
5114 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5116         PR target/85606
5117         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5118         equivalent.
5119         (cortex-m0): Use armv6s-m isa.
5120         (cortex-m0plus): Likewise.
5121         (cortex-m1): Likewise.
5122         (cortex-m0.small-multiply): Likewise.
5123         (cortex-m0plus.small-multiply): Likewise.
5124         (cortex-m1.small-multiply): Likewise.
5126 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5127             Jakub Jelinek  <jakub@redhat.com>
5129         PR tree-optimization/85692
5130         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5131         source permute as well.
5133 2018-05-11  Martin Liska  <mliska@suse.cz>
5135         PR sanitizer/85556
5136         * doc/extend.texi: Document LLVM style format for no_sanitize
5137         attribute.
5139 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5141         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5142         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5143         (mode_supports_vsx_dform_quad): Likewise.
5144         (mode_supports_vmx_dform): Move these functions to be next to the
5145         other mode_supports functions.
5146         (mode_supports_dq_form): Likewise.
5147         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5148         mode_supports_dq_form.
5149         (reg_offset_addressing_ok_p): Likewise.
5150         (offsettable_ok_by_alignment): Likewise.
5151         (rs6000_legitimate_offset_address_p): Likewise.
5152         (legitimate_lo_sum_address_p): Likewise.
5153         (rs6000_legitimize_address): Likewise.
5154         (rs6000_legitimize_reload_address): Likewise.
5155         (rs6000_secondary_reload_inner): Likewise.
5156         (rs6000_preferred_reload_class): Likewise.
5157         (rs6000_output_move_128bit): Likewise.
5159 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5161         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5162         Generate SImode target register for null target.
5163         <case IX86_BUILTIN_XGETBV>: Ditto.
5164         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5165         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5167 2018-05-10  Carl Love  <cel@us.ibm.com>
5169         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5170         dcbtt and dcbtstt if operands[2] is 0.
5172 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5174         PR target/85693
5175         * config/i386/sse.md (usadv64qi): New expander.
5177 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5179         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5180         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5181         -maltivec=be support.
5182         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5183         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5184         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5185         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5186         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5187         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5188         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5189         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5190         altivec_vsumsws): Adjust.
5191         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5192         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5193         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5194         support.
5195         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5196         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5197         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5198         (altivec_lve<VI_char>x): Delete expand.
5199         (*altivec_lve<VI_char>x_internal): Rename to...
5200         (altivec_lve<VI_char>x): ... this.
5201         (altivec_lvxl_<mode>): Delete expand.
5202         (*altivec_lvxl_<mode>_internal): Rename to ...
5203         (altivec_lvxl_<mode>): ... this.
5204         (altivec_stvxl_<mode>): Delete expand.
5205         (*altivec_stvxl_<mode>_internal): Rename to ...
5206         (altivec_stvxl_<mode>): ... this.
5207         (altivec_stve<VI_char>x): Delete expand.
5208         (*altivec_stve<VI_char>x_internal): Rename to ...
5209         (altivec_stve<VI_char>x): ... this.
5210         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5211         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5212         reduc_plus_scal_<mode>): Adjust.
5213         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5214         comment.
5215         (rs6000_cpu_cpp_builtins): Adjust.
5216         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5217         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5218         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5219         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5220         -maltivec=be support.
5221         (rs6000_split_vec_extract_var): Adjust.
5222         (rs6000_split_v4si_init): Adjust.
5223         (swap_selector_for_mode): Delete.
5224         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5225         altivec_expand_stvex_be): Delete.
5226         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5227         -maltivec=be support.
5228         (rs6000_gimple_fold_builtin): Ditto.
5229         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5230         Adjust.
5231         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5232         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5233         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5234         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5235         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5236         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5237         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5238         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5239         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5240         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5241         anonymous split): Adjust.
5242         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5243         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5245 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5247         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5248         when --with-gxx-include-dir is also specified.
5249         * configure: Regenerate.
5251 2018-05-09  Jim Wilson  <jimw@sifive.com>
5253         PR target/84797
5254         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5255         * config/riscv/t-withmultilib: New.
5256         * config/riscv/withmultilib.h: New.
5257         * doc/install.texi: Document RISC-V --with-multilib-list support.
5259 2018-05-09  Richard Biener  <rguenther@suse.de>
5261         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5262         vector.
5263         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5264         actual scalar cost using the cost vector and the add_stmt_cost
5265         machinery.
5267 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5269         PR rtl-optimization/85645
5270         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5271         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5273 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5275         PR rtl-optimization/85645
5276         * shrink-wrap.c (spread_components): Return a boolean saying if
5277         anything was changed.
5278         (try_shrink_wrapping_separate): Iterate spread_components until
5279         nothing changes anymore.
5281 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5283         PR rtl-optimization/85645
5284         * regrename.c (build_def_use): Also kill the chains that include the
5285         destination of a REG_CFA_REGISTER note.
5287 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5289         PR rtl-optimization/85645
5290         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5291         insn that has a REG_CFA_REGISTER note.
5293 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5295         * cfgexpand.c (expand_clobber): New function.
5296         (expand_gimple_stmt_1): Use it.
5297         * tree-vect-stmts.c (vect_clobber_variable): New function,
5298         split out from...
5299         (vectorizable_simd_clone_call): ...here.
5300         (vectorizable_store): Emit a clobber either side of an
5301         IFN_STORE_LANES sequence.
5302         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5304 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5306         PR target/85626
5307         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5308         (define_insn "trap_if_false"): Add exit after trap.
5310 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5312         PR rtl-optimization/85638
5313         * bb-reorder.c: Include common/common-target.h.
5314         (create_forwarder_block): New function extracted from...
5315         (fix_up_crossing_landing_pad): ...here.  Rename into...
5316         (dw2_fix_up_crossing_landing_pad): ...this.
5317         (sjlj_fix_up_crossing_landing_pad): New function.
5318         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5319         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5320         from both partitions and exit the loop after one iteration.
5322 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5324         Revert:
5325         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5326         subsection.
5327         (Basic PowerPC Built-in Functions): The new name of the
5328         subsection previously known as "PowerPC Built-in Functions".
5329         (Basic PowerPC Built-in Functions Available on all Configurations):
5330         New subsubsection.
5331         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5332         subsubsection.
5333         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5334         subsubsection.
5335         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5336         subsubsection.
5337         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5338         subsubsection.
5340 2018-05-08  Jim Wilson  <jimw@sifive.com>
5342         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5343         (LD_EMUL_SUFFIX): New.
5344         (LINK_SPEC): Use it.
5346 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5348         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5349         subsection.
5350         (Basic PowerPC Built-in Functions): The new name of the
5351         subsection previously known as "PowerPC Built-in Functions".
5352         (Basic PowerPC Built-in Functions Available on all Configurations):
5353         New subsubsection.
5354         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5355         subsubsection.
5356         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5357         subsubsection.
5358         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5359         subsubsection.
5360         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5361         subsubsection.
5363 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5365         PR target/85683
5366         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5367         after cmpelim optimization.
5369 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5371         * config.gcc: Support "goldmont".
5372         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5373         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5374         PROCESSOR_GOLDMONT.
5375         * config/i386/i386.c (m_GOLDMONT): Define.
5376         (processor_target_table): Add "goldmont".
5377         (PTA_GOLDMONT): Define.
5378         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5379         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5380         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5381         (fold_builtin_cpu): Add "goldmont".
5382         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5383         (ix86_option_override_internal): Add "goldmont".
5384         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5385         (processor_type): Add PROCESSOR_GOLDMONT.
5386         * config/i386/i386.md: Add CPU "glm".
5387         * config/i386/glm.md: New file.
5388         * config/i386/x86-tune.def: Add m_GOLDMONT.
5389         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5391 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5393         PR target/85572
5394         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5395         E_V4DImode.
5396         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5397         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5398         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5400         PR target/85317
5401         * config/i386/i386.c (ix86_fold_builtin): Handle
5402         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5404         PR target/85480
5405         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5406         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5408 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5410         PR target/85658
5411         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5412         (check_arch): Likewise.
5413         (check_fpu): Return the result rather than printing it.
5414         (end arch): Fix operator precedence.
5415         (end cpu): Likewise.
5416         (END): Print the result from check_fpu.
5418 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5419             Alan Hayward  <alan.hayward@arm.com>
5420             David Sherwood  <david.sherwood@arm.com>
5422         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5423         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5424         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5425         (*fcmuo<mode>_and): New patterns.
5427 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5429         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5430         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5431         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5432         (cmp_op, sve_imm_con): New code attributes.
5433         (SVE_COND_INT_CMP, imm_con): Delete.
5434         (cmp_op): Remove above unspecs from int attribute.
5435         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5436         to...
5437         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5438         comparison-specific unspecs.
5439         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5440         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5441         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5442         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5443         (*vec_fcm<cmp_op><mode>): Rename to...
5444         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5445         (*vec_fcmuo<mode>): Rename to...
5446         (*fcmuo<mode>): ...this and adjust likewise.
5447         (*pred_fcm<cmp_op><mode>): New pattern.
5448         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5449         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5450         functions.
5451         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5452         and UNORDERED.
5453         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5454         (aarch64_emit_sve_predicated_cond): New function.
5455         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5456         (aarch64_emit_unspec_cond_or): Replace with...
5457         (aarch64_emit_sve_or_conds): ...this new function.  Use
5458         aarch64_emit_sve_ptrue_op for the individual comparisons and
5459         aarch64_emit_binop to OR them together.
5460         (aarch64_emit_inverted_unspec_cond): Replace with...
5461         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5462         aarch64_emit_sve_ptrue_op for the comparison and
5463         aarch64_emit_unop to invert the result.
5464         (aarch64_expand_sve_vec_cmp_float): Update after the above
5465         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5467 2018-05-07  Nathan Sidwell  <nathan@acm.org>
5469         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5470         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5471         (Backwards Compatibility): Likewise.
5473 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5475         PR bootstrap/85681
5476         Revert:
5477         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5479         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5480         <prefetch_dynamic_strides>: New const bool field.
5481         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5482         prefetch_dynamic_strides.
5483         (exynosm1_prefetch_tune): Likewise.
5484         (thunderxt88_prefetch_tune): Likewise.
5485         (thunderx_prefetch_tune): Likewise.
5486         (thunderx2t99_prefetch_tune): Likewise.
5487         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5488         to false.
5489         (aarch64_override_options_internal): Update to set
5490         PARAM_PREFETCH_DYNAMIC_STRIDES.
5491         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5492         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5493         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5494         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5495         prefetch-dynamic-strides setting.
5497         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5499         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5500         <minimum_stride>: New const int field.
5501         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5502         minimum_stride field.
5503         (exynosm1_prefetch_tune): Likewise.
5504         (thunderxt88_prefetch_tune): Likewise.
5505         (thunderx_prefetch_tune): Likewise.
5506         (thunderx2t99_prefetch_tune): Likewise.
5507         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5508         (aarch64_override_options_internal): Update to set
5509         PARAM_PREFETCH_MINIMUM_STRIDE.
5510         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5511         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5512         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5513         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5514         stride is constant and is below the minimum stride threshold.
5516 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5518         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5519         to 512.
5521 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5523         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5524         <prefetch_dynamic_strides>: New const bool field.
5525         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5526         prefetch_dynamic_strides.
5527         (exynosm1_prefetch_tune): Likewise.
5528         (thunderxt88_prefetch_tune): Likewise.
5529         (thunderx_prefetch_tune): Likewise.
5530         (thunderx2t99_prefetch_tune): Likewise.
5531         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5532         to false.
5533         (aarch64_override_options_internal): Update to set
5534         PARAM_PREFETCH_DYNAMIC_STRIDES.
5535         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5536         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5537         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5538         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5539         prefetch-dynamic-strides setting.
5541 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5543         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5544         <minimum_stride>: New const int field.
5545         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5546         minimum_stride field.
5547         (exynosm1_prefetch_tune): Likewise.
5548         (thunderxt88_prefetch_tune): Likewise.
5549         (thunderx_prefetch_tune): Likewise.
5550         (thunderx2t99_prefetch_tune): Likewise.
5551         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5552         (aarch64_override_options_internal): Update to set
5553         PARAM_PREFETCH_MINIMUM_STRIDE.
5554         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5555         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5556         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5557         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5558         stride is constant and is below the minimum stride threshold.
5560 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
5562         PR c++/85659
5563         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5564         the type is addressable.  Don't force op into register if it has
5565         BLKmode.
5567 2018-05-05  Roland McGrath  <mcgrathr@google.com>
5569         PR other/77609
5570         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5571         any section for which we don't know a specific type it should have,
5572         regardless of name.  Previously this was done only for the exact
5573         names ".init_array", ".fini_array", and ".preinit_array".
5574         (default_elf_asm_named_section): Add comment about
5575         relationship with default_section_type_flags and SECTION_NOTYPE.
5576         (get_section): Don't consider it a type conflict if one side has
5577         SECTION_NOTYPE and the other doesn't, as long as neither has the
5578         SECTION_BSS et al used in the default_section_type_flags logic.
5580 2018-05-05  Tom de Vries  <tom@codesourcery.com>
5582         PR target/85653
5583         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5584         (workaround_barsyncs): New function.
5585         (nvptx_reorg): Use workaround_barsyncs.
5586         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5587         (define_expand "nvptx_membar_cta"): New define_expand.
5588         (define_insn "*nvptx_membar_cta"): New insn.
5590 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
5592         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5593         To improve optimization opportunities.
5594         * builtin-types.def: The new needed builtin types for the above.
5596 2018-05-04  Richard Biener  <rguenther@suse.de>
5598         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5599         * gimple-ssa-store-merging.c
5600         (imm_store_chain_info::output_merged_store): Remove redundant create,
5601         release split_store vector contents on failure.
5602         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5603         scalar stmt vector on cache hit.
5605 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
5607         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5608         Xilinx FP support.
5609         * config.gcc (powerpc-xilinx-eabi*): Remove.
5610         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5611         support.
5612         (fusion_addis_mem_combo_load): Ditto.
5613         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5614         FP support.
5615         (rs6000_cpu_cpp_builtins): Ditto.
5616         * config/rs6000/rs6000-linux.c
5617         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5618         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5619         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5620         support.
5621         (rs6000_setup_reg_addr_masks): Ditto.
5622         (rs6000_init_hard_regno_mode_ok): Ditto.
5623         (rs6000_option_override_internal): Ditto.
5624         (legitimate_lo_sum_address_p): Ditto.
5625         (rs6000_legitimize_address): Ditto.
5626         (rs6000_legitimize_reload_address): Ditto.
5627         (rs6000_legitimate_address_p): Ditto.
5628         (abi_v4_pass_in_fpr): Ditto.
5629         (setup_incoming_varargs): Ditto.
5630         (rs6000_gimplify_va_arg): Ditto.
5631         (rs6000_split_multireg_move): Ditto.
5632         (rs6000_savres_strategy): Ditto.
5633         (rs6000_emit_prologue_components): Ditto.
5634         (rs6000_emit_epilogue_components): Ditto.
5635         (rs6000_emit_prologue): Ditto.
5636         (rs6000_emit_epilogue): Ditto.
5637         (rs6000_elf_file_end): Ditto.
5638         (rs6000_function_value): Ditto.
5639         (rs6000_libcall_value): Ditto.
5640         * config/rs6000/rs6000.h: Ditto.
5641         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5642         (TARGET_MINMAX): ... this.  New.
5643         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5644         * config/rs6000/rs6000.md: Remove Xilinx FP support.
5645         (*movsi_internal1_single): Delete.
5646         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5647         mfpu=, mxilinx-fpu): Delete.
5648         * config/rs6000/singlefp.h: Delete.
5649         * config/rs6000/sysv4.h: Remove Xilinx FP support.
5650         * config/rs6000/t-rs6000: Ditto.
5651         * config/rs6000/t-xilinx: Delete.
5652         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5653         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5654         (VStype_simple): Delete.
5655         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5656         * config/rs6000/xfpu.h: Delete.
5657         * config/rs6000/xfpu.md: Delete.
5658         * config/rs6000/xilinx.h: Delete.
5659         * config/rs6000/xilinx.opt: Delete.
5660         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5661         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5663 2018-05-04  Tom de Vries  <tom@codesourcery.com>
5665         PR libgomp/85639
5666         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5667         if ignore == 0.
5669 2018-05-04  Richard Biener  <rguenther@suse.de>
5671         PR middle-end/85627
5672         * tree-complex.c (update_complex_assignment): We are always in SSA form.
5673         (expand_complex_div_wide): Likewise.
5674         (expand_complex_operations_1): Likewise.
5675         (expand_complex_libcall): Preserve EH info of the original stmt.
5676         (tree_lower_complex): Handle removed blocks.
5677         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5678         on complex multiplication and division libcall builtins.
5680 2018-05-04  Richard Biener  <rguenther@suse.de>
5682         PR middle-end/85574
5683         * fold-const.c (negate_expr_p): Restrict negation of operand
5684         zero of a division to when we know that can happen without
5685         overflow.
5686         (fold_negate_expr_1): Likewise.
5688 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
5690         PR libstdc++/85466
5691         * real.h (real_nextafter): Declare.
5692         * real.c (real_nextafter): New function.
5693         * fold-const-call.c (fold_const_nextafter): New function.
5694         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5695         CASE_CFN_NEXTTOWARD.
5696         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5697         even when arg1_mode is different from arg0_mode.
5699 2018-05-03  Nathan Sidwell  <nathan@acm.org>
5701         * doc/extend.texi (Deprecated Features): Remove
5702         -ffriend-injection.
5703         (Backwards Compatibility): Likewise.
5704         * doc/invoke.texi (C++ Language Options): Likewise.
5705         (C++ Dialect Options): Likewise.
5707 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
5709         PR target/85530
5710         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5711         _mm512_mask_mullox_epi64): New intrinsics.
5713 2018-05-03  Tom de Vries  <tom@codesourcery.com>
5715         PR testsuite/85106
5716         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5717         dump files): Add offload-tree.
5719 2018-05-03  Richard Biener  <rguenther@suse.de>
5721         PR tree-optimization/85615
5722         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5723         to loops not nested in BBs loop father to avoid creating multi-entry
5724         loops.
5726 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5728         PR tree-optimization/70291
5729         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5730         arguments.  Change return type to tree.  Emit libcall as a new
5731         statement rather than replacing existing one when inplace_p is true.
5732         (expand_complex_multiplication_components): New function.
5733         (expand_complex_multiplication): Expand floating-point complex
5734         multiplication using the above.
5735         (expand_complex_division): Rename inner_type parameter to type.
5736         Update expand_complex_libcall call-site.
5737         (expand_complex_operations_1): Update expand_complex_multiplication
5738         and expand_complex_division call-sites.
5740 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5742         PR target/85582
5743         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5744         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5745         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5746         the highest significant bit of the shift count mask is clear.  In
5747         check whether and[sq]i3 is needed verify that all significant bits
5748         of the shift count other than the highest are set.
5750 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5752         PR libgomp/82428
5753         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5754         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5755         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5756         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5757         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5758         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5759         __builtin_goacc_parlevel_size.
5761 2018-05-02  Richard Biener  <rguenther@suse.de>
5763         PR tree-optimization/85597
5764         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5765         do not use split vect_get_vec_defs call but call vect_get_slp_defs
5766         directly.
5768 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5770         PR testsuite/85106
5771         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5772         dump files): Add ltrans-tree.
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 wpa-ipa.
5780 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
5782         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
5783         powerpc*-*-linux*paired* target.
5784         * config/rs6000/750cl.h: Delete.
5785         * config/rs6000/paired.h: Delete.
5786         * config/rs6000/paired.md: Delete.
5787         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5788         float support.
5789         * config/rs6000/rs6000-builtin.def: Remove paired float support.
5790         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5791         comment.  Remove paired float support.
5792         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5793         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5794         VECTOR_PAIRED.
5795         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5796         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5797         declarations.
5798         * config/rs6000/rs6000.c: Remove paired float support.
5799         (paired_expand_vector_init, paired_expand_vector_move,
5800         paired_emit_vector_compare, paired_emit_vector_cond_expr,
5801         (paired_expand_lv_builtin, paired_expand_stv_builtin,
5802         paired_expand_builtin, paired_expand_predicate_builtin,
5803         paired_init_builtins): Delete.
5804         * config/rs6000/rs6000.h: Remove paired float support.
5805         * config/rs6000/rs6000.md: Remove paired float support.
5806         (move_from_CR_ov_bit): Delete.
5807         * config/rs6000/rs6000.opt (mpaired): Delete.
5808         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5809         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5811 2018-05-02  Richard Biener  <rguenther@suse.de>
5813         PR middle-end/85567
5814         * gimplify.c (gimplify_save_expr): When in SSA form allow
5815         SAVE_EXPRs to compute to SSA vars.
5817 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5819         PR target/85582
5820         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5821         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5822         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5823         clobber operands[2], instead use a new pseudo.  Formatting fixes.
5825 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
5827         PR tree-optimization/85586
5828         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5829         exit early for statements in the same group if the accesses are
5830         not strided.
5832 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5834         PR lto/85451
5835         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5836         error message.
5838 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
5840         PR tree-optimization/85143
5841         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5843 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5845         PR lto/85451
5846         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5847         not found" error message.
5849 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5851         PR other/83786
5852         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5853         * vec.c (test_ordered_remove_if): New function.
5854         (vec_c_tests): Call test_ordered_remove_if.
5855         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5856         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5857         * tree-vect-patterns.c (vect_pattern_recog_1): Use
5858         VEC_ORDERED_REMOVE_IF.
5860 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5862         PR tree-optimization/82665
5863         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5864         pointer subtraction where arguments come from a memchr call.
5866 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
5868         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5869         --push-state --as-needed and --pop-state instead of --as-needed and
5870         --no-as-needed if ld supports it.
5871         * configure: Regenerated.
5873         PR web/85578
5874         * doc/install.texi2html: Replace _002d with - and _002a with * in
5875         generated html files using sed.
5877 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5879         PR c++/85523
5880         * gcc-rich-location.c (blank_line_before_p): New function.
5881         (use_new_line): New function.
5882         (gcc_rich_location::add_fixit_insert_formatted): New function.
5883         * gcc-rich-location.h
5884         (gcc_rich_location::add_fixit_insert_formatted): New function.
5886 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5888         * selftest.c (assert_streq): Rename "expected" and "actual" to
5889         "val1" and "val2".  Extend NULL-handling to cover both inputs
5890         symmetrically, while still requiring both to be non-NULL for a pass.
5891         * selftest.h (assert_streq): Rename "expected" and "actual" to
5892         "val1" and "val2".
5893         (ASSERT_EQ): Likewise.
5894         (ASSERT_EQ_AT): Likewise.
5895         (ASSERT_KNOWN_EQ): Likewise.
5896         (ASSERT_KNOWN_EQ_AT): Likewise.
5897         (ASSERT_NE): Likewise.
5898         (ASSERT_MAYBE_NE): Likewise.
5899         (ASSERT_MAYBE_NE_AT): Likewise.
5900         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
5901         the assertion to pass.
5902         (ASSERT_STREQ_AT): Likewise.
5904 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
5906         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
5907         interaction with -pie.
5909 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5911         * selftest.h: Fix alphabetization of per-source-file selftest
5912         declarations.
5914 2018-04-30  Jason Merrill  <jason@redhat.com>
5916         PR c++/61982 - dead stores to destroyed objects.
5917         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
5918         of clobber.
5920 2018-04-30  Jason Merrill  <jason@redhat.com>
5922         * tree.c (build_clobber): New.
5923         * tree.h: Declare it.
5924         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
5926 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5928         * diagnostic-show-locus.c (layout::layout): Update for
5929         location_get_source_line returning a char_span.
5930         (struct char_span): Move to input.h.
5931         (struct correction): Update for fields in char_span becoming
5932         private.
5933         (struct source_line): Update for location_get_source_line
5934         returning a char_span.
5935         (layout::print_line): Likewise.
5936         * edit-context.c (edited_file::print_content): Likewise.
5937         (edited_file::print_diff_hunk): Likewise.
5938         (edited_file::print_run_of_changed_lines): Likewise.
5939         (edited_file::get_num_lines): Likewise.
5940         (edited_line::edited_line): Likewise.
5941         * final.c (asm_show_source): Likewise.
5942         * input.c (location_get_source_line): Convert return type
5943         from const char * to char_span, losing the final "line_len"
5944         param.
5945         (dump_location_info): Update for the above.
5946         (get_substring_ranges_for_loc): Likewise.  Use a char_span
5947         when handling the literal within the line.
5948         (test_reading_source_line): Update for location_get_source_line
5949         returning a char_span.
5950         * input.h (class char_span): Move here from
5951         diagnostic-show-locus.c, converting from a struct to a class.
5952         Make data members private.
5953         (char_span::operator bool): New.
5954         (char_span::length): New.
5955         (char_span::get_buffer): New.
5956         (char_span::operator[]): New.
5957         (char_span::subspan): Make const.
5958         (char_span::xstrdup): New.
5959         (location_get_source_line): Convert return type from const char *
5960         to char_span, losing the final "line_size" param.
5962 2018-04-30  Jan Hubicka  <jh@suse.cz>
5964         * lto-wrapper.c (ltrans_priorities): New static var.
5965         (cmp_priority): New.
5966         (run_gcc): Read priorities and if doing parallel build order
5967         the Makefile by them.
5969 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5971         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
5973 2018-04-30  Richard Biener  <rguenther@suse.de>
5975         * tree-cfg.c (verify_address): Remove base argument, add
5976         flag whether to check TREE_ADDRESSABLE and do that.
5977         (verify_expr): Remove.
5978         (verify_types_in_gimple_reference): Add pieces from verify_expr.
5979         (verify_gimple_assign_single): Likewise.
5980         (verify_gimple_switch): Likewise.
5981         (verify_expr_location_1): Dereference tp once.  Add (disabled)
5982         piece from verify_expr.
5983         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
5985 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5987         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
5989 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
5991         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
5992         (small_data_pattern): Likewise.
5993         (arc_rewrite_small_data): Likewise.
5994         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
5995         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
5996         (get_symbol_alignment): New function.
5997         (legitimate_small_data_address_p): Likewise.
5998         (legitimate_scaled_address): Update, call
5999         legitimate_small_data_address_p.
6000         (output_sdata): New static variable.
6001         (arc_print_operand): Update how we handle small data operands.
6002         (arc_print_operand_address): Likewise.
6003         (arc_legitimate_address_p): Update, use
6004         legitimate_small_data_address_p.
6005         (arc_rewrite_small_data_p): Remove.
6006         (arc_rewrite_small_data_1): Likewise.
6007         (arc_rewrite_small_data): Likewise.
6008         (small_data_pattern): Likewise.
6009         (compact_sda_memory_operand): Update to use
6010         legitimate_small_data_address_p and get_symbol_alignment.
6011         (prepare_move_operands): Don't rewite sdata pattern.
6012         (prepare_extend_operands): Remove.
6013         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6014         pattern.
6015         (zero_extendqisi2): Likewise.
6016         (zero_extendhisi2): Likewise.
6017         (extendqihi2): Likewise.
6018         (extendqisi2): Likewise.
6019         (extendhisi2): Likewise.
6020         (addsi3): Likewise.
6021         (subsi3): Likewise.
6022         (andsi3): Likewise.
6023         * config/arc/constraints.md (Usd): Change it to memory constraint.
6025 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6027         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6028         as source of std instructions.
6029         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6030         allow 6-bit constants as source for store instructions.
6031         (movdi_insn): Update instruction pattern to allow 6-bit constants
6032         as source for store instructions.
6034 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6036         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6038 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6039             Sandra Loosemore <sandra@codesourcery.com>
6041         * dumpfile.c (dump_open): Allow '-' for stdout.
6042         * doc/invoke.texi (Developer Options): Document dump filename
6043         determination early.  Document stdin/stdout selection.
6045 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6047         Microblaze Target: PIC data text relative
6049         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6050         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6051         Add declaration.
6052         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6053         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6054         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6055         New addressing mode for data-text relative position indepenedent code.
6056         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6057         'ADDRESS_SYMBOLIC_TXT_REL'.
6058         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6059         (microblaze_legitimate_pic_operand): Exclude function calls from
6060         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6061         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6062         addresses cases.
6063         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6064         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6065         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6066         for 'address + offset'.
6067         (microblaze_expand_prologue): Add new function prologue call for
6068         'r20' assignation.
6069         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6070         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6071         table in case of TARGET_PIC_DATA_TEXT_REL.
6072         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6073         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6074         Add new macros 'UNSPEC_TEXT',
6075         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6076         + exclude function calls from 'UNSPEC_PLT' in case of data text
6077         relative mode.
6078         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6079         new target hook for generating address diff vector tables in case of
6080         flag_pic.
6081         * doc/tm.texi : Regenerate.
6082         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6083         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6084         of addr diff vector generation.
6085         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6086         target hook definition.
6087         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6088         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6089         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6090         option for data text relative.
6092 2018-04-30  Richard Biener  <rguenther@suse.de>
6094         * tree-chrec.h (evolution_function_is_constant_p): Remove
6095         redundant check.
6096         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6098 2018-04-30  Richard Biener  <rguenther@suse.de>
6100         PR bootstrap/85571
6101         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6103 2018-04-30  Richard Biener  <rguenther@suse.de>
6105         PR tree-optimization/28364
6106         PR tree-optimization/85275
6107         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6108         copying first exit test.
6110 2018-04-28  Mark Wielaard  <mark@klomp.org>
6112         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6113         dwarf_version >= 5.
6114         (dwarf_AT): Handle DW_AT_addr_base.
6115         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6117 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6119         PR target/84431
6120         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6121         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6122         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6123         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6125 2018-04-28  Richard Biener  <rguenther@suse.de>
6127         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6128         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6129         to reflect use.  Only add interesting stmts.
6131 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6133         PR ipa/85549
6134         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6135         the jump function allows for passing through aggregate values.
6137 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6139         * input.h (in_system_header_at): Convert from macro to inline
6140         function.
6141         (from_macro_expansion_at): Likewise.
6142         (from_macro_definition_at): Likewise.
6144 2018-04-27  Jeff Law  <law@redhat.com>
6146         * config.gcc: Mark tile* targets as deprecated/obsolete.
6148 2018-04-27  Richard Biener  <rguenther@suse.de>
6150         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6151         fix for ILP32.
6153 2018-04-27  Richard Biener  <rguenther@suse.de>
6155         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6157 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6159         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6160         with Yd constraint. Set "preferred_for_speed" attribute from
6161         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6162         with Yd constraint.
6163         (*movdi_internal): Ditto.
6164         (movti_interunit splitters): Remove
6165         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6166         (movdi_interunit splitters): Ditto.
6167         * config/i386/constraints.md (Ye): Remove.
6168         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6170 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6172         PR target/85512
6173         * config/aarch64/constraints.md (Usg): Limit to 31.
6174         (Usj): Limit to 63.
6176 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6178         PR tree-optimization/85529
6179         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6180         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6181         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6182         zero extension or masking of the MSB bit.
6183         (optimize_range_tests): Add FIRST_BB argument, pass it through
6184         to optimize_range_tests_var_bound.
6185         (maybe_optimize_range_tests, reassociate_bb): Adjust
6186         optimize_range_tests callers.
6188 2018-04-26  Richard Biener  <rguenther@suse.de>
6189             Jakub Jelinek  <jakub@redhat.com>
6191         * cgraph.h (symbol_table): Just declare debug method here.
6192         * symtab.c (symbol_table::debug): Define.
6194 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6196         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6198 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6200         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6201         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6202         (*movdi_internal): Substitute Yi and Yj constraint with x
6203         and Ym and Yn constraint with y constraint.  Update "isa"
6204         attribute and set "preferred_for_speed" attribute from
6205         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6206         (*movsi_internal): Ditto.
6207         (*movdf_internal): Ditto.
6208         (*movsf_internal): Ditto.
6209         (*zero_extendsidi2): Ditto.
6210         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6211         (sse2_loadld): Ditto.
6212         (*vec_extract<ssevecmodelower>_0): Ditto.
6213         (*vec_extractv4si_0_zext_sse4): Ditto.
6214         (vec_concatv2di): Ditto.
6215         (*vec_dup<mode>): Ditto.
6216         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6217         * config/i386/constraints.md (Yi): Remove.
6218         (Yj): Remove.
6219         (Ym): Remove.
6220         (Yn): Remove.
6222 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6224         * dumpfile.c (dump_open): New.
6225         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6226         (dump_finish): Detect stdio/stderr by value not name.
6228 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6230         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6232 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6234         PR target/84952
6235         * config/nvptx/nvptx.c (verify_neutering_jumps)
6236         (verify_neutering_labels): New function
6237         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6239 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6241         PR target/84025
6242         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6243         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6244         need neutering.
6246 2018-04-26  Richard Biener <rguenther@suse.de>
6247             Tom de Vries  <tom@codesourcery.com>
6249         PR lto/85422
6250         * lto-streamer-out.c (output_function): Fixup loops if required to match
6251         discovery done in the reader.
6253 2018-04-26  Richard Biener  <rguenther@suse.de>
6255         PR tree-optimization/85116
6256         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6257         have a loop exit from the single latch predecessor.  Remove
6258         case of header with just condition.
6259         (ch_base::copy_headers): Exclude infinite loops from any
6260         processing.
6261         (pass_ch::execute): Record exits.
6263 2018-04-26  Richard Biener  <rguenther@suse.de>
6265         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6266         prologue cost vector and pass it to vect_get_load_cost.
6267         (vect_get_peeling_costs_all_drs): Likewise.
6268         (vect_peeling_hash_get_lowest_cost): Likewise.
6269         (vect_enhance_data_refs_alignment): Likewise.
6271 2018-04-26  Richard Biener  <rguenther@suse.de>
6273         PR middle-end/85450
6274         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6275         checking of integer<->pointer conversions.
6276         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6277         sign-/zero-extending pointer types.
6278         (expand_omp_for_static_chunk): Likewise.
6280 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6281             Jean Lee  <xiaoyur347@gmail.com>
6283         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6284         (TARGET_ASAN_SHADOW_OFFSET): Define.
6285         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6286         true for -fsanitize=address.
6288 2018-04-25  Mark Wielaard  <mark@klomp.org>
6290         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6291         shorter ones.
6293 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6295         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6296         than "alu", remove explicit "memory" and "imm_disp" attributes.
6297         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6299         PR middle-end/85414
6300         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6301         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6302         gen_lowpart_no_emit.
6304 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6306         PR target/85473
6307         * config/i386/i386.c (ix86_expand_builtin): Change memory
6308         operand to XI, extend p0 to Pmode.
6309         * config/i386/i386.md: Change unspec volatile and operand
6310         1 mode to XI, change operand 0 mode to P.
6312 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6314         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6315         GET_MODE_MASK before any checking.
6316         (nds32_can_use_bset_p): Likewise.
6317         (nds32_can_use_btgl_p): Likewise.
6319 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6321         * config/nds32/nds32-doubleword.md: New define_split pattern for
6322         illegal register number.
6324 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6326         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6328 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6330         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6332 2018-04-25  Richard Biener  <rguenther@suse.de>
6334         * lto-streamer.h (LTO_major_version): Bump to 8.
6336 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6338         * BASE-VER: Set to 9.0.0.
6340 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6342         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6343         in __abskf2 and __powikf2.
6345 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6347         PR target/85512
6348         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6349         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6350         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6351         Use the above on operand 2.  Reindent.
6352         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6354 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6356         PR target/85485
6357         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6358         handle OPT_mcet.
6359         * config/i386/i386.opt (mcet): Removed.
6360         * doc/install.texi: Remove -mcet documentation.
6361         * doc/invoke.texi: Likewise.
6363 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6365         PR target/85485
6366         * doc/install.texi: Remove -mcet from bootstrap-cet.
6368 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6370         PR target/85511
6371         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6372         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6373         if TARGET_64BIT.
6375         PR target/85503
6376         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6377         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6378         containing a CONST_VECTOR.
6380 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6382         * doc/install.texi: Update newlib dependency for nvptx.
6384 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6386         PR target/85508
6387         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6388         instead of INTVAL when shifting x left.
6390 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6392         PR tree-optimization/85478
6393         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6394         vect_grouped_store_supported for single element vectors.
6396 2018-04-24  Richard Biener  <rguenther@suse.de>
6398         PR target/85491
6399         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6400         load cost increase to the case of non-constant step.
6402 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6404         PR target/84828
6405         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6406         destination if any_malformed_asm.
6408 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6410         PR middle-end/85496
6411         * expr.c (store_field): In the bitfield case, if the value comes from
6412         a function call and is returned in registers by means of a PARALLEL,
6413         do not change the mode of the temporary unless BLKmode and VOIDmode.
6415 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6417         PR rtl-optimization/85423
6418         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6419         dependencies to debug insns when the previous insn is non-debug.
6421 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6423         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6424         enums into a single definition.
6425         (fls): Fix predicates and printing.
6426         (seti): Likewise.
6428 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6430         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6431         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6432         and short u6 immediate.
6433         (check_if_valid_sleep_operand): Remove.
6434         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6436 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6438         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6439         flag_always_save_lp condition.
6440         * config/nds32/nds32.opt (malways-save-lp): New option.
6442 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6444         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6445         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6446         * config/nds32/nds32.h
6447         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6448         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6450 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6452         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6453         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6455 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6456             Chung-Ju Wu  <jasonwucj@gmail.com>
6458         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6459         Declare.
6460         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6461         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6463 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6465         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6467 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6469         * config/nds32/nds32-protos.h (nds32_data_alignment,
6470         nds32_local_alignment): Declare.
6471         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6472         nds32_local_alignment): New functions.
6473         (TARGET_CONSTANT_ALIGNMENT): Define.
6474         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6476 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6478         * config/nds32/nds32.c
6479         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6480         (TARGET_MODES_TIEABLE_P): Likewise.
6482 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6484         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6485         level Ofast and Og.
6487 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
6488             Chung-Ju Wu  <jasonwucj@gmail.com>
6490         * config/nds32/constants.md (unspec_volatile_element): Add enum values
6491         for unaligned access.
6492         * config/nds32/nds32-intrinsic.c: Implementation of expanding
6493         unaligned access.
6494         * config/nds32/nds32-intrinsic.md: Likewise.
6495         * config/nds32/nds32_intrinsic.h: Likewise.
6496         * config/nds32/nds32.h (nds32_builtins): Likewise.
6497         * config/nds32/nds32.opt (munaligned-access): New option.
6498         * config/nds32/nds32.c (nds32_asm_file_start): Display
6499         flag_unaligned_access status.
6501 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6503         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6504         -mno-relax is present.
6505         * config/riscv/linux.h (LINK_SPEC): Ditto.
6507 2018-04-20  Martin Sebor  <msebor@redhat.com>
6509         PR c/85365
6510         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6511         for null pointers.
6512         (gimple_fold_builtin_stxcpy_chk): Same.
6513         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6515 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
6517         PR target/85456
6518         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6519         __powikf2 when long double is IEEE 128-bit.
6521 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6523         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6524         step to make sure stack always aligned.
6526 2018-04-20  Carl Love  <cel@us.ibm.com>
6528         PR target/83402
6529         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6530         size check for arg0.
6532 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6533             Tom de Vries  <tom@codesourcery.com>
6535         PR target/85445
6536         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6537         Emit insns for calls too.
6538         (nvptx_find_par): Always look for worker-level predecessor insn.
6539         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
6540         calls.
6541         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6542         (nvptx_process_pars): Propagate frames for calls.
6544 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
6546         PR target/85469
6547         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6548         Removed.
6549         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6550         (ix86_handle_option): Don't handle OPT_mibt.
6551         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6552         __SHSTK__.
6553         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6554         has_ibt and ibt.
6555         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6556         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6557         (ix86_target_macros): Define __CET__ with flag_cf_protection
6558         for -fcf-protection.
6559         * config/i386/i386.c (isa2_opts): Remove -mibt.
6560         * config/i386/i386.h (TARGET_IBT): Removed.
6561         (TARGET_IBT_P): Likewise.
6562         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6563         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6564         * config/i386/i386.opt (mcet): Update help message.
6565         (mshstk): Likewise.
6566         (mibt): Removed.
6567         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
6568         -mcet as an alias for -mshstk.
6570 2018-04-20  Richard Biener <rguenther@suse.de>
6572         PR middle-end/85475
6573         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6574         complexity by forcing a single use of the multiply operand.
6576 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6578         ipa/85449
6579         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6580         recursion dependency to only apply to non-clones.
6582 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6584         ipa/85447
6585         * ipa-cp.c (create_specialized_node): Check that clones of
6586         self-recursive edges exist during IPA-CP.
6588 2018-04-19  Toon Moene  <toon@moene.org>
6590         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6591         by -O3.
6593 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6595         PR tree-optimization/85467
6596         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6597         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
6598         VECTOR_CST element to type.
6600 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6602         PR target/85397
6603         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6604         * config/i386/i386.md (builtin_setjmp_setup): Removed.
6605         (builtin_longjmp): Likewise.
6606         (save_stack_nonlocal): New pattern.
6607         (restore_stack_nonlocal): Likewise.
6609 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6611         PR target/85404
6612         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6613         Replace ASM_OUTPUT_LABEL with fprintf.
6615 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6617         PR target/85417
6618         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6619         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6620         * config/i386/i386-c.c (ix86_target_macros_internal): Also
6621         define __IBT__ and __SHSTK__ for -fcf-protection.
6622         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6623         TARGET_IBT.
6624         (ix86_trampoline_init): Likewise.
6625         (x86_output_mi_thunk): Likewise.
6626         (ix86_notrack_prefixed_insn_p): Likewise.
6627         (ix86_option_override_internal): Don't disallow -fcf-protection.
6628         * config/i386/i386.md (rdssp<mode>): Also enable for
6629         -fcf-protection.
6630         (incssp<mode>): Likewise.
6631         (nop_endbr): Likewise.
6632         * config/i386/i386.opt (mcet): Change help message to built-in
6633         functions only.
6634         (mibt): Likewise.
6635         (mshstk): Likewise.
6636         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6637         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
6638         enable CET built-in functions.
6640 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
6642         * common/config/i386/i386-common.c
6643         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6644         OPTION_MASK_ISA_MOVDIRI_UNSET,
6645         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6646         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6647         * config.gcc (movdirintrin.h): New header.
6648         * config/i386/cpuid.h (bit_MOVDIRI,
6649         bit_MOVDIR64B): New bits.
6650         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6651         and -mmvodir64b.
6652         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6653         (VOID, PVOID, PCVOID)): New function types.
6654         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6655         __builtin_ia32_directstoreu_u64,
6656         __builtin_ia32_movdir64b): New builtins.
6657         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6658         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6659         and -mmovdiri.
6660         (ix86_valid_target_attribute_inner_p): Ditto.
6661         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6662         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6663         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6664         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6665         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6666         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6667         (movdiri<mode>, movdir64b_<mode>): New.
6668         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6669         * config/i386/immintrin.h: Include movdirintrin.h.
6670         * config/i386/movdirintrin.h: New file.
6671         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6673 2018-04-19  Richard Biener  <rguenther@suse.de>
6675         PR middle-end/85455
6676         * cfg.c (clear_bb_flags): When loop state says we have
6677         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6679 2018-04-19  Richard Biener  <rguenther@suse.de>
6681         PR tree-optimization/84737
6682         * tree-vect-data-refs.c (vect_copy_ref_info): New function
6683         copying restrict info.
6684         (vect_setup_realignment): Use it.
6685         * tree-vectorizer.h (vect_copy_ref_info): Declare.
6686         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6687         the first DR to all generated stores.
6688         (vectorizable_load): Likewise for loads.
6690 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6692         PR tree-optimization/85446
6693         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6694         the integral and pointer types to have the same precision.
6696         * doc/install.texi: Document --disable-cet being the default and
6697         --enable-cet=auto.
6699 2018-04-18  Martin Liska  <mliska@suse.cz>
6701         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6702         style.
6704 2018-04-18  Martin Liska  <mliska@suse.cz>
6706         Revert
6707         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6709         PR ipa/83983
6710         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6711         arguments if they are comparable.
6713 2018-04-18  Martin Liska  <mliska@suse.cz>
6715         Revert
6716         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6718         PR lto/84805
6719         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6720         incomplete types.
6722 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
6724         PR target/85388
6725         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6726         ENDBR after calling __morestack.
6728 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
6730         PR jit/85384
6731         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6732         by using gcc_base_ver to generate a gcc_driver_version, and use
6733         it when generating GCC_DRIVER_NAME.
6734         * configure: Regenerate.
6736 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
6738         PR target/81084
6739         * config.gcc: Obsolete powerpc*-*-*spe*.
6741 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6743         PR debug/84637
6744         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6745         (stabstr_D): Change type of unum from unsigned int to
6746         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
6747         type.
6749 2018-04-17  Jim Wilson  <jimw@sifive.com>
6751         PR 84856
6752         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6753         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6754         Set arg_pointer_offset after using pretend_args_size.
6756 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6758         PR rtl-optimization/85431
6759         * dse.c (record_store): Ignore zero width stores.
6761         PR sanitizer/85230
6762         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
6763         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6764         __builtin_stack_restore rather than after it.
6765         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6766         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6767         argument instead of virtual_dynamic_stack_rtx.
6769 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6771         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6772         New prototype.
6773         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6774         Add note to error message to explain internal mapping of overloaded
6775         built-in function name to non-overloaded built-in function name.
6776         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6777         function.
6779 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
6781         PR target/85424
6782         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6783         where the inputs overlap with the output.
6785 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6787         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6788         (=v, v) alternative and explicit "memory" attribute.
6789         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
6790         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6791         attributes.
6792         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6793         "sselog1" type instead of "sselog".
6794         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6795         "sselog".  Remove explicit "memory" attribute.
6796         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6797         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6798         attributes.
6799         (vec_extract_hi_v32hi): Merge all alternatives into one, use
6800         "sselog1" type instead of "sselog".  Remove explicit "memory"
6801         attribute.
6802         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6803         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6804         attribute.
6805         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6806         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6807         attributes.
6808         (vec_extract_hi_v64qi): Merge all alternatives into one, use
6809         "sselog1" type instead of "sselog".  Remove explicit "memory"
6810         attribute.
6811         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6812         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6813         attribute.
6815         PR target/85430
6816         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6818         PR middle-end/85414
6819         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6820         on a SUBREG.
6822 2018-04-17  Martin Jambor  <mjambor@suse.cz>
6824         PR ipa/85421
6825         * ipa-cp.c (create_specialized_node): Call
6826         expand_all_artificial_thunks if necessary.
6828 2018-04-17  Martin Liska  <mliska@suse.cz>
6830         PR lto/85405
6831         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6832         in message, remote space in between '_G' and '('.
6834 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6836         PR target/85281
6837         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6838         avx512f_vmcmp<mode>3<round_saeonly_name>,
6839         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6840         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6841         avx512f_rndscale<mode><round_saeonly_name>,
6842         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6843         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6844         Use %<iptr>2 instead of %2 for -masm=intel.
6845         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6846         avx512f_vcvttss2usi<round_saeonly_name>,
6847         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6848         -masm=intel.
6849         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6850         avx512f_vcvttsd2usi<round_saeonly_name>,
6851         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6852         Use %q1 instead of %1 for -masm=intel.
6853         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6854         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6855         of %3 for -masm=intel.
6856         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6857         -masm=intel.
6858         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6859         -masm=intel.
6860         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6861         -masm=intel.
6862         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6863         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6864         %g1.
6865         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6866         -masm=intel.
6867         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6868         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6869         %g1 and one with %0 and %1.
6870         (avx512er_vmrcp28<mode><round_saeonly_name>,
6871         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6872         %1 for -masm=intel.
6873         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6874         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6875         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6876         of %0 and %{%4%} for -masm=intel.
6877         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6878         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6879         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6880         order of %0 and %{%5%}%{z%} for -masm=intel.
6882 2018-04-17  Jan Hubicka  <jh@suse.cz>
6884         PR lto/85405
6885         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6887 2018-04-17  Martin Liska  <mliska@suse.cz>
6889         PR ipa/85329
6890         * multiple_target.c (create_dispatcher_calls): Set apostrophes
6891         for target_clone error message.  Make default implementation
6892         clone to be a local declaration.
6893         (separate_attrs): Add new argument and check for an empty
6894         string.
6895         (expand_target_clones): Handle it.
6896         (ipa_target_clone): Make redirection just for target_clones
6897         functions.
6899 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
6900             Tom de Vries  <tom@codesourcery.com>
6902         PR middle-end/84955
6903         * omp-expand.c (expand_oacc_for): Add dummy false branch for
6904         tiled basic blocks without omp continue statements.
6906 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
6908         PR target/83660
6909         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
6910         vec_extract expression as having side effects to make sure it gets
6911         a cleanup point.
6913 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
6915         PR target/85403
6916         * config/i386/i386.c (get_builtin_code_for_version): Check
6917         error_mark_node.
6919 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
6921         PR target/84331
6922         * gcc/config.gcc: Support "skylake".
6923         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
6924         PROCESSOR_SKYLAKE.
6925         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
6926         (processor_target_table): Add "skylake".
6927         (ix86_option_override_internal): Add "skylake".
6928         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
6929         PROCESSOR_CANNONLAKE.
6930         (get_builtin_code_for_version): Fix priority for
6931         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
6932         PROCESSOR_SKYLAKE-AVX512.
6933         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
6934         (processor_type): Add PROCESSOR_SKYLAKE.
6936 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
6937             Jason Merrill  <jason@redhat.com>
6939         PR c++/85112
6940         * convert.c (convert_to_integer_1): Use direct recursion for
6941         enumeral types and types with a precision less than the number
6942         of bits in their mode.
6944 2018-04-16  Julia Koval  <julia.koval@intel.com>
6946         PR target/84413
6947         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
6948         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
6950 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
6952         PR target/85293
6953         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
6954         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
6955         and -mno-direct-move.
6957 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
6959         PR target/83402
6960         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
6961         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
6962         Ensure negative shifts result in {0}.
6964 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
6966         PR rtl-optimization/79916
6967         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
6968         regs (if any) to define how to gnerate SD moves when LRA is in
6969         progress.
6971 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
6973         PR rtl-optimization/85393
6974         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
6975         * except.c (expand_dw2_landing_pad_for_region): Make static.
6976         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
6977         a label and unconditional jump to old_bb, rather than
6978         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
6979         basic block.
6981         PR rtl-optimization/85376
6982         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
6983         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
6984         instead of a specific value.
6986 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
6987             Bin Cheng  <bin.cheng@arm.com>
6989         PR tree-optimization/82965
6990         PR tree-optimization/83991
6991         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
6992         by_profile_only parameter.
6993         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
6994         information if the loop was predicted to iterate too many times.
6995         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
6997 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
6999         PR lto/71991
7000         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7001         always inline.
7003 2018-04-13  Martin Liska  <mliska@suse.cz>
7004             Jakub Jelinek  <jakub@redhat.com>
7006         PR middle-end/81657
7007         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7008         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7009         * builtins.c (expand_builtin_memory_copy_args): Use
7010         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7011         handle dest_addr == pc_rtx.
7013 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7015         PR target/85291
7016         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7017         asked to not generate direct moves.
7018         (fix_trunc<mode>si2_stfiwx): Similar.
7019         (fix_trunc<mode>si2_internal): Similar.
7021 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7023         PR debug/83157
7024         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7025         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7026         lookup if dest in some wider mode is known to be const0_rtx and
7027         if so, record permanent equivalence for it to be ZERO_EXTEND of
7028         the narrower mode destination.
7030 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7032         * lto-streamer-out.c (output_function): Revert 259346.
7033         * omp-expand.c (expand_oacc_for): Likewise.
7035 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7037         PR rtl-optimization/85354
7038         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7039         * sel-sched.c (sel_global_init): ... here.
7041 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7043         PR target/85238
7044         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7045         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7046         mode for PE-COFF targets.
7047         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7048         (i386_pe_asm_lto_end): Likewise.
7049         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7050         (TARGET_ASM_LTO_END): Likewise.
7051         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7052         (i386_pe_asm_lto_start): New function.
7053         (i386_pe_asm_lto_end): Likewise.
7055 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7056             Richard Biener  <rguenther@suse.de>
7058         PR middle-end/84955
7059         * lto-streamer-out.c (output_function): Fix CFG loop state before
7060         streaming out.
7061         * omp-expand.c (expand_oacc_for): Handle calls to internal
7062         functions like regular functions.
7064 2018-04-12  Richard Biener  <rguenther@suse.de>
7066         PR lto/85371
7067         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7068         for the early LTO debug to properly generate references to it
7069         during DIE emission.  Do not re-use that for the skeleton for
7070         split-dwarf.
7071         (dwarf2out_early_finish): Likewise.
7073 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7075         PR target/85328
7076         * config/i386/sse.md
7077         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7078         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7079         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7080         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7081         and output is a reg, avoid creating invalid lowpart subreg, but
7082         instead split into a 512-bit move.  Don't split if not AVX512VL,
7083         input is xmm16+ reg and output is a mem.
7084         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7085         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7086         xmm16+ reg and output is a mem.
7088 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7090         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7091         also for flag_dwarf2_cfi_asm.
7093 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7095         PR rtl-optimization/85342
7096         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7097         a bool scalar var inside of the loop instead.  Don't try to update
7098         recog_data.operand after failed apply_change_group.
7100 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7102         PR target/85296
7103         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7104         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7105         array with flexible array member as array without given dimension.
7106         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7107         argument for undefined param to true.
7109 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7111         PR target/85321
7112         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7113         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7114         from PowerPC section.
7115         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7116         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7117         help text that is too long.
7118         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7119         help text that is too long.
7120         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7121         help text that is too long.
7123 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7125         * config/alpha/alpha.md (stack_probe_internal): Rename
7126         from "probe_stack".  Update all callers.
7128 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7130         PR rtl-optimization/84566
7131         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7132         sched_macro_fuse_insns.
7134 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7136         PR target/84301
7137         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7138         (compute_block_dependences): ... from here.
7140 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7142         PR tree-optimization/85331
7143         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7144         from int to HOST_WIDE_INT.
7146 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7148         PR ipa/84149
7149         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7150         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7151         not the same as the source val.
7152         (cgraph_edge_brings_value_p): New parameter.
7153         (gather_edges_for_value): Pass destination value to
7154         cgraph_edge_brings_value_p.
7155         (perhaps_add_new_callers): Likewise.
7156         (get_info_about_necessary_edges): Likewise and exclude values brought
7157         only by self-recursive edges.
7158         (create_specialized_node): Redirect only clones of self-calling edges.
7159         (+self_recursive_pass_through_p): New function.
7160         (find_more_scalar_values_for_callers_subset): Use it.
7161         (find_aggregate_values_for_callers_subset): Likewise.
7162         (known_aggs_to_agg_replacement_list): Removed.
7163         (decide_whether_version_node): Re-calculate known constants for all
7164         remaining context clones.
7166 2018-04-11  Richard Biener  <rguenther@suse.de>
7168         PR lto/85339
7169         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7170         from early DWARF output.
7171         (dwarf2out_early_finish): Output line info unconditionally into
7172         early DWARF and add reference to it.
7174 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7176         PR target/85281
7177         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7178         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7179         other than V2DFmode using iptr mode attribute.
7180         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7182 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7184         PR rtl-optimization/84659
7185         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7187 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7189         PR debug/85302
7190         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7191         SIZEP is NULL.
7192         (output_loc_list): Pass address of a dummy size variable even in the
7193         locview handling loop.
7194         (index_location_lists): Add comment on why skip_loc_list_entry can't
7195         call size_of_locs.
7197 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7199         PR target/85261
7200         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7201         into register.
7203 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7205         PR target/85321
7206         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7207         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7208         and -mstring-compare-inline-limit.
7210 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7212         PR target/85287
7213         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7214         for stack clash protection in a register whenever we need it to be in
7215         a register.
7217 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7219         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7220         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7222 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7224         PR target/85321
7225         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7226         the help text.
7227         (mlong-double-): Ditto.
7228         * config/rs6000/sysv4.opt (msdata=): Ditto.
7229         (mtls-size=): Ditto.
7231 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7233         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7234         erroneous entries for
7235         "vector int vec_ldl (int, long int *)", and
7236         "vector unsigned int vec_ldl (int, unsigned long int *)".
7237         Add comments and entries for
7238         "vector bool char vec_ldl (int, bool char *)",
7239         "vector bool short vec_ldl (int, bool short *)",
7240         "vector bool int vec_ldl (int, bool int *)",
7241         "vector bool long long vec_ldl (int, bool long long *)",
7242         "vector pixel vec_ldl (int, pixel *)",
7243         "vector long long vec_ldl (int, long long *)",
7244         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7245         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7246         type tree bool_long_long_type_node and correct definition of
7247         bool_V2DI_type_node to make reference to this new type tree.
7248         (rs6000_mangle_type): Replace erroneous reference to
7249         bool_long_type_node with bool_long_long_type_node.
7250         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7251         comments to emphasize sign distinctions for char and int types and
7252         replace RS6000_BTI_bool_long constant with
7253         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7254         use of RS6000_BTI_pixel.
7255         (bool_long_type_node): Remove this macro definition.
7256         (bool_long_long_type_node): New macro definition
7258 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7260         PR rtl-optimization/85300
7261         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7262         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7263         simplify_unary_operation fails.
7265 2018-04-10  Martin Liska  <mliska@suse.cz>
7267         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7268         cgraph_edge and ipa_ref.
7270 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7272         PR target/85177
7273         PR target/85255
7274         * config/i386/sse.md
7275         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7276         computation of the VEC_MERGE selector from mask.
7277         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7278         Fix decoding of the VEC_MERGE selector into mask.
7280 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7282         PR tree-optimization/85286
7283         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7285 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7287         * final.c (final_1): Set insn_last_address as well as
7288         insn_current_address.
7290 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7292         PR target/85173
7293         * explow.c (emit_stack_probe): Call validize_mem on memory location
7294         before passing it to gen_probe_stack.  Create address operand and
7295         legitimize it for the probe_stack_address case.
7297 2018-04-09  Jan Hubicka  <jh@suse.cz>
7299         PR lto/85078
7300         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7301         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7302         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7303         walk basetypes.
7304         (free_lang_data): Rebuild type inheritance graph.
7306 2018-04-09  Martin Sebor  <msebor@redhat.com>
7308         * invoke.texi (-finline-small-functions): Mention other optimization
7309         options.
7310         (-findirect-inlining, -fpartial-inlining): Same.
7311         (-finline-functions-called-once): Same.
7312         (-freorder-blocks-and-partition): Same.
7314 2018-04-09  Jan Hubicka  <jh@suse.cz>
7316         PR rtl/84058
7317         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7318         jumps; choose last target that matches the criteria (i.e.
7319         no partition changes for non-crossing jumps).
7320         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7321         support for redirecting crossing jumps to non-crossing.
7323 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7325         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7326         also for naked functions.
7328 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7330         * config/arc/arc.md (add_shift): New pattern.
7331         (add_shift2): Likewise.
7332         (sub_shift): Likewise.
7333         (sub_shift_cmp0_noout): Likewise.
7334         (compare_si_ashiftsi): Likewise.
7335         (xbfu_cmp0_noout): New combine pattern.
7336         (xbfu_cmp0"): Likewise.
7337         (movsi_set_cc_insn): Place the predicable variant first.
7338         (commutative_binary_cmp0_noout): Remove clobber.
7339         (commutative_binary_cmp0): New pattern.
7340         (noncommutative_binary_cmp0): Likewise.
7341         (noncommutative_binary_cmp0_noout): Likewise.
7342         (noncommutative_binary_comparison_result_used): Removed.
7343         (rsub_cmp0): New pattern.
7344         (rsub_cmp0_noout): Likewise.
7345         (extzvsi): Changed, keep only meaningful variants.
7346         (SQH, SEZ): New iterators.
7347         (SQH_postfix): New mode attribute.
7348         (SEZ_prefix): New code attribute.
7349         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7350         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7351         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7352         of numerical value.
7353         (noncommutative_operator): Check the availability of barrel
7354         shifter option.
7356 2018-04-09  Richard Biener  <rguenther@suse.de>
7358         PR tree-optimization/85284
7359         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7360         Only use the niter constraining form of simple_iv when the exit
7361         is always executed.
7363 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7365         PR target/84041
7366         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7367         (define_expand "*memory_barrier"): New define_expand.
7368         (define_insn "memory_barrier"): New insn.
7370 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7372         PR rtl-optimization/80463
7373         PR rtl-optimization/83972
7374         PR rtl-optimization/83480
7376         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7377         correct producer for the insn.
7378         (tidy_control_flow): Fixup seqnos in case of debug insns.
7380 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7382         PR rtl-optimization/83913
7384         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7385         different sched-times when merging exprs.
7387 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7389         PR rtl-optimization/83962
7391         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7392         tidy_fallthru_edge and tidy_control_flow.
7394 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7396         PR rtl-optimization/83530
7398         * sel-sched.c (force_next_insn): New global variable.
7399         (remove_insn_for_debug): When force_next_insn is true, also leave only
7400         next insn in the ready list.
7401         (sel_sched_region): When the region wasn't scheduled, make another pass
7402         over it with force_next_insn set to 1.
7404 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7406         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7407         into tm_file.
7408         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7409         for interrupt control.
7410         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7411         functions for interrupt control.
7412         * config/nds32/nds32-intrinsic.md: Likewise.
7413         * config/nds32/nds32_intrinsic.h: Likewise.
7414         * config/nds32/nds32.h (nds32_builtins): Likewise.
7416 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7418         * config/nds32/nds32.c (nds32_init_machine_status,
7419         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7420         strict_aligned_p field.
7421         (nds32_expand_to_rtl_hook): New function.
7422         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7423         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7425 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7426             Chung-Ju Wu  <jasonwucj@gmail.com>
7428         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7429         * config/nds32/nds32-n7.md: New file.
7430         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7431         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7432         pipeline.
7433         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7434         * config/nds32/nds32.md (pipeline_model): Add n7.
7435         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7436         * config/nds32/pipelines.md: Include n7 settings.
7438 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7439             Chung-Ju Wu  <jasonwucj@gmail.com>
7441         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7442         * config/nds32/nds32-e8.md: New file.
7443         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7444         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7445         pipeline.
7446         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7447         * config/nds32/nds32.md (pipeline_model): Add e8.
7448         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7449         * config/nds32/pipelines.md: Include e8 settings.
7451 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7452             Chung-Ju Wu  <jasonwucj@gmail.com>
7454         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7455         * config/nds32/nds32-n8.md: New file.
7456         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7457         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7458         pipeline.
7459         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7460         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7461         * config/nds32/nds32.md (pipeline_model): Add n8.
7462         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7463         * config/nds32/pipelines.md: Include n8 settings.
7465 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7466             Chung-Ju Wu  <jasonwucj@gmail.com>
7468         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7469         * config/nds32/nds32-n9-2r1w.md: New file.
7470         * config/nds32/nds32-n9-3r2w.md: New file.
7471         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7472         nds32_register_ports): New or modify for cpu n9.
7473         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7474         pipeline.
7475         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7476         * config/nds32/nds32-utils.c: New file.
7477         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7478         TARGET_MUL_SLOW): Define.
7479         * config/nds32/nds32.md (pipeline_model): New attribute.
7480         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7481         New options that support cpu n9.
7482         * config/nds32/pipelines.md: Include n9 settings.
7483         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7485 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7487         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7488         information if necessary.
7489         (output_cond_branch_compare_zero): Likewise.
7490         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7491         (nds32_target_alignment): Refine for alignment.
7492         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7493         (FUNCTION_BOUNDARY): Modify.
7494         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7495         align case.
7496         * config/nds32/nds32.opt (malways-align, malign-functions): New.
7498 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7500         * config/nds32/constants.md (unspec_volatile_element): Add values for
7501         TLB operation and data prefetch.
7502         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7503         functions for TLB operation and data prefetch.
7504         * config/nds32/nds32-intrinsic.md: Likewise.
7505         * config/nds32/nds32_intrinsic.h: Likewise.
7506         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7507         (nds32_print_operand): Likewise.
7508         * config/nds32/nds32.h (nds32_builtins): Likewise.
7510 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
7511         Andrew Pinski <pinsika@gcc.gnu.org>
7513         PR middle-end/82976
7514         * match.pd: Use constant_boolean_node of correct type instead of
7515         boolean_true_node or boolean_false_node for simplifying
7516         pointer comparisons to zero.
7518 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7520         PR tree-optimization/80021
7521         * tree.c (verify_type_variant): Make error call in verify_variant_match
7522         translatable and remove final full stop.
7524 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7526         * config/nds32/constants.md (unspec_volatile_element): Add
7527         UNSPEC_VOLATILE_EH_RETURN.
7528         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7529         nds32_output_stack_pop): Support dwarf exception handling process.
7530         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7531         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7532         exception handling process.
7533         (nds32_compute_stack_frame): Likewise.
7534         (nds32_return_addr_rtx): Likewise.
7535         (nds32_initial_elimination_offset): Likewise.
7536         (nds32_expand_prologue): Likewise.
7537         (nds32_expand_epilogue): Likewise.
7538         (nds32_dynamic_chain_address): New function.
7539         * config/nds32/nds32.h (machine_function): Add fields for dwarf
7540         exception handling.
7541         (DYNAMIC_CHAIN_ADDRESS): Define.
7542         (EH_RETURN_DATA_REGNO): Define.
7543         (EH_RETURN_STACKADJ_RTX): Define.
7544         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7545         patterns for dwarf exception handling.
7547 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7549         * config/nds32/nds32.h: Clean up obsolete macros.
7551 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7553         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7554         Add enum values for particular instructions.
7555         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7556         particular intrinsic functions.
7557         * config/nds32/nds32-intrinsic.md: Likewise.
7558         * config/nds32/nds32_intrinsic.h: Likewise.
7559         * config/nds32/nds32.h (nds32_builtins): Likewise.
7560         * config/nds32/nds32.md (type): Add pbsad and pbsada.
7561         (btst, ave): New patterns for particular instructions.
7563 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7565         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7566         Add enum values for atomic load/store and memory sync.
7567         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7568         and memory sync.
7569         * config/nds32/nds32-intrinsic.md: Likewise.
7570         * config/nds32/nds32_intrinsic.h: Likewise.
7571         * config/nds32/nds32.h (nds32_builtins): Likewise.
7573 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7575         PR tree-optimization/85257
7576         * fold-const.c (native_encode_vector): If not all elts could fit
7577         and off is -1, return 0 rather than offset.
7578         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7579         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7580         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
7581         adjust buffer in native_interpret_expr call.
7583 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7585         * config/nds32/constants.md (unspec_volatile_element): Add cache
7586         control enum values.
7587         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7588         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7589         * config/nds32/nds32.c (nds32_cctl_names): New.
7590         (nds32_print_operand): Handle cache control register names.
7591         * config/nds32/nds32.h (nds32_builtins): New enum values.
7592         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7593         macros.
7594         * config/nds32/nds32.md (type): Add mmu.
7595         * config/nds32/pipelines.md (simple_insn): Add mmu.
7597 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7599         * config/nds32/nds32.md (type): Remove call.
7600         * config/nds32/pipelines.md (simple_insn): Likewise.
7602 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7604         * config/nds32/constants.md (unspec_volatile_element): Add
7605         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7606         UNSPEC_VOLATILE_FMFCFG.
7607         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7608         description for fmfcfg and fmfcsr.
7609         (bdesc_1arg): Add fmtcsr.
7610         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7611         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7612         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7613         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7614         unspec_fmfcfg): New patterns.
7615         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7616         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7617         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7618         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7619         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7620         __nds32__fmfcfg): Define.
7622 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7624         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7625         intrinsic register names.
7626         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7627         intrinsic register enum values and macros.
7629 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7631         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7632         for load/store addressing form.
7633         (nds32_print_operand_address): Likewise.
7635 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
7637         PR target/85196
7638         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7639         based on LABEL_REF.  Remove useless assertion.
7640         (pic_address_needs_scratch): Fix formatting.
7641         (sparc_legitimize_pic_address): Minor tweaks.
7642         (sparc_delegitimize_address): Adjust assertion accordingly.
7643         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7644         into symbolic_operand.
7645         (movsi_high_pic_label_ref): Likewise.
7646         (movsi_lo_sum_pic_label_ref): Likewise.
7647         (movdi_pic_label_ref): Likewise.
7648         (movdi_high_pic_label_ref): Likewise.
7649         (movdi_lo_sum_pic_label_ref): Likewise.
7651 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
7653         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7654         custom LIB_SPEC setup.
7656 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
7657             Kito Cheng  <kito.cheng@gmail.com>
7659         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7660         * config/riscv/freebsd.h: New.
7662 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7664         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7665         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7666         file.
7668 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7669             Kito Cheng  <kito.cheng@gmail.com>
7671         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7672         nds32_output_call, nds32_symbol_binds_local_p): New functions.
7673         * config/nds32/nds32-protos.h (nds32_output_call,
7674         nds32_output_return): Declare.
7675         * config/nds32/nds32.md: Refine all the call and return patterns.
7677 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7679         PR debug/85252
7680         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7681         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7683         PR rtl-optimization/84872
7684         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7685         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7686         EDGE_CROSSING edge.
7688 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
7690         * expr.c (copy_blkmode_to_reg): Revert 254862.
7691         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7693 2018-04-06  Richard Biener  <rguenther@suse.de>
7695         PR middle-end/85244
7696         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7697         after seeing a component reference with an adjacent field.  Treat
7698         refs to arrays at struct end of external decls similar to
7699         refs to unconstrained commons.
7701 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7703         PR sanitizer/85213
7704         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7705         look through SAVE_EXPRs with non-side-effects argument.  Adjust
7706         recursive calls.
7707         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7708         save_p here.
7710 2018-04-06  Richard Biener  <rguenther@suse.de>
7712         PR middle-end/85180
7713         * alias.c (find_base_term): New wrapper around find_base_term
7714         unwinding CSELIB_VAL_PTR changes.
7715         (find_base_term): Do not restore CSELIB_VAL_PTR during the
7716         recursion.
7718 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7720         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7721         instructions.
7722         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7723         constant definitions.
7724         ("nop"): lr 0,0 -> nopr r0
7725         ("nop_lr0", "nop_lr1"): New insn definitions.
7727 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7729         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7730         NDS32_V3PUSH_AVAILABLE_P macro.
7732 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
7733             Chung-Ju Wu  <jasonwucj@gmail.com>
7735         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7736         (nds32*-*-*): Add float and fpu_config into supported_defaults.
7737         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7738         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7739         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7740         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7741         * config/nds32/constraints.md: New constraints and checking for hard
7742         float configuration.
7743         * config/nds32/iterators.md: New mode iterator and attribute for hard
7744         float configuration.
7745         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7746         patterns.
7747         * config/nds32/nds32-fpu.md: New file.
7748         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7749         deal with hard float code generation.
7750         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7751         ARCH_V3S.
7752         (abi_type, float_reg_number): New enum type.
7753         * config/nds32/nds32-predicates.c: New predicates for hard float.
7754         * config/nds32/nds32-protos.h: Declare functions for hard float.
7755         * config/nds32/nds32.c: Implementation for hard float configuration.
7756         * config/nds32/nds32.h: Definitions for hard float configuration.
7757         * config/nds32/nds32.md: Include hard float machine description and
7758         modify patterns for hard float configuration.
7759         * config/nds32/nds32.opt: New options for hard float configuration.
7760         * config/nds32/predicates.md: New predicates for hard float
7761         configuration.
7763 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
7765         * common/config/nds32/nds32-common.c
7766         (nds32_option_optimization_table): Enable -mreleax-hint by default.
7768 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
7770         PR middle-end/85195
7771         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7772         CONSTRUCTOR_ELT (ctor, ...)->value.
7774 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
7776         PR target/85193
7777         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7779 2018-04-05  Tom de Vries  <tom@codesourcery.com>
7781         PR target/85204
7782         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7783         cond jump.
7785 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7786             Kito Cheng  <kito.cheng@gmail.com>
7788         * config/nds32/constraints.md (U33): Fine-tune checking condition.
7789         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7790         * config/nds32/nds32.h (nds32_16bit_address_type): Add
7791         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7793 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7794             Kito Cheng  <kito.cheng@gmail.com>
7796         * config/nds32/constraints.md (Ufe): New memory constraint.
7797         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7798         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7799         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7800         operands.
7801         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7802         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7804 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7806         * config/nds32/nds32.md: Use optimize_size in the condition for
7807         alu-shift instructions.
7809 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7811         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7813 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7815         * config/nds32/nds32.md (negsi2): Refine pattern.
7817 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7818             Chung-Ju Wu  <jasonwucj@gmail.com>
7820         * config/nds32/iterators.md (shift_rotate): New code iterator.
7821         (shift): New code attribute.
7822         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7823         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7824         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7825         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7826         bit-wise operations.
7827         (andsi3, *andsi3): Ditto.
7828         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7829         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7830         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7831         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7832         nds32_ior_operand, nds32_xor_operand): New predicates.
7834 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7836         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7837         (addsi3, subsi3): ... this.
7839 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7841         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7843 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7845         * config/nds32/nds32.md: Adjust indention.
7847 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7849         * config/nds32/nds32.md (feature): New attribute.
7851 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7853         * config/nds32/nds32.md (subtype): New attribute.
7855 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7857         PR target/85203
7858         * config/arm/arm-builtins.c (arm_expand_builtin): Change
7859         expansion to perform a bitwise AND of the argument followed by a
7860         boolean negation of the result.
7862 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
7864         PR rtl-optimization/84878
7865         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7866         the basic block.  Assert the use reference is not artificial and that
7867         it has an associated insn.
7869 2018-04-04  Michael Matz  <matz@suse.de>
7871         * builtins.c (compute_objsize): Pass correct operand
7872         to array_at_struct_end_p.
7874 2018-04-04  Richard Biener  <rguenther@suse.de>
7876         PR lto/85176
7877         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7878         from contexts for DINFO_LEVEL_TERSE and below.
7880 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7882         * config/nds32/nds32-doubleword.md (move_<mode>): Require
7883         resiter_operand condition.
7884         * config/nds32/nds32.md (*move<mode>): Ditto.
7886 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7887             Monk Chiang  <sh.chiang04@gmail.com>
7889         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7891 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7893         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
7895 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7896             Kito Cheng  <kito.cheng@gmail.com>
7898         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
7899         nds32_cond_code_str, output_cond_branch,
7900         output_cond_branch_compare_zero, nds32_expand_cbranch,
7901         nds32_expand_cstore, nds32_expand_movcc,
7902         nds32_output_cbranchsi4_equality_zero,
7903         nds32_output_cbranchsi4_equality_reg,
7904         nds32_output_cbranchsi4_equality_reg_or_const_int,
7905         nds32_output_cbranchsi4_greater_less_zero: New functions.
7906         * config/nds32/nds32-protos.h (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): Declare.
7912         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
7913         nds32_rimm11s_operand): New predicates.
7914         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
7915         * config/nds32/nds32.md: Rewrite all the branch and conditional move
7916         patterns.
7918 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7920         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
7921         * config/nds32/nds32.md: Ditto.
7922         * config/nds32/pipelines.md: Ditto.
7924 2018-04-04  Richard Biener  <rguenther@suse.de>
7926         PR tree-optimization/85168
7927         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
7928         propagating abnormals.
7930 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7932         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
7934 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7935             Kito Cheng  <kito.cheng@gmail.com>
7937         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
7938         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
7939         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
7940         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
7941         * config/nds32/nds32.md (sibcall_internal): New.
7942         (sibcall_register): Remove.
7943         (sibcall_immediate): Remove.
7944         (sibcall_value_internal): New.
7945         (sibcall_value_register): Remove.
7946         (sibcall_value_immediate): Remove.
7947         * config/nds32/predicates.md (nds32_general_register_operand): New.
7948         (nds32_call_address_operand): New.
7950 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7952         PR rtl-optimization/85167
7953         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
7954         bb_defs if *split_p, instead preinitialize it to NULL.
7956         PR tree-optimization/85156
7957         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
7958         evaluating the argument multiple times.
7960 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
7962         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
7963         than vector.
7964         (_mm_cvtpd_ps): Likewise.
7965         (_mm_cvttpd_epi32): Likewise.
7966         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
7967         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
7968         vector, pixel, and bool following altivec.h include.
7970 2018-04-03  Martin Sebor  <msebor@redhat.com>
7972         * doc/extend.texi (Common Function Attributes): Clarify.
7973         (const attribute): Likewise.
7974         (pure attribute): Likewise.
7976 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7978         PR target/85169
7979         * config/i386/i386.c (ix86_expand_vector_set): Use
7980         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
7982 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
7984         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
7985         instructions when changing rounding bits to preserve precision bits
7986         in the x87 control word.
7988 2018-04-03  Martin Liska  <mliska@suse.cz>
7990         PR tree-optimization/82491
7991         * rtl.h (strip_offset_and_add): Replace += suboffset with
7992         poly_uint64 () + suboffset.
7994 2018-03-29  Martin Liska  <mliska@suse.cz>
7995             Martin Jambor  <mjambor@suse.cz>
7997         PR ipa/84947
7998         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
7999         param_type is not an integral or pointer type.
8001 2018-04-03  Richard Biener  <rguenther@suse.de>
8003         * sese.h (recompute_all_dominators): Remove.
8005 2018-04-02  Martin Sebor  <msebor@redhat.com>
8007         * doc/invoke.texi (-Wrestrict): Fix typos.
8009 2018-04-02  Jim Wilson  <jimw@sifive.com>
8011         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8012         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8013         (<optab>di3, <optab>si3_extend): Likewise.
8014         (<optab>si3_mask, <optab>si3_mask_1): New.
8015         (<optab>di3_mask, <optab>di3_mask_1): New.
8016         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8017         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8018         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8020 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8022         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8023         example.
8025 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8027         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8028         (nds32_canonicalize_comparison): New function.
8030 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8031             Kito Cheng  <kito.cheng@gmail.com>
8032             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8034         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8035         * config/nds32/constants.md (unspec_volatile_element): Add
8036         UNSPEC_VOLATILE_RELAX_GROUP.
8037         * config/nds32/nds32-relax-opt.c: New file.
8038         * config/nds32/nds32-predicates.c
8039         (nds32_symbol_load_store_p): New function.
8040         * config/nds32/nds32-protos.h
8041         (nds32_symbol_load_store_p): Declare function.
8042         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8043         * config/nds32/nds32.c
8044         (nds32_register_pass): New function to register pass.
8045         (nds32_register_passes): New function to register passes.
8046         * config/nds32/nds32.md (relax_group): New pattern.
8047         * config/nds32/nds32.opt (mrelax-hint): New option.
8048         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8050 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8052         * config/nds32/t-nds32: Modify files dependency.
8054 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8056         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8057         (PROFILE_HOOK): Define its implementation.
8059 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8061         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8062         type and 32-bit size.
8064 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8066         PR middle-end/85090
8067         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8068         (V_128_256): New mode iterator.
8069         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8070         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8071         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8072         of V.
8073         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8074         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8076 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8078         PR target/83315
8079         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8080         NaN inputs correctly.
8082 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8084         PR target/80546
8085         * config/rs6000/vsx.md (??r): New mode attribute.
8086         (*vsx_mov<mode>_64bit): Use it.
8087         (*vsx_mov<mode>_32bit): Likewise.
8089 2018-03-30  Martin Sebor  <msebor@redhat.com>
8091         PR tree-optimization/84818
8092         * builtins.c (check_access): Use warning_n.
8094 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8096         PR target/83822
8097         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8098         condition.
8099         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8100         condition.
8102 2018-03-30  Julia Koval  <julia.koval@intel.com>
8104         PR target/84413
8105         * x86-tune.def (movx, partial_reg_dependency): Enable for
8106         m_SKYLAKE_AVX512.
8108 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8110         PR inline-asm/84985
8111         * lra-constraints.c (process_alt_operands): Move setting
8112         this_alternative_matches below.
8114 2018-03-29  Martin Liska  <mliska@suse.cz>
8116         PR lto/84995.
8117         * doc/invoke.texi: Document how LTO works with debug info.
8118         Describe auto-load support of binutils.  Mention 'x86-64'
8119         as valid option value of -march option.
8121 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8123         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8125         PR c/85094
8126         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8127         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8128         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8129         checking.
8131 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8133         PR target/84912
8134         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8135         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8136         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8137         for RS6000_BTM_POWERPC64.
8138         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8139         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8140         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8141         definition.
8142         (DIVDE): Use it.
8143         (DIVDEU): Likewise.
8145 2018-03-28 Carl Love  <cel@us.ibm.com>
8147         Revert
8148         2017-09-27  Carl Love  <cel@us.ibm.com>
8150         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8151         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8152         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8153         fctiw instruction.
8155 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8157         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8158         instead of __vector bool.
8159         (_mm_max_pu8): Likewise.
8160         (_mm_min_pi16): Likewise.
8162 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8164         PR target/84912
8165         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8166         (DIVWEUO): Likewise.
8167         (DIVDEO): Likewise.
8168         (DIVDEUO): Likewise.
8169         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8170         DIVWEUO and DIVDEUO.
8171         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8172         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8173         (div_extend): Likewise.
8174         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8175         builtin function.
8176         (__builtin_divweuo): Likewise.
8177         (__builtin_divdeo): Likewise.
8178         (__builtin_divdeuo): Likewise.
8180 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8182         PR target/85095
8183         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8184         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8186         PR tree-optimization/82004
8187         * gimple-match-head.c (optimize_pow_to_exp): New function.
8188         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8189         Don't fold to exp if optimize_pow_to_exp is false.
8191 2018-03-28  Martin Liska  <mliska@suse.cz>
8193         PR other/84819
8194         * calls.c (initialize_argument_information): Fix trailing space.
8195         * common.opt: Fix typo and provide better explanation for
8196         -fsanitize-coverage option.
8197         * config/i386/i386.opt: Fix typo.
8199 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8200             Martin Liska  <mliska@suse.cz>
8202         PR sanitizer/85081
8203         * gimplify.c (asan_poison_variable): Don't do the check for
8204         gimplify_omp_ctxp here.
8205         (gimplify_decl_expr): Do it here.
8206         (gimplify_target_expr): Likewise.
8208 2018-03-28  Martin Liska  <mliska@suse.cz>
8210         PR target/84988
8211         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8212         chkp_type_bounds_count if MPX is not enabled.
8214 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8216         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8218 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8220         PR target/84914
8221         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8222         function to create the function decl for complex long double
8223         multiply and divide for -mabi=ieeelongdouble.
8224         (init_float128_ieee): Call it.
8226 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8228         PR target/85044
8229         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8230         -fcf-protection=branch -mibt.
8231         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8233 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8235         PR target/81863
8236         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8237         arm_word_relocations.
8239 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8241         PR target/85056
8242         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8243         extern array declarations.
8245 2018-03-27  Richard Biener  <rguenther@suse.de>
8247         PR middle-end/84067
8248         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8249         explicit single_use checks.
8251 2018-03-27  Richard Biener  <rguenther@suse.de>
8253         PR tree-optimization/85082
8254         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8255         Valueize the VUSE.
8257 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8259         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8260         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8261         Turn on fasynchronous-unwind-tables and funwind-tables.
8263 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8265         PR target/85073
8266         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8267         (*bmi_blsr_<mode>_ccz): Ditto.
8269 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8271         PR tree-optimization/85063
8272         * omp-general.c (offloading_function_p): New function.  Factor out
8273         of ...
8274         * omp-offload.c (pass_omp_target_link::gate): ... here.
8275         * omp-general.h (offloading_function_p): Declare.
8276         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8277         with attribute omp declare target for offloading functions.
8279 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8281         PR tree-optimization/84005
8282         * tree-data-ref.h (get_base_for_alignment): Declare.
8283         * tree-data-ref.c (get_base_for_alignment_1): New function.
8284         (get_base_for_alignment): Likewise.
8285         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8286         get_base_for_alignment to find a suitable base object, instead
8287         of always using drb->base_address.
8289 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8291         PR inline-asm/85022
8292         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8293         known size by default.
8295 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8297         PR inline-asm/85030
8298         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8299         and non BLKmode operands.
8301 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8303         PR target/85026
8304         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8305         Clean up attributes.
8307 2018-03-23  Richard Biener  <rguenther@suse.de>
8309         PR debug/85020
8310         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8311         we are going to emit early debug for LTO.
8313 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8315         PR inline-asm/85034
8316         * function.c (match_asm_constraints_1): Don't optimize if input
8317         doesn't satisfy general_operand predicate for output's mode.
8319         PR inline-asm/85022
8320         * alias.c (write_dependence_p): Don't require for x_canonicalized
8321         non-VOIDmode if x has VOIDmode.
8323         PR sanitizer/85029
8324         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8325         just don't try to optimize it rather than assert it never happens.
8327 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8329         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8330         macro expansions for definition of ST_INTERNAL_<mode> and
8331         LD_INTERNAL_<mode> builtins.
8332         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8333         Remove prototype.
8334         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8335         function.
8336         (altivec_expand_st_builtin): Likewise.
8337         (altivec_expand_builtin): Remove calls to deleted functions.
8338         (rs6000_address_for_altivec): Delete this function.
8339         * config/rs6000/vector.md: Remove expands for
8340         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8342 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8344         PR target/84826
8345         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8346         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8347         re-computing once computed.
8348         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8349         (arm_init_machine_status): Initialize
8350         machine->static_chain_stack_bytes.
8352 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8354         PR target/84760
8355         * doc/extend.texi: Add four new prototypes for vec_ld.
8356         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8357         definitions for more logical presentation.
8358         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8359         entries for V1TI variants of __builtin_altivec_ld builtin.
8360         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8361         handling of V1TI variant of LVX icode pattern.
8362         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8363         (rs6000_gimple_fold_builtin): Likewise.
8364         (altivec_init_builtins): Add code to define
8365         __builtin_altivec_lvx_v1ti function.
8367 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8369         PR inline-asm/84941
8370         * function.c (match_asm_constraints_1): Don't do the optimization
8371         if input isn't a REG, SUBREG, MEM or constant.
8373 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8375         PR tree-optimization/84956
8376         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8377         bb_has_abnormal_pred.
8379 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8381         PR sanitizer/85018
8382         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8383         DECL_INITIAL (decl) to decl at the end.
8384         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8385         adjust the comment.
8387 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8389         * doc/extend.texi (__builtin_tgmath): Document when complex
8390         integer types are treated as _Complex _Float64.
8392 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8394         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8396 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8398         PR tree-optimization/84960
8399         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8400         if it is ENTRY block, move them into single succ of ENTRY in that case.
8402 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8404         PR tree-optimization/84811
8405         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8406         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8407         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8408         (known_subrange_p): Update accordingly.  Cast each value involved
8409         in the size comparison, rather than casting the result of the
8410         subtraction.
8412 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8414         PR tree-optimization/84982
8415         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8416         by flipping the least significant bit rather than all bits from
8417         bitpos to bitpos + bitsize - 1.
8419 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8421         * doc/extend.texi (Deprecated Features): Remove mention of
8422         long-deleted deprecations.
8424 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8426         PR jit/84288
8427         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8428         * configure: Regenerate.
8430 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8432         PR tree-optimization/83126
8433         * tree-parloops.c (num_phis): New function.
8434         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8436 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8438         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8439         mention anon-struct/union members and trailing attributes.
8441 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8443         PR tree-optimization/84969
8444         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8445         builtin memset partitions if they set different rhs values.
8447 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8449         PR rtl-optimization/84989
8450         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8451         VEC_DUPLICATE with scalar result mode.
8453 2018-03-21  Martin Liska  <mliska@suse.cz>
8455         PR ipa/84963
8456         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8457         not intended return statement.
8459 2018-03-21  Martin Liska  <mliska@suse.cz>
8461         PR target/84988
8462         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8463         (chkp_find_bound_slots_1): Limit number of iterations.
8465 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8467         PR target/84838
8468         * Minor grammar fixes for x86 options.
8470 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8472         PR debug/84875
8473         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8474         holding REG_CFA_RESTORE notes, instead turn them into a USE.
8476 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
8478         PR target/83789
8479         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8480         (altivec_lvx_<mode>_1op): Likewise.
8481         (altivec_stvx_<mode>_2op): Likewise.
8482         (altivec_stvx_<mode>_1op): Likewise.
8483         (altivec_lvx_<VM2:mode>): New define_expand.
8484         (altivec_stvx_<VM2:mode>): Likewise.
8485         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8486         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8487         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8488         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8489         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8490         (rs6000_gen_lvx): Likewise.
8491         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8492         (altivec_expand_stv_builtin): Likewise.
8493         (altivec_expand_builtin): Likewise.
8494         * config/rs6000/vector.md: Likewise.
8496 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8498         PR target/82518
8499         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8500         BYTES_BIG_ENDIAN.
8502 2018-03-20  Richard Biener  <rguenther@suse.de>
8504         PR target/84986
8505         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8506         sign-conversions as zero, fall back to standard scalar_stmt
8507         cost for the rest.
8509 2018-03-20  Martin Liska  <mliska@suse.cz>
8511         PR ipa/84825
8512         * predict.c (rebuild_frequencies): Handle case when we have
8513         PROFILE_ABSENT, but flag_guess_branch_prob is false.
8515 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8517         PR target/84990
8518         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8519         flag_section_anchors.
8520         * varasm.c (use_blocks_for_decl_p): Remove hack for
8521         dw2_force_const_mem.
8523         PR target/84845
8524         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8525         to ...
8526         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
8527         be created, use lowpart_subreg of operands[0] rather than operands[0]
8528         itself.
8529         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8530         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8531         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8532         and n constraint instead of aarch64_shift_imm_di and Usd.
8533         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8534         (*aarch64_<optab>_reg_minus<mode>3): ... this.
8536 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
8538         PR target/82989
8539         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8540         to favor GPR over NEON registers.
8541         (<shift>di3_neon): Likewise.
8543 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8545         PR target/84952
8546         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8547         (nvptx_process_pars): Emit bar.sync asap and alap.
8549 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8551         PR target/84954
8552         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8553         seen_label if seen_label is already set.
8555 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8557         PR target/84945
8558         * config/i386/i386.c (fold_builtin_cpu): For features above 31
8559         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8560         Use 1U instead of 1.  Formatting fixes.
8562         PR c/84953
8563         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8564         instead of TREE_TYPE (s1) for the return value.
8566 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
8568         PR tree-optimization/84946
8569         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8570         bitsize + bitsize in poly_uint64 rather than poly_int64.
8572         PR sanitizer/78651
8573         * dwarf2asm.c: Include fold-const.c.
8574         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8575         of decl rather than decl itself.
8577         PR rtl-optimization/84643
8578         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8580 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
8582         PR sanitizer/78651
8583         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8584         calling assemble_variable.
8586 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
8588         PR target/81647
8589         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8590         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8592 2018-03-19  Jim Wilson  <jimw@sifive.com>
8594         PR bootstrap/84856
8595         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8596         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8597         (riscv_first_stack_step): Likewise.
8598         (riscv_option_override): Use STACK_BOUNDARY instead of
8599         MIN_STACK_BOUNDARY.
8600         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8601         MIN_STACK_BOUNDARY.
8602         (BIGGEST_ALIGNMENT): Set to 128.
8603         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8604         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8605         STACK_BOUNDARY.
8607 2018-03-19  Richard Biener  <rguenther@suse.de>
8609         PR tree-optimization/84933
8610         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8611         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8613 2018-03-19  Richard Biener  <rguenther@suse.de>
8615         PR tree-optimization/84859
8616         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8617         (cond_if_else_store_replacement): Perform sinking operation on
8618         single-store BBs regardless of MAX_STORES_TO_SINK setting.
8619         Generalize what a BB with a single eligible store is.
8621 2018-03-19  Richard Biener  <rguenther@suse.de>
8623         PR tree-optimization/84929
8624         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8625         chrec_is_positive against non-chrec arg.
8627 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
8629         PR target/84711
8630         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8632 2018-03-18  Martin Liska  <mliska@suse.cz>
8634         PR rtl-optimization/84635
8635         * regrename.c (build_def_use): Use matches_mode only when
8636         matches >= 0.
8638 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
8640         PR tree-optimization/84913
8641         * tree-vect-loop.c (vectorizable_reduction): Don't try to
8642         vectorize chains of COND_EXPRs.
8644 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8646         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8648 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8650         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8652 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8654         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8656 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8657             Kito Cheng  <kito.cheng@gmail.com>
8659         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8660         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8661         (nds32_adjust_reg_alloc_order): New function.
8662         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8664 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
8666         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8667         nds32_print_operand, nds32_print_operand_address): Use
8668         HOST_WIDE_INT_PRINT_DEC instead.
8670 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8672         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8674 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
8676         PR target/84902
8677         * config/i386/i386.c (initial_ix86_tune_features,
8678         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8679         unsigned long long.
8680         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8681         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8682         rather than 1u << ix86_tune.  Formatting fix.
8683         (ix86_option_override_internal): Change ix86_arch_mask from
8684         unsigned int to unsigned HOST_WIDE_INT, initialize to
8685         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8686         (ix86_function_specific_restore): Likewise.
8688 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8690         PR target/84899
8691         * postreload.c (reload_combine_recognize_pattern): Perform
8692         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8693         truncate_int_for_mode the result for the destination's mode.
8695         PR c/84909
8696         * hsa-gen.c (mem_type_for_type): Fix comment typo.
8697         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8698         Likewise.
8699         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8700         Likewise.
8702 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
8704         PR target/84876
8705         * lra-assigns.c (lra_split_hard_reg_for): Don't use
8706         regno_allocno_class_array and sorted_pseudos.
8707         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8708         insns where regno is used.
8710 2018-03-16  Martin Liska  <mliska@suse.cz>
8712         PR ipa/84833
8713         * multiple_target.c (create_dispatcher_calls): Redirect
8714         reference in the symbol table.
8716 2018-03-16  Martin Liska  <mliska@suse.cz>
8718         PR ipa/84722
8719         * multiple_target.c (create_dispatcher_calls): Redirect also
8720         an alias.
8722 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8724         PR c++/79937
8725         PR c++/82410
8726         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8727         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8728         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8730 2018-03-16  Julia Koval  <julia.koval@intel.com>
8732         * doc/invoke.texi (Skylake Server): Add CLWB.
8733         Cannonlake): Remove CLWB.
8735 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8737         PR tree-optimization/84841
8738         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8739         1 << 3.
8740         (FLOAT_ONE_CONST_TYPE): Define.
8741         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8742         (sort_by_operand_rank): Put entries with higher constant_type last
8743         rather than first to match comments.
8745 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
8747         * config/nios2/nios2.md (movsi_internal): Fix thinko in
8748         split predicate.
8750 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8752         PR c++/79085
8753         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8754         check and use address of target always.
8756 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
8758         PR target/84574
8759         * config/i386/i386.c (indirect_thunk_needed): Update comments.
8760         (indirect_thunk_bnd_needed): Likewise.
8761         (indirect_thunks_used): Likewise.
8762         (indirect_thunks_bnd_used): Likewise.
8763         (indirect_return_needed): New.
8764         (indirect_return_bnd_needed): Likewise.
8765         (output_indirect_thunk_function): Add a bool argument for
8766         function return.
8767         (output_indirect_thunk_function): Don't generate alias for
8768         function return thunk.
8769         (ix86_code_end): Call output_indirect_thunk_function to generate
8770         function return thunks.
8771         (ix86_output_function_return): Set indirect_return_bnd_needed
8772         and indirect_return_needed instead of indirect_thunk_bnd_needed
8773         and indirect_thunk_needed.
8775 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
8777         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8778         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8779         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8781 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
8782             Paul Hua <paul.hua.gm@gmail.com>
8784         PR c/84852
8785         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8787 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
8789         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8790         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8791         resp. SFmode cases.
8793 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
8795         PR target/84711
8796         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8797         instead of GET_MODE_SIZE when comparing Units.
8799 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8801         PR target/68256
8802         * varasm.c (hash_section): Return an unchangeble hash value
8803         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8804         Return !aarch64_can_use_per_function_literal_pools_p ().
8806 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8808         PR target/84860
8809         * optabs.c (emit_conditional_move): Pass address of cmode's copy
8810         rather than address of cmode as last argument to prepare_cmp_insn.
8812 2018-03-15  Julia Koval  <julia.koval@intel.com>
8814         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8815         F_AVX512VNNI, F_AVX512BITALG): New.
8817 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
8819         PR target/83451
8820         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
8821         insn for floating-point loads and stores.
8823 2018-03-14  Carl Love  <cel@us.ibm.com>
8825         * config/rs6000/rs6000-c.c: Add macro definitions for
8826         ALTIVEC_BUILTIN_VEC_PERMXOR.
8827         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8828         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8829         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8830         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8831         UNSPEC_VPERMXOR.
8832         * config/doc/extend.texi: Add prototypes for vec_permxor.
8834 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
8836         PR c/84852
8837         * diagnostic-show-locus.c (class layout_point): Convert m_line
8838         from int to linenum_type.
8839         (line_span::comparator): Use linenum "compare" function when
8840         comparing line numbers.
8841         (test_line_span): New function.
8842         (layout_range::contains_point): Convert param "row" from int to
8843         linenum_type.
8844         (layout_range::intersects_line_p): Likewise.
8845         (layout::will_show_line_p): Likewise.
8846         (layout::print_source_line): Likewise.
8847         (layout::should_print_annotation_line_p): Likewise.
8848         (layout::print_annotation_line): Likewise.
8849         (layout::print_leading_fixits): Likewise.
8850         (layout::annotation_line_showed_range_p): Likewise.
8851         (struct line_corrections): Likewise for field m_row.
8852         (line_corrections::line_corrections): Likewise for param "row".
8853         (layout::print_trailing_fixits): Likewise.
8854         (layout::get_state_at_point): Likewise.
8855         (layout::get_x_bound_for_row): Likewise.
8856         (layout::print_line): Likewise.
8857         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8858         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8859         * input.c (selftest::test_linenum_comparisons): New function.
8860         (selftest::input_c_tests): Call it.
8861         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8862         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8863         * selftest.h (ASSERT_GT): New macro.
8864         (ASSERT_GT_AT): New macro.
8865         (ASSERT_LT): New macro.
8866         (ASSERT_LT_AT): New macro.
8868 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
8870         PR rtl-optimization/84780
8871         * combine.c (distribute_links): Don't make a link based on pc_rtx.
8873 2018-03-14  Martin Liska  <mliska@suse.cz>
8875         * tree.c (record_node_allocation_statistics): Use
8876         get_stats_node_kind.
8877         (get_stats_node_kind): New function extracted from
8878         record_node_allocation_statistics.
8879         (free_node): Use get_stats_node_kind.
8881 2018-03-14  Richard Biener  <rguenther@suse.de>
8883         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8884         that the value-set of ANTIC_IN doesn't grow.
8886         Revert
8887         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8888         member.
8889         (BB_VISITED_WITH_VISITED_SUCCS): New define.
8890         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8892 2018-03-14  Julia Koval  <julia.koval@intel.com>
8894         * config.gcc (icelake-client, icelake-server): New.
8895         (icelake): Remove.
8896         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8897         (initial_ix86_arch_features): Ditto.
8898         (PTA_SKYLAKE): Add SGX.
8899         (PTA_ICELAKE): Remove.
8900         (PTA_ICELAKE_CLIENT): New.
8901         (PTA_ICELAKE_SERVER): New.
8902         (ix86_option_override_internal): Split up icelake on icelake client and
8903         icelake server.
8904         (get_builtin_code_for_version): Ditto.
8905         (fold_builtin_cpu): Ditto.
8906         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
8907         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
8908         * config/i386/i386.h (processor_type): Ditto.
8909         * doc/invoke.texi: Ditto.
8911 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
8913         PR sanitizer/83392
8914         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
8915         INTEGER_CST offset, add it together with bitpos / 8 and
8916         sign extend based on POINTER_SIZE.
8918         PR target/84844
8919         Revert
8920         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
8922         PR target/78090
8923         * config/i386/constraints.md (Yc): New register constraint.
8924         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
8925         Use Yc constraint for alternative 2 of operand 0.  Remove
8926         preferred_for_speed attribute.
8928 2018-03-14  Richard Biener  <rguenther@suse.de>
8930         PR tree-optimization/84830
8931         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
8932         with the old one to avoid oscillations.
8934 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
8936         PR target/83712
8937         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
8938         pseudos.
8939         (assign_by_spills): Return a flag of reload assignment failure.
8940         Do not process the reload assignment failures.  Do not spill other
8941         reload pseudos if they has the same reg class.  Update n if
8942         necessary.
8943         (lra_assign): Add a return arg.  Set up from the result of
8944         assign_by_spills call.
8945         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8946         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8947         usage_insns if it is not NULL.
8948         (spill_hard_reg_in_range): New function.
8949         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8950         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8951         function prototypes.
8952         (lra_assign): Change prototype.
8953         * lra.c (lra): Add code to deal with fails by splitting hard reg
8954         live ranges.
8956 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
8958         * config/riscv/riscv.opt (mrelax): New option.
8959         * config/riscv/riscv.c (riscv_file_start): Emit ".option
8960         "norelax" when riscv_mrelax is disabled.
8961         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
8963 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8965         PR target/84743
8966         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
8967         reassociation for int modes.
8969 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8971         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
8972         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
8973         for big-endian.
8974         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
8975         * config/aarch64/aarch64-sve.md
8976         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
8977         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
8978         (*extend<mode><Vwide>2): Rename to...
8979         (aarch64_sve_extend<mode><Vwide>2): ...this.
8980         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
8981         renaming the old pattern to...
8982         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
8983         unsigned packs.
8984         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
8985         define_expand, renaming the old pattern to...
8986         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
8987         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
8988         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
8989         account when deciding which SVE instruction the optab should use.
8990         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
8992 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
8994         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
8995         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
8996         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
8997         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
8998         (tlsdesc_small_<mode>): Turn a define_expand and use
8999         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9000         (tlsdesc_small_advsimd_<mode>): ...this.
9001         (tlsdesc_small_sve_<mode>): New pattern.
9003 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9005         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9006         (UNSPEC_UMUL_HIGHPART): New constants.
9007         (MUL_HIGHPART): New int iteraor.
9008         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9009         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9010         define_expand.
9011         (*<su>mul<mode>3_highpart): New define_insn.
9013 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9015         PR lto/84805
9016         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9017         incomplete types.
9019 2018-03-13  Martin Liska  <mliska@suse.cz>
9021         PR ipa/84658.
9022         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9023         vector.
9024         (sem_item_optimizer::~sem_item_optimizer): Release it.
9025         (sem_item_optimizer::merge_classes): Register variable aliases.
9026         (sem_item_optimizer::fixup_pt_set): New function.
9027         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9028         * ipa-icf.h: Declare new variables and functions.
9030 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9032         PR middle-end/84834
9033         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9034         integer_pow2p@2 and test integer_pow2p in condition.
9035         (A < 0 ? C : 0): Similarly for @1.
9037         PR middle-end/84831
9038         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9039         characters starting at p contain '\0' character, don't look beyond
9040         that.
9042         PR target/84827
9043         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9044         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9046         PR target/84828
9047         * reg-stack.c (change_stack): Change update_end var from int to
9048         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9049         also call set_block_for_insn on the newly added insns and rescan.
9051         PR target/84786
9052         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9053         on the last operand.
9055         PR c++/84704
9056         * tree.c (stabilize_reference_1): Return save_expr (e) for
9057         STATEMENT_LIST even if it doesn't have side-effects.
9059 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9061         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9063 2018-03-12  Renlin Li  <renlin.li@arm.com>
9065         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9066         aarch64_output_scalar_simd_mov_immediate.
9068 2018-03-12  Martin Sebor  <msebor@redhat.com>
9070         PR tree-optimization/83456
9071         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9072         for perfectly overlapping calls to memcpy.
9073         (gimple_fold_builtin_memory_chk): Same.
9074         (gimple_fold_builtin_strcpy): Handle no-warning.
9075         (gimple_fold_builtin_stxcpy_chk): Same.
9076         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9078 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9080         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9081         parameter.  Use it for SFmode.
9082         (rs6000_function_arg_advance_1): Adjust.
9083         (rs6000_function_arg): Adjust.
9084         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9086 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9088         PR rtl-optimization/84169
9089         PR rtl-optimization/84780
9090         * combine.c (can_combine_p): Check for a 2-insn combination whether
9091         the destination register is used between the two insns, too.
9093 2018-03-12  Richard Biener  <rguenther@suse.de>
9095         PR tree-optimization/84803
9096         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9097         for refs DR analysis didn't process.
9099 2018-03-12  Richard Biener  <rguenther@suse.de>
9101         PR tree-optimization/84777
9102         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9103         force-vectorize loops ignore whether we are optimizing for size.
9105 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9107         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9108         (TARGET_MD_ASM_ADJUST): Define.
9110 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9111             Kito Cheng  <kito.cheng@gmail.com>
9112             Chung-Ju Wu  <jasonwucj@gmail.com>
9114         * config/nds32/nds32.c (nds32_compute_stack_frame,
9115         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9116         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9117         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9118         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9119         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9120         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9121         * config/nds32/nds32.md (prologue, epilogue): Use macro
9122         NDS32_V3PUSH_AVAILABLE_P to do checking.
9124 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9126         PR debug/58150
9127         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9128         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9129         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9130         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9131         addition of most attributes on !orig_type_die or the attribute not
9132         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9134 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9135             Chung-Ju Wu  <jasonwucj@gmail.com>
9137         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9138         __NDS32_VH__ macro.
9139         * config/nds32/nds32.opt (mvh): New option.
9141 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9142             Chung-Ju Wu  <jasonwucj@gmail.com>
9144         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9145         function.
9146         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9147         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9148         definition.
9150 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9151             Chung-Ju Wu  <jasonwucj@gmail.com>
9153         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9154         function.
9155         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9156         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9158 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9159             Kito Cheng  <kito.cheng@gmail.com>
9160             Chung-Ju Wu  <jasonwucj@gmail.com>
9162         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9163         UNSPEC_FFMISM and UNSPEC_FLMISM.
9164         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9165         for ffb, ffmism and flmism.
9166         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9167         (unspec_ffmism): Ditto.
9168         (unspec_flmism): Ditto.
9169         (nds32_expand_builtin_impl): Check if string extension is available.
9170         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9171         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9173 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9175         Reverting patch:
9176         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9178         PR target/83712
9179         * lra-assigns.c (assign_by_spills): Return a flag of reload
9180         assignment failure.  Do not process the reload assignment
9181         failures.  Do not spill other reload pseudos if they has the same
9182         reg class.
9183         (lra_assign): Add a return arg.  Set up from the result of
9184         assign_by_spills call.
9185         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9186         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9187         usage_insns if it is not NULL.
9188         (spill_hard_reg_in_range): New function.
9189         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9190         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9191         function prototypes.
9192         (lra_assign): Change prototype.
9193         * lra.c (lra): Add code to deal with fails by splitting hard reg
9194         live ranges.
9196 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9198         PR target/84807
9199         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9201 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9203         PR debug/84620
9204         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9205         (dw_val_node): Add val_symbolic_view.
9206         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9207         (symview_upper_bound): New.
9208         (new_line_info_table): Initialize symviews_since_reset.
9209         (dwarf2out_source_line): Count symviews_since_reset and set
9210         symview_upper_bound.
9211         (dw_val_equal_p): Handle symview.
9212         (add_AT_symview): New.
9213         (print_dw_val): Handle symview.
9214         (attr_checksum, attr_checksum_ordered): Likewise.
9215         (same_dw_val_p, size_of_die): Likewise.
9216         (value_format, output_die): Likewise.
9217         (add_high_low_attributes): Use add_AT_symview for entry_view.
9218         (dwarf2out_finish): Reset symview_upper_bound, clear
9219         zero_view_p.
9221 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9223         PR target/83969
9224         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9225         Add strict argument and use it.
9226         (rs6000_split_multireg_move): Update for new strict argument.
9227         (mem_operand_gpr): Disallow all non-offsettable addresses.
9228         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9230 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9232         PR target/84772
9233         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9234         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9235         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9237         PR c++/84767
9238         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9239         decl, use remap_type if we want to use the type.
9241 2018-03-09  Martin Sebor  <msebor@redhat.com>
9243         PR tree-optimization/84526
9244         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9245         Remove dead code.
9246         (builtin_access::generic_overlap): Be prepared to handle non-array
9247         base objects.
9249 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9251         PR rtl-optimization/84682
9252         * lra-constraints.c (process_address_1): Check is_address flag
9253         for address constraints.
9254         (process_alt_operands): Likewise.
9255         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9256         preprocess_constraints.
9257         * recog.h (preprocess_constraints): Add oploc parameter.
9258         Adjust callers.
9259         * recog.c (preprocess_constraints): Test address_operand for
9260         CT_ADDRESS constraints.
9262 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9264         PR target/83712
9265         * lra-assigns.c (assign_by_spills): Return a flag of reload
9266         assignment failure.  Do not process the reload assignment
9267         failures.  Do not spill other reload pseudos if they has the same
9268         reg class.
9269         (lra_assign): Add a return arg.  Set up from the result of
9270         assign_by_spills call.
9271         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9272         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9273         usage_insns if it is not NULL.
9274         (spill_hard_reg_in_range): New function.
9275         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9276         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9277         function prototypes.
9278         (lra_assign): Change prototype.
9279         * lra.c (lra): Add code to deal with fails by splitting hard reg
9280         live ranges.
9282 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9284         PR target/83193
9285         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9286         Accept complain bool parameter.  Only emit errors if it is true.
9287         (arm_parse_cpu_option_name): Likewise.
9288         (arm_target_thumb_only): Adjust callers of the above.
9289         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9290         prototype to take a default true bool parameter.
9291         (arm_parse_arch_option_name): Likewise.
9293 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9294             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9296         PR jit/64089
9297         PR jit/84288
9298         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9299         * configure: Regenerate.
9300         * configure.ac ("linker --version-script option"): New.
9301         ("linker soname option"): New.
9303 2018-03-09  Richard Biener  <rguenther@suse.de>
9305         PR tree-optimization/84775
9306         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9307         immediate uses of predicate stmts and mark them modified.
9309         Revert
9310         PR tree-optimization/84178
9311         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9312         to caller.
9313         (version_loop_for_if_conversion): Delay update_ssa call.
9314         (tree_if_conversion): Delay update_ssa until after predicate
9315         insertion.
9317 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9319         PR target/84763
9320         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9321         when the function accesses prior frames.
9323 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9325         PR debug/84456
9326         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9327         gen_llsym, otherwise call maybe_gen_llsym.
9329         PR inline-asm/84742
9330         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9331         has ',' character inside of it.
9333 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9335         PR target/84748
9336         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9337         as clobbering CC_REGNUM.
9339 2018-03-08  Richard Biener  <rguenther@suse.de>
9341         PR middle-end/84552
9342         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9343         (follow_copies_to_constant): Do not follow SSA names registered
9344         for update.
9346 2018-03-08  Richard Biener  <rguenther@suse.de>
9348         PR tree-optimization/84178
9349         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9350         to caller.
9351         (version_loop_for_if_conversion): Delay update_ssa call.
9352         (tree_if_conversion): Delay update_ssa until after predicate
9353         insertion.
9355 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9357         PR tree-optimization/84178
9358         * tree-if-conv.c (release_bb_predicate): Remove the
9359         the assertion that the stmts have NULL use_ops.
9360         Discard the statements, asserting that they haven't
9361         yet been added to a BB.
9363 2018-03-08  Richard Biener  <rguenther@suse.de>
9365         PR tree-optimization/84746
9366         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9367         (phi_translate): Pass in destination ANTIC_OUT set.
9368         (phi_translate_1): Likewise.  For a simplified result lookup
9369         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9370         (phi_translate_set): Adjust.
9371         (do_pre_regular_insertion): Likewise.
9372         (do_pre_partial_partial_insertion): Likewise.
9374 2018-03-08  Martin Liska  <mliska@suse.cz>
9376         PR gcov-profile/84735
9377         * doc/gcov.texi: Document usage of profile files.
9378         * gcov-io.h: Document changes in the format.
9380 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9382         PR debug/84404
9383         PR debug/84408
9384         * dwarf2out.c (struct dw_line_info_table): Update comments for
9385         view == -1.
9386         (FORCE_RESET_NEXT_VIEW): New.
9387         (FORCE_RESETTING_VIEW_P): New.
9388         (RESETTING_VIEW_P): Check for -1 too.
9389         (ZERO_VIEW_P): Likewise.
9390         (new_line_info_table): Force-reset next view.
9391         (dwarf2out_begin_function): Likewise.
9392         (dwarf2out_source_line): Simplify zero_view_p initialization.
9393         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9394         view directly.  Omit view when omitting .loc at line 0.
9396 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9398         PR tree-optimization/84740
9399         * tree-switch-conversion.c (process_switch): Call build_constructors
9400         only if info.phi_count is non-zero.
9402         PR tree-optimization/84739
9403         * tree-tailcall.c (find_tail_calls): Check call arguments against
9404         DECL_ARGUMENTS (current_function_decl) rather than
9405         DECL_ARGUMENTS (func) when checking for tail recursion.
9407 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9409         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9410         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9411         Volker Reichelt's entry and add entries for people that perform
9412         GCC fuzzy testing and report numerous bugs.
9414 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9416         PR target/82411
9417         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9418         readonly data in sdata, if that is disabled.
9419         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9420         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9421         -mreadonly-in-sdata option.
9423 2018-03-07  Martin Sebor  <msebor@redhat.com>
9425         PR tree-optimization/84468
9426         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9427         basic block when looking for nul assignment.
9429 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9431         PR target/84277
9432         * except.h (output_function_exception_table): Adjust prototype.
9433         * except.c (output_function_exception_table): Remove FNNAME parameter
9434         and add SECTION parameter.  Ouput one part of the table at a time.
9435         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9436         the first part of the exception table and emit unwind directives.
9437         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9438         (i386_pe_seh_cold_init): Likewise.
9439         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9440         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9441         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9442         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9443         * config/i386/winnt.c: Include except.h.
9444         (struct seh_frame_state): Add reg_offset, after_prologue and
9445         in_cold_section fields.
9446         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9447         (i386_pe_seh_cold_init): New function.
9448         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9449         to seh->in_cold_section.
9450         (seh_emit_push): Record the offset of the push.
9451         (seh_emit_save): Record the offet of the save.
9452         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9453         Test seh->after_prologue to disregard the epilogue.
9454         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9455         (i386_pe_end_cold_function): New function.
9457 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9459         PR fortran/84565
9460         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9461         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9463         PR c++/84704
9464         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9465         on tmp_var.
9466         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9467         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9469         PR middle-end/84723
9470         * multiple_target.c: Include tree-inline.h and intl.h.
9471         (expand_target_clones): Diagnose and fail if node->definition and
9472         !tree_versionable_function_p (node->decl).
9474 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
9476         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9477         sprint_ul.
9478         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9479         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9480         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9482 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9484         PR target/84710
9485         * combine.c (try_combine): Use reg_or_subregno instead of handling
9486         just paradoxical SUBREGs and REGs.
9488 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
9490         * config/arc/arc.c (arc_finalize_pic): Remove function.
9491         (arc_must_save_register): We use single base PIC register, remove
9492         checks to save/restore the PIC register.
9493         (arc_expand_prologue): Likewise.
9494         * config/arc/arc-protos.h (arc_set_default_type_attributes):
9495         Remove.
9496         (arc_verify_short): Likewise.
9497         (arc_attr_type): Likewise.
9498         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9499         (walk_stores): Likewise.
9500         (arc_address_cost): Make it static.
9501         (arc_verify_short): Likewise.
9502         (branch_dest): Likewise.
9503         (arc_attr_type): Likewise.
9504         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9505         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9506         (arc_final_prescan_insn): Remove inserting the nops due to
9507         hardware hazards.  It is done in reorg step.
9508         (insn_length_variant_t): Remove.
9509         (insn_length_parameters_t): Likewise.
9510         (arc_insn_length_parameters): Likewise.
9511         (arc_get_insn_variants): Likewise.
9512         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9514 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9516         PR inline-asm/84683
9517         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9518         assertion failure.
9520         PR tree-optimization/84687
9521         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9522         on new_node->decl.
9523         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9525 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9527         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9528         Rename to ppc_speculation_barrier.
9529         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9530         __builtin_ppc_speculation_barrier.
9532 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9534         PR target/84700
9535         * combine.c (combine_simplify_rtx): Don't try to simplify if
9536         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9537         are equal to x.
9539 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
9541         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9542         to 32 bytes when compiling for POWER9.
9544 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9546         PR target/84564
9547         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9548         regparm >= 3 with no arg reg available also for calls with
9549         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
9551         PR target/84524
9552         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9553         orig,vex.
9554         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
9556 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
9558         PR target/84264
9559         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9561 2018-03-05  Richard Biener  <rguenther@suse.de>
9563         PR tree-optimization/84486
9564         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9565         When inserting a __builtin_assume_aligned call set the LHS
9566         SSA name alignment info accordingly.
9568 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
9570         PR tree-optimization/84114
9571         * config/aarch64/aarch64.c (aarch64_reassociation_width)
9572         Avoid reassociation of FLOAT_MODE addition.
9574 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
9576         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9577         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9578         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9579         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9580         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9581         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9582         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9583         and -mwbnoinvd.
9584         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9585         __builtin_ia32_wbinvd): New builtins.
9586         (SPECIAL_ARGS2): New.
9587         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9588         (SPECIAL_ARGS2): New.
9589         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9590         (ix86_valid_target_attribute_inner_p): Ditto.
9591         (ix86_init_mmx_sse_builtins): Add special_args2.
9592         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9593         TARGET_WBNOINVD_P): New.
9594         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9595         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9596         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9597         * config/i386/immintrin.h (_wbinvd): New intrinsic.
9598         * config/i386/pconfigintrin.h: New file.
9599         * config/i386/wbnoinvdintrin.h: Ditto.
9600         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9601         wbnoinvdintrin.h.
9602         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9604 2018-03-05  Richard Biener  <rguenther@suse.de>
9606         PR tree-optimization/84670
9607         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9608         member.
9609         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9610         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9611         (compute_antic_aux): Only assert the number of values in ANTIC_IN
9612         doesn't grow if all successors (recursively) were visited at least
9613         once.
9615 2018-03-05  Richard Biener  <rguenther@suse.de>
9617         PR tree-optimization/84650
9618         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9619         if executed in the loop pipeline.
9621 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
9623         * doc/configfiles.texi (Configuration Files): Move info about
9624         conditionalizing $target-protos.h to...
9625         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
9626         differs from $target-protos.h.
9628 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
9629             Chung-Ju Wu  <jasonwucj@gmail.com>
9631         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9632         * config/nds32/nds32-multiple.md (setmemsi): Define.
9633         * config/nds32/nds32-memory-manipulation.c
9634         (nds32_gen_dup_4_byte_to_word_value): New.
9635         (emit_setmem_word_loop): New.
9636         (emit_setmem_byte_loop): New.
9637         (nds32_expand_setmem_loop): New.
9638         (nds32_expand_setmem_loop_v3m): New.
9639         (nds32_expand_setmem_unroll): New.
9640         (nds32_expand_setmem): New.
9642 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9643             Chung-Ju Wu  <jasonwucj@gmail.com>
9645         * config/nds32/nds32-memory-manipulation.c
9646         (nds32_emit_load_store): New.
9647         (nds32_emit_post_inc_load_store): New.
9648         (nds32_emit_mem_move): New.
9649         (nds32_emit_mem_move_block): New.
9650         (nds32_expand_movmemsi_loop_unknown_size): New.
9651         (nds32_expand_movmemsi_loop_known_size): New.
9652         (nds32_expand_movmemsi_loop): New.
9653         (nds32_expand_movmemsi_unroll): New.
9654         (nds32_expand_movmemqi): Rename ...
9655         (nds32_expand_movmemsi): ... to this.
9656         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9657         (movmemsi): ... to this.
9658         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9659         (nds32_expand_movmemsi): ... to this.
9661 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9662             Monk Chiang  <sh.chiang04@gmail.com>
9663             Chung-Ju Wu  <jasonwucj@gmail.com>
9665         * config/nds32/nds32-protos.h
9666         (nds32_expand_load_multiple): New arguments.
9667         (nds32_expand_store_multiple): Ditto.
9668         (nds32_valid_multiple_load_store): Rename ...
9669         (nds32_valid_multiple_load_store_p): ... to this.
9670         * config/nds32/nds32-memory-manipulation.c
9671         (nds32_expand_load_multiple): Refine implementation.
9672         (nds32_expand_store_multiple): Ditto.
9673         * config/nds32/nds32-multiple.md
9674         (load_multiple): Update nds32_expand_load_multiple interface.
9675         (store_multiple): Update nds32_expand_store_multiple interface.
9676         * config/nds32/nds32-predicates.c
9677         (nds32_valid_multiple_load_store): Rename ...
9678         (nds32_valid_multiple_load_store_p): ... to this and refine
9679         implementation.
9680         * config/nds32/predicates.md
9681         (nds32_load_multiple_and_update_address_operation): New predicate.
9682         (nds32_store_multiple_and_update_address_operation): New predicate.
9684 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9685             Chung-Ju Wu  <jasonwucj@gmail.com>
9687         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9688         (combo): New attribute.
9689         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9691 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9693         * config/nds32/nds32.opt: Change -mcmodel= default value.
9695 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
9696             Monk Chiang  <sh.chiang04@gmail.com>
9697             Chung-Ju Wu  <jasonwucj@gmail.com>
9699         * config/nds32/constants.md (unspec_element): New enum.
9700         * config/nds32/constraints.md (Umw): New constraint.
9701         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9702         * config/nds32/nds32-intrinsic.md: Likewise.
9703         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9704         (nds32_valid_smw_lwm_base_p): New.
9705         (nds32_output_smw_single_word): New.
9706         (nds32_output_lmw_single_word): New.
9707         (nds32_expand_unaligned_load): New.
9708         (nds32_expand_unaligned_store): New.
9709         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9710         (nds32_output_smw_single_word): Declare.
9711         (nds32_output_lmw_single_word): Declare.
9712         (nds32_expand_unaligned_load): Declare.
9713         (nds32_expand_unaligned_store): Declare.
9714         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9715         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9716         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9717         NDS32_BUILTIN_UASTORE_DW.
9718         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9719         predicate.
9721 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
9722             Kito Cheng  <kito.cheng@gmail.com>
9723             Chung-Ju Wu  <jasonwucj@gmail.com>
9725         * config/nds32/nds32-intrinsic.c
9726         (nds32_expand_builtin_null_ftype_reg): Delete.
9727         (nds32_expand_builtin_reg_ftype_imm): Ditto.
9728         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9729         (nds32_read_argument): New.
9730         (nds32_legitimize_target): Ditto.
9731         (nds32_legitimize_argument): Ditto.
9732         (nds32_check_constant_argument): Ditto.
9733         (nds32_expand_unop_builtin): Ditto.
9734         (nds32_expand_unopimm_builtin): Ditto.
9735         (nds32_expand_binop_builtin): Ditto.
9736         (nds32_builtin_decl_impl): Ditto.
9737         (builtin_description): Ditto.
9738         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9739         (nds32_init_builtins_impl): Ditto.
9740         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9741         (nds32_builtin_decl): New.
9742         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9743         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9745 2018-03-02  Jeff Law  <law@redhat.com>
9747         * reorg.c (stop_search_p): Handle DEBUG_INSN.
9748         (redundant_insn, fill_simple_delay_slots): Likewise.
9749         (fill_slots_from_thread): Likewise.
9750         * resource.c (mark_referenced_resources): Likewise.
9751         (mark_set_resources, find_dead_or_set_registers): Likewise.
9753 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9755         * substring-locations.h (format_warning_va): Formatting fix for
9756         ATTRIBUTE_GCC_DIAG.
9757         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9758         argument.
9759         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9760         * substring-locations.c: Include intl.h.
9761         (format_warning_va): Turned into small wrapper around
9762         format_warning_n_va, renamed to ...
9763         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9764         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9765         use ngettext.
9766         (format_warning_at_substring_n): New function.
9767         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9768         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
9769         format_warning_at_substring with just a shorter name instead of
9770         const function pointer.
9771         (fmtwarn_n): New function.
9772         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9773         appropriate, get rid of all the fmtstr temporaries, move conditionals
9774         with G_() wrapped string literals directly into fmtwarn arguments,
9775         cast dir.len to (int), formatting fixes.
9777 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
9779         * doc/invoke.texi: Remove "Cilk Plus" references.
9781 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9782             Richard Biener  <rguenther@suse.de>
9784         PR ipa/84628
9785         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9786         for error or warning attributes if CALL_FROM_THUNK_P is set.
9787         Formatting fixes.
9789 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9791         PR target/56540
9792         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9793         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9795         PR target/56540
9796         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9797         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9799         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9800         instead of -1U in last predictors element's probability member.
9802 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9804         PR ipa/83983
9805         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9806         arguments if they are comparable.
9808 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9810         PR tree-optimization/84634
9811         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9812         masks and masked_loop_p with a single loop_masks, making sure it's
9813         null for bb vectorization.
9815 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9817         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9818         (vect_analyze_data_ref_access): Use loop->safe_len rather than
9819         loop->force_vectorize to check whether there is no alias.
9821 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9823         PR target/84614
9824         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9825         prototypes.
9826         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9827         comments.
9828         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9829         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9830         instead of a loop around prev_real_insn.
9831         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9832         prev_real_insn.
9834         PR inline-asm/84625
9835         * config/i386/i386.c (ix86_print_operand): Use conditional
9836         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9837         zero vector.
9839 2018-03-02  Richard Biener  <rguenther@suse.de>
9841         PR tree-optimization/84427
9842         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9843         (bitmap_set_subtract_values): Rewrite to handle multiple
9844         exprs per value.
9845         (clean): Likewise.
9846         (prune_clobbered_mems): Likewise.
9847         (phi_translate): Take edge instead of pred/phiblock.
9848         (phi_translate_1): Likewise.
9849         (phi_translate_set): Likewise.  Insert all translated
9850         exprs for a value into the set, keeping possibly multiple
9851         expressions per value.
9852         (compute_antic_aux): Adjust for phi_translate changes.
9853         When intersecting union the expressions and prune those
9854         not in the final value set, keeping possibly multiple
9855         expressions per value.  Do not use value-insertion
9856         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9857         all expressions.  Add verification that the value-sets
9858         only shrink during iteration.
9859         (compute_partial_antic_aux): Adjust for the phi_translate changes.
9860         (do_pre_regular_insertion): Likewise.
9861         (do_pre_partial_partial_insertion): Likewise.
9863 2018-03-02  Richard Biener  <rguenther@suse.de>
9865         PR target/82005
9866         * config/darwin.c (saved_debug_info_level): New static global.
9867         (darwin_asm_lto_start): Disable debug info generation for LTO out.
9868         (darwin_asm_lto_end): Restore debug info generation settings.
9870 2018-03-01  Martin Liska  <mliska@suse.cz>
9872         PR sanitizer/82484
9873         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9874         volatile arguments.
9876 2018-03-01  Richard Biener  <rguenther@suse.de>
9878         PR debug/84645
9879         * dwarf2out.c (gen_variable_die): Properly handle late VLA
9880         type annotation with LTO when debug was disabled at compile-time.
9882 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
9884         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9885         XINT with INTVAL.
9886         (mips_final_postscan_insn): Likewise.
9888 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
9890         PR rtl-optimization/84528
9891         * alias.c (init_alias_target): Add commentary.
9892         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9893         a unique base value if the frame pointer is not eliminated
9894         to the stack pointer.
9896 2018-03-01  Tom de Vries  <tom@codesourcery.com>
9898         PR rtl-optimization/83327
9899         * lra-int.h (hard_regs_spilled_into): Declare.
9900         * lra.c (hard_regs_spilled_into): Define.
9901         (init_reg_info): Init hard_regs_spilled_into.
9902         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
9903         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
9904         (process_bb_lives): Handle hard_regs_spilled_into.
9905         (lra_create_live_ranges_1): Before doing liveness propagation, clear
9906         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
9908 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
9910         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
9911         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
9912         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
9913         * config/rs6000/aix72.h: New file.
9915 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
9917         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
9918         instead of warning_at with conditional singular and plural messages
9919         where possible.
9921         PR target/52991
9922         * stor-layout.c (update_alignment_for_field): For
9923         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
9924         && !DECL_PACKED (field), do the alignment update, just use
9925         only desired_align instead of MAX (type_align, desired_align)
9926         as the alignment.
9927         (place_field): Don't do known_align < desired_align handling
9928         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
9929         is non-NULL, instead do it after rli->prev_field handling and
9930         only if not within a bitfield word.  For DECL_PACKED (field)
9931         use type_align of BITS_PER_UNIT.
9933 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
9935         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
9936         superfluous parentheses and trailing spaces.
9938 2018-02-28  Richard Biener  <rguenther@suse.de>
9940         PR tree-optimization/84584
9941         * graphite-scop-detection.c (scop_detection::add_scop): Discard
9942         SCoPs with fake exit edge.
9944 2018-02-28  Martin Liska  <mliska@suse.cz>
9946         PR testsuite/84597
9947         * timevar.c (timer::print): Fix format to properly print 100%
9948         values.
9950 2018-02-28  Richard Biener  <rguenther@suse.de>
9952         PR middle-end/84607
9953         * genmatch.c (capture_info::walk_match): Do not mark
9954         captured expressions without operands as expr_p given
9955         they act more like predicates and should be subject to
9956         "lost tail" side-effect preserving.
9958 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
9960         PR rtl-optimization/81611
9961         * auto-inc-dec.c (attempt_change): Move dead note from
9962         mem_insn if it's the next use of regno
9963         (find_address): Take address use of reg holding
9964         non-incremented value.  Add parm to limit search to the named
9965         reg only.
9966         (merge_in_block): Attempt to use a mem insn that is the next
9967         use of the original regno.
9969 2018-02-27  Martin Sebor  <msebor@redhat.com>
9971         PR c++/83871
9972         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
9973         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
9975 2018-02-27  Martin Sebor  <msebor@redhat.com>
9977         PR translation/84207
9978         * diagnostic-core.h (warning_n, error_n, inform_n): Change
9979         n argument to unsigned HOST_WIDE_INT.
9980         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
9981         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
9982         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
9983         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
9985 2018-02-27  Richard Biener  <rguenther@suse.de>
9987         PR tree-optimization/84512
9988         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
9989         Do not use the estimate returned from record_stmt_cost for
9990         the scalar iteration cost but sum properly using add_stmt_cost.
9992 2018-02-27  Richard Biener  <rguenther@suse.de>
9994         PR tree-optimization/84466
9995         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
9996         Adjust last change to less strictly validate use operands.
9998 2018-02-27  Martin Liska  <mliska@suse.cz>
10000         PR gcov-profile/84548
10001         * gcov.c (process_file): Allow partial overlap and consider it
10002         also as group functions.
10003         (output_lines): Properly calculate range of lines for a group.
10005 2018-02-27  Martin Liska  <mliska@suse.cz>
10007         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10008         'ggc' suffixes.  Change first column width.
10009         (timer::print): Fix formatting of the column.
10011 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10013         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10014         preserve inline entry blocks for the sake of debug inline
10015         entry point markers alone.
10016         (remove_unused_locals): Suggest in comments a better place to
10017         force the preservation of inline entry blocks that are
10018         otherwise unused, but do not preserve them.
10020 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10022         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10024 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10026         PR target/84039
10027         * config/i386/constraints.md (Bs): Replace
10028         ix86_indirect_branch_register with
10029         TARGET_INDIRECT_BRANCH_REGISTER.
10030         (Bw): Likewise.
10031         * config/i386/i386.md (indirect_jump): Likewise.
10032         (tablejump): Likewise.
10033         (*sibcall_memory): Likewise.
10034         (*sibcall_value_memory): Likewise.
10035         Peepholes of indirect call and jump via memory: Likewise.
10036         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10037         (*sibcall_value_GOT_32): Likewise.
10038         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10039         (GOT_memory_operand): Likewise.
10040         (call_insn_operand): Likewise.
10041         (sibcall_insn_operand): Likewise.
10042         (GOT32_symbol_operand): Likewise.
10043         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10045 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10047         PR rtl-optimization/83496
10048         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10049         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10050         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10051         redundant insn, if any.
10052         (relax_delay_slots): Likewise.
10053         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10055 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10057         PR tree-optimization/83965
10058         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10059         that grouped statements are part of a reduction chain.  Return
10060         true if the statement is not marked as a reduction itself but
10061         is part of a group.
10062         (vect_recog_dot_prod_pattern): Don't check whether the statement
10063         is part of a group here.
10064         (vect_recog_sad_pattern): Likewise.
10065         (vect_recog_widen_sum_pattern): Likewise.
10067 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10069         PR debug/84545
10070         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10072 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10074         PR target/84530
10075         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10076         the bool argument.
10077         (ix86_output_indirect_function_return): New prototype.
10078         (ix86_split_simple_return_pop_internal): Likewise.
10079         * config/i386/i386.c (indirect_return_via_cx): New.
10080         (indirect_return_via_cx_bnd): Likewise.
10081         (indirect_thunk_name): Handle return va CX_REG.
10082         (output_indirect_thunk_function): Create alias for
10083         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10084         (ix86_output_indirect_jmp): Remove the bool argument.
10085         (ix86_output_indirect_function_return): New function.
10086         (ix86_split_simple_return_pop_internal): Likewise.
10087         * config/i386/i386.md (*indirect_jump): Don't pass false
10088         to ix86_output_indirect_jmp.
10089         (*tablejump_1): Likewise.
10090         (simple_return_pop_internal): Change it to define_insn_and_split.
10091         Call ix86_split_simple_return_pop_internal to split it for
10092         -mfunction-return=.
10093         (simple_return_indirect_internal): Call
10094         ix86_output_indirect_function_return instead of
10095         ix86_output_indirect_jmp.
10097 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10099         PR bootstrap/84405
10100         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10101         memset and value initialization afterwards.
10103 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10105         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10107 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10109         PR target/84521
10110         * common/config/aarch64/aarch64-common.c
10111         (aarch_option_optimization_table[]): Switch
10112         off fomit-frame-pointer
10114 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10115             Chung-Ju Wu  <jasonwucj@gmail.com>
10117         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10118         volatile memory.
10119         (store_multiple): Ditto.
10121 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10123         * config.gcc: Add --with-cpu support for nds32 target.
10124         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10125         * config/nds32/nds32.opt: Add -mcpu= option.
10127 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10129         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10130         isel=yes): Warn for these deprecated options.
10132 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10134         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10135         ISA_2_5_MASKS_EMBEDDED.
10137 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10139         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10140         p->max as pointers rather than using iterative_hash_expr.
10142 2018-02-23  Carl Love  <cel@us.ibm.com>
10144         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10145         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10146         BU_P8V_OVERLOAD_2.
10147         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10148         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10149         P8V_BUILTIN_VEC_VUNSIGNED2.
10151 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10153         PR target/81572
10154         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10155         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10156         LRA_UNKNOWN_ALT.
10157         * lra-constraints.c (curr_insn_transform): Set up
10158         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10159         LRA_UNKNOWN_ALT.
10160         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10161         * lra-eliminations.c (spill_pseudos): Ditto.
10162         (process_insn_for_elimination): Ditto.
10163         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10164         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10165         LRA_NON_CLOBBERED_ALT.
10167 2018-02-22  Martin Sebor  <msebor@redhat.com>
10169         PR tree-optimization/84480
10170         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10171         to maybe_diag_stxncpy_trunc.  Call it.
10172         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10173         from gimple_fold_builtin_strcpy.  Print inlining stack.
10174         (handle_builtin_stxncpy): Print inlining stack.
10175         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10177 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10179         PR target/84176
10180         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10181         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10182         and -fcheck-pointer-bounds are used together.
10183         (indirect_thunk_prefix): New enum.
10184         (indirect_thunk_need_prefix): New function.
10185         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10186         "_nt" instead of "_bnd" for NOTRACK prefix.
10187         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10188         (output_indirect_thunk_function): Likewise.
10189         (): Likewise.
10190         (ix86_code_end): Update output_indirect_thunk_function calls.
10191         (ix86_output_indirect_branch_via_reg): Replace
10192         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10193         (ix86_output_indirect_branch_via_push): Likewise.
10194         (ix86_output_function_return): Likewise.
10195         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10196         incompatible with -fcf-protection=branch and
10197         -fcheck-pointer-bounds.
10199 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10201         PR target/83335
10202         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10203         Change gcc_assert call to output_operand_lossage.
10205 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10207         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10209 2018-02-22  DJ Delorie  <dj@redhat.com>
10210             Sebastian Perta  <sebastian.perta@renesas.com>
10211             Oleg Endo  <olegendo@gcc.gnu.org>
10213         * config/rx/rx.c (rx_rtx_costs): New function.
10214         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10216 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10218         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10220 2018-02-22  Martin Liska  <mliska@suse.cz>
10222         PR driver/83193
10223         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10224         Add "native" as a possible value.
10226 2018-02-22  Martin Liska  <mliska@suse.cz>
10228         PR driver/83193
10229         * config/i386/i386.c (ix86_option_override_internal):
10230         Add "native" as a possible value for -march and -mtune.
10232 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10234         PR target/84502
10235         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10236         to all type variants.
10238         PR tree-optimization/84503
10239         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10240         width as info->bitpos + info->bitsize - start.
10241         (merged_store_group::merge_overlapping): Simplify width computation.
10242         (check_no_overlap): New function.
10243         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10244         start + width and last_order of the group, fail if check_no_overlap
10245         fails.
10246         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10247         to group if check_no_overlap fails.
10249 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10251         * config/rs6000/altivec.md: Delete contraint arguments to
10252         define_expand, define_split, and define_peephole2, and in
10253         define_insn_and_split if always unused.
10254         * config/rs6000/darwin.md: Ditto.
10255         * config/rs6000/dfp.md: Ditto.
10256         * config/rs6000/rs6000.md: Ditto.
10257         * config/rs6000/sync.md: Ditto.
10258         * config/rs6000/vector.md: Ditto.
10259         * config/rs6000/vsx.md: Ditto.
10261 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10263         * config/rs6000/altivec.md: Write output control strings as braced
10264         blocks instead of double-quoted strings.
10265         * config/rs6000/darwin.md: Ditto.
10266         * config/rs6000/rs6000.md: Ditto.
10267         * config/rs6000/vector.md: Ditto.
10268         * config/rs6000/vsx.md: Ditto.
10270 2018-02-21  Jason Merrill  <jason@redhat.com>
10272         PR c++/84314 - ICE with templates and fastcall attribute.
10273         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10275 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10277         * ipa-cp.c (determine_versionability): Fix comment typos.
10279 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10281         PR c/84229
10282         * ipa-cp.c (determine_versionability): Do not version functions caling
10283         va_arg_pack.
10285 2018-02-21  Martin Liska  <mliska@suse.cz>
10287         PR driver/83193
10288         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10289         Add "native" as a possible value.
10290         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10291         the macro when native cpu detection is available.
10293 2018-02-21  Martin Liska  <mliska@suse.cz>
10295         PR driver/83193
10296         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10297         Add "native" as a possible value.
10298         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10299         when native cpu detection is available.
10301 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10302             Martin Sebor  <msebor@redhat.com>
10304         PR tree-optimization/84478
10305         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10306         false.
10307         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10308         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10309         support which is conservatively correct, for 2 only stay conservative
10310         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10311         argument to the 2 argument get_range_strlen, adjust 6 arg
10312         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10313         false.
10314         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10315         (gimple_fold_builtin_strlen): Pass true as last argument to
10316         get_range_strlen.
10318 2018-02-20  Martin Sebor  <msebor@redhat.com>
10320         PR middle-end/84095
10321         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10322         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10323         (builtin_memref::builtin_memref): Factor out parts into
10324         set_base_and_offset and call it.
10326 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10328         PR middle-end/84406
10329         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10330         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10331         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10332         search at the associated MODE_INT.
10334 2018-02-20  Jeff Law  <law@redhat.com>
10336         PR middle-end/82123
10337         PR tree-optimization/81592
10338         PR middle-end/79257
10339         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10340         for range data rather than using global data.
10341         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10342         range data rather than using global data.
10343         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10344         pass it to children as needed.
10345         (struct directive::fmtresult): Similarly.
10346         (struct directive::set_width): Similarly.
10347         (struct directive::set_precision): Similarly.
10348         (format_integer, format_directive, parse_directive): Similarly.
10349         (format_none): Accept unnamed vr_values parameter.
10350         (format_percent, format_floating, format_character): Similarly.
10351         (format_string, format_plain): Similarly.
10352         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10353         the EVRP range analyzer for range data rather than using global data.
10354         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10355         gimple-ssa-evrp-analyze.h
10356         (class sprintf_dom_walker): Add after_dom_children member function.
10357         Add evrp_range_analyzer member.
10358         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10359         range analyzer as needed.
10360         (sprintf_dom_walker::after_dom_children): New member function.
10361         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10362         if not optimizing.
10363         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10364         (evrp_range_analyzer::pop_to_marker): Likewise.
10366 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10368         PR tree-optimization/84419
10369         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10370         with the required type if its current type is compatible but
10371         different.
10373 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10375         PR middle-end/82004
10376         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10377         after vectorization.
10379 2018-02-20  Martin Liska  <mliska@suse.cz>
10381         PR driver/83193
10382         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10383         possible values if we don't have a hint.
10385 2018-02-20  Martin Liska  <mliska@suse.cz>
10387         PR c/84310
10388         PR target/79747
10389         * final.c (shorten_branches): Build align_tab array with one
10390         more element.
10391         * opts.c (finish_options): Add alignment option limit check.
10392         (MAX_CODE_ALIGN): Likewise.
10393         (MAX_CODE_ALIGN_VALUE): Likewise.
10394         * doc/invoke.texi: Document maximum allowed option value for
10395         all -falign-* options.
10397 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10399         PR target/84146
10400         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10401         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10402         * var-tracking.c (emit_note_insn_var_location): Remove all references
10403         to NOTE_INSN_CALL_ARG_LOCATION.
10404         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10405         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10406         Use copy_rtx_if_shared.
10407         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10408         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10409         (dwarf2out_var_location): Remove handling of
10410         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10411         on call_insn.
10412         * final.c (final_scan_insn): Remove all references to
10413         NOTE_INSN_CALL_ARG_LOCATION.
10414         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10415         before dumping final insns.
10416         * except.c (emit_note_eh_region_end): Remove all references to
10417         NOTE_INSN_CALL_ARG_LOCATION.
10418         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10419         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10420         * config/arc/arc.c (hwloop_optimize): Likewise.
10421         * config/arm/arm.c (create_fix_barrier): Likewise.
10422         * config/s390/s390.c (s390_chunkify_start): Likewise.
10423         * config/sh/sh.c (find_barrier): Likewise.
10424         * config/i386/i386.c (rest_of_insert_endbranch,
10425         ix86_seh_fixup_eh_fallthru): Likewise.
10426         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10427         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10428         * config/frv/frv.c (frv_function_prologue): Likewise.
10429         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10430         reg note.
10431         (note_outside_basic_block_p): Remove all references to
10432         NOTE_INSN_CALL_ARG_LOCATION.
10433         * gengtype.c (adjust_field_rtx_def): Likewise.
10434         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10435         Likewise.
10436         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10437         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10439         PR c++/84444
10440         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10441         is ADDR_EXPR.
10443         PR tree-optimization/84452
10444         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10445         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10446         is NULL.
10448 2018-02-19  Martin Liska  <mliska@suse.cz>
10450         PR sanitizer/82183
10451         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10453 2018-02-19  Martin Liska  <mliska@suse.cz>
10454             Richard Sandiford  <richard.sandiford@linaro.org>
10456         PR tree-optimization/82491
10457         * gimple-fold.c (get_base_constructor): Make earlier bail out
10458         to prevent ubsan.
10460 2018-02-19  Carl Love  <cel@us.ibm.com>
10462         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10463         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10464         BU_P8V_OVERLOAD_1.
10465         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10466         P8V_BUILTIN_VEC_NEG.
10468 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
10470         * config/rl78/rl78.md (movdf): New define expand.
10472 2018-02-19  Martin Liska  <mliska@suse.cz>
10474         PR other/80589
10475         * doc/invoke.texi: Fix typo.
10476         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10478 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
10480         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10481         handle rs6000_single_float and rs6000_double_float specially for
10482         e500 family CPUs.
10484 2018-02-16  Jeff Law  <law@redhat.com>
10486         * config/rx/rx.c (add_pop_cfi_notes): New function.;
10487         (pop_regs): Use it.
10489 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10491         PR ipa/84425
10492         * ipa-inline.c (inline_small_functions): Fix a typo.
10494 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10496         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10498 2018-02-16  Carl Love  <cel@us.ibm.com>
10500         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10501         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10502         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10503         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10504         expansion to P8V_BUILTIN_VEC_FLOAT2.
10506 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
10508         PR rtl-optimization/70023
10509         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
10510         src_regno into account.
10512 2018-02-16  Carl Love  <cel@us.ibm.com>
10514         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10515         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10516         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10517         * config/rs6000/rs6000.c: Remove case statements for
10518         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10519         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10520         and P9V_BUILTIN_VEC_VINSERT4B.
10521         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10522         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10523         * config/rs6000/vsx.md:
10524         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10525         vec_insert4b.
10527 2018-02-16  Carl Love  <cel@us.ibm.com>
10529         * config/rs6000/altivec.h: Add builtin names vec_extract4b
10530         vec_insert4b.
10531         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10532         definitions.
10533         * config/rs6000/rs6000-c.c: Add the definitions for
10534         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10535         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10536         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10537         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
10538         definition for insert4b and define insn *insert3b_internal.
10539         * doc/extend.texi: Add documentation for vec_extract4b.
10541 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10543         * doc/extend.texi (Backwards Compatibility): Mention friend
10544         injection.  Note for-scope is deprecated.
10545         * doc/invoke.texi (-ffriend-injection): Deprecate.
10547 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
10549         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10550         that moved to I2, also allow destinations that are a paradoxical
10551         subreg (instead of a normal reg).
10553 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
10555         PR target/83831
10556         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10557         to QImode.
10559 2018-02-16  Richard Biener  <rguenther@suse.de>
10561         PR tree-optimization/84037
10562         PR tree-optimization/84016
10563         PR target/82862
10564         * config/i386/i386.c (ix86_builtin_vectorization_cost):
10565         Adjust vec_construct for the fact we need additional higher latency
10566         128bit inserts for AVX256 and AVX512 vector builds.
10567         (ix86_add_stmt_cost): Scale vector construction cost for
10568         elementwise loads.
10570 2018-02-16  Richard Biener  <rguenther@suse.de>
10572         PR tree-optimization/84417
10573         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10574         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10575         (non_rewritable_lvalue_p): Likewise, use poly-ints.
10577 2018-02-16  Martin Liska  <mliska@suse.cz>
10579         PR sanitizer/84307
10580         * internal-fn.def (ASAN_CHECK): Set proper flags.
10581         (ASAN_MARK): Likewise.
10583 2018-02-16  Julia Koval  <julia.koval@intel.com>
10585         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10586         from PTA_CANNONLAKE.
10588 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10590         PR target/84272
10591         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10592         Use ++iter rather than iter++ for std::list iterators.
10593         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
10594         defer deleting them until all nodes in the forest are processed.  Do
10595         free even leaf nodes.  Change to_process into auto_vec.
10597         PR bootstrap/84405
10598         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10599         * vec.h (vec_default_construct): Use memset instead of placement new
10600         if BROKEN_VALUE_INITIALIZATION is defined.
10601         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10602         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10603         is defined.
10605         PR rtl-optimization/83723
10606         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10607         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
10608         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
10609         recursive calls.
10610         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10611         callers.
10612         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10614 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
10616         PR rtl-optimization/81443
10617         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10618         from inner REGs to paradoxical SUBREGs.
10620 2018-02-16  Richard Biener  <rguenther@suse.de>
10622         PR tree-optimization/84399
10623         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10624         For operands we can analyze at their definition make sure we can
10625         analyze them at each use as well.
10627 2018-02-16  Richard Biener  <rguenther@suse.de>
10629         PR tree-optimization/84190
10630         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10631         volatile accesses if the decl isn't volatile.
10633 2018-02-15  Jason Merrill  <jason@redhat.com>
10635         PR c++/84314 - ICE with templates and fastcall attribute.
10636         * attribs.c (build_type_attribute_qual_variant): Don't clobber
10637         TYPE_CANONICAL on an existing type.
10639 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
10641         PR tree-optimization/84383
10642         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10643         dstoff nor call operand_equal_p if dstbase is NULL.
10645         PR tree-optimization/84334
10646         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10647         also a CONSTANT_CLASS_P, punt.
10649 2018-02-14  Jim Wilson  <jimw@sifive.com>
10651         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10652         first SMALL_OPERAND check.  New local min_second_step.  Move assert
10653         to where locals are set.  Add TARGET_RVC support.
10654         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10656 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
10658         * doc/invoke.texi: Correct -Wformat-overflow code sample.
10660 2018-02-14  Martin Sebor  <msebor@redhat.com>
10662         PR tree-optimization/83698
10663         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10664         arrays constrain the offset range to their bounds.
10665         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10666         (builtin_access::overlap): Avoid setting the size of overlap if it's
10667         already been set.
10668         (maybe_diag_overlap): Also consider arrays when deciding what values
10669         of offsets to include in diagnostics.
10671 2018-02-14  Martin Sebor  <msebor@redhat.com>
10673         PR c/84108
10674         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10675         that correspond to the kind of a declaration.
10677 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
10679         PR target/83984
10680         * config/pa/pa.md: Load address of PIC label using the linkage table
10681         if the label is nonlocal.
10683 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10685         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10686         warning message if user requests -maltivec=be.
10687         * doc/invoke.texi: Document deprecation of -maltivec=be.
10689 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
10691         PR target/84220
10692         * config/rs6000/rs6000-c.c: Update definitions for
10693         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10694         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10696 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10698         PR target/84239
10699         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10700         add _get_ssp intrinsics. Remove argument from
10701         __builtin_ia32_rdssp[d|q].
10702         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10703         * config/i386/i386-builtin.def: Remove argument from
10704         __builtin_ia32_rdssp[d|q].
10705         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10706         ix86_expand_special_args_builtin for _rdssp[d|q].
10707         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10708         Clear register before usage.
10709         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10710         Add documentation for new _get_ssp and _inc_ssp intrinsics.
10712 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
10714         PR tree-optimization/84357
10715         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10716         operand 1 of an ARRAY_REF too.
10718 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
10720         PR target/83831
10721         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10722         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10723         declarations.
10724         (set_of_reg): New struct.
10725         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10726         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10727         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10728         functions.
10729         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10730         Split into bitclr, bitset, bitinvert patterns if appropriate.
10731         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10732         use rx_fuse_in_memory_bitop.
10733         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10734         to named insn, correct maximum insn length.
10736 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
10738         PR target/79242
10739         * machmode.def: Define a complex mode for PARTIAL_INT.
10740         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10741         MODE_PARTIAL_INT.
10742         * doc/rtl.texi: Document CSPImode.
10743         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10744         handling.
10745         (msp430_hard_regno_nregs_with_padding): Likewise.
10747 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
10749         PR target/84279
10750         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10752 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
10754         PR rtl-optimization/84169
10755         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
10756         we generated a parallel as new i3 and we split that to new i2 and i3
10757         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
10758         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
10759         those to i2, not i1.  Partially rewrite this scan code.
10761 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10763         PR c/82210
10764         * stor-layout.c (place_field): For variable length fields, adjust
10765         offset_align afterwards not just based on the field's alignment,
10766         but also on the size.
10768         PR middle-end/84309
10769         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10770         of exps and logs in the use_exp2 case.
10772 2018-02-13  Jeff Law  <law@redhat.com>
10774         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10775         entry for "vector".
10777         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10778         ARGS as unused.
10780 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
10782         PR debug/84342
10783         PR debug/84319
10784         * common.opt (gas-loc-support, gas-locview-support): New.
10785         (ginline-points, ginternal-reset-location-views): New.
10786         * doc/invoke.texi: Document them.  Use @itemx where intended.
10787         (gvariable-location-views): Adjust.
10788         * target.def (reset_location_view): New.
10789         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10790         (TARGET_RESET_LOCATION_VIEW): New.
10791         * doc/tm.texi: Rebuilt.
10792         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10793         (dwarf2out_default_as_locview_support): New.
10794         (output_asm_line_debug_info): Use option variables.
10795         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10796         (output_loc_list): Likewise.
10797         (add_high_low_attributes): Check option variables.
10798         Don't output entry view attribute in strict mode.
10799         (gen_inlined_subroutine_die): Check option variables.
10800         (dwarf2out_inline_entry): Likewise.
10801         (init_sections_and_labels): Likewise.
10802         (dwarf2out_early_finish): Likewise.
10803         (maybe_reset_location_view): New, from...
10804         (dwarf2out_var_location): ... here.  Call it.
10805         * debug.h (dwarf2out_default_as_loc_support): Declare.
10806         (dwarf2out_default_as_locview_support): Declare.
10807         * hooks.c (hook_int_rtx_insn_0): New.
10808         * hooks.h (hook_int_rtx_insn_0): Declare.
10809         * toplev.c (process_options): Take -gas-loc-support and
10810         -gas-locview-support from dwarf2out.  Enable
10811         -gvariable-location-views by default only with locview
10812         assembler support.  Enable -ginternal-reset-location-views by
10813         default only if the target defines the corresponding hook.
10814         Enable -ginline-points by default if location views are
10815         enabled; force it disabled if statement frontiers are
10816         disabled.
10817         * tree-inline.c (expand_call_inline): Check option variables.
10818         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10820 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
10822         PR tree-optimization/84321
10823         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10824         handling.  Also check whether the anti-range contains any values
10825         that satisfy the mask; switch to a VR_RANGE if not.
10827 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
10829         PR sanitizer/84340
10830         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10832 2018-02-13  Martin Jambor  <mjambor@suse.cz>
10834         PR c++/83990
10835         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10836         of call statements, also set location of a load to a temporary.
10838 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
10840         * config/rl78/rl78.c (add_vector_labels): New function.
10841         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10842         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10843         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10844         which checks that no arguments are passed.
10845         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10846         * doc/extend.texi: Documentation for the new attribute.
10848 2018-02-13  Andreas Schwab  <schwab@suse.de>
10850         * config/riscv/linux.h (CPP_SPEC): Define.
10852 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10854         PR target/84335
10855         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10856         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10857         OPTION_MASK_ISA_AES as first argument to def_builtin_const
10858         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10859         instead of OPTION_MASK_ISA_PCLMUL as first argument to
10860         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10861         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10862         temporarily for AES and PCLMUL builtins.
10864         PR tree-optimization/84339
10865         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10866         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10867         Formatting fixes.
10869         PR middle-end/84309
10870         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10871         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10872         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10873         inline function.
10874         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10875         inline function.
10876         * omp-simd-clone.h: New file.
10877         * omp-simd-clone.c: Include omp-simd-clone.h.
10878         (expand_simd_clones): No longer static.
10879         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10880         cgraph.h and omp-simd-clone.h.
10881         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10882         (vect_recog_widen_shift_pattern): Formatting fix.
10883         (vect_pattern_recog_1): Don't check optab for calls.
10885         PR target/84336
10886         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10887         operands[2] into a REG before using gen_lowpart on it.
10889 2018-02-12  Jeff Law  <law@redhat.com>
10891         PR target/83760
10892         * config/sh/sh.c (find_barrier): Consider a sibling call
10893         a barrier as well.
10895         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10896         successfully back substituting a reg.
10898 2018-02-12  Richard Biener  <rguenther@suse.de>
10900         PR tree-optimization/84037
10901         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
10902         parameter, move visited init to caller.
10903         (vect_slp_analyze_operations): Separate cost from validity
10904         check, initialize visited once for all instances.
10905         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
10906         for all instances.
10907         * tree-vect-stmts.c (vect_model_simple_cost): Make early
10908         out an assert.
10909         (vect_model_promotion_demotion_cost): Likewise.
10910         (vectorizable_bswap): Guard cost modeling with !slp_node
10911         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
10912         SLP stmts.
10913         (vectorizable_call): Likewise.
10914         (vectorizable_conversion): Likewise.
10915         (vectorizable_assignment): Likewise.
10916         (vectorizable_shift): Likewise.
10917         (vectorizable_operation): Likewise.
10918         (vectorizable_store): Likewise.
10919         (vectorizable_load): Likewise.
10920         (vectorizable_condition): Likewise.
10921         (vectorizable_comparison): Likewise.
10923 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
10925         PR sanitizer/84307
10926         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
10927         (ASAN_MARK): Fix fnspec to account for return value, change pointer
10928         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
10930 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
10932         PR middle-end/83665
10933         * params.def (inline-min-speedup): Increase from 8 to 15.
10934         (max-inline-insns-auto): Decrease from 40 to 30.
10935         * ipa-split.c (consider_split): Add some buffer for function to
10936         be considered inlining candidate.
10937         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
10938         default values.
10940 2018-02-12  Richard Biener  <rguenther@suse.de>
10942         PR tree-optimization/84037
10943         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
10944         matched stmts if we cannot swap the non-matched ones.
10946 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10948         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
10949         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
10950         _mm_maskz_scalef_round_ss): New intrinsics.
10951         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
10952         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
10953         __builtin_ia32_scalefss_round): Remove.
10954         (__builtin_ia32_scalefsd_mask_round,
10955         __builtin_ia32_scalefss_mask_round): New intrinsics.
10956         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
10957         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
10958         ((match_operand:VF_128 2 "<round_nimm_predicate>"
10959         "<round_constraint>")): Changed to ...
10960         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
10961         "<round_scalar_constraint>")): ... this.
10962         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
10963         %0, %1, %2<round_op3>}"): Changed to ...
10964         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
10965         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
10966         %2<round_scalar_mask_op3>}"): ... this.
10967         * config/i386/subst.md (round_scalar_nimm_predicate): New.
10969 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10971         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
10972         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
10973         (_mm_maskz_sqrt_round_ss): New intrinsics.
10974         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
10975         (__builtin_ia32_sqrtsd_mask_round)
10976         (__builtin_ia32_sqrtss_mask_round): New builtins.
10977         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
10978         (__builtin_ia32_sqrtss_round): Remove.
10979         (__builtin_ia32_sqrtsd_mask_round)
10980         (__builtin_ia32_sqrtss_mask_round): New builtins.
10981         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
10982         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
10983         ((match_operand:VF_128 1 "vector_operand"
10984         "xBm,<round_constraint>")): Changed to ...
10985         ((match_operand:VF_128 1 "vector_operand"
10986         "xBm,<round_scalar_constraint>")): ... this.
10987         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
10988         %0, %2, %<iptr>1<round_op3>}): Changed to ...
10989         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
10990         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
10991         %<iptr>1<round_scalar_mask_op3>}): ... this.
10992         ((set_attr "prefix" "<round_prefix>")): Changed to ...
10993         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
10995 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
10997         PR target/84266
10998         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
10999         Cast vec_cmpeq result to correct type.
11000         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11001         Cast vec_cmpgt result to correct type.
11003 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11005         * final.c (final_scan_insn_1): Renamed from...
11006         (final_scan_insn): ... this.  New wrapper, to recover
11007         seen from the outermost call in recursive ones.
11008         * config/sparc/sparc.c (output_return): Drop seen from call.
11009         (output_sibcall): Likewise.
11010         * config/visium/visium.c (output_branch): Likewise.
11012 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11014         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11015         function label.
11017 2018-02-10  Alan Modra  <amodra@gmail.com>
11019         PR target/84300
11020         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11021         Specify LR as an input.
11023 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11025         PR sanitizer/83987
11026         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11027         remove_member_access_dummy_vars): New functions.
11028         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11029         lower_omp_1, execute_lower_omp): Use them.
11031         PR rtl-optimization/84308
11032         * shrink-wrap.c (spread_components): Release todo vector.
11034 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11036         PR rtl-optimization/57193
11037         * ira-color.c (struct allocno_color_data): Add member
11038         conflict_allocno_hard_prefs.
11039         (update_conflict_allocno_hard_prefs): New.
11040         (bucket_allocno_compare_func): Add a preference based on
11041         conflict_allocno_hard_prefs.
11042         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11043         (color_allocnos): Remove a dead code.  Initiate
11044         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11046 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11048         PR target/84226
11049         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11050         constraint from =wa to wa.  Avoid a subreg on the output operand,
11051         instead use a pseudo and subreg it in a move.
11052         (p9_xxbrd_<mode>): Changed to ...
11053         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11054         (p9_xxbrd_v2df): New expander.
11055         (p9_xxbrw_<mode>): Changed to ...
11056         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11057         (p9_xxbrw_v4sf): New expander.
11059 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11061         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11063 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11065         PR target/83926
11066         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11067         multiply in 32-bit mode.
11068         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11069         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11070         mode.
11072 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11074         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11075         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11076         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11077         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11079 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11081         PR lto/84213
11082         * dwarf2out.c (is_trivial_indirect_ref): New function.
11083         (dwarf2out_late_global_decl): Do not generate a location
11084         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11085         and that are not defined in the current unit.
11087 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11089         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11090         instead of a libcall for UNORDERED.
11092 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11094         PR target/82641
11095         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11096         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11098 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11100         PR target/PR84295
11101         * config/s390/s390.c (s390_set_current_function): Invoke
11102         s390_indirect_branch_settings also if fndecl didn't change.
11104 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11106         * config/rs6000/rs6000.md (blockage): Set length to zero.
11108 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11110         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11112 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11114         PR sanitizer/84285
11115         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11116         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11117         -static-lib*san.
11119         PR debug/84252
11120         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11121         PARALLEL incoming that failed vt_get_decl_and_offset check.
11123         PR middle-end/84237
11124         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11125         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11126         TREE_READONLY bit.
11127         (get_variable_section): For decls in named .bss* sections pass true as
11128         second argument to bss_initializer_p.
11130 2018-02-09  Marek Polacek  <polacek@redhat.com>
11131             Jakub Jelinek  <jakub@redhat.com>
11133         PR c++/83659
11134         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11135         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11136         Sync some changes from cxx_fold_indirect_ref.
11138 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11140         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11141         markers.
11142         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11143         (BLOCK_INLINE_ENTRY_LABEL): New.
11144         (dwarf2out_var_location): Disregard inline entry markers.
11145         (inline_entry_data): New struct.
11146         (inline_entry_data_hasher): New hashtable type.
11147         (inline_entry_data_hasher::hash): New.
11148         (inline_entry_data_hasher::equal): New.
11149         (inline_entry_data_table): New variable.
11150         (add_high_low_attributes): Add DW_AT_entry_pc and
11151         DW_AT_GNU_entry_view attributes if a pending entry is found
11152         in inline_entry_data_table.  Add old entry_pc attribute only
11153         if debug nonbinding markers are disabled.
11154         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11155         markers are enabled.
11156         (block_within_block_p, dwarf2out_inline_entry): New.
11157         (dwarf2out_finish): Check that no entries remained in
11158         inline_entry_data_table.
11159         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11160         (final_scan_insn, notice_source_line): Likewise.
11161         (rest_of_clean_state): Skip inline entry markers.
11162         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11163         markers.
11164         * gimple.c (gimple_build_debug_inline_entry): New.
11165         * gimple.h (enum gimple_debug_subcode): Add
11166         GIMPLE_DEBUG_INLINE_ENTRY.
11167         (gimple_build_debug_inline_entry): Declare.
11168         (gimple_debug_inline_entry_p): New.
11169         (gimple_debug_nonbind_marker_p): Adjust.
11170         * insn-notes.def (INLINE_ENTRY): New.
11171         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11172         inline entry marker notes.
11173         (print_insn): Likewise.
11174         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11175         (INSN_DEBUG_MARKER_KIND): Likewise.
11176         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11177         * tree-inline.c (expand_call_inline): Build and insert
11178         debug_inline_entry stmt.
11179         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11180         inline entry blocks early, if nonbind markers are enabled.
11181         (dump_scope_block): Dump fragment info.
11182         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11183         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11184         (gimple_build_debug_inline_entry): New.
11185         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11186         Enable/disable inline entry points too.
11187         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11188         (DEBUG_INSN): Describe inline entry markers.
11190         * common.opt (gvariable-location-views): New.
11191         (gvariable-location-views=incompat5): New.
11192         * config.in: Rebuilt.
11193         * configure: Rebuilt.
11194         * configure.ac: Test assembler for view support.
11195         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11196         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11197         * dwarf2out.c (var_loc_view): New typedef.
11198         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11199         (dwarf2out_locviews_in_attribute): New.
11200         (dwarf2out_locviews_in_loclist): New.
11201         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11202         (enum dw_line_info_opcode): Add LI_adv_address.
11203         (struct dw_line_info_table): Add view.
11204         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11205         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11206         (zero_view_p): New variable.
11207         (ZERO_VIEW_P): New macro.
11208         (output_asm_line_debug_info): New.
11209         (struct var_loc_node): Add view.
11210         (add_AT_view_list, AT_loc_list): New.
11211         (add_var_loc_to_decl): Add view param.  Test it against last.
11212         (new_loc_list): Add view params.  Record them.
11213         (AT_loc_list_ptr): Handle loc and view lists.
11214         (view_list_to_loc_list_val_node): New.
11215         (print_dw_val): Handle dw_val_class_view_list.
11216         (size_of_die): Likewise.
11217         (value_format): Likewise.
11218         (loc_list_has_views): New.
11219         (gen_llsym): Set vl_symbol too.
11220         (maybe_gen_llsym, skip_loc_list_entry): New.
11221         (dwarf2out_maybe_output_loclist_view_pair): New.
11222         (output_loc_list): Output view list or entries too.
11223         (output_view_list_offset): New.
11224         (output_die): Handle dw_val_class_view_list.
11225         (output_dwarf_version): New.
11226         (output_compilation_unit_header): Use it.
11227         (output_skeleton_debug_sections): Likewise.
11228         (output_rnglists, output_line_info): Likewise.
11229         (output_pubnames, output_aranges): Update version comments.
11230         (output_one_line_info_table): Output view numbers in asm comments.
11231         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11232         Call maybe_gen_llsym.
11233         (loc_list_from_tree_1): Adjust.
11234         (add_AT_location_description): Create view list attribute if
11235         needed, check it's absent otherwise.
11236         (convert_cfa_to_fb_loc_list): Adjust.
11237         (maybe_emit_file): Call output_asm_line_debug_info for test.
11238         (dwarf2out_var_location): Reset views as needed.  Precompute
11239         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11240         attribute.  Set view.
11241         (new_line_info_table): Reset next view.
11242         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11243         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11244         the assembler, or select appropriate line info opcodes.
11245         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11246         (optimize_string_length): Catch it.  Adjust.
11247         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11248         dw_val_class_view_list, and remove it if no longer needed.
11249         (hash_loc_list): Hash view numbers.
11250         (loc_list_hasher::equal): Compare them.
11251         (optimize_location_lists): Check whether a view list symbol is
11252         needed, and whether the locview attribute is present, and
11253         whether they match.  Remove the locview attribute if no longer
11254         needed.
11255         (index_location_lists): Call skip_loc_list_entry for test.
11256         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11257         Use output_dwarf_version.
11258         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11259         (struct dw_val_node): Add val_view_list.
11260         * final.c (SEEN_NEXT_VIEW): New.
11261         (set_next_view_needed): New.
11262         (clear_next_view_needed): New.
11263         (maybe_output_next_view): New.
11264         (final_start_function): Rename to...
11265         (final_start_function_1): ... this.  Take pointer to FIRST,
11266         add SEEN parameter.  Emit param bindings in the initial view.
11267         (final_start_function): Reintroduce SEEN-less interface.
11268         (final): Rename to...
11269         (final_1): ... this.  Take SEEN parameter.  Output final pending
11270         next view at the end.
11271         (final): Reintroduce seen-less interface.
11272         (final_scan_insn): Output pending next view before switching
11273         sections or ending a block.  Mark the next view as needed when
11274         outputting variable locations.  Notify debug backend of section
11275         changes, and of location view changes.
11276         (rest_of_handle_final): Adjust.
11277         * toplev.c (process_options): Autodetect value for debug variable
11278         location views option.  Warn on incompat5 without -gdwarf-5.
11279         * doc/invoke.texi (gvariable-location-views): New.
11280         (gvariable-location-views=incompat5): New.
11281         (gno-variable-location-views): New.
11283 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11285         PR tree-optimization/84136
11286         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11287         that the result of find_edge is non-NULL.
11289 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11291         PR target/83008
11292         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11293         storing integer register in SImode.  Fix cost of 256 and 512
11294         byte aligned SSE register store.
11296 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11298         * config/i386/i386.c (ix86_multiplication_cost): Fix
11299         multiplication cost for TARGET_AVX512DQ.
11301 2018-02-08  Marek Polacek  <polacek@redhat.com>
11303         PR tree-optimization/84238
11304         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11305         get_range_strlen.
11307 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11309         PR tree-optimization/84265
11310         * tree-vect-stmts.c (vectorizable_store): Don't treat
11311         VMAT_CONTIGUOUS accesses as grouped.
11312         (vectorizable_load): Likewise.
11314 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11316         PR tree-optimization/81635
11317         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11318         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11319         (test_round_for_mask): New functions.
11320         (wide_int_cc_tests): Call test_round_for_mask.
11321         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11322         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11323         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11324         range returned by get_range_info.
11326 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11328         PR ipa/81360
11329         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11330         * symtab.c: Include builtins.h
11331         (symtab_node::output_to_lto_symbol_table_p): Move here
11332         from lto-streamer-out.c:output_symbol_p.
11333         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11334         (output_symbol_p): Move all logic to symtab.c
11335         (produce_symtab): Update.
11337 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11339         * config/s390/s390-opts.h (enum indirect_branch): Define.
11340         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11341         (s390_indirect_branch_via_thunk)
11342         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11343         (enum s390_indirect_branch_type): Define.
11344         * config/s390/s390.c (struct s390_frame_layout, struct
11345         machine_function): Remove.
11346         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11347         (indirect_branch_table_label_no, indirect_branch_table_name):
11348         Define variables.
11349         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11350         (enum s390_indirect_branch_option): Define.
11351         (s390_return_addr_from_memory): New function.
11352         (s390_handle_string_attribute): New function.
11353         (s390_attribute_table): Add new attribute handler.
11354         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11355         (s390_indirect_branch_via_thunk): New function.
11356         (s390_indirect_branch_via_inline_thunk): New function.
11357         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11358         sibling call optimization for non z10 compiles.
11359         (s390_emit_call): Force indirect branch target to be a single
11360         register.  Add r1 clobber for non-z10 compiles.
11361         (s390_emit_epilogue): Emit return jump via return_use expander.
11362         (s390_reorg): Handle JUMP_INSNs as execute targets.
11363         (s390_option_override_internal): Perform validity checks for the
11364         new command line options.
11365         (s390_indirect_branch_attrvalue): New function.
11366         (s390_indirect_branch_settings): New function.
11367         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11368         (s390_output_indirect_thunk_function):  New function.
11369         (s390_code_end): Implement target hook.
11370         (s390_case_values_threshold): Implement target hook.
11371         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11372         macros.
11373         * config/s390/s390.h (struct s390_frame_layout)
11374         (struct machine_function): Move here from s390.c.
11375         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11376         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11377         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11378         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11379         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11380         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11381         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11382         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11383         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11384         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11385         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11386         (mnemonic attribute): Add values which aren't recognized
11387         automatically.
11388         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11389         pattern for branch conversion.  Fix mnemonic attribute.
11390         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11391         indirect branch via thunk if requested.
11392         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11393         ("*indirect_jump"): Disable for branch conversion using out of
11394         line thunks.
11395         ("indirect_jump_via_thunk<mode>_z10")
11396         ("indirect_jump_via_thunk<mode>")
11397         ("indirect_jump_via_inlinethunk<mode>_z10")
11398         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11399         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11400         ("casesi_jump_via_inlinethunk<mode>_z10")
11401         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11402         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11403         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11404         ("*indirect2_jump"): Disable for branch conversion.
11405         ("casesi_jump"): Turn into expander and expand patterns for branch
11406         conversion.
11407         ("return_use"): New expander.
11408         ("*return"): Emit return via thunk and rename it to ...
11409         ("*return<mode>"): ... this one.
11410         * config/s390/s390.opt: Add new options and and enum for the
11411         option values.
11413 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11415         * lra-constraints.c (match_reload): Unconditionally use
11416         gen_lowpart_SUBREG, rather than selecting between that
11417         and equivalent gen_rtx_SUBREG code.
11419 2018-02-08  Richard Biener  <rguenther@suse.de>
11421         PR tree-optimization/84233
11422         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11423         changed flag instead of boguously re-using phi_inserted.
11425 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11427         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11428         static local variables.
11430 2018-02-08  Richard Biener  <rguenther@suse.de>
11432         PR tree-optimization/84278
11433         * tree-vect-stmts.c (vectorizable_store): When looking for
11434         smaller vector types to perform grouped strided loads/stores
11435         make sure the mode is supported by the target.
11436         (vectorizable_load): Likewise.
11438 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11440         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11441         Increase LDP/STP opportunities by adding adjacent callee-saves.
11443 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11445         PR rtl-optimization/84068
11446         PR rtl-optimization/83459
11447         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11449 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11451         PR tree-optimization/84224
11452         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11453         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11454         non-zero arguments.
11456 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11458         PR target/84113
11459         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11460         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11461         count, remove one USE.
11463 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11465         * doc/install.texi (Configuration): Document the
11466         --with-long-double-format={ibm,ieee} PowerPC configuration
11467         options.
11469         PR target/84154
11470         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11471         Convert from define_expand to be define_insn_and_split.  Rework
11472         float/double/_Float128 conversions to QI/HI/SImode to work with
11473         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
11474         conversions to QI/HImode types did a store and then a load to
11475         truncate the value.  For conversions to VSX registers, don't split
11476         the insn, instead emit the code directly.  Use the code iterator
11477         any_fix to combine signed and unsigned conversions.
11478         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11479         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11480         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11481         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11482         (fix_<mode>di2_hw): Likewise.
11483         (fixuns_<mode>di2_hw): Likewise.
11484         (fix_<mode>si2_hw): Likewise.
11485         (fixuns_<mode>si2_hw): Likewise.
11486         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11487         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11488         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11489         fix<uns>_trunc<SFDF:mode>si2_p8.
11490         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11491         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11492         (fix<uns>_<mode>_mem): Likewise.
11493         (fctiw<u>z_<mode>_mem): Likewise.
11494         (fix<uns>_<mode>_mem): Likewise.
11495         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11496         the register allocator from doing a direct move to the GPRs to do
11497         a store, and instead use the ISA 3.0 store byte/half-word from
11498         vector register instruction.  For IEEE 128-bit floating point,
11499         also optimize stores of 32-bit ints.
11500         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11502 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
11504         * genextract.c (push_pathstr_operand): New function to support
11505         [a-zA-Z].
11506         (walk_rtx): Call push_pathstr_operand.
11507         (print_path): Support [a-zA-Z].
11509 2018-02-07  Richard Biener  <rguenther@suse.de>
11511         PR tree-optimization/84037
11512         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11513         (cse_and_gimplify_to_preheader): Declare.
11514         (vect_get_place_in_interleaving_chain): Likewise.
11515         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11516         ivexpr_map.
11517         (_loop_vec_info::~_loop_vec_info): Delete it.
11518         (cse_and_gimplify_to_preheader): New function.
11519         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11520         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11521         (vectorizable_load): Likewise.  For grouped stores always base
11522         the IV on the first element.
11523         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11524         condition before gimplifying.
11526 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11528         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11529         *DIV_EXPR and *MOD_EXPR.
11531 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
11533         PR target/84248
11534         * config/i386/i386.c (ix86_option_override_internal): Mask out
11535         the CF_SET bit when checking -fcf-protection.
11537 2018-02-07  Tom de Vries  <tom@codesourcery.com>
11539         PR libgomp/84217
11540         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11541         enough.
11543 2018-02-07  Richard Biener  <rguenther@suse.de>
11545         PR tree-optimization/84204
11546         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11547         this place.
11549         PR tree-optimization/84205
11550         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11551         special-case isl_ast_op_zdiv_r.
11553         PR tree-optimization/84223
11554         * graphite-scop-detection.c (gather_bbs::before_dom_children):
11555         Only add conditions from within the region.
11556         (gather_bbs::after_dom_children): Adjust.
11558 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
11560         PR target/84209
11561         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11562         * config/avr/avr.md: Only post-reload split REG-REG moves if
11563         either register is GENERAL_REG_P.
11565 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11567         PR tree-optimization/84235
11568         * tree-ssa-scopedtables.c
11569         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11570         if the subtraction is performed in floating point type where NaNs are
11571         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11572         build 1.  Formatting fix.
11574 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
11576         PR target/84146
11577         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11578         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11579         and skip it regardless of bb boundaries.  Use CALL_P macro,
11580         don't test INSN_P (insn) together with CALL_P or JUMP_P check
11581         unnecessarily, formatting fix.
11583 2018-02-06  Michael Collison  <michael.collison@arm.com>
11585         * config/arm/thumb2.md:
11586         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11587         (*thumb_mov_notscc): Ditto.
11589 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
11591         PR target/84154
11592         * config/rs6000/rs6000.md (su code attribute): Use "u" for
11593         unsigned_fix, not "s".
11595 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11597         * configure.ac (gcc_fn_eh_frame_ro): New function.
11598         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11599         correct .eh_frame permissions.
11600         * configure: Regenerate.
11602 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
11604         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11605         irrelevant options.
11607 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11609         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11610         Display warning message for -mno-speculate-indirect-jumps.
11612 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
11614         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11615         Undocumented.
11616         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11618 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
11620         PR tree-optimization/84225
11621         * tree-eh.c (find_trapping_overflow): Only call
11622         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11624 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11626         PR target/84145
11627         * config/i386/i386.c: Reimplement the check of possible options
11628         -mibt/-mshstk conbination. Change error messages.
11629         * doc/invoke.texi: Fix a typo: remove extra '='.
11631 2018-02-06  Marek Polacek  <polacek@redhat.com>
11633         PR tree-optimization/84228
11634         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11636 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
11638         PR target/82641
11639         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11640         emitted arch directives.
11641         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11642         __ARM_FEATURE_COPROC before changing architectures.
11644 2018-02-06  Richard Biener  <rguenther@suse.de>
11646         * config/i386/i386.c (print_reg): Fix typo.
11647         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11649 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11651         * configure: Regenerate.
11653 2018-02-05  Martin Sebor  <msebor@redhat.com>
11655         PR tree-optimization/83369
11656         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11657         inlining context.
11659 2018-02-05  Martin Liska  <mliska@suse.cz>
11661         * doc/invoke.texi: Cherry-pick upstream r323995.
11663 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
11665         * ira.c (ira_init_register_move_cost): Adjust comment.
11667 2018-02-05  Martin Liska  <mliska@suse.cz>
11669         PR gcov-profile/84137
11670         * doc/gcov.texi: Fix typo in documentation.
11672 2018-02-05  Martin Liska  <mliska@suse.cz>
11674         PR gcov-profile/83879
11675         * doc/gcov.texi: Document necessity of --dynamic-list-data when
11676         using dlopen functionality.
11678 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
11680         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11681         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11682         _mm_maskz_range_ss, _mm_mask_range_round_ss,
11683         _mm_maskz_range_round_ss): New intrinsics.
11684         (__builtin_ia32_rangesd128_round)
11685         (__builtin_ia32_rangess128_round): Remove.
11686         (__builtin_ia32_rangesd128_mask_round,
11687         __builtin_ia32_rangess128_mask_round): New builtins.
11688         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11689         __builtin_ia32_rangess128_round): Remove.
11690         (__builtin_ia32_rangesd128_mask_round,
11691         __builtin_ia32_rangess128_mask_round): New builtins.
11692         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11693         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11694         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11695         "<round_saeonly_constraint>")): Changed to ...
11696         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11697         "<round_saeonly_scalar_constraint>")): ... this.
11698         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11699         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11700         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11701         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11702         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11704 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
11706         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11707         options.
11708         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11709         Remove all values except native, 8540 and 8548.
11711 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
11713         * config/i386/i386.c (ix86_output_function_return): Pass
11714         INVALID_REGNUM, instead of -1, as invalid register number to
11715         indirect_thunk_name and output_indirect_thunk.
11717 2018-02-02  Julia Koval  <julia.koval@intel.com>
11719         * config.gcc: Add -march=icelake.
11720         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11721         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11722         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11723         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11724         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11725         (processor_target_table): Add icelake.
11726         (ix86_option_override_internal): Handle new PTAs.
11727         (get_builtin_code_for_version): Handle icelake.
11728         (M_INTEL_COREI7_ICELAKE): New.
11729         (fold_builtin_cpu): Handle icelake.
11730         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11731         * doc/invoke.texi: Add -march=icelake.
11733 2018-02-02  Julia Koval  <julia.koval@intel.com>
11735         * config/i386/i386.c (ix86_option_override_internal): Change flags type
11736         to wide_int_bitmask.
11737         * wide-int-bitmask.h: New.
11739 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11741         PR target/84066
11742         * config/i386/i386.md: Replace Pmode with word_mode in
11743         builtin_setjmp_setup and builtin_longjmp to support x32.
11745 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
11747         PR target/56010
11748         PR target/83743
11749         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11750         #include "opts.h".
11751         (rs6000_supported_cpu_names): New static variable.
11752         (linux_cpu_translation_table): Likewise.
11753         (elf_platform) <cpu>: Define new static variable and use it.
11754         Translate kernel AT_PLATFORM name to canonical name if needed.
11755         Error if platform name is unknown.
11757 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
11759         PR target/84089
11760         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11762 2018-02-01  Jeff Law  <law@redhat.com>
11764         PR target/84128
11765         * config/i386/i386.c (release_scratch_register_on_entry): Add new
11766         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
11767         the scratch if RELEASE_VIA_POP is false.
11768         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11769         If we have to save a temporary register, decrement SIZE appropriately.
11770         Pass new arguments to release_scratch_register_on_entry.
11771         (ix86_adjust_stack_and_probe): Likewise.
11772         (ix86_emit_probe_stack_range): Pass new arguments to
11773         release_scratch_register_on_entry.
11775 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
11777         PR rtl-optimization/84157
11778         * combine.c (change_zero_ext): Use REG_P predicate in
11779         front of HARD_REGISTER_P predicate.
11781 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
11783         * config/avr/avr.c (avr_option_override): Move disabling of
11784         -fdelete-null-pointer-checks to...
11785         * common/config/avr/avr-common.c (avr_option_optimization_table):
11786         ...here.
11788 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11790         PR tree-optimization/81635
11791         * tree-data-ref.c (split_constant_offset_1): For types that
11792         wrap on overflow, try to use range info to prove that wrapping
11793         cannot occur.
11795 2018-02-01  Renlin Li  <renlin.li@arm.com>
11797         PR target/83370
11798         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11799         TAILCALL_ADDR_REGS.
11800         (aarch64_register_move_cost): Likewise.
11801         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11802         TAILCALL_ADDR_REGS.
11803         (REG_CLASS_NAMES): Likewise.
11804         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11805         TAILCALL_ADDR_REGS. Remove IP registers.
11806         * config/aarch64/aarch64.md (Ucs): Update register constraint.
11808 2018-02-01  Richard Biener  <rguenther@suse.de>
11810         * domwalk.h (dom_walker::dom_walker): Add additional constructor
11811         for specifying RPO order and allow NULL for that.
11812         * domwalk.c (dom_walker::dom_walker): Likewise.
11813         (dom_walker::walk): Handle NULL RPO order.
11814         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11815         in RPO order.
11816         (rewrite_update_dom_walker): Likewise.
11817         (mark_def_dom_walker): Likewise.
11819 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11821         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11822         (aarch64_maybe_expand_sve_subreg_move): Declare.
11823         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11824         * config/aarch64/predicates.md (aarch64_any_register_operand): New
11825         predicate.
11826         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11827         that are semantically a reverse operation.
11828         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11829         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11830         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11831         functions.
11832         (aarch64_can_change_mode_class): For big-endian, forbid changes
11833         between two SVE modes if they have different element sizes.
11835 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11837         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11838         the TImode handling for big-endian targets.
11840 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11842         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11843         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
11844         not just bytes.
11845         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11846         Remove BSWAP handing for big-endian targets and use the form of
11847         LD1RQ appropariate for the mode.
11849 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11851         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11852         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11853         duplicated element.
11855 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11857         PR tearget/83845
11858         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11859         check for operands that need to go through aarch64_sve_reload_be.
11861 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
11863         PR tree-optimization/81661
11864         PR tree-optimization/84117
11865         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11866         * tree-eh.c: Include gimplify.h.
11867         (find_trapping_overflow, replace_trapping_overflow,
11868         rewrite_to_non_trapping_overflow): New functions.
11869         * tree-vect-loop.c: Include tree-eh.h.
11870         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11871         * tree-data-ref.c: Include tree-eh.h.
11872         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11874 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
11876         PR rtl-optimization/84123
11877         * combine.c (change_zero_ext): Check if hard register satisfies
11878         can_change_dest_mode before calling gen_lowpart_SUBREG.
11880 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
11882         PR target/82444
11883         * ira.c (ira_init_register_move_cost): Remove assert.
11885 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11887         PR rtl-optimization/84071
11888         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11889         * doc/tm.texi: Regenerate.
11891 2018-01-31  Richard Biener  <rguenther@suse.de>
11893         PR tree-optimization/84132
11894         * tree-data-ref.c (analyze_miv_subscript): Properly
11895         check whether evolution_function_is_affine_multivariate_p
11896         before calling gcd_of_steps_may_divide_p.
11898 2018-01-31  Julia Koval  <julia.koval@intel.com>
11900         PR target/83618
11901         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
11902         * config/i386/i386.md (rdpid_rex64) New.
11903         (rdpid): Make 32bit only.
11905 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
11907         PR lto/84105
11908         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
11909         an IDENTIFIER_NODE for FUNCTION_TYPE's.
11911 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11913         Revert
11914         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11916         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11918 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11920         PR rtl-optimization/84071
11921         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
11922         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
11924 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11926         * config/arc/arc.c (arc_handle_aux_attribute): New function.
11927         (arc_attribute_table): Add 'aux' attribute.
11928         (arc_in_small_data_p): Consider aux like variables.
11929         (arc_is_aux_reg_p): New function.
11930         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
11931         (arc_get_aux_arg): New function.
11932         (prepare_move_operands): Handle aux-register access.
11933         (arc_handle_aux_attribute): New function.
11934         * doc/extend.texi (ARC Variable attributes): Add subsection.
11936 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11938         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
11939         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
11940         (arc_attribute_table): Add 'uncached' attribute.
11941         (arc_print_operand): Print '.di' flag for uncached memory
11942         accesses.
11943         (arc_in_small_data_p): Do not consider for small data the uncached
11944         types.
11945         (arc_is_uncached_mem_p): New function.
11946         * config/arc/predicates.md (compact_store_memory_operand): Check
11947         for uncached memory accesses.
11948         (nonvol_nonimm_operand): Likewise.
11949         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
11951 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
11953         PR c/84100
11954         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
11955         falign-loops=): Add Optimization flag.
11957 2018-01-30  Jeff Law  <law@redhat.com>
11959         PR target/84064
11960         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
11961         INT_REGISTERS_SAVED.  Check it prior to calling
11962         get_scratch_register_on_entry.
11963         (ix86_adjust_stack_and_probe): Similarly.
11964         (ix86_emit_probe_stack_range): Similarly.
11965         (ix86_expand_prologue): Corresponding changes.
11967 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11969         PR target/40411
11970         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
11971         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
11973 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
11975         PR target/84112
11976         * lra-constraints.c (curr_insn_transform): Process AND in the
11977         address.
11979 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
11981         PR rtl-optimization/83986
11982         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
11983         dependence against last_pending_memory_flush in addition to
11984         pending_jump_insns.
11986 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
11988         PR tree-optimization/81611
11989         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
11990         copies.
11992 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11994         PR target/83758
11995         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
11996         a reg rtx.
11998 2018-01-30  Richard Biener  <rguenther@suse.de>
11999             Jakub Jelinek  <jakub@redhat.com>
12001         PR tree-optimization/84111
12002         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12003         inner loops added during recursion, as they don't have up-to-date
12004         SSA form.
12006 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12008         PR ipa/81360
12009         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12010         (can_inline_edge_by_limits_p): ... here.
12011         (can_early_inline_edge_p, check_callers,
12012         update_caller_keys, update_callee_keys, recursive_inlining,
12013         add_new_edges_to_heap, speculation_useful_p,
12014         inline_small_functions,
12015         inline_small_functions, flatten_function,
12016         inline_to_all_callers_1): Update.
12018 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12020         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12021         zeros correctly.
12023 2018-01-30  Richard Biener  <rguenther@suse.de>
12025         PR tree-optimization/83008
12026         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12027         invariant and constant vector uses in stmts when they need
12028         more than one stmt.
12030 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12032         PR bootstrap/84017
12033         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12034         * configure: Regenerate.
12036 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12038         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12039         pattern.
12040         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12041         Use gen_rtx_REG rather than gen_lowpart.
12043 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12045         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12046         rather than 0 when creating partial subregs.
12048 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12050         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12051         of usage.
12053 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12055         PR target/81550
12056         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12057         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12058         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12059         flags.  This restores the settings used before the 2017-07-24.
12060         Turning off pre increment/decrement/modify allows IVOPTS to
12061         optimize DF/SF loops where the index is an int.
12063 2018-01-29  Richard Biener  <rguenther@suse.de>
12064             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12066         PR bootstrap/80867
12067         * tree-vect-stmts.c (vectorizable_call): Don't call
12068         targetm.vectorize_builtin_md_vectorized_function if callee is
12069         NULL.
12071 2018-01-22  Carl Love  <cel@us.ibm.com>
12073         * doc/extend.tex: Fix typo in second arg in
12074         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12076 2018-01-29  Richard Biener  <rguenther@suse.de>
12078         PR tree-optimization/84086
12079         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12080         (flush_ssaname_freelist): When SSA names were released reset
12081         the SCEV hash table.
12083 2018-01-29  Richard Biener  <rguenther@suse.de>
12085         PR tree-optimization/84057
12086         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12087         removed paths when removing edges.
12089 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12091         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12092         -mfunction-return=@var{choice}.
12094 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12096         PR diagnostic/84034
12097         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12098         Handle CR like TAB.
12099         (layout::print_source_line): Likewise.
12100         (test_get_line_width_without_trailing_whitespace): Add test cases.
12102 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12104         PR middle-end/84040
12105         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12106         debug insns.
12108 2018-01-26  Jim Wilson  <jimw@sifive.com>
12110         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12112         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12113         specified.
12115 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12117         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12118         and CMP + SUB-immediate -> SUBS.
12120 2018-01-26  Martin Sebor  <msebor@redhat.com>
12122         PR tree-optimization/83896
12123         * tree-ssa-strlen.c (get_string_len): Rename...
12124         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12125         Avoid assuming length is constant.
12126         (handle_char_store): Use HOST_WIDE_INT for string length.
12128 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12130         PR target/81763
12131         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12132         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12134 2018-01-26  Richard Biener  <rguenther@suse.de>
12136         PR rtl-optimization/84003
12137         * dse.c (record_store): Only record redundant stores when
12138         the earlier store aliases at least all accesses the later one does.
12140 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12142         PR rtl-optimization/83985
12143         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12144         REG_CFA_RESTORE insns.
12145         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12146         REG_CFA_RESTORE insns here.
12148         PR c/83989
12149         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12150         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12152 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12154         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12155         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12156         (arc_init): Likewise.
12157         (arc_override_options): Likewise.
12158         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12159         value.
12160         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12161         support.
12162         * config/arc/arc.h (TARGET_DBNZ): Define.
12163         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12164         properly set the tune attribute.
12165         (dbnz): Use TARGET_DBNZ guard.
12166         * config/arc/arc.opt (mtune): Add core3 option.
12168 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12170         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12171         recognize new pic like addresses.
12172         (arc_delegitimize_address): Clean up.
12174 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12176         * config/arc/arc-arches.def: Option mrf16 valid for all
12177         architectures.
12178         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12179         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12180         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12181         * config/arc/arc-tables.opt: Regenerate.
12182         * config/arc/arc.c (arc_conditional_register_usage): Handle
12183         reduced register file case.
12184         (arc_file_start): Set must have build attributes.
12185         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12186         mrf16 option value.
12187         * config/arc/arc.opt (mrf16): Add new option.
12188         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12189         * config/arc/genmultilib.awk: Handle new mrf16 option.
12190         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12191         * config/arc/t-multilib: Regenerate.
12192         * doc/invoke.texi (ARC Options): Document mrf16 option.
12194 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12196         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12197         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12198         (arc_attribute_table): Add 'secure_call' attribute.
12199         (arc_print_operand): Print secure call operand.
12200         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12201         secure.
12202         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12203         (call_i): Add support for sjli instruction.
12204         (call_value_i): Likewise.
12205         * config/arc/constraints.md (Csc): New constraint.
12207 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12208             John Eric Martin  <John.Martin@emmicro-us.com>
12210         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12211         * config/arc/arc.c (_arc_jli_section): New struct.
12212         (arc_jli_section): New type.
12213         (rc_jli_sections): New static variable.
12214         (arc_handle_jli_attribute): New function.
12215         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12216         (arc_file_end): New function.
12217         (TARGET_ASM_FILE_END): Define.
12218         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12219         (arc_add_jli_section): New function.
12220         (jli_call_scan): Likewise.
12221         (arc_reorg): Call jli_call_scan.
12222         (arc_output_addsi): Remove 'S' from printing asm operand.
12223         (arc_is_jli_call_p): New function.
12224         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12225         operand.
12226         (movhi_insn): Likewise.
12227         (movsi_insn): Likewise.
12228         (movsi_set_cc_insn): Likewise.
12229         (loadqi_update): Likewise.
12230         (load_zeroextendqisi_update): Likewise.
12231         (load_signextendqisi_update): Likewise.
12232         (loadhi_update): Likewise.
12233         (load_zeroextendhisi_update): Likewise.
12234         (load_signextendhisi_update): Likewise.
12235         (loadsi_update): Likewise.
12236         (loadsf_update): Likewise.
12237         (movsicc_insn): Likewise.
12238         (bset_insn): Likewise.
12239         (bxor_insn): Likewise.
12240         (bclr_insn): Likewise.
12241         (bmsk_insn): Likewise.
12242         (bicsi3_insn): Likewise.
12243         (cmpsi_cc_c_insn): Likewise.
12244         (movsi_ne): Likewise.
12245         (movsi_cond_exec): Likewise.
12246         (clrsbsi2): Likewise.
12247         (norm_f): Likewise.
12248         (normw): Likewise.
12249         (swap): Likewise.
12250         (divaw): Likewise.
12251         (flag): Likewise.
12252         (sr): Likewise.
12253         (kflag): Likewise.
12254         (ffs): Likewise.
12255         (ffs_f): Likewise.
12256         (fls): Likewise.
12257         (call_i): Remove 'S' asm letter, add jli instruction.
12258         (call_value_i): Likewise.
12259         * config/arc/arc.op (mjli-always): New option.
12260         * config/arc/constraints.md (Cji): New constraint.
12261         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12262         operand.
12263         (subsf3_fpx): Likewise.
12264         (mulsf3_fpx): Likewise.
12265         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12266         asm operand.
12267         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12268         function attrbutes.
12269         * doc/invoke.texi (ARC): Document mjli-always option.
12271 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12273         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12274         avoid addition with 0 and use incw and decw where possible.
12276 2018-01-26  Richard Biener  <rguenther@suse.de>
12278         PR tree-optimization/81082
12279         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12280         association if it requires casting to unsigned.
12281         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12282         from fold_plusminus_mult_expr to catch important cases late when
12283         range info is available.
12285 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12287         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12288         * configure.ac (hidden_linkonce): New test.
12289         * configure: Regenerate.
12290         * config.in: Regenerate.
12292 2018-01-26  Julia Koval  <julia.koval@intel.com>
12294         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12295         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12296         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12297         _mm_mask_bitshuffle_epi64_mask): Fix type.
12298         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12299         USI_FTYPE_V4DI_V4DI_USI): Remove.
12300         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12301         __builtin_ia32_vpshufbitqmb256_mask,
12302         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12303         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12304         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12306 2018-01-26  Alan Modra  <amodra@gmail.com>
12308         PR target/84033
12309         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12310         UNSPEC_VBPERMQ.  Sort other unspecs.
12312 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12314         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12316 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12318         PR middle-end/83055
12319         * predict.c (drop_profile): Do not push/pop cfun; update also
12320         node->count.
12321         (handle_missing_profiles): Fix logic looking for zero profiles.
12323 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12325         PR middle-end/83977
12326         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12327         on functions with #pragma omp declare simd or functions with simd
12328         attribute.
12329         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12330         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12331         Remove trailing \n from warning_at calls.
12333 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12335         PR target/84028
12336         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12337         for neutered workers.
12339 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12341         PR target/68467
12342         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12343         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12345 2018-01-24  Jeff Law  <law@redhat.com>
12347         PR target/83994
12348         * i386.c (get_probe_interval): Move to earlier point.
12349         (ix86_compute_frame_layout): If -fstack-clash-protection and
12350         the frame is larger than the probe interval, then use pushes
12351         to save registers rather than reg->mem moves.
12352         (ix86_expand_prologue): Remove conditional for int_registers_saved
12353         assertion.
12355 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12357         PR target/84014
12358         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12359         min/max for never referenced object.
12361 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12363         PR middle-end/83977
12364         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12365         here.
12366         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12367         attributes from DECL_ATTRIBUTES (decl) without affecting
12368         DECL_ATTRIBUTES (current_function_decl).
12369         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12370         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12372 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12374         PR tree-optimization/83979
12375         * fold-const.c (fold_comparison): Use constant_boolean_node
12376         instead of boolean_{true,false}_node.
12378 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12380         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12381         with zero counts.
12383 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12385         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12386         Simplify the clause that sets the length attribute.
12387         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12388         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12389         clause that sets the length attribute.
12390         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12392 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12394         PR target/83589
12395         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12396         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12397         Add strict parameter.
12398         (prevent_branch_around_nothing): Insert dummy insn between branch to
12399         label and label with no ptx insn inbetween.
12400         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12402 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12404         PR target/81352
12405         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12406         for neutered threads in warp.
12407         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12409 2018-01-24  Richard Biener  <rguenther@suse.de>
12411         PR tree-optimization/83176
12412         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12413         operands.
12415 2018-01-24  Richard Biener  <rguenther@suse.de>
12417         PR tree-optimization/82819
12418         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12419         code generating pluses that are no-ops in the target precision.
12421 2018-01-24  Richard Biener  <rguenther@suse.de>
12423         PR middle-end/84000
12424         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12426 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12428         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12429         to merge probabilities.
12430         * predict.c (probably_never_executed): Also mark as cold functions
12431         with global 0 profile and guessed local profile.
12432         * profile-count.c (profile_probability::combine_with_count): New
12433         member function.
12434         * profile-count.h (profile_probability::operator*,
12435         profile_probability::operator*=, profile_probability::operator/,
12436         profile_probability::operator/=): Reduce precision to adjusted
12437         and set value to guessed on contradictory divisions.
12438         (profile_probability::combine_with_freq): Remove.
12439         (profile_probability::combine_wiht_count): Declare.
12440         (profile_count::force_nonzero):: Set to adjusted.
12441         (profile_count::probability_in):: Set quality to adjusted.
12442         * tree-ssa-tail-merge.c (replace_block_by): Use
12443         combine_with_count.
12445 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12446             Jim Wilson  <jimw@sifive.com>
12448         * config/riscv/riscv.c (riscv_stack_boundary): New.
12449         (riscv_option_override): Set riscv_stack_boundary.  Handle
12450         riscv_preferred_stack_boundary_arg.
12451         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12452         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12453         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12454         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12455         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12456         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12458 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12460         PR target/83905
12461         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12462         of struct ix86_frame.
12463         (ix86_expand_epilogue): Likewise.  Add a local variable for
12464         the reg_save_offset field in struct ix86_frame.
12466 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
12468         PR tree-optimization/82604
12469         * tree-loop-distribution.c (enum partition_kind): New enum item
12470         PKIND_PARTIAL_MEMSET.
12471         (partition_builtin_p): Support above new enum item.
12472         (generate_code_for_partition): Ditto.
12473         (compute_access_range): Differentiate cases that equality can be
12474         proven at all loops, the innermost loops or no loops.
12475         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12476         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
12477         (finalize_partitions, distribute_loop): Don't fuse partition of
12478         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12479         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12480         parloop is enabled.
12482 2018-01-23  Martin Liska  <mliska@suse.cz>
12484         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12485         order to ignore the predictor.
12486         (PRED_POLYMORPHIC_CALL): Likewise.
12487         (PRED_RECURSIVE_CALL): Likewise.
12489 2018-01-23  Martin Liska  <mliska@suse.cz>
12491         * tree-profile.c (tree_profiling): Print function header to
12492         aware reader which function we are working on.
12493         * value-prof.c (gimple_find_values_to_profile): Do not print
12494         not interesting value histograms.
12496 2018-01-23  Martin Liska  <mliska@suse.cz>
12498         * profile-count.h (enum profile_quality): Add
12499         profile_uninitialized as the first value. Do not number values
12500         as they are zero based.
12501         (profile_count::verify): Update sanity check.
12502         (profile_probability::verify): Likewise.
12504 2018-01-23  Nathan Sidwell  <nathan@acm.org>
12506         * doc/invoke.texi (ffor-scope): Deprecate.
12508 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12510         PR tree-optimization/83510
12511         * domwalk.c (set_all_edges_as_executable): New function.
12512         (dom_walker::dom_walker): Convert bool param
12513         "skip_unreachable_blocks" to enum reachability.  Move setup of
12514         edge flags to set_all_edges_as_executable and only do it when
12515         reachability is REACHABLE_BLOCKS.
12516         * domwalk.h (enum dom_walker::reachability): New enum.
12517         (dom_walker::dom_walker): Convert bool param
12518         "skip_unreachable_blocks" to enum reachability.
12519         (set_all_edges_as_executable): New decl.
12520         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
12521         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12522         "reachability".
12523         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12524         but converting true to REACHABLE_BLOCKS.
12525         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12526         * tree-vrp.c
12527         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12528         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12529         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12530         REACHABLE_BLOCKS.
12531         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12532         if check_all_array_refs will be called.
12534 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12536         * tree.c (selftest::test_location_wrappers): Add more test
12537         coverage.
12539 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12541         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12542         (selftest::test_bit_in_range): Likewise.
12544 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12546         PR testsuite/83888
12547         * doc/sourcebuild.texi (vect_float): Say that the selector
12548         only describes the situation when -funsafe-math-optimizations is on.
12549         (vect_float_strict): Document.
12551 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12553         PR tree-optimization/83965
12554         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12555         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12556         instead of checking only for a reduction.
12557         (vect_recog_widen_sum_pattern): Likewise.
12559 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12561         * predict.c (probably_never_executed): Only use precise profile info.
12562         (compute_function_frequency): Skip after inlining hack since we now
12563         have quality checking.
12565 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12567         * profile-count.h (profile_probability::very_unlikely,
12568         profile_probability::unlikely, profile_probability::even): Set
12569         precision to guessed.
12571 2018-01-23  Richard Biener  <rguenther@suse.de>
12573         PR tree-optimization/83963
12574         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12575         Properly terminate dominator walk when crossing the exit edge not
12576         when visiting its source block.
12578 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
12580         PR c++/83918
12581         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12582         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12584 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
12586         PR tree-optimization/83957
12587         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
12588         semicolon after for body surrounded by braces.
12590         PR tree-optimization/83081
12591         * profile-count.h (profile_probability::split): New method.
12592         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12593         Use profile_probability::split.
12594         (do_compare_rtx_and_jump): Fix adjustment of probabilities
12595         when splitting a single conditional jump into 2.
12597 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
12599         PR tree-optimization/69452
12600         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12601         decl.
12603 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12605         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12606         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12607         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12609 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12611         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12612         declaration.
12613         * config/rl78/rl78.md (movdi): New define_expand.
12614         * config/rl78/rl78.c (rl78_split_movdi): New function.
12616 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
12618         PR target/83862
12619         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12620         no longer used.
12621         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12622         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12623         128-bit to produce an UNSPEC move to get the double word with the
12624         signbit and then a shift directly to do signbit.
12625         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12626         implementation with a new version that just does either a direct
12627         move or a regular move.  Move memory interface to separate insns.
12628         Move insns so they are next to the expander.
12629         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12630         with signbit move.  Split big and little endian case.
12631         (signbit<mode>2_dm_mem_le): Likewise.
12632         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12633         (signbit<mode>2_dm2): Likewise.
12635 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12637         * config/rl78/rl78.md (anddi3): New define_expand.
12639 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12641         * config/rl78/rl78.md (umindi3): New define_expand.
12643 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12645         * config/rl78/rl78.md (smindi3): New define_expand.
12647 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12649         * config/rl78/rl78.md (smaxdi3): New define_expand.
12651 2018-01-22  Carl Love  <cel@us.ibm.com>
12653         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12654         LVX_V1TI): Add macro expansion.
12655         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12656         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12657         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12658         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12659         Change check to determine if the instruction is a byte reversing
12660         entry.  Fix typo in comment.
12661         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12662         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12663         Add def_builtin calls for new builtins.
12664         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12665         Add define_insn expansion.
12667 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12669         * config/rl78/rl78.md (umaxdi3): New define_expand.
12671 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12673         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12674         for non-QImode registers.
12676 2018-01-22  Richard Biener  <rguenther@suse.de>
12678         PR tree-optimization/83963
12679         * graphite-scop-detection.c (scop_detection::get_sese): Delay
12680         including the loop exit block.
12681         (scop_detection::merge_sese): Likewise.
12682         (scop_detection::add_scop): Do it here instead.
12684 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12686         * doc/sourcebuild.texi (arm_softfloat): Document.
12688 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
12690         PR gcc/77734
12691         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12692         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12693         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12695 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12696             David Edelsohn  <dje.gcc@gmail.com>
12698         PR target/83946
12699         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12700         Change "crset eq" to "crset 2".
12701         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12702         (*call_indirect_aix<mode>_nospec): Likewise.
12703         (*call_value_indirect_aix<mode>_nospec): Likewise.
12704         (*call_indirect_elfv2<mode>_nospec): Likewise.
12705         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12706         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12707         change assembly output from . to $.
12708         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12709         (indirect_jump<mode>_nospec): Change assembly output from . to $.
12710         (*tablejump<mode>_internal1_nospec): Likewise.
12712 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
12714         PR target/80870
12715         * config/sh/sh_optimize_sett_clrt.cc:
12716         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12718 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
12720         PR tree-optimization/83940
12721         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12722         offset_dt to vect_constant_def rather than vect_unknown_def_type.
12723         (vect_check_load_store_mask): Add a mask_dt_out parameter and
12724         use it to pass back the definition type.
12725         (vect_check_store_rhs): Likewise rhs_dt_out.
12726         (vect_build_gather_load_calls): Add a mask_dt argument and use
12727         it instead of a call to vect_is_simple_use.
12728         (vectorizable_store): Update calls to vect_check_load_store_mask
12729         and vect_check_store_rhs.  Use the dt returned by the latter instead
12730         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
12731         instead of calls to vect_is_simple_use.  Pass the scalar rather
12732         than the vector operand to vect_is_simple_use when handling
12733         second and subsequent copies of an rhs value.
12734         (vectorizable_load): Update calls to vect_check_load_store_mask
12735         and vect_build_gather_load_calls.  Use the cached mask_dt and
12736         gs_info.offset_dt instead of calls to vect_is_simple_use.
12738 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
12740         PR middle-end/83945
12741         * tree-emutls.c: Include gimplify.h.
12742         (lower_emutls_2): New function.
12743         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12744         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12745         it before further processing.
12747         PR target/83930
12748         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12749         UINTVAL (trueop1) instead of INTVAL (op1).
12751 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
12753         PR debug/81570
12754         PR debug/83728
12755         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12756         INCOMING_FRAME_SP_OFFSET if not defined.
12757         (scan_trace): Add ENTRY argument.  If true and
12758         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12759         emit a note to adjust the CFA offset.
12760         (create_cfi_notes): Adjust scan_trace callers.
12761         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12762         INCOMING_FRAME_SP_OFFSET in the CIE.
12763         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12764         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12765         Likewise.
12766         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12767         * doc/tm.texi: Regenerated.
12769 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12771         PR rtl-optimization/83147
12772         * lra-constraints.c (remove_inheritance_pseudos): Use
12773         lra_substitute_pseudo_within_insn.
12775 2018-01-19  Tom de Vries  <tom@codesourcery.com>
12776             Cesar Philippidis  <cesar@codesourcery.com>
12778         PR target/83920
12779         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12781 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
12783         PR target/83790
12784         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12785         spaces for function labels.
12787 2018-01-19  Martin Liska  <mliska@suse.cz>
12789         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12790         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12791         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12792         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12793         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12794         (PRED_CONST_RETURN): Change from 69 to 65.
12795         (PRED_NULL_RETURN): Change from 91 to 71.
12796         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12797         (PRED_LOOP_GUARD): Change from 66 to 73.
12799 2018-01-19  Martin Liska  <mliska@suse.cz>
12801         * predict.c (predict_insn_def): Add new assert.
12802         (struct branch_predictor): Change type to signed integer.
12803         (test_prediction_value_range): Amend test to cover
12804         PROB_UNINITIALIZED.
12805         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12806         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12807         (PRED_LOOP_ITERATIONS_MAX): Likewise.
12808         (PRED_LOOP_IV_COMPARE): Likewise.
12809         * predict.h (PROB_UNINITIALIZED): Define new constant.
12811 2018-01-19  Martin Liska  <mliska@suse.cz>
12813         * predict.c (dump_prediction): Add new format for
12814         analyze_brprob.py script which is enabled with -details
12815         suboption.
12816         * profile-count.h (precise_p): New function.
12818 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12820         PR tree-optimization/83922
12821         * tree-vect-loop.c (vect_verify_full_masking): Return false if
12822         there are no statements that need masking.
12823         (vect_active_double_reduction_p): New function.
12824         (vect_analyze_loop_operations): Use it when handling phis that
12825         are not in the loop header.
12827 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12829         PR tree-optimization/83914
12830         * tree-vect-loop.c (vectorizable_induction): Don't convert
12831         init_expr or apply the peeling adjustment for inductions
12832         that are nested within the vectorized loop.
12834 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12836         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12837         instead of NEG.
12839 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12841         PR sanitizer/81715
12842         PR testsuite/83882
12843         * function.h (gimplify_parameters): Add gimple_seq * argument.
12844         * function.c: Include gimple.h and options.h.
12845         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12846         for the added local temporaries if needed.
12847         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12848         if there are any parameter cleanups, wrap whole body into a
12849         try/finally with the cleanups.
12851 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
12853         PR target/82964
12854         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12855         Use GET_MODE_CLASS for scalar floating point.
12857 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12859         PR ipa/82256
12860         patch by PaX Team
12861         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12862         Fix call of call_cgraph_insertion_hooks.
12864 2018-01-18  Martin Sebor  <msebor@redhat.com>
12866         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12868 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12870         PR ipa/83619
12871         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12872         frequencies.
12874 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
12876         PR other/70268
12877         * common.opt: (-ffile-prefix-map): New option.
12878         * opts.c (common_handle_option): Defer it.
12879         * opts-global.c (handle_common_deferred_options): Handle it.
12880         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12881         * file-prefix-map.h: New file.
12882         (remap_debug_filename, add_debug_prefix_map): ...here.
12883         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12884         * final.c (debug_prefix_map, add_debug_prefix_map
12885         remap_debug_filename): Move to...
12886         * file-prefix-map.c: New file.
12887         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12888         generalize, get rid of alloca(), use strrchr() instead of strchr().
12889         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12890         Implement in terms of add_prefix_map().
12891         (remap_macro_filename, remap_debug_filename): Implement in term of
12892         remap_filename().
12893         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12894         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12895         * dbxout.c: Include file-prefix-map.h.
12896         * varasm.c: Likewise.
12897         * vmsdbgout.c: Likewise.
12898         * xcoffout.c: Likewise.
12899         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
12900         * doc/cppopts.texi (-fmacro-prefix-map): Document.
12901         * doc/invoke.texi (-ffile-prefix-map): Document.
12902         (-fdebug-prefix-map): Update description.
12904 2018-01-18  Martin Liska  <mliska@suse.cz>
12906         * config/i386/i386.c (indirect_thunk_name): Document that also
12907         lfence is emitted.
12908         (output_indirect_thunk): Document why both instructions
12909         (pause and lfence) are generated.
12911 2018-01-18  Richard Biener  <rguenther@suse.de>
12913         PR tree-optimization/83887
12914         * graphite-scop-detection.c
12915         (scop_detection::get_nearest_dom_with_single_entry): Remove.
12916         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
12917         (scop_detection::merge_sese): Re-implement with a flood-fill
12918         algorithm that properly finds a SESE region if it exists.
12920 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12922         PR c/61240
12923         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
12924         pointer_diff optimizations use view_convert instead of convert.
12926 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12928         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12929         Generate different code for -mno-speculate-indirect-jumps.
12930         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12931         (*call_indirect_aix<mode>): Disable for
12932         -mno-speculate-indirect-jumps.
12933         (*call_indirect_aix<mode>_nospec): New define_insn.
12934         (*call_value_indirect_aix<mode>): Disable for
12935         -mno-speculate-indirect-jumps.
12936         (*call_value_indirect_aix<mode>_nospec): New define_insn.
12937         (*sibcall_nonlocal_sysv<mode>): Generate different code for
12938         -mno-speculate-indirect-jumps.
12939         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12941 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12943         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
12944         long double type, set the flags for noting the default long double
12945         type, even if we don't pass or return a long double type.
12947 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
12949         PR ipa/83051
12950         * ipa-inline.c (flatten_function): Do not overwrite final inlining
12951         failure.
12953 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
12955         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
12956         support for merge[hl].
12957         (fold_mergehl_helper): New helper function.
12958         (tree-vector-builder.h): New #include for tree_vector_builder usage.
12959         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
12960         (altivec_vmrglw_direct): Add xxmrglw insn.
12962 2018-01-17  Andrew Waterman  <andrew@sifive.com>
12964         * config/riscv/riscv.c (riscv_conditional_register_usage): If
12965         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
12967 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
12969         PR lto/83121
12970         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
12971         call the lto_location_cache before reading the
12972         DECL_SOURCE_LOCATION of the types.
12974 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
12975             Richard Sandiford  <richard.sandiford@linaro.org>
12977         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
12978         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
12979         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
12980         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
12981         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
12982         Add declaration.
12983         * config/aarch64/constraints.md (aarch64_movti_operand):
12984         Limit immediates.
12985         * config/aarch64/predicates.md (Uti): Add new constraint.
12987 2018-01-17 Carl Love  <cel@us.ibm.com>
12989         * config/rs6000/vsx.md (define_expand xl_len_r,
12990         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
12991         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
12992         lxvll.
12993         (define_expand, define_insn): Move the shift left from  the
12994         define_insn to the define_expand for lxvl and stxvl instructions.
12995         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
12996         and XL_LEN_R definitions to PURE.
12998 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13000         * config/i386/i386.c (indirect_thunk_name): Declare regno
13001         as unsigned int.  Compare regno with INVALID_REGNUM.
13002         (output_indirect_thunk): Ditto.
13003         (output_indirect_thunk_function): Ditto.
13004         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13005         in the call to output_indirect_thunk_function.
13007 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13009         PR middle-end/83884
13010         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13011         rather than the size of inner_type to determine the stack slot size
13012         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13014 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13016         PR target/83546
13017         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13018         to PTA_SILVERMONT.
13020 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13022         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13023         endian Linux systems to optionally enable multilibs for selecting
13024         the long double type if the user configured an explicit type.
13025         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13026         have no long double multilibs if not defined.
13027         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13028         warn if the user used -mabi={ieee,ibm}longdouble and we built
13029         multilibs for long double.
13030         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13031         appropriate multilib option.
13032         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13033         multilib options.
13034         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13035         for building long double multilibs.
13036         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13038 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13040         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13041         copies.
13043         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13044         64 bits.
13045         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13046         128 bits.
13048         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13049         variables.
13051         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13052         return value.
13054 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13056         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13057         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13059 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13061         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13062         different rtl trees depending on TARGET_64BIT.
13063         (rs6000_gen_lvx): Likewise.
13065 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13067         * config/visium/visium.md (nop): Tweak comment.
13068         (hazard_nop): Likewise.
13070 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13072         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13073         -mspeculate-indirect-jumps.
13074         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13075         for -mno-speculate-indirect-jumps.
13076         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13077         (*call_value_indirect_elfv2<mode>): Disable for
13078         -mno-speculate-indirect-jumps.
13079         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13080         (indirect_jump): Emit different RTL for
13081         -mno-speculate-indirect-jumps.
13082         (*indirect_jump<mode>): Disable for
13083         -mno-speculate-indirect-jumps.
13084         (*indirect_jump<mode>_nospec): New define_insn.
13085         (tablejump): Emit different RTL for
13086         -mno-speculate-indirect-jumps.
13087         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13088         (tablejumpsi_nospec): New define_expand.
13089         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13090         (tablejumpdi_nospec): New define_expand.
13091         (*tablejump<mode>_internal1): Disable for
13092         -mno-speculate-indirect-jumps.
13093         (*tablejump<mode>_internal1_nospec): New define_insn.
13094         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13095         option.
13097 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13099         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13100         callers updated.
13102 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13103             Richard Biener  <rguenth@suse.de>
13105         PR libgomp/83590
13106         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13107         return early, inline manually is_gimple_sizepos.  Make sure if we
13108         call gimplify_expr we don't end up with a gimple constant.
13109         * tree.c (variably_modified_type_p): Don't return true for
13110         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13111         * gimplify.h (is_gimple_sizepos): Remove.
13113 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13115         PR tree-optimization/83857
13116         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13117         vectorizable_live_operation for pure SLP statements.
13118         (vectorizable_live_operation): Handle PHIs.
13120 2018-01-16  Richard Biener  <rguenther@suse.de>
13122         PR tree-optimization/83867
13123         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13124         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13126 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13128         PR c/83844
13129         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13130         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13131         If off is not INTEGER_CST, issue a may not be aligned warning
13132         rather than isn't aligned.  Use isn%'t rather than isn't.
13133         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13134         into MULT_EXPR.
13135         <case MULT_EXPR>: Improve the case when bottom and one of the
13136         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13137         operand, in that case check if the other operand is multiple of
13138         bottom divided by the INTEGER_CST operand.
13140 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13142         PR target/83858
13143         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13144         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13145         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13146         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13147         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13148         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13149         (pa_function_arg_size): New function.
13151 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13153         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13154         in a separate statement.
13156 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13158         PR tree-optimization/83847
13159         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13160         group gathers and scatters.
13162 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13164         PR rtl-optimization/86620
13165         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13167         PR rtl-optimization/83213
13168         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13169         to last if both are JUMP_INSNs.
13171         PR tree-optimization/83843
13172         * gimple-ssa-store-merging.c
13173         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13174         store_immediate_info for bswap/nop orig_stores.
13176 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13178         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13179         !TARGET_MUL.
13180         <UDIV>: Increase cost if !TARGET_DIV.
13182 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13184         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13185         (define_attr "cr_logical_3op"): New.
13186         (cceq_ior_compare): Adjust.
13187         (cceq_ior_compare_complement): Adjust.
13188         (*cceq_rev_compare): Adjust.
13189         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13190         (is_cracked_insn): Adjust.
13191         (insn_must_be_first_in_group): Adjust.
13192         * config/rs6000/40x.md: Adjust.
13193         * config/rs6000/440.md: Adjust.
13194         * config/rs6000/476.md: Adjust.
13195         * config/rs6000/601.md: Adjust.
13196         * config/rs6000/603.md: Adjust.
13197         * config/rs6000/6xx.md: Adjust.
13198         * config/rs6000/7450.md: Adjust.
13199         * config/rs6000/7xx.md: Adjust.
13200         * config/rs6000/8540.md: Adjust.
13201         * config/rs6000/cell.md: Adjust.
13202         * config/rs6000/e300c2c3.md: Adjust.
13203         * config/rs6000/e500mc.md: Adjust.
13204         * config/rs6000/e500mc64.md: Adjust.
13205         * config/rs6000/e5500.md: Adjust.
13206         * config/rs6000/e6500.md: Adjust.
13207         * config/rs6000/mpc.md: Adjust.
13208         * config/rs6000/power4.md: Adjust.
13209         * config/rs6000/power5.md: Adjust.
13210         * config/rs6000/power6.md: Adjust.
13211         * config/rs6000/power7.md: Adjust.
13212         * config/rs6000/power8.md: Adjust.
13213         * config/rs6000/power9.md: Adjust.
13214         * config/rs6000/rs64.md: Adjust.
13215         * config/rs6000/titan.md: Adjust.
13217 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13219         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13220         ix86_indirect_branch_register logic.
13222 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13224         * config/i386/constraints.md (Bs): Update
13225         ix86_indirect_branch_register check.  Don't check
13226         ix86_indirect_branch_register with GOT_memory_operand.
13227         (Bw): Likewise.
13228         * config/i386/predicates.md (GOT_memory_operand): Don't check
13229         ix86_indirect_branch_register here.
13230         (GOT32_symbol_operand): Likewise.
13232 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13234         * config/i386/predicates.md (constant_call_address_operand):
13235         Rewrite ix86_indirect_branch_register logic.
13236         (sibcall_insn_operand): Likewise.
13238 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13240         * config/i386/constraints.md (Bs): Replace
13241         ix86_indirect_branch_thunk_register with
13242         ix86_indirect_branch_register.
13243         (Bw): Likewise.
13244         * config/i386/i386.md (indirect_jump): Likewise.
13245         (tablejump): Likewise.
13246         (*sibcall_memory): Likewise.
13247         (*sibcall_value_memory): Likewise.
13248         Peepholes of indirect call and jump via memory: Likewise.
13249         * config/i386/i386.opt: Likewise.
13250         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13251         (GOT_memory_operand): Likewise.
13252         (call_insn_operand): Likewise.
13253         (sibcall_insn_operand): Likewise.
13254         (GOT32_symbol_operand): Likewise.
13256 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13258         PR middle-end/83837
13259         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13260         type rather than type addr's type points to.
13261         (expand_omp_atomic_mutex): Likewise.
13262         (expand_omp_atomic): Likewise.
13264 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13266         PR target/83839
13267         * config/i386/i386.c (output_indirect_thunk_function): Use
13268         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13269         for  __x86_return_thunk.
13271 2018-01-15  Richard Biener  <rguenther@suse.de>
13273         PR middle-end/83850
13274         * expmed.c (extract_bit_field_1): Fix typo.
13276 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13278         PR target/83687
13279         * config/arm/iterators.md (VF): New mode iterator.
13280         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13281         Remove integer-related logic from pattern.
13282         (neon_vabd<mode>_3): Likewise.
13284 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13286         PR middle-end/82694
13287         * common.opt (fstrict-overflow): No longer an alias.
13288         (fwrapv-pointer): New option.
13289         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13290         also for pointer types based on flag_wrapv_pointer.
13291         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13292         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13293         opts->x_flag_wrapv got set.
13294         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13295         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13296         POINTER_TYPE_OVERFLOW_UNDEFINED.
13297         * match.pd: Likewise in address comparison pattern.
13298         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13300 2018-01-15  Richard Biener  <rguenther@suse.de>
13302         PR lto/83804
13303         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13304         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13305         Reset type names to their identifier if their TYPE_DECL doesn't
13306         have linkage (and thus is used for ODR and devirt).
13307         (save_debug_info_for_decl): Remove.
13308         (save_debug_info_for_type): Likewise.
13309         (add_tree_to_fld_list): Adjust.
13310         * tree-pretty-print.c (dump_generic_node): Make dumping of
13311         type names more robust.
13313 2018-01-15  Richard Biener  <rguenther@suse.de>
13315         * BASE-VER: Bump to 8.0.1.
13317 2018-01-14  Martin Sebor  <msebor@redhat.com>
13319         PR other/83508
13320         * builtins.c (check_access): Avoid warning when the no-warning bit
13321         is set.
13323 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13325         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13326         * ira-color (allocno_hard_regs_compare): Likewise.
13328 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13330         PR target/83013
13331         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13332         Use .pushsection/.popsection.
13334 2018-01-14  Martin Sebor  <msebor@redhat.com>
13336         PR c++/81327
13337         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13339 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13341         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13342         entry from extra_headers.
13343         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13344         extra_headers, make the list bitwise identical to the i?86-*-* one.
13346 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13348         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13349         -mcmodel=large with -mindirect-branch=thunk,
13350         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13351         -mfunction-return=thunk-extern.
13352         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13353         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13354         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13356 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13358         * config/i386/i386.c (print_reg): Print the name of the full
13359         integer register without '%'.
13360         (ix86_print_operand): Handle 'V'.
13361         * doc/extend.texi: Document 'V' modifier.
13363 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13365         * config/i386/constraints.md (Bs): Disallow memory operand for
13366         -mindirect-branch-register.
13367         (Bw): Likewise.
13368         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13369         (GOT_memory_operand): Likewise.
13370         (call_insn_operand): Likewise.
13371         (sibcall_insn_operand): Likewise.
13372         (GOT32_symbol_operand): Likewise.
13373         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13374         for -mindirect-branch-register.
13375         (tablejump): Likewise.
13376         (*sibcall_memory): Likewise.
13377         (*sibcall_value_memory): Likewise.
13378         Disallow peepholes of indirect call and jump via memory for
13379         -mindirect-branch-register.
13380         (*call_pop): Replace m with Bw.
13381         (*call_value_pop): Likewise.
13382         (*sibcall_pop_memory): Replace m with Bs.
13383         * config/i386/i386.opt (mindirect-branch-register): New option.
13384         * doc/invoke.texi: Document -mindirect-branch-register option.
13386 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13388         * config/i386/i386-protos.h (ix86_output_function_return): New.
13389         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13390         set function_return_type.
13391         (indirect_thunk_name): Add ret_p to indicate thunk for function
13392         return.
13393         (output_indirect_thunk_function): Pass false to
13394         indirect_thunk_name.
13395         (ix86_output_indirect_branch_via_reg): Likewise.
13396         (ix86_output_indirect_branch_via_push): Likewise.
13397         (output_indirect_thunk_function): Create alias for function
13398         return thunk if regno < 0.
13399         (ix86_output_function_return): New function.
13400         (ix86_handle_fndecl_attribute): Handle function_return.
13401         (ix86_attribute_table): Add function_return.
13402         * config/i386/i386.h (machine_function): Add
13403         function_return_type.
13404         * config/i386/i386.md (simple_return_internal): Use
13405         ix86_output_function_return.
13406         (simple_return_internal_long): Likewise.
13407         * config/i386/i386.opt (mfunction-return=): New option.
13408         (indirect_branch): Mention -mfunction-return=.
13409         * doc/extend.texi: Document function_return function attribute.
13410         * doc/invoke.texi: Document -mfunction-return= option.
13412 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13414         * config/i386/i386-opts.h (indirect_branch): New.
13415         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13416         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13417         with local indirect jump when converting indirect call and jump.
13418         (ix86_set_indirect_branch_type): New.
13419         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13420         (indirectlabelno): New.
13421         (indirect_thunk_needed): Likewise.
13422         (indirect_thunk_bnd_needed): Likewise.
13423         (indirect_thunks_used): Likewise.
13424         (indirect_thunks_bnd_used): Likewise.
13425         (INDIRECT_LABEL): Likewise.
13426         (indirect_thunk_name): Likewise.
13427         (output_indirect_thunk): Likewise.
13428         (output_indirect_thunk_function): Likewise.
13429         (ix86_output_indirect_branch_via_reg): Likewise.
13430         (ix86_output_indirect_branch_via_push): Likewise.
13431         (ix86_output_indirect_branch): Likewise.
13432         (ix86_output_indirect_jmp): Likewise.
13433         (ix86_code_end): Call output_indirect_thunk_function if needed.
13434         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13435         needed.
13436         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13437         (ix86_attribute_table): Add indirect_branch.
13438         * config/i386/i386.h (machine_function): Add indirect_branch_type
13439         and has_local_indirect_jump.
13440         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13441         to true.
13442         (tablejump): Likewise.
13443         (*indirect_jump): Use ix86_output_indirect_jmp.
13444         (*tablejump_1): Likewise.
13445         (simple_return_indirect_internal): Likewise.
13446         * config/i386/i386.opt (mindirect-branch=): New option.
13447         (indirect_branch): New.
13448         (keep): Likewise.
13449         (thunk): Likewise.
13450         (thunk-inline): Likewise.
13451         (thunk-extern): Likewise.
13452         * doc/extend.texi: Document indirect_branch function attribute.
13453         * doc/invoke.texi: Document -mindirect-branch= option.
13455 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13457         PR ipa/83051
13458         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13460 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13462         * ipa-inline.c (want_inline_small_function_p): Return false if
13463         inlining has already failed with CIF_FINAL_ERROR.
13464         (update_caller_keys): Call want_inline_small_function_p before
13465         can_inline_edge_p.
13466         (update_callee_keys): Likewise.
13468 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13470         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13471         New function.
13472         (rs6000_quadword_masked_address_p): Likewise.
13473         (quad_aligned_load_p): Likewise.
13474         (quad_aligned_store_p): Likewise.
13475         (const_load_sequence_p): Add comment to describe the outer-most loop.
13476         (mimic_memory_attributes_and_flags): New function.
13477         (rs6000_gen_stvx): Likewise.
13478         (replace_swapped_aligned_store): Likewise.
13479         (rs6000_gen_lvx): Likewise.
13480         (replace_swapped_aligned_load): Likewise.
13481         (replace_swapped_load_constant): Capitalize argument name in
13482         comment describing this function.
13483         (rs6000_analyze_swaps): Add a third pass to search for vector loads
13484         and stores that access quad-word aligned addresses and replace
13485         with stvx or lvx instructions when appropriate.
13486         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13487         New function prototype.
13488         (rs6000_quadword_masked_address_p): Likewise.
13489         (rs6000_gen_lvx): Likewise.
13490         (rs6000_gen_stvx): Likewise.
13491         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13492         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13493         when memory address is aligned.
13494         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13495         this split to select lvx instruction when memory address is aligned.
13496         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13497         instruction when memory address is aligned.
13498         (*vsx_le_perm_load_v16qi): Likewise.
13499         (four unnamed splitters): Modify to select the stvx instruction
13500         when memory is aligned.
13502 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
13504         * predict.c (determine_unlikely_bbs): Handle correctly BBs
13505         which appears in the queue multiple times.
13507 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13508             Alan Hayward  <alan.hayward@arm.com>
13509             David Sherwood  <david.sherwood@arm.com>
13511         * tree-vectorizer.h (vec_lower_bound): New structure.
13512         (_loop_vec_info): Add check_nonzero and lower_bounds.
13513         (LOOP_VINFO_CHECK_NONZERO): New macro.
13514         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13515         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13516         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13517         fields.  Make seg_len the distance travelled, not including the
13518         access size.
13519         (dr_direction_indicator): Declare.
13520         (dr_zero_step_indicator): Likewise.
13521         (dr_known_forward_stride_p): Likewise.
13522         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13523         tree-ssanames.h.
13524         (runtime_alias_check_p): Allow runtime alias checks with
13525         variable strides.
13526         (operator ==): Compare access_size and align.
13527         (prune_runtime_alias_test_list): Rework for new distinction between
13528         the access_size and seg_len.
13529         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
13530         segment lengths.
13531         (get_segment_min_max): New function.
13532         (create_intersect_range_checks): Use it.
13533         (dr_step_indicator): New function.
13534         (dr_direction_indicator): Likewise.
13535         (dr_zero_step_indicator): Likewise.
13536         (dr_known_forward_stride_p): Likewise.
13537         * tree-loop-distribution.c (data_ref_segment_size): Return
13538         DR_STEP * (niters - 1).
13539         (compute_alias_check_pairs): Update call to the dr_with_seg_len
13540         constructor.
13541         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13542         (vect_preserves_scalar_order_p): New function, split out from...
13543         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
13544         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13545         (vect_vfa_access_size): New function.
13546         (vect_vfa_align): Likewise.
13547         (vect_compile_time_alias): Take access_size_a and access_b arguments.
13548         (dump_lower_bound): New function.
13549         (vect_check_lower_bound): Likewise.
13550         (vect_small_gap_p): Likewise.
13551         (vectorizable_with_step_bound_p): Likewise.
13552         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13553         depencies if the vectorization factor is 1.  Convert the checks
13554         for nonzero steps into checks on the bounds of DR_STEP.  Try using
13555         a bunds check for variable steps if the minimum required step is
13556         relatively small. Update calls to the dr_with_seg_len
13557         constructor and to vect_compile_time_alias.
13558         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13559         function.
13560         (vect_loop_versioning): Call it.
13561         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13562         when retrying.
13563         (vect_estimate_min_profitable_iters): Account for any bounds checks.
13565 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13566             Alan Hayward  <alan.hayward@arm.com>
13567             David Sherwood  <david.sherwood@arm.com>
13569         * doc/sourcebuild.texi (vect_scatter_store): Document.
13570         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13571         optabs.
13572         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13573         Document.
13574         * genopinit.c (main): Add supports_vec_scatter_store and
13575         supports_vec_scatter_store_cached to target_optabs.
13576         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13577         IFN_MASK_SCATTER_STORE.
13578         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13579         functions.
13580         * internal-fn.h (internal_store_fn_p): Declare.
13581         (internal_fn_stored_value_index): Likewise.
13582         * internal-fn.c (scatter_store_direct): New macro.
13583         (expand_scatter_store_optab_fn): New function.
13584         (direct_scatter_store_optab_supported_p): New macro.
13585         (internal_store_fn_p): New function.
13586         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13587         IFN_MASK_SCATTER_STORE.
13588         (internal_fn_mask_index): Likewise.
13589         (internal_fn_stored_value_index): New function.
13590         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13591         for scatter stores.
13592         * optabs-query.h (supports_vec_scatter_store_p): Declare.
13593         * optabs-query.c (supports_vec_scatter_store_p): New function.
13594         * tree-vectorizer.h (vect_get_store_rhs): Declare.
13595         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13596         true for scatter stores.
13597         (vect_gather_scatter_fn_p): Handle scatter stores too.
13598         (vect_check_gather_scatter): Consider using scatter stores if
13599         supports_vec_scatter_store_p.
13600         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13601         scatter stores too.
13602         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13603         internal_fn_stored_value_index.
13604         (check_load_store_masking): Handle scatter stores too.
13605         (vect_get_store_rhs): Make public.
13606         (vectorizable_call): Use internal_store_fn_p.
13607         (vectorizable_store): Handle scatter store internal functions.
13608         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13609         when deciding whether the end of the group has been reached.
13610         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13611         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13612         (mask_scatter_store<mode>): New insns.
13614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13615             Alan Hayward  <alan.hayward@arm.com>
13616             David Sherwood  <david.sherwood@arm.com>
13618         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13619         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13620         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13621         function.
13622         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13623         Use vect_truncate_gather_scatter_offset if we can't treat the
13624         operation as a normal gather load or scatter store.
13625         (get_group_load_store_type): Take the gather_scatter_info
13626         as argument.  Try using a gather load or scatter store for
13627         single-element groups.
13628         (get_load_store_type): Update calls to get_group_load_store_type
13629         and vect_use_strided_gather_scatters_p.
13631 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13632             Alan Hayward  <alan.hayward@arm.com>
13633             David Sherwood  <david.sherwood@arm.com>
13635         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13636         optional tree argument.
13637         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13638         null target hooks.
13639         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13640         but continue to use the current value as a fallback.
13641         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13642         to compare the updates.
13643         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13644         (get_load_store_type): Use it when handling a strided access.
13645         (vect_get_strided_load_store_ops): New function.
13646         (vect_get_data_ptr_increment): Likewise.
13647         (vectorizable_load): Handle strided gather loads.  Always pass
13648         a step to vect_create_data_ref_ptr and bump_vector_ptr.
13650 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13651             Alan Hayward  <alan.hayward@arm.com>
13652             David Sherwood  <david.sherwood@arm.com>
13654         * doc/md.texi (gather_load@var{m}): Document.
13655         (mask_gather_load@var{m}): Likewise.
13656         * genopinit.c (main): Add supports_vec_gather_load and
13657         supports_vec_gather_load_cached to target_optabs.
13658         * optabs-tree.c (init_tree_optimization_optabs): Use
13659         ggc_cleared_alloc to allocate target_optabs.
13660         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13661         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13662         functions.
13663         * internal-fn.h (internal_load_fn_p): Declare.
13664         (internal_gather_scatter_fn_p): Likewise.
13665         (internal_fn_mask_index): Likewise.
13666         (internal_gather_scatter_fn_supported_p): Likewise.
13667         * internal-fn.c (gather_load_direct): New macro.
13668         (expand_gather_load_optab_fn): New function.
13669         (direct_gather_load_optab_supported_p): New macro.
13670         (direct_internal_fn_optab): New function.
13671         (internal_load_fn_p): Likewise.
13672         (internal_gather_scatter_fn_p): Likewise.
13673         (internal_fn_mask_index): Likewise.
13674         (internal_gather_scatter_fn_supported_p): Likewise.
13675         * optabs-query.c (supports_at_least_one_mode_p): New function.
13676         (supports_vec_gather_load_p): Likewise.
13677         * optabs-query.h (supports_vec_gather_load_p): Declare.
13678         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13679         and memory_type field.
13680         (NUM_PATTERNS): Bump to 15.
13681         * tree-vect-data-refs.c: Include internal-fn.h.
13682         (vect_gather_scatter_fn_p): New function.
13683         (vect_describe_gather_scatter_call): Likewise.
13684         (vect_check_gather_scatter): Try using internal functions for
13685         gather loads.  Recognize existing calls to a gather load function.
13686         (vect_analyze_data_refs): Consider using gather loads if
13687         supports_vec_gather_load_p.
13688         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13689         (vect_get_gather_scatter_offset_type): Likewise.
13690         (vect_convert_mask_for_vectype): Likewise.
13691         (vect_add_conversion_to_patterm): Likewise.
13692         (vect_try_gather_scatter_pattern): Likewise.
13693         (vect_recog_gather_scatter_pattern): New pattern recognizer.
13694         (vect_vect_recog_func_ptrs): Add it.
13695         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13696         internal_fn_mask_index and internal_gather_scatter_fn_p.
13697         (check_load_store_masking): Take the gather_scatter_info as an
13698         argument and handle gather loads.
13699         (vect_get_gather_scatter_ops): New function.
13700         (vectorizable_call): Check internal_load_fn_p.
13701         (vectorizable_load): Likewise.  Handle gather load internal
13702         functions.
13703         (vectorizable_store): Update call to check_load_store_masking.
13704         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13705         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13706         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13707         (aarch64_gather_scale_operand_d): New predicates.
13708         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13709         (mask_gather_load<mode>): New insns.
13711 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13712             Alan Hayward  <alan.hayward@arm.com>
13713             David Sherwood  <david.sherwood@arm.com>
13715         * optabs.def (fold_left_plus_optab): New optab.
13716         * doc/md.texi (fold_left_plus_@var{m}): Document.
13717         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13718         * internal-fn.c (fold_left_direct): Define.
13719         (expand_fold_left_optab_fn): Likewise.
13720         (direct_fold_left_optab_supported_p): Likewise.
13721         * fold-const-call.c (fold_const_fold_left): New function.
13722         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13723         * tree-parloops.c (valid_reduction_p): New function.
13724         (gather_scalar_reductions): Use it.
13725         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13726         (vect_finish_replace_stmt): Declare.
13727         * tree-vect-loop.c (fold_left_reduction_fn): New function.
13728         (needs_fold_left_reduction_p): New function, split out from...
13729         (vect_is_simple_reduction): ...here.  Accept reductions that
13730         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13731         (vect_force_simple_reduction): Also store the reduction type in
13732         the assignment's STMT_VINFO_REDUC_TYPE.
13733         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13734         (merge_with_identity): New function.
13735         (vect_expand_fold_left): Likewise.
13736         (vectorize_fold_left_reduction): Likewise.
13737         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
13738         scalar phi in place for it.  Check for target support and reject
13739         cases that would reassociate the operation.  Defer the transform
13740         phase to vectorize_fold_left_reduction.
13741         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13742         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13743         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13745 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13747         * tree-if-conv.c (predicate_mem_writes): Remove redundant
13748         call to ifc_temp_var.
13750 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13751             Alan Hayward  <alan.hayward@arm.com>
13752             David Sherwood  <david.sherwood@arm.com>
13754         * target.def (legitimize_address_displacement): Take the original
13755         offset as a poly_int.
13756         * targhooks.h (default_legitimize_address_displacement): Update
13757         accordingly.
13758         * targhooks.c (default_legitimize_address_displacement): Likewise.
13759         * doc/tm.texi: Regenerate.
13760         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13761         as an argument, moving assert of ad->disp == ad->disp_term to...
13762         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
13763         Try calling targetm.legitimize_address_displacement before expanding
13764         the address rather than afterwards, and adjust for the new interface.
13765         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13766         Match the new hook interface.  Handle SVE addresses.
13767         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13768         new hook interface.
13770 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13772         * Makefile.in (OBJS): Add early-remat.o.
13773         * target.def (select_early_remat_modes): New hook.
13774         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13775         * doc/tm.texi: Regenerate.
13776         * targhooks.h (default_select_early_remat_modes): Declare.
13777         * targhooks.c (default_select_early_remat_modes): New function.
13778         * timevar.def (TV_EARLY_REMAT): New timevar.
13779         * passes.def (pass_early_remat): New pass.
13780         * tree-pass.h (make_pass_early_remat): Declare.
13781         * early-remat.c: New file.
13782         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13783         function.
13784         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13786 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13787             Alan Hayward  <alan.hayward@arm.com>
13788             David Sherwood  <david.sherwood@arm.com>
13790         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13791         vfm1 with a bound_epilog parameter.
13792         (vect_do_peeling): Update calls accordingly, and move the prologue
13793         call earlier in the function.  Treat the base bound_epilog as 0 for
13794         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
13795         this base when peeling for gaps.
13796         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13797         with fully-masked loops.
13798         (vect_estimate_min_profitable_iters): Handle the single peeled
13799         iteration in that case.
13801 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13802             Alan Hayward  <alan.hayward@arm.com>
13803             David Sherwood  <david.sherwood@arm.com>
13805         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13806         single-element interleaving even if the size is not a power of 2.
13807         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13808         accesses for single-element interleaving if the group size is
13809         not a power of 2.
13811 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13812             Alan Hayward  <alan.hayward@arm.com>
13813             David Sherwood  <david.sherwood@arm.com>
13815         * doc/md.texi (fold_extract_last_@var{m}): Document.
13816         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13817         * optabs.def (fold_extract_last_optab): New optab.
13818         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13819         * internal-fn.c (fold_extract_direct): New macro.
13820         (expand_fold_extract_optab_fn): Likewise.
13821         (direct_fold_extract_optab_supported_p): Likewise.
13822         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13823         * tree-vect-loop.c (vect_model_reduction_cost): Handle
13824         EXTRACT_LAST_REDUCTION.
13825         (get_initial_def_for_reduction): Do not create an initial vector
13826         for EXTRACT_LAST_REDUCTION reductions.
13827         (vectorizable_reduction): Leave the scalar phi in place for
13828         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
13829         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
13830         epilogue code for EXTRACT_LAST_REDUCTION and defer the
13831         transform phase to vectorizable_condition.
13832         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13833         split out from...
13834         (vect_finish_stmt_generation): ...here.
13835         (vect_finish_replace_stmt): New function.
13836         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13837         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13838         pattern.
13839         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13841 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13842             Alan Hayward  <alan.hayward@arm.com>
13843             David Sherwood  <david.sherwood@arm.com>
13845         * doc/md.texi (extract_last_@var{m}): Document.
13846         * optabs.def (extract_last_optab): New optab.
13847         * internal-fn.def (EXTRACT_LAST): New internal function.
13848         * internal-fn.c (cond_unary_direct): New macro.
13849         (expand_cond_unary_optab_fn): Likewise.
13850         (direct_cond_unary_optab_supported_p): Likewise.
13851         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13852         loops using EXTRACT_LAST.
13853         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13854         (extract_last_<mode>): ...this optab.
13855         (vec_extract<mode><Vel>): Update accordingly.
13857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13858             Alan Hayward  <alan.hayward@arm.com>
13859             David Sherwood  <david.sherwood@arm.com>
13861         * target.def (empty_mask_is_expensive): New hook.
13862         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13863         * doc/tm.texi: Regenerate.
13864         * targhooks.h (default_empty_mask_is_expensive): Declare.
13865         * targhooks.c (default_empty_mask_is_expensive): New function.
13866         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13867         if the target says that empty masks are expensive.
13868         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13869         New function.
13870         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13872 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13873             Alan Hayward  <alan.hayward@arm.com>
13874             David Sherwood  <david.sherwood@arm.com>
13876         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13877         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13878         (vect_use_loop_mask_for_alignment_p): New function.
13879         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13880         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13881         niters_skip argument.  Make sure that the first niters_skip elements
13882         of the first iteration are inactive.
13883         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13884         Update call to vect_set_loop_masks_directly.
13885         (get_misalign_in_elems): New function, split out from...
13886         (vect_gen_prolog_loop_niters): ...here.
13887         (vect_update_init_of_dr): Take a code argument that specifies whether
13888         the adjustment should be added or subtracted.
13889         (vect_update_init_of_drs): Likewise.
13890         (vect_prepare_for_masked_peels): New function.
13891         (vect_do_peeling): Skip prologue peeling if we're using a mask
13892         instead.  Update call to vect_update_inits_of_drs.
13893         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13894         mask_skip_niters.
13895         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13896         alignment.  Do not include the number of peeled iterations in
13897         the minimum threshold in that case.
13898         (vectorizable_induction): Adjust the start value down by
13899         LOOP_VINFO_MASK_SKIP_NITERS iterations.
13900         (vect_transform_loop): Call vect_prepare_for_masked_peels.
13901         Take the number of skipped iterations into account when calculating
13902         the loop bounds.
13903         * tree-vect-stmts.c (vect_gen_while_not): New function.
13905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13906             Alan Hayward  <alan.hayward@arm.com>
13907             David Sherwood  <david.sherwood@arm.com>
13909         * doc/sourcebuild.texi (vect_fully_masked): Document.
13910         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
13911         default value to 0.
13912         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
13913         split out from...
13914         (vect_analyze_loop_2): ...here. Don't check the vectorization
13915         factor against the number of loop iterations if the loop is
13916         fully-masked.
13918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13919             Alan Hayward  <alan.hayward@arm.com>
13920             David Sherwood  <david.sherwood@arm.com>
13922         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
13923         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
13924         (dump_groups): Update accordingly.
13925         (iv_use::mem_type): New member variable.
13926         (address_p): New function.
13927         (record_use): Add a mem_type argument and initialize the new
13928         mem_type field.
13929         (record_group_use): Add a mem_type argument.  Use address_p.
13930         Remove obsolete null checks of base_object.  Update call to record_use.
13931         (find_interesting_uses_op): Update call to record_group_use.
13932         (find_interesting_uses_cond): Likewise.
13933         (find_interesting_uses_address): Likewise.
13934         (get_mem_type_for_internal_fn): New function.
13935         (find_address_like_use): Likewise.
13936         (find_interesting_uses_stmt): Try find_address_like_use before
13937         calling find_interesting_uses_op.
13938         (addr_offset_valid_p): Use the iv mem_type field as the type
13939         of the addressed memory.
13940         (add_autoinc_candidates): Likewise.
13941         (get_address_cost): Likewise.
13942         (split_small_address_groups_p): Use address_p.
13943         (split_address_groups): Likewise.
13944         (add_iv_candidate_for_use): Likewise.
13945         (autoinc_possible_for_pair): Likewise.
13946         (rewrite_groups): Likewise.
13947         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
13948         (determine_group_iv_cost): Update after split of USE_ADDRESS.
13949         (get_alias_ptr_type_for_ptr_address): New function.
13950         (rewrite_use_address): Rewrite address uses in calls that were
13951         identified by find_address_like_use.
13953 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13954             Alan Hayward  <alan.hayward@arm.com>
13955             David Sherwood  <david.sherwood@arm.com>
13957         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
13958         TARGET_MEM_REFs.
13959         * gimple-expr.h (is_gimple_addressable: Likewise.
13960         * gimple-expr.c (is_gimple_address): Likewise.
13961         * internal-fn.c (expand_call_mem_ref): New function.
13962         (expand_mask_load_optab_fn): Use it.
13963         (expand_mask_store_optab_fn): Likewise.
13965 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13966             Alan Hayward  <alan.hayward@arm.com>
13967             David Sherwood  <david.sherwood@arm.com>
13969         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
13970         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
13971         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
13972         (cond_umax@var{mode}): Document.
13973         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
13974         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
13975         (cond_umin_optab, cond_umax_optab): New optabs.
13976         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
13977         (COND_IOR, COND_XOR): New internal functions.
13978         * internal-fn.h (get_conditional_internal_fn): Declare.
13979         * internal-fn.c (cond_binary_direct): New macro.
13980         (expand_cond_binary_optab_fn): Likewise.
13981         (direct_cond_binary_optab_supported_p): Likewise.
13982         (get_conditional_internal_fn): New function.
13983         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
13984         Cope with reduction statements that are vectorized as calls rather
13985         than assignments.
13986         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
13987         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
13988         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
13989         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13990         (UNSPEC_COND_EOR): New unspecs.
13991         (optab): Add mappings for them.
13992         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
13993         (sve_int_op, sve_fp_op): New int attributes.
13995 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13996             Alan Hayward  <alan.hayward@arm.com>
13997             David Sherwood  <david.sherwood@arm.com>
13999         * optabs.def (while_ult_optab): New optab.
14000         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14001         * internal-fn.def (WHILE_ULT): New internal function.
14002         * internal-fn.h (direct_internal_fn_supported_p): New override
14003         that takes two types as argument.
14004         * internal-fn.c (while_direct): New macro.
14005         (expand_while_optab_fn): New function.
14006         (convert_optab_supported_p): Likewise.
14007         (direct_while_optab_supported_p): New macro.
14008         * wide-int.h (wi::udiv_ceil): New function.
14009         * tree-vectorizer.h (rgroup_masks): New structure.
14010         (vec_loop_masks): New typedef.
14011         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14012         and fully_masked_p.
14013         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14014         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14015         (vect_max_vf): New function.
14016         (slpeel_make_loop_iterate_ntimes): Delete.
14017         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14018         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14019         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14020         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14021         internal-fn.h, stor-layout.h and optabs-query.h.
14022         (vect_set_loop_mask): New function.
14023         (add_preheader_seq): Likewise.
14024         (add_header_seq): Likewise.
14025         (interleave_supported_p): Likewise.
14026         (vect_maybe_permute_loop_masks): Likewise.
14027         (vect_set_loop_masks_directly): Likewise.
14028         (vect_set_loop_condition_masked): Likewise.
14029         (vect_set_loop_condition_unmasked): New function, split out from
14030         slpeel_make_loop_iterate_ntimes.
14031         (slpeel_make_loop_iterate_ntimes): Rename to..
14032         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14033         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14034         (vect_do_peeling): Update call accordingly.
14035         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14036         loops.
14037         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14038         mask_compare_type, can_fully_mask_p and fully_masked_p.
14039         (release_vec_loop_masks): New function.
14040         (_loop_vec_info): Use it to free the loop masks.
14041         (can_produce_all_loop_masks_p): New function.
14042         (vect_get_max_nscalars_per_iter): Likewise.
14043         (vect_verify_full_masking): Likewise.
14044         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14045         retries, and free the mask rgroups before retrying.  Check loop-wide
14046         reasons for disallowing fully-masked loops.  Make the final decision
14047         about whether use a fully-masked loop or not.
14048         (vect_estimate_min_profitable_iters): Do not assume that peeling
14049         for the number of iterations will be needed for fully-masked loops.
14050         (vectorizable_reduction): Disable fully-masked loops.
14051         (vectorizable_live_operation): Likewise.
14052         (vect_halve_mask_nunits): New function.
14053         (vect_double_mask_nunits): Likewise.
14054         (vect_record_loop_mask): Likewise.
14055         (vect_get_loop_mask): Likewise.
14056         (vect_transform_loop): Handle the case in which the final loop
14057         iteration might handle a partial vector.  Call vect_set_loop_condition
14058         instead of slpeel_make_loop_iterate_ntimes.
14059         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14060         (check_load_store_masking): New function.
14061         (prepare_load_store_mask): Likewise.
14062         (vectorizable_store): Handle fully-masked loops.
14063         (vectorizable_load): Likewise.
14064         (supportable_widening_operation): Use vect_halve_mask_nunits for
14065         booleans.
14066         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14067         (vect_gen_while): New function.
14068         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14069         (aarch64_uqdec<mode>): New insn.
14071 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14072             Alan Hayward  <alan.hayward@arm.com>
14073             David Sherwood  <david.sherwood@arm.com>
14075         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14076         (reduc_xor_scal_optab): New optabs.
14077         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14078         (reduc_xor_scal_@var{m}): Document.
14079         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14080         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14081         internal functions.
14082         * fold-const-call.c (fold_const_call): Handle them.
14083         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14084         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14085         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14086         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14087         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14088         (UNSPEC_XORV): New unspecs.
14089         (optab): Add entries for them.
14090         (BITWISEV): New int iterator.
14091         (bit_reduc_op): New int attributes.
14093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14094             Alan Hayward  <alan.hayward@arm.com>
14095             David Sherwood  <david.sherwood@arm.com>
14097         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14098         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14099         * optabs.def (vec_shl_insert_optab): New optab.
14100         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14101         (duplicate_and_interleave): Likewise.
14102         * tree-vect-loop.c: Include internal-fn.h.
14103         (neutral_op_for_slp_reduction): New function, split out from
14104         get_initial_defs_for_reduction.
14105         (get_initial_def_for_reduction): Handle option 2 for variable-length
14106         vectors by loading the neutral value into a vector and then shifting
14107         the initial value into element 0.
14108         (get_initial_defs_for_reduction): Replace the code argument with
14109         the neutral value calculated by neutral_op_for_slp_reduction.
14110         Use gimple_build_vector for constant-length vectors.
14111         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14112         but the first group_size elements have a neutral value.
14113         Use duplicate_and_interleave otherwise.
14114         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14115         Update call to get_initial_defs_for_reduction.  Handle SLP
14116         reductions for variable-length vectors by creating one vector
14117         result for each scalar result, with the elements associated
14118         with other scalar results stubbed out with the neutral value.
14119         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14120         Require IFN_VEC_SHL_INSERT for double reductions on
14121         variable-length vectors, or SLP reductions that have
14122         a neutral value.  Require can_duplicate_and_interleave_p
14123         support for variable-length unchained SLP reductions if there
14124         is no neutral value, such as for MIN/MAX reductions.  Also require
14125         the number of vector elements to be a multiple of the number of
14126         SLP statements when doing variable-length unchained SLP reductions.
14127         Update call to vect_create_epilog_for_reduction.
14128         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14129         and remove initial values.
14130         (duplicate_and_interleave): Make public.
14131         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14132         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14135             Alan Hayward  <alan.hayward@arm.com>
14136             David Sherwood  <david.sherwood@arm.com>
14138         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14139         (can_duplicate_and_interleave_p): New function.
14140         (vect_get_and_check_slp_defs): Take the vector of statements
14141         rather than just the current one.  Remove excess parentheses.
14142         Restriction rejectinon of vect_constant_def and vect_external_def
14143         for variable-length vectors to boolean types, or types for which
14144         can_duplicate_and_interleave_p is false.
14145         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14146         (duplicate_and_interleave): New function.
14147         (vect_get_constant_vectors): Use gimple_build_vector for
14148         constant-length vectors and suitable variable-length constant
14149         vectors.  Use duplicate_and_interleave for other variable-length
14150         vectors.  Don't defer the update when inserting new statements.
14152 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14153             Alan Hayward  <alan.hayward@arm.com>
14154             David Sherwood  <david.sherwood@arm.com>
14156         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14157         min_profitable_iters doesn't go negative.
14159 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14160             Alan Hayward  <alan.hayward@arm.com>
14161             David Sherwood  <david.sherwood@arm.com>
14163         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14164         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14165         * optabs.def (vec_mask_load_lanes_optab): New optab.
14166         (vec_mask_store_lanes_optab): Likewise.
14167         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14168         (MASK_STORE_LANES): Likewise.
14169         * internal-fn.c (mask_load_lanes_direct): New macro.
14170         (mask_store_lanes_direct): Likewise.
14171         (expand_mask_load_optab_fn): Handle masked operations.
14172         (expand_mask_load_lanes_optab_fn): New macro.
14173         (expand_mask_store_optab_fn): Handle masked operations.
14174         (expand_mask_store_lanes_optab_fn): New macro.
14175         (direct_mask_load_lanes_optab_supported_p): Likewise.
14176         (direct_mask_store_lanes_optab_supported_p): Likewise.
14177         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14178         parameter.
14179         (vect_load_lanes_supported): Likewise.
14180         * tree-vect-data-refs.c (strip_conversion): New function.
14181         (can_group_stmts_p): Likewise.
14182         (vect_analyze_data_ref_accesses): Use it instead of checking
14183         for a pair of assignments.
14184         (vect_store_lanes_supported): Take a masked_p parameter.
14185         (vect_load_lanes_supported): Likewise.
14186         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14187         vect_store_lanes_supported and vect_load_lanes_supported.
14188         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14189         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14190         parameter.  Don't allow gaps for masked accesses.
14191         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14192         and vect_load_lanes_supported.
14193         (get_load_store_type): Take a masked_p parameter and update
14194         call to get_group_load_store_type.
14195         (vectorizable_store): Update call to get_load_store_type.
14196         Handle IFN_MASK_STORE_LANES.
14197         (vectorizable_load): Update call to get_load_store_type.
14198         Handle IFN_MASK_LOAD_LANES.
14200 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14201             Alan Hayward  <alan.hayward@arm.com>
14202             David Sherwood  <david.sherwood@arm.com>
14204         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14205         modes for SVE.
14206         * config/aarch64/aarch64-protos.h
14207         (aarch64_sve_struct_memory_operand_p): Declare.
14208         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14209         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14210         (VPRED, vpred): Handle SVE structure modes.
14211         * config/aarch64/constraints.md (Utx): New constraint.
14212         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14213         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14214         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14215         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14216         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14217         structure modes.  Split into pieces after RA.
14218         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14219         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14220         New patterns.
14221         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14222         SVE structure modes.
14223         (aarch64_classify_address): Likewise.
14224         (sizetochar): Move earlier in file.
14225         (aarch64_print_operand): Handle SVE register lists.
14226         (aarch64_array_mode): New function.
14227         (aarch64_sve_struct_memory_operand_p): Likewise.
14228         (TARGET_ARRAY_MODE): Redefine.
14230 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14231             Alan Hayward  <alan.hayward@arm.com>
14232             David Sherwood  <david.sherwood@arm.com>
14234         * target.def (array_mode): New target hook.
14235         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14236         * doc/tm.texi: Regenerate.
14237         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14238         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14239         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14240         targetm.array_mode.
14241         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14242         type sizes.
14244 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14245             Alan Hayward  <alan.hayward@arm.com>
14246             David Sherwood  <david.sherwood@arm.com>
14248         * fold-const.c (fold_binary_loc): Check the argument types
14249         rather than the result type when testing for a vector operation.
14251 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14253         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14254         * doc/tm.texi: Regenerate.
14256 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14257             Alan Hayward  <alan.hayward@arm.com>
14258             David Sherwood  <david.sherwood@arm.com>
14260         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14261         (sve): Document new AArch64 extension.
14262         * doc/md.texi (w): Extend the description of the AArch64
14263         constraint to include SVE vectors.
14264         (Upl, Upa): Document new AArch64 predicate constraints.
14265         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14266         enum.
14267         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14268         (msve-vector-bits=): New option.
14269         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14270         SVE when these are disabled.
14271         (sve): New extension.
14272         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14273         modes.  Adjust their number of units based on aarch64_sve_vg.
14274         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14275         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14276         aarch64_addr_query_type.
14277         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14278         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14279         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14280         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14281         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14282         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14283         (aarch64_simd_imm_zero_p): Delete.
14284         (aarch64_check_zero_based_sve_index_immediate): Declare.
14285         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14286         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14287         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14288         (aarch64_sve_float_mul_immediate_p): Likewise.
14289         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14290         rather than an rtx.
14291         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14292         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14293         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14294         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14295         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14296         (aarch64_regmode_natural_size): Likewise.
14297         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14298         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14299         left one place.
14300         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14301         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14302         for VG and the SVE predicate registers.
14303         (V_ALIASES): Add a "z"-prefixed alias.
14304         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14305         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14306         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14307         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14308         (REG_CLASS_NAMES): Add entries for them.
14309         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14310         and the predicate registers.
14311         (aarch64_sve_vg): Declare.
14312         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14313         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14314         (REGMODE_NATURAL_SIZE): Define.
14315         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14316         SVE macros.
14317         * config/aarch64/aarch64.c: Include cfgrtl.h.
14318         (simd_immediate_info): Add a constructor for series vectors,
14319         and an associated step field.
14320         (aarch64_sve_vg): New variable.
14321         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14322         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14323         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14324         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14325         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14326         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14327         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14328         (aarch64_get_mask_mode): New functions.
14329         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14330         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14331         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14332         predicate modes and predicate registers.  Explicitly restrict
14333         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14334         to store a vector mode if it is recognized by
14335         aarch64_classify_vector_mode.
14336         (aarch64_regmode_natural_size): New function.
14337         (aarch64_hard_regno_caller_save_mode): Return the original mode
14338         for predicates.
14339         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14340         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14341         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14342         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14343         functions.
14344         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14345         does not overlap dest if the function is frame-related.  Handle
14346         SVE constants.
14347         (aarch64_split_add_offset): New function.
14348         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14349         them aarch64_add_offset.
14350         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14351         and update call to aarch64_sub_sp.
14352         (aarch64_add_cfa_expression): New function.
14353         (aarch64_expand_prologue): Pass extra temporary registers to the
14354         functions above.  Handle the case in which we need to emit new
14355         DW_CFA_expressions for registers that were originally saved
14356         relative to the stack pointer, but now have to be expressed
14357         relative to the frame pointer.
14358         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14359         functions above.
14360         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14361         IP0 and IP1 values for SVE frames.
14362         (aarch64_expand_vec_series): New function.
14363         (aarch64_expand_sve_widened_duplicate): Likewise.
14364         (aarch64_expand_sve_const_vector): Likewise.
14365         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14366         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14367         into the register, rather than emitting a SET directly.
14368         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14369         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14370         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14371         (offset_9bit_signed_scaled_p): New functions.
14372         (aarch64_replicate_bitmask_imm): New function.
14373         (aarch64_bitmask_imm): Use it.
14374         (aarch64_cannot_force_const_mem): Reject expressions involving
14375         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14376         (aarch64_classify_index): Handle SVE indices, by requiring
14377         a plain register index with a scale that matches the element size.
14378         (aarch64_classify_address): Handle SVE addresses.  Assert that
14379         the mode of the address is VOIDmode or an integer mode.
14380         Update call to aarch64_classify_symbol.
14381         (aarch64_classify_symbolic_expression): Update call to
14382         aarch64_classify_symbol.
14383         (aarch64_const_vec_all_in_range_p): New function.
14384         (aarch64_print_vector_float_operand): Likewise.
14385         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14386         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14387         and the FP immediates 1.0 and 0.5.
14388         (aarch64_print_address_internal): Handle SVE addresses.
14389         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14390         (aarch64_regno_regclass): Handle predicate registers.
14391         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14392         data modes.
14393         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14394         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14395         (aarch64_convert_sve_vector_bits): New function.
14396         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14397         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14398         rather than an rtx.
14399         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14400         Handle SVE vector and predicate modes.  Accept VL-based constants
14401         that need only one temporary register, and VL offsets that require
14402         no temporary registers.
14403         (aarch64_conditional_register_usage): Mark the predicate registers
14404         as fixed if SVE isn't available.
14405         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14406         Return true for SVE vector and predicate modes.
14407         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14408         rather than an unsigned int.  Handle SVE modes.
14409         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14410         SVE modes.
14411         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14412         if SVE is enabled.
14413         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14414         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14415         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14416         (aarch64_sve_float_mul_immediate_p): New functions.
14417         (aarch64_sve_valid_immediate): New function.
14418         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14419         Explicitly reject structure modes.  Check for INDEX constants.
14420         Handle PTRUE and PFALSE constants.
14421         (aarch64_check_zero_based_sve_index_immediate): New function.
14422         (aarch64_simd_imm_zero_p): Delete.
14423         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14424         vector modes.  Accept constants in the range of CNT[BHWD].
14425         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14426         ask for an Advanced SIMD mode.
14427         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14428         (aarch64_simd_vector_alignment): Handle SVE predicates.
14429         (aarch64_vectorize_preferred_vector_alignment): New function.
14430         (aarch64_simd_vector_alignment_reachable): Use it instead of
14431         the vector size.
14432         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14433         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14434         functions.
14435         (MAX_VECT_LEN): Delete.
14436         (expand_vec_perm_d): Add a vec_flags field.
14437         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14438         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14439         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14440         for SVE modes.
14441         (aarch64_evpc_rev): Rename to...
14442         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14443         (aarch64_evpc_rev_global): New function.
14444         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14445         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14446         MAX_VECT_LEN.
14447         (aarch64_evpc_sve_tbl): New function.
14448         (aarch64_expand_vec_perm_const_1): Update after rename of
14449         aarch64_evpc_rev.  Handle SVE permutes too, trying
14450         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14451         than aarch64_evpc_tbl.
14452         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14453         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14454         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14455         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14456         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14457         (aarch64_expand_sve_vcond): New functions.
14458         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14459         of aarch64_vector_mode_p.
14460         (aarch64_dwarf_poly_indeterminate_value): New function.
14461         (aarch64_compute_pressure_classes): Likewise.
14462         (aarch64_can_change_mode_class): Likewise.
14463         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14464         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14465         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14466         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14467         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14468         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14469         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14470         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14471         constraints.
14472         (Dn, Dl, Dr): Accept const as well as const_vector.
14473         (Dz): Likewise.  Compare against CONST0_RTX.
14474         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14475         of "vector" where appropriate.
14476         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14477         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14478         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14479         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14480         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14481         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14482         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14483         (v_int_equiv): Extend to SVE modes.
14484         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14485         mode attributes.
14486         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14487         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14488         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14489         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14490         (SVE_COND_FP_CMP): New int iterators.
14491         (perm_hilo): Handle the new unpack unspecs.
14492         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14493         attributes.
14494         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14495         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14496         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14497         (aarch64_equality_operator, aarch64_constant_vector_operand)
14498         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14499         (aarch64_sve_nonimmediate_operand): Likewise.
14500         (aarch64_sve_general_operand): Likewise.
14501         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14502         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14503         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14504         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14505         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14506         (aarch64_sve_float_arith_immediate): Likewise.
14507         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14508         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14509         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
14510         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
14511         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14512         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14513         (aarch64_sve_float_arith_operand): Likewise.
14514         (aarch64_sve_float_arith_with_sub_operand): Likewise.
14515         (aarch64_sve_float_mul_operand): Likewise.
14516         (aarch64_sve_vec_perm_operand): Likewise.
14517         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14518         (aarch64_mov_operand): Accept const_poly_int and const_vector.
14519         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14520         as well as const_vector.
14521         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14522         in file.  Use CONST0_RTX and CONSTM1_RTX.
14523         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
14524         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14525         Use aarch64_simd_imm_zero.
14526         * config/aarch64/aarch64-sve.md: New file.
14527         * config/aarch64/aarch64.md: Include it.
14528         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14529         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14530         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14531         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14532         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14533         (sve): New attribute.
14534         (enabled): Disable instructions with the sve attribute unless
14535         TARGET_SVE.
14536         (movqi, movhi): Pass CONST_POLY_INT operaneds through
14537         aarch64_expand_mov_immediate.
14538         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14539         CNT[BHSD] immediates.
14540         (movti): Split CONST_POLY_INT moves into two halves.
14541         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14542         Split additions that need a temporary here if the destination
14543         is the stack pointer.
14544         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14545         (*add<mode>3_poly_1): New instruction.
14546         (set_clobber_cc): New expander.
14548 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14550         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14551         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
14552         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14553         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14554         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
14555         Change innermode from fixed_mode_size to machine_mode.
14556         (simplify_subreg): Update call accordingly.  Handle a constant-sized
14557         subreg of a variable-length CONST_VECTOR.
14559 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14560             Alan Hayward  <alan.hayward@arm.com>
14561             David Sherwood  <david.sherwood@arm.com>
14563         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14564         (add_offset_to_base): New function, split out from...
14565         (create_mem_ref): ...here.  When handling a scale other than 1,
14566         check first whether the address is valid without the offset.
14567         Add it into the base if so, leaving the index and scale as-is.
14569 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14571         PR c++/83778
14572         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14573         fold_for_warn before checking if arg2 is INTEGER_CST.
14575 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
14577         * config/rs6000/predicates.md (load_multiple_operation): Delete.
14578         (store_multiple_operation): Delete.
14579         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14580         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14581         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14582         guarded by TARGET_STRING.
14583         (rs6000_output_load_multiple): Delete.
14584         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14585         OPTION_MASK_STRING / TARGET_STRING handling.
14586         (print_operand) <'N', 'O'>: Add comment that these are unused now.
14587         (const rs6000_opt_masks) <"string">: Change mask to 0.
14588         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14589         (MASK_STRING): Delete.
14590         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14591         parts.  Simplify.
14592         (load_multiple): Delete.
14593         (*ldmsi8): Delete.
14594         (*ldmsi7): Delete.
14595         (*ldmsi6): Delete.
14596         (*ldmsi5): Delete.
14597         (*ldmsi4): Delete.
14598         (*ldmsi3): Delete.
14599         (store_multiple): Delete.
14600         (*stmsi8): Delete.
14601         (*stmsi7): Delete.
14602         (*stmsi6): Delete.
14603         (*stmsi5): Delete.
14604         (*stmsi4): Delete.
14605         (*stmsi3): Delete.
14606         (movmemsi_8reg): Delete.
14607         (corresponding unnamed define_insn): Delete.
14608         (movmemsi_6reg): Delete.
14609         (corresponding unnamed define_insn): Delete.
14610         (movmemsi_4reg): Delete.
14611         (corresponding unnamed define_insn): Delete.
14612         (movmemsi_2reg): Delete.
14613         (corresponding unnamed define_insn): Delete.
14614         (movmemsi_1reg): Delete.
14615         (corresponding unnamed define_insn): Delete.
14616         * config/rs6000/rs6000.opt (mno-string): New.
14617         (mstring): Replace by deprecation warning stub.
14618         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14620 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14622         * regrename.c (regrename_do_replace): If replacing the same
14623         reg multiple times, try to reuse last created gen_raw_REG.
14625         PR debug/81155
14626         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14627         main to workaround a bug in GDB.
14629 2018-01-12  Tom de Vries  <tom@codesourcery.com>
14631         PR target/83737
14632         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14634 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
14636         PR rtl-optimization/80481
14637         * ira-color.c (get_cap_member): New function.
14638         (allocnos_conflict_by_live_ranges_p): Use it.
14639         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14640         (setup_slot_coalesced_allocno_live_ranges): Ditto.
14642 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
14644         PR target/83628
14645         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14646         (*saddl_se_1): Ditto.
14647         (*ssubsi_1): Ditto.
14648         (*ssubl_se_1): Ditto.
14650 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14652         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14653         rather than wi::to_widest for DR_INITs.
14654         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14655         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14656         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14657         INTEGER_CSTs.
14658         (vect_analyze_group_access_1): Note that here.
14660 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14662         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14663         polynomial type sizes.
14665 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14667         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14668         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14669         (gimple_add_tmp_var): Likewise.
14671 2018-01-12  Martin Liska  <mliska@suse.cz>
14673         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14674         (gimple_alloc_sizes): Likewise.
14675         (dump_gimple_statistics): Use PRIu64 in printf format.
14676         * gimple.h: Change uint64_t to int.
14678 2018-01-12  Martin Liska  <mliska@suse.cz>
14680         * tree-core.h: Use uint64_t instead of int.
14681         * tree.c (tree_node_counts): Likewise.
14682         (tree_node_sizes): Likewise.
14683         (dump_tree_statistics): Use PRIu64 in printf format.
14685 2018-01-12  Martin Liska  <mliska@suse.cz>
14687         * Makefile.in: As qsort_chk is implemented in vec.c, add
14688         vec.o to linkage of gencfn-macros.
14689         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14690         passing the info to record_node_allocation_statistics.
14691         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14692         and pass the info.
14693         * ggc-common.c (struct ggc_usage): Add operator== and use
14694         it in operator< and compare function.
14695         * mem-stats.h (struct mem_usage): Likewise.
14696         * vec.c (struct vec_usage): Remove operator< and compare
14697         function. Can be simply inherited.
14699 2018-01-12  Martin Jambor  <mjambor@suse.cz>
14701         PR target/81616
14702         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14703         * tree-ssa-math-opts.c: Include domwalk.h.
14704         (convert_mult_to_fma_1): New function.
14705         (fma_transformation_info): New type.
14706         (fma_deferring_state): Likewise.
14707         (cancel_fma_deferring): New function.
14708         (result_of_phi): Likewise.
14709         (last_fma_candidate_feeds_initial_phi): Likewise.
14710         (convert_mult_to_fma): Added deferring logic, split actual
14711         transformation to convert_mult_to_fma_1.
14712         (math_opts_dom_walker): New type.
14713         (math_opts_dom_walker::after_dom_children): New method, body moved
14714         here from pass_optimize_widening_mul::execute, added deferring logic
14715         bits.
14716         (pass_optimize_widening_mul::execute): Moved most of code to
14717         math_opts_dom_walker::after_dom_children.
14718         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14719         * config/i386/i386.c (ix86_option_override_internal): Added
14720         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14722 2018-01-12  Richard Biener  <rguenther@suse.de>
14724         PR debug/83157
14725         * dwarf2out.c (gen_variable_die): Do not reset old_die for
14726         inline instance vars.
14728 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
14730         PR target/81819
14731         * config/rx/rx.c (rx_is_restricted_memory_address):
14732         Handle SUBREG case.
14734 2018-01-12  Richard Biener  <rguenther@suse.de>
14736         PR tree-optimization/80846
14737         * target.def (split_reduction): New target hook.
14738         * targhooks.c (default_split_reduction): New function.
14739         * targhooks.h (default_split_reduction): Declare.
14740         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14741         target requests first reduce vectors by combining low and high
14742         parts.
14743         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14744         (get_vectype_for_scalar_type_and_size): Export.
14745         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14746         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14747         * doc/tm.texi: Regenerate.
14748         * config/i386/i386.c (ix86_split_reduction): Implement
14749         TARGET_VECTORIZE_SPLIT_REDUCTION.
14751 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14753         PR target/83368
14754         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14755         in PIC mode except for TARGET_VXWORKS_RTP.
14756         * config/sparc/sparc.c: Include cfgrtl.h.
14757         (TARGET_INIT_PIC_REG): Define.
14758         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14759         (sparc_pic_register_p): New predicate.
14760         (sparc_legitimate_address_p): Use it.
14761         (sparc_legitimize_pic_address): Likewise.
14762         (sparc_delegitimize_address): Likewise.
14763         (sparc_mode_dependent_address_p): Likewise.
14764         (gen_load_pcrel_sym): Remove 4th parameter.
14765         (load_got_register): Adjust call to above.  Remove obsolete stuff.
14766         (sparc_expand_prologue): Do not call load_got_register here.
14767         (sparc_flat_expand_prologue): Likewise.
14768         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14769         (sparc_use_pseudo_pic_reg): New function.
14770         (sparc_init_pic_reg): Likewise.
14771         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14772         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14774 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
14776         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14777         Add item for branch_cost.
14779 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14781         PR rtl-optimization/83565
14782         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14783         not extend the result to a larger mode for rotate operations.
14784         (num_sign_bit_copies1): Likewise.
14786 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14788         PR target/40411
14789         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14790         -symbolic.
14791         Use values-Xc.o for -pedantic.
14792         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14794 2018-01-12  Martin Liska  <mliska@suse.cz>
14796         PR ipa/83054
14797         * ipa-devirt.c (final_warning_record::grow_type_warnings):
14798         New function.
14799         (possible_polymorphic_call_targets): Use it.
14800         (ipa_devirt): Likewise.
14802 2018-01-12  Martin Liska  <mliska@suse.cz>
14804         * profile-count.h (enum profile_quality): Use 0 as invalid
14805         enum value of profile_quality.
14807 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14809         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14810         -mext-string options.
14812 2018-01-12  Richard Biener  <rguenther@suse.de>
14814         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14815         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14816         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14817         Likewise.
14818         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14820 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14822         * configure.ac (--with-long-double-format): Add support for the
14823         configuration option to change the default long double format on
14824         PowerPC systems.
14825         * config.gcc (powerpc*-linux*-*): Likewise.
14826         * configure: Regenerate.
14827         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14828         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14829         used without modification.
14831 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14833         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14834         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14835         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14836         MISC_BUILTIN_SPEC_BARRIER.
14837         (rs6000_init_builtins): Likewise.
14838         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14839         enum value.
14840         (speculation_barrier): New define_insn.
14841         * doc/extend.texi: Document __builtin_speculation_barrier.
14843 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14845         PR target/83203
14846         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14847         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14848         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14849         iterators.
14850         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
14851         integral modes instead of "ss" and "sd".
14852         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14853         vectors with 32-bit and 64-bit elements.
14854         (vecdupssescalarmodesuffix): New mode attribute.
14855         (vec_dup<mode>): Use it.
14857 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
14859         PR target/83330
14860         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14861         frame if argument is passed on stack.
14863 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14865         PR target/82682
14866         * ree.c (combine_reaching_defs): Optimize also
14867         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14868         reg2=any_extend(exp); reg1=reg2;, formatting fix.
14870 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14872         PR middle-end/83189
14873         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14875 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14877         PR middle-end/83718
14878         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14879         after they are computed.
14881 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
14883         PR tree-optimization/83695
14884         * gimple-loop-linterchange.cc
14885         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14886         reset cached scev information after interchange.
14887         (pass_linterchange::execute): Remove call to scev_reset_htab.
14889 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14891         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14892         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14893         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14894         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14895         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14896         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14897         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
14898         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
14899         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
14900         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
14901         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
14902         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
14903         (V_lane_reg): Likewise.
14904         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
14905         New define_expand.
14906         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
14907         (vfmal_lane_low<mode>_intrinsic,
14908         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
14909         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
14910         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
14911         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
14912         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
14913         vfmsl_lane_high<mode>_intrinsic): New define_insns.
14915 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14917         * config/arm/arm-cpus.in (fp16fml): New feature.
14918         (ALL_SIMD): Add fp16fml.
14919         (armv8.2-a): Add fp16fml as an option.
14920         (armv8.3-a): Likewise.
14921         (armv8.4-a): Add fp16fml as part of fp16.
14922         * config/arm/arm.h (TARGET_FP16FML): Define.
14923         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
14924         when appropriate.
14925         * config/arm/arm-modes.def (V2HF): Define.
14926         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
14927         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
14928         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
14929         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
14930         vfmsl_low, vfmsl_high): New set of builtins.
14931         * config/arm/iterators.md (PLUSMINUS): New code iterator.
14932         (vfml_op): New code attribute.
14933         (VFMLHALVES): New int iterator.
14934         (VFML, VFMLSEL): New mode attributes.
14935         (V_reg): Define mapping for V2HF.
14936         (V_hi, V_lo): New mode attributes.
14937         (VF_constraint): Likewise.
14938         (vfml_half, vfml_half_selector): New int attributes.
14939         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
14940         define_expand.
14941         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
14942         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
14943         New define_insn.
14944         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
14945         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
14946         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
14947         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
14948         documentation.
14949         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
14950         Document new effective target and option set.
14952 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14954         * config/arm/arm-cpus.in (armv8_4): New feature.
14955         (ARMv8_4a): New fgroup.
14956         (armv8.4-a): New arch.
14957         * config/arm/arm-tables.opt: Regenerate.
14958         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
14959         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
14960         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
14961         Add matching rules for -march=armv8.4-a and extensions.
14962         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
14964 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
14966         PR target/81821
14967         * config/rx/rx.md (BW): New mode attribute.
14968         (sync_lock_test_and_setsi): Add mode suffix to insn output.
14970 2018-01-11  Richard Biener  <rguenther@suse.de>
14972         PR tree-optimization/83435
14973         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
14974         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
14975         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
14977 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14978             Alan Hayward  <alan.hayward@arm.com>
14979             David Sherwood  <david.sherwood@arm.com>
14981         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
14982         field.
14983         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
14984         (aarch64_print_address_internal): Use it to check for a zero offset.
14986 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
14987             Alan Hayward  <alan.hayward@arm.com>
14988             David Sherwood  <david.sherwood@arm.com>
14990         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
14991         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
14992         Return a poly_int64 rather than a HOST_WIDE_INT.
14993         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
14994         rather than a HOST_WIDE_INT.
14995         * config/aarch64/aarch64.h (aarch64_frame): Protect with
14996         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
14997         hard_fp_offset, frame_size, initial_adjust, callee_offset and
14998         final_offset from HOST_WIDE_INT to poly_int64.
14999         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15000         to_constant when getting the number of units in an Advanced SIMD
15001         mode.
15002         (aarch64_builtin_vectorized_function): Check for a constant number
15003         of units.
15004         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15005         GET_MODE_SIZE.
15006         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15007         attribute instead of GET_MODE_NUNITS.
15008         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15009         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15010         GET_MODE_SIZE for fixed-size registers.
15011         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15012         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15013         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15014         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15015         (aarch64_print_operand, aarch64_print_address_internal)
15016         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15017         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15018         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15019         Handle polynomial GET_MODE_SIZE.
15020         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15021         wider than SImode without modification.
15022         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15023         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15024         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15025         passing and returning SVE modes.
15026         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15027         rather than GEN_INT.
15028         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15029         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15030         (aarch64_allocate_and_probe_stack_space): Likewise.
15031         (aarch64_layout_frame): Cope with polynomial offsets.
15032         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15033         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15034         polynomial offsets.
15035         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15036         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15037         poly_int64 rather than a HOST_WIDE_INT.
15038         (aarch64_get_separate_components, aarch64_process_components)
15039         (aarch64_expand_prologue, aarch64_expand_epilogue)
15040         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15041         (aarch64_anchor_offset): New function, split out from...
15042         (aarch64_legitimize_address): ...here.
15043         (aarch64_builtin_vectorization_cost): Handle polynomial
15044         TYPE_VECTOR_SUBPARTS.
15045         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15046         GET_MODE_NUNITS.
15047         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15048         number of elements from the PARALLEL rather than the mode.
15049         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15050         rather than GET_MODE_BITSIZE.
15051         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15052         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15053         (aarch64_expand_vec_perm_const_1): Handle polynomial
15054         d->perm.length () and d->perm elements.
15055         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15056         Apply to_constant to d->perm elements.
15057         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15058         polynomial CONST_VECTOR_NUNITS.
15059         (aarch64_move_pointer): Take amount as a poly_int64 rather
15060         than an int.
15061         (aarch64_progress_pointer): Avoid temporary variable.
15062         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15063         the mode attribute instead of GET_MODE.
15065 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15066             Alan Hayward  <alan.hayward@arm.com>
15067             David Sherwood  <david.sherwood@arm.com>
15069         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15070         x exists before using it.
15071         (aarch64_add_constant_internal): Rename to...
15072         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15073         src and dest rtxes.  Handle the case in which they're different,
15074         including when the offset is zero.  Replace scratchreg with an rtx.
15075         Use 2 additions if there is no spare register into which we can
15076         move a 16-bit constant.
15077         (aarch64_add_constant): Delete.
15078         (aarch64_add_offset): Replace reg with separate src and dest
15079         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15080         Use aarch64_add_offset_1.
15081         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15082         an rtx rather than an int.  Take the delta as a poly_int64
15083         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15084         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15085         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15086         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15087         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15088         and aarch64_add_sp.
15089         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15090         aarch64_add_constant.
15092 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15094         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15095         Use scalar_float_mode.
15097 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15099         * config/aarch64/aarch64-simd.md
15100         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15101         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15102         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15103         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15104         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15105         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15106         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15107         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15108         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15109         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15111 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15113         PR target/83514
15114         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15115         targ_options->x_arm_arch_string is non NULL.
15117 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15119         * config/aarch64/aarch64.h
15120         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15122 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15124         PR target/82096
15125         * expmed.c (emit_store_flag_force): Swap if const op0
15126         and change VOIDmode to mode of op0.
15128 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15130         PR rtl-optimization/83761
15131         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15132         than bytes to mode_for_size.
15134 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15136         PR middle-end/83189
15137         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15138         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15139         profile.
15141 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15143         PR middle-end/83575
15144         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15145         when in layout mode.
15146         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15147         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15148         partition fixup.
15150 2018-01-10  Michael Collison  <michael.collison@arm.com>
15152         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15153         * config/aarch64/aarch64-option-extension.def: Add
15154         AARCH64_OPT_EXTENSION of 'fp16fml'.
15155         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15156         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15157         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15158         * config/aarch64/constraints.md (Ui7): New constraint.
15159         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15160         (VFMLA_SEL_W): Ditto.
15161         (f16quad): Ditto.
15162         (f16mac1): Ditto.
15163         (VFMLA16_LOW): New int iterator.
15164         (VFMLA16_HIGH): Ditto.
15165         (UNSPEC_FMLAL): New unspec.
15166         (UNSPEC_FMLSL): Ditto.
15167         (UNSPEC_FMLAL2): Ditto.
15168         (UNSPEC_FMLSL2): Ditto.
15169         (f16mac): New code attribute.
15170         * config/aarch64/aarch64-simd-builtins.def
15171         (aarch64_fmlal_lowv2sf): Ditto.
15172         (aarch64_fmlsl_lowv2sf): Ditto.
15173         (aarch64_fmlalq_lowv4sf): Ditto.
15174         (aarch64_fmlslq_lowv4sf): Ditto.
15175         (aarch64_fmlal_highv2sf): Ditto.
15176         (aarch64_fmlsl_highv2sf): Ditto.
15177         (aarch64_fmlalq_highv4sf): Ditto.
15178         (aarch64_fmlslq_highv4sf): Ditto.
15179         (aarch64_fmlal_lane_lowv2sf): Ditto.
15180         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15181         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15182         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15183         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15184         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15185         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15186         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15187         (aarch64_fmlal_lane_highv2sf): Ditto.
15188         (aarch64_fmlsl_lane_highv2sf): Ditto.
15189         (aarch64_fmlal_laneq_highv2sf): Ditto.
15190         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15191         (aarch64_fmlalq_lane_highv4sf): Ditto.
15192         (aarch64_fmlsl_lane_highv4sf): Ditto.
15193         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15194         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15195         * config/aarch64/aarch64-simd.md:
15196         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15197         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15198         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15199         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15200         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15201         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15202         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15203         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15204         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15205         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15206         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15207         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15208         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15209         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15210         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15211         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15212         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15213         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15214         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15215         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15216         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15217         (vfmlsl_low_u32): Ditto.
15218         (vfmlalq_low_u32): Ditto.
15219         (vfmlslq_low_u32): Ditto.
15220         (vfmlal_high_u32): Ditto.
15221         (vfmlsl_high_u32): Ditto.
15222         (vfmlalq_high_u32): Ditto.
15223         (vfmlslq_high_u32): Ditto.
15224         (vfmlal_lane_low_u32): Ditto.
15225         (vfmlsl_lane_low_u32): Ditto.
15226         (vfmlal_laneq_low_u32): Ditto.
15227         (vfmlsl_laneq_low_u32): Ditto.
15228         (vfmlalq_lane_low_u32): Ditto.
15229         (vfmlslq_lane_low_u32): Ditto.
15230         (vfmlalq_laneq_low_u32): Ditto.
15231         (vfmlslq_laneq_low_u32): Ditto.
15232         (vfmlal_lane_high_u32): Ditto.
15233         (vfmlsl_lane_high_u32): Ditto.
15234         (vfmlal_laneq_high_u32): Ditto.
15235         (vfmlsl_laneq_high_u32): Ditto.
15236         (vfmlalq_lane_high_u32): Ditto.
15237         (vfmlslq_lane_high_u32): Ditto.
15238         (vfmlalq_laneq_high_u32): Ditto.
15239         (vfmlslq_laneq_high_u32): Ditto.
15240         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15241         (AARCH64_FL_FOR_ARCH8_4): New.
15242         (AARCH64_ISA_F16FML): New ISA flag.
15243         (TARGET_F16FML): New feature flag for fp16fml.
15244         (doc/invoke.texi): Document new fp16fml option.
15246 2018-01-10  Michael Collison  <michael.collison@arm.com>
15248         * config/aarch64/aarch64-builtins.c:
15249         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15250         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15251         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15252         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15253         (AARCH64_ISA_SHA3): New ISA flag.
15254         (TARGET_SHA3): New feature flag for sha3.
15255         * config/aarch64/iterators.md (sha512_op): New int attribute.
15256         (CRYPTO_SHA512): New int iterator.
15257         (UNSPEC_SHA512H): New unspec.
15258         (UNSPEC_SHA512H2): Ditto.
15259         (UNSPEC_SHA512SU0): Ditto.
15260         (UNSPEC_SHA512SU1): Ditto.
15261         * config/aarch64/aarch64-simd-builtins.def
15262         (aarch64_crypto_sha512hqv2di): New builtin.
15263         (aarch64_crypto_sha512h2qv2di): Ditto.
15264         (aarch64_crypto_sha512su0qv2di): Ditto.
15265         (aarch64_crypto_sha512su1qv2di): Ditto.
15266         (aarch64_eor3qv8hi): Ditto.
15267         (aarch64_rax1qv2di): Ditto.
15268         (aarch64_xarqv2di): Ditto.
15269         (aarch64_bcaxqv8hi): Ditto.
15270         * config/aarch64/aarch64-simd.md:
15271         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15272         (aarch64_crypto_sha512su0qv2di): Ditto.
15273         (aarch64_crypto_sha512su1qv2di): Ditto.
15274         (aarch64_eor3qv8hi): Ditto.
15275         (aarch64_rax1qv2di): Ditto.
15276         (aarch64_xarqv2di): Ditto.
15277         (aarch64_bcaxqv8hi): Ditto.
15278         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15279         (vsha512h2q_u64): Ditto.
15280         (vsha512su0q_u64): Ditto.
15281         (vsha512su1q_u64): Ditto.
15282         (veor3q_u16): Ditto.
15283         (vrax1q_u64): Ditto.
15284         (vxarq_u64): Ditto.
15285         (vbcaxq_u16): Ditto.
15286         * config/arm/types.md (crypto_sha512): New type attribute.
15287         (crypto_sha3): Ditto.
15288         (doc/invoke.texi): Document new sha3 option.
15290 2018-01-10  Michael Collison  <michael.collison@arm.com>
15292         * config/aarch64/aarch64-builtins.c:
15293         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15294         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15295         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15296         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15297         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15298         (AARCH64_ISA_SM4): New ISA flag.
15299         (TARGET_SM4): New feature flag for sm4.
15300         * config/aarch64/aarch64-simd-builtins.def
15301         (aarch64_sm3ss1qv4si): Ditto.
15302         (aarch64_sm3tt1aq4si): Ditto.
15303         (aarch64_sm3tt1bq4si): Ditto.
15304         (aarch64_sm3tt2aq4si): Ditto.
15305         (aarch64_sm3tt2bq4si): Ditto.
15306         (aarch64_sm3partw1qv4si): Ditto.
15307         (aarch64_sm3partw2qv4si): Ditto.
15308         (aarch64_sm4eqv4si): Ditto.
15309         (aarch64_sm4ekeyqv4si): Ditto.
15310         * config/aarch64/aarch64-simd.md:
15311         (aarch64_sm3ss1qv4si): Ditto.
15312         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15313         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15314         (aarch64_sm4eqv4si): Ditto.
15315         (aarch64_sm4ekeyqv4si): Ditto.
15316         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15317         (sm3part_op): Ditto.
15318         (CRYPTO_SM3TT): Ditto.
15319         (CRYPTO_SM3PART): Ditto.
15320         (UNSPEC_SM3SS1): New unspec.
15321         (UNSPEC_SM3TT1A): Ditto.
15322         (UNSPEC_SM3TT1B): Ditto.
15323         (UNSPEC_SM3TT2A): Ditto.
15324         (UNSPEC_SM3TT2B): Ditto.
15325         (UNSPEC_SM3PARTW1): Ditto.
15326         (UNSPEC_SM3PARTW2): Ditto.
15327         (UNSPEC_SM4E): Ditto.
15328         (UNSPEC_SM4EKEY): Ditto.
15329         * config/aarch64/constraints.md (Ui2): New constraint.
15330         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15331         * config/arm/types.md (crypto_sm3): New type attribute.
15332         (crypto_sm4): Ditto.
15333         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15334         (vsm3tt1aq_u32): Ditto.
15335         (vsm3tt1bq_u32): Ditto.
15336         (vsm3tt2aq_u32): Ditto.
15337         (vsm3tt2bq_u32): Ditto.
15338         (vsm3partw1q_u32): Ditto.
15339         (vsm3partw2q_u32): Ditto.
15340         (vsm4eq_u32): Ditto.
15341         (vsm4ekeyq_u32): Ditto.
15342         (doc/invoke.texi): Document new sm4 option.
15344 2018-01-10  Michael Collison  <michael.collison@arm.com>
15346         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15347         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15348         (AARCH64_FL_FOR_ARCH8_4): New.
15349         (AARCH64_FL_V8_4): New flag.
15350         (doc/invoke.texi): Document new armv8.4-a option.
15352 2018-01-10  Michael Collison  <michael.collison@arm.com>
15354         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15355         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15356         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15357         * config/aarch64/aarch64-option-extension.def: Add
15358         AARCH64_OPT_EXTENSION of 'sha2'.
15359         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15360         (crypto): Disable sha2 and aes if crypto disabled.
15361         (crypto): Enable aes and sha2 if enabled.
15362         (simd): Disable sha2 and aes if simd disabled.
15363         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15364         New flags.
15365         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15366         (TARGET_SHA2): New feature flag for sha2.
15367         (TARGET_AES): New feature flag for aes.
15368         * config/aarch64/aarch64-simd.md:
15369         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15370         conditional on TARGET_AES.
15371         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15372         (aarch64_crypto_sha1hsi): Make pattern conditional
15373         on TARGET_SHA2.
15374         (aarch64_crypto_sha1hv4si): Ditto.
15375         (aarch64_be_crypto_sha1hv4si): Ditto.
15376         (aarch64_crypto_sha1su1v4si): Ditto.
15377         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15378         (aarch64_crypto_sha1su0v4si): Ditto.
15379         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15380         (aarch64_crypto_sha256su0v4si): Ditto.
15381         (aarch64_crypto_sha256su1v4si): Ditto.
15382         (doc/invoke.texi): Document new aes and sha2 options.
15384 2018-01-10  Martin Sebor  <msebor@redhat.com>
15386         PR tree-optimization/83781
15387         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15388         as string arrays.
15390 2018-01-11  Martin Sebor  <msebor@gmail.com>
15391             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15393         PR tree-optimization/83501
15394         PR tree-optimization/81703
15396         * tree-ssa-strlen.c (get_string_cst): Rename...
15397         (get_string_len): ...to this.  Handle global constants.
15398         (handle_char_store): Adjust.
15400 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15401             Jim Wilson  <jimw@sifive.com>
15403         * config/riscv/riscv-protos.h (riscv_output_return): New.
15404         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15405         (riscv_attribute_table, riscv_output_return),
15406         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15407         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15408         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15409         function.
15410         (riscv_expand_prologue): Add early return for naked function.
15411         (riscv_expand_epilogue): Likewise.
15412         (riscv_function_ok_for_sibcall): Return false for naked function.
15413         (riscv_set_current_function): New.
15414         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15415         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15416         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15417         * doc/extend.texi (RISC-V Function Attributes): New.
15419 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15421         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15422         check for 128-bit long double before checking TCmode.
15423         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15424         128-bit long doubles before checking TFmode or TCmode.
15425         (FLOAT128_IBM_P): Likewise.
15427 2018-01-10  Martin Sebor  <msebor@redhat.com>
15429         PR tree-optimization/83671
15430         * builtins.c (c_strlen): Unconditionally return zero for the empty
15431         string.
15432         Use -Warray-bounds for warnings.
15433         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15434         for non-constant array indices with COMPONENT_REF, arrays of
15435         arrays, and pointers to arrays.
15436         (gimple_fold_builtin_strlen): Determine and set length range for
15437         non-constant character arrays.
15439 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15441         PR middle-end/81897
15442         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15443         empty blocks.
15445 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15447         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15449 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15451         PR target/83399
15452         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15453         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15454         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15455         indexed_or_indirect_operand predicate.
15456         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15457         (*vsx_le_perm_load_v8hi): Likewise.
15458         (*vsx_le_perm_load_v16qi): Likewise.
15459         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15460         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15461         (*vsx_le_perm_store_v8hi): Likewise.
15462         (*vsx_le_perm_store_v16qi): Likewise.
15463         (eight unnamed splitters): Likewise.
15465 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15467         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15468         * config/rs6000/emmintrin.h: Likewise.
15469         * config/rs6000/mmintrin.h: Likewise.
15470         * config/rs6000/xmmintrin.h: Likewise.
15472 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
15474         PR c++/43486
15475         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15476         "public_flag".
15477         * tree.c (tree_nop_conversion): Return true for location wrapper
15478         nodes.
15479         (maybe_wrap_with_location): New function.
15480         (selftest::check_strip_nops): New function.
15481         (selftest::test_location_wrappers): New function.
15482         (selftest::tree_c_tests): Call it.
15483         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15484         (maybe_wrap_with_location): New decl.
15485         (EXPR_LOCATION_WRAPPER_P): New macro.
15486         (location_wrapper_p): New inline function.
15487         (tree_strip_any_location_wrapper): New inline function.
15489 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
15491         PR target/83735
15492         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15493         stack_realign_offset for the largest alignment of stack slot
15494         actually used.
15495         (ix86_find_max_used_stack_alignment): New function.
15496         (ix86_finalize_stack_frame_flags): Use it.  Set
15497         max_used_stack_alignment if we don't realign stack.
15498         * config/i386/i386.h (machine_function): Add
15499         max_used_stack_alignment.
15501 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
15503         * config/arm/arm.opt (-mbranch-cost): New option.
15504         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15505         account.
15507 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
15509         PR target/83629
15510         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
15511         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15513 2018-01-10  Richard Biener  <rguenther@suse.de>
15515         PR debug/83765
15516         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15517         early out so it also covers the case where we have a non-NULL
15518         origin.
15520 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15522         PR tree-optimization/83753
15523         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15524         for non-strided grouped accesses if the number of elements is 1.
15526 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15528         PR target/81616
15529         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15530         * i386.h (TARGET_USE_GATHER): Define.
15531         * x86-tune.def (X86_TUNE_USE_GATHER): New.
15533 2018-01-10  Martin Liska  <mliska@suse.cz>
15535         PR bootstrap/82831
15536         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15537         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15538         partitioning.
15539         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15540         CLEANUP_NO_PARTITIONING is not set.
15542 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15544         * doc/rtl.texi: Remove documentation of (const ...) wrappers
15545         for vectors, as a partial revert of r254296.
15546         * rtl.h (const_vec_p): Delete.
15547         (const_vec_duplicate_p): Don't test for vector CONSTs.
15548         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15549         * expmed.c (make_tree): Likewise.
15551         Revert:
15552         * common.md (E, F): Use CONSTANT_P instead of checking for
15553         CONST_VECTOR.
15554         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15555         checking for CONST_VECTOR.
15557 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15559         PR middle-end/83575
15560         * predict.c (force_edge_cold): Handle in more sane way edges
15561         with no prediction.
15563 2018-01-09  Carl Love  <cel@us.ibm.com>
15565         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15566         V4SI, V4SF types.
15567         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15568         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15569         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15570         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
15571         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15572         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
15573         * config/rs6000/rs6000-protos.h: Add extern defition for
15574         rs6000_generate_float2_double_code.
15575         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15576         function.
15577         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15578         (float2_v2df): Add define_expand.
15580 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
15582         PR target/83628
15583         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15584         op_mode in the force_to_mode call.
15586 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15588         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15589         instead of checking each element individually.
15590         (aarch64_evpc_uzp): Likewise.
15591         (aarch64_evpc_zip): Likewise.
15592         (aarch64_evpc_ext): Likewise.
15593         (aarch64_evpc_rev): Likewise.
15594         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15595         instead of checking each element individually.  Return true without
15596         generating rtl if
15597         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15598         whether all selected elements come from the same input, instead of
15599         checking each element individually.  Remove calls to gen_rtx_REG,
15600         start_sequence and end_sequence and instead assert that no rtl is
15601         generated.
15603 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15605         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15606         order of HIGH and CONST checks.
15608 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15610         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15611         if the destination isn't an SSA_NAME.
15613 2018-01-09  Richard Biener  <rguenther@suse.de>
15615         PR tree-optimization/83668
15616         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15617         move prologue...
15618         (canonicalize_loop_form): ... here, renamed from ...
15619         (canonicalize_loop_closed_ssa_form): ... this and amended to
15620         swap successor edges for loop exit blocks to make us use
15621         the RPO order we need for initial schedule generation.
15623 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
15625         PR tree-optimization/64811
15626         * match.pd: When optimizing comparisons with Inf, avoid
15627         introducing or losing exceptions from comparisons with NaN.
15629 2018-01-09  Martin Liska  <mliska@suse.cz>
15631         PR sanitizer/82517
15632         * asan.c (shadow_mem_size): Add gcc_assert.
15634 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
15636         Don't save registers in main().
15638         PR target/83738
15639         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15640         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15641         * config/avr/avr.c (avr_set_current_function): Don't error if
15642         naked, OS_task or OS_main are specified at the same time.
15643         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15644         OS_main.
15645         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15646         attribute.
15647         * common/config/avr/avr-common.c (avr_option_optimization_table):
15648         Switch on -mmain-is-OS_task for optimizing compilations.
15650 2018-01-09  Richard Biener  <rguenther@suse.de>
15652         PR tree-optimization/83572
15653         * graphite.c: Include cfganal.h.
15654         (graphite_transform_loops): Connect infinite loops to exit
15655         and remove fake edges at the end.
15657 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15659         * ipa-inline.c (edge_badness): Revert accidental checkin.
15661 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15663         PR ipa/80763
15664         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15665         symbols; not inline clones.
15667 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
15669         PR target/83507
15670         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15671         hard registers.  Formatting fixes.
15673         PR preprocessor/83722
15674         * gcc.c (try_generate_repro): Pass
15675         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15676         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15677         do_report_bug.
15679 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
15680             Kito Cheng  <kito.cheng@gmail.com>
15682         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15683         (riscv_leaf_function_p): Delete.
15684         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15686 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15688         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15689         function.
15690         (do_ifelse): New function.
15691         (do_isel): New function.
15692         (do_sub3): New function.
15693         (do_add3): New function.
15694         (do_load_mask_compare): New function.
15695         (do_overlap_load_compare): New function.
15696         (expand_compare_loop): New function.
15697         (expand_block_compare): Call expand_compare_loop() when appropriate.
15698         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15699         option description.
15700         (-mblock-compare-inline-loop-limit): New option.
15702 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15704         PR target/83677
15705         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15706         Reverse order of second and third operands in first alternative.
15707         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15708         of first and second elements in UNSPEC_VPERMR vector.
15709         (altivec_expand_vec_perm_le): Likewise.
15711 2018-01-08  Jeff Law  <law@redhat.com>
15713         PR rtl-optimizatin/81308
15714         * tree-switch-conversion.c (cfg_altered): New file scoped static.
15715         (process_switch): If group_case_labels makes a change, then set
15716         cfg_altered.
15717         (pass_convert_switch::execute): If a switch is converted, then
15718         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
15720         PR rtl-optimization/81308
15721         * recog.c (split_all_insns): Conditionally cleanup the CFG after
15722         splitting insns.
15724 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
15726         PR target/83663 - Revert r255946
15727         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15728         generation for cases where splatting a value is not useful.
15729         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15730         across a vec_duplicate and a paradoxical subreg forming a vector
15731         mode to a vec_concat.
15733 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15735         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15736         -march=armv8.3-a variants.
15737         * config/arm/t-multilib: Likewise.
15738         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
15740 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15742         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15743         to generate rtl.
15744         (cceq_ior_compare_complement): Give it a name so I can use it, and
15745         change boolean_or_operator predicate to boolean_operator so it can
15746         be used to generate a crand.
15747         (eqne): New code iterator.
15748         (bd/bd_neg): New code_attrs.
15749         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15750         a single define_insn.
15751         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15752         decrement (bdnzt/bdnzf/bdzt/bdzf).
15753         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15754         with the new names of the branch decrement patterns, and added the
15755         names of the branch decrement conditional patterns.
15757 2018-01-08  Richard Biener  <rguenther@suse.de>
15759         PR tree-optimization/83563
15760         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15761         cache.
15763 2018-01-08  Richard Biener  <rguenther@suse.de>
15765         PR middle-end/83713
15766         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15768 2018-01-08  Richard Biener  <rguenther@suse.de>
15770         PR tree-optimization/83685
15771         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15772         references to abnormals.
15774 2018-01-08  Richard Biener  <rguenther@suse.de>
15776         PR lto/83719
15777         * dwarf2out.c (output_indirect_strings): Handle empty
15778         skeleton_debug_str_hash.
15779         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15781 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15783         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15784         (emit_store_direct): Likewise.
15785         (arc_trampoline_adjust_address): Likewise.
15786         (arc_asm_trampoline_template): New function.
15787         (arc_initialize_trampoline): Use asm_trampoline_template.
15788         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15789         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15790         * config/arc/arc.md (flush_icache): Delete pattern.
15792 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15794         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15795         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15796         munaligned-access.
15798 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15800         PR target/83681
15801         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15802         by not USED_FOR_TARGET.
15803         (make_pass_resolve_sw_modes): Likewise.
15805 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15807         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15808         USED_FOR_TARGET.
15810 2018-01-08  Richard Biener  <rguenther@suse.de>
15812         PR middle-end/83580
15813         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15815 2018-01-08  Richard Biener  <rguenther@suse.de>
15817         PR middle-end/83517
15818         * match.pd ((t * 2) / 2) -> t): Add missing :c.
15820 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
15822         PR middle-end/81897
15823         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15824         basic blocks with a small number of successors.
15825         (convert_control_dep_chain_into_preds): Improve handling of
15826         forwarder blocks.
15827         (dump_predicates): Split apart into...
15828         (dump_pred_chain): ...here...
15829         (dump_pred_info): ...and here.
15830         (can_one_predicate_be_invalidated_p): Add debugging printfs.
15831         (can_chain_union_be_invalidated_p): Improve check for invalidation
15832         of paths.
15833         (uninit_uses_cannot_happen): Avoid unnecessary if
15834         convert_control_dep_chain_into_preds yielded nothing.
15836 2018-01-06  Martin Sebor  <msebor@redhat.com>
15838         PR tree-optimization/83640
15839         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15840         subtracting negative offset from size.
15841         (builtin_access::overlap): Adjust offset bounds of the access to fall
15842         within the size of the object if possible.
15844 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
15846         PR rtl-optimization/83699
15847         * expmed.c (extract_bit_field_1): Restrict the vector usage of
15848         extract_bit_field_as_subreg to cases in which the extracted
15849         value is also a vector.
15851         * lra-constraints.c (process_alt_operands): Test for the equivalence
15852         substitutions when detecting a possible reload cycle.
15854 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
15856         PR debug/83480
15857         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15858         by default if flag_selective_schedling{,2}.  Formatting fixes.
15860         PR rtl-optimization/83682
15861         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15862         if it has non-VECTOR_MODE element mode.
15863         (vec_duplicate_p): Likewise.
15865         PR middle-end/83694
15866         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15867         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15869 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15871         PR target/83604
15872         * config/i386/i386-builtin.def
15873         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15874         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15875         Require also OPTION_MASK_ISA_AVX512F in addition to
15876         OPTION_MASK_ISA_GFNI.
15877         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15878         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15879         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15880         to OPTION_MASK_ISA_GFNI.
15881         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15882         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15883         OPTION_MASK_ISA_AVX512BW.
15884         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15885         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15886         addition to OPTION_MASK_ISA_GFNI.
15887         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15888         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15889         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15890         to OPTION_MASK_ISA_GFNI.
15891         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15892         a requirement for all ISAs rather than any of them with a few
15893         exceptions.
15894         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15895         processing.
15896         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15897         bitmasks to be enabled with 3 exceptions, instead of requiring any
15898         enabled ISA with lots of exceptions.
15899         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
15900         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
15901         Change avx512bw in isa attribute to avx512f.
15902         * config/i386/sgxintrin.h: Add license boilerplate.
15903         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
15904         to __AVX512F__ and __AVX512VL to __AVX512VL__.
15905         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
15906         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
15907         defined.
15908         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
15909         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
15910         temporarily sse2 rather than sse if not enabled already.
15912         PR target/83604
15913         * config/i386/sse.md (VI248_VLBW): Rename to ...
15914         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
15915         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
15916         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
15917         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
15918         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
15919         mode iterator instead of VI248_VLBW.
15921 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
15923         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
15924         (record_modified): Skip clobbers; add debug output.
15925         (param_change_prob): Use sreal frequencies.
15927 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15929         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
15930         punt for user-aligned variables.
15932 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15934         * tree-chrec.c (chrec_contains_symbols): Return true for
15935         POLY_INT_CST.
15937 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
15939         PR target/82439
15940         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
15941         of (x|y) == x for BICS pattern.
15943 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15945         PR tree-optimization/83605
15946         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
15947         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
15948         can throw.
15950 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15952         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
15953         * config/epiphany/rtems.h: New file.
15955 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15956             Uros Bizjak  <ubizjak@gmail.com>
15958         PR target/83554
15959         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
15960         QIreg_operand instead of register_operand predicate.
15961         * config/i386/i386.c (ix86_rop_should_change_byte_p,
15962         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
15963         comments instead of -fmitigate[-_]rop.
15965 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15967         PR bootstrap/81926
15968         * cgraphunit.c (symbol_table::compile): Switch to text_section
15969         before calling assembly_start debug hook.
15970         * run-rtl-passes.c (run_rtl_passes): Likewise.
15971         Include output.h.
15973 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15975         * tree-vrp.c (extract_range_from_binary_expr_1): Check
15976         range_int_cst_p rather than !symbolic_range_p before calling
15977         extract_range_from_multiplicative_op_1.
15979 2018-01-04  Jeff Law  <law@redhat.com>
15981         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
15982         redundant test in assertion.
15984 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15986         * doc/rtl.texi: Document machine_mode wrapper classes.
15988 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15990         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
15991         using tree_to_uhwi.
15993 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
15995         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
15996         the VEC_PERM_EXPR fold to fail.
15998 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16000         PR debug/83585
16001         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16002         to switched_sections.
16004 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16006         PR target/83680
16007         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16008         test for d.testing.
16010 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16012         PR target/83387
16013         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16014         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16016 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16018         PR debug/83666
16019         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16020         is BLKmode and bitpos not zero or mode change is needed.
16022 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16024         PR target/83675
16025         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16026         TARGET_VIS2.
16028 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16030         PR target/83628
16031         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16032         instead of MULT rtx.  Update all corresponding splitters.
16033         (*saddl_se): Ditto.
16034         (*ssub<modesuffix>): Ditto.
16035         (*ssubl_se): Ditto.
16036         (*cmp_sadd_di): Update split patterns.
16037         (*cmp_sadd_si): Ditto.
16038         (*cmp_sadd_sidi): Ditto.
16039         (*cmp_ssub_di): Ditto.
16040         (*cmp_ssub_si): Ditto.
16041         (*cmp_ssub_sidi): Ditto.
16042         * config/alpha/predicates.md (const23_operand): New predicate.
16043         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16044         Look for ASHIFT, not MULT inner operand.
16045         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16047 2018-01-04  Martin Liska  <mliska@suse.cz>
16049         PR gcov-profile/83669
16050         * gcov.c (output_intermediate_file): Add version to intermediate
16051         gcov file.
16052         * doc/gcov.texi: Document new field 'version' in intermediate
16053         file format. Fix location of '-k' option of gcov command.
16055 2018-01-04  Martin Liska  <mliska@suse.cz>
16057         PR ipa/82352
16058         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16060 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16062         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16064 2018-01-03  Martin Sebor  <msebor@redhat.com>
16066         PR tree-optimization/83655
16067         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16068         checking calls with invalid arguments.
16070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16072         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16073         (vectorizable_mask_load_store): Delete.
16074         (vectorizable_call): Return false for masked loads and stores.
16075         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16076         instead of gimple_assign_rhs1.
16077         (vectorizable_load): Handle IFN_MASK_LOAD.
16078         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16080 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16082         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16083         split out from..,
16084         (vectorizable_mask_load_store): ...here.
16085         (vectorizable_load): ...and here.
16087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16089         * tree-vect-stmts.c (vect_build_all_ones_mask)
16090         (vect_build_zero_merge_argument): New functions, split out from...
16091         (vectorizable_load): ...here.
16093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16095         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16096         split out from...
16097         (vectorizable_mask_load_store): ...here.
16098         (vectorizable_store): ...and here.
16100 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16102         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16103         split out from...
16104         (vectorizable_mask_load_store): ...here.
16106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16108         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16109         (vect_model_store_cost): Take a vec_load_store_type instead of a
16110         vect_def_type.
16111         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16112         (vect_model_store_cost): Take a vec_load_store_type instead of a
16113         vect_def_type.
16114         (vectorizable_mask_load_store): Update accordingly.
16115         (vectorizable_store): Likewise.
16116         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16120         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16121         IFN_MASK_LOAD calls here rather than...
16122         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16125             Alan Hayward  <alan.hayward@arm.com>
16126             David Sherwood  <david.sherwood@arm.com>
16128         * expmed.c (extract_bit_field_1): For vector extracts,
16129         fall back to extract_bit_field_as_subreg if vec_extract
16130         isn't available.
16132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16133             Alan Hayward  <alan.hayward@arm.com>
16134             David Sherwood  <david.sherwood@arm.com>
16136         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16137         they are variable or constant sized.
16138         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16139         slots for constant-sized data.
16141 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16142             Alan Hayward  <alan.hayward@arm.com>
16143             David Sherwood  <david.sherwood@arm.com>
16145         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16146         handling COND_EXPRs with boolean comparisons, try to find a better
16147         basis for the mask type than the boolean itself.
16149 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16151         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16152         is calculated and how it can be overridden.
16153         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16154         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16155         if defined.
16156         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16157         if nonzero.
16159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16160             Alan Hayward  <alan.hayward@arm.com>
16161             David Sherwood  <david.sherwood@arm.com>
16163         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16164         Remove the mode argument.
16165         (aarch64_simd_valid_immediate): Remove the mode and inverse
16166         arguments.
16167         * config/aarch64/iterators.md (bitsize): New iterator.
16168         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16169         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16170         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16171         aarch64_simd_valid_immediate.
16172         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16173         (aarch64_reg_or_bic_imm): Likewise.
16174         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16175         with an insn_type enum and msl with a modifier_type enum.
16176         Replace element_width with a scalar_mode.  Change the shift
16177         to unsigned int.  Add constructors for scalar_float_mode and
16178         scalar_int_mode elements.
16179         (aarch64_vect_float_const_representable_p): Delete.
16180         (aarch64_can_const_movi_rtx_p)
16181         (aarch64_simd_scalar_immediate_valid_for_move)
16182         (aarch64_simd_make_constant): Update call to
16183         aarch64_simd_valid_immediate.
16184         (aarch64_advsimd_valid_immediate_hs): New function.
16185         (aarch64_advsimd_valid_immediate): Likewise.
16186         (aarch64_simd_valid_immediate): Remove mode and inverse
16187         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16188         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16189         and aarch64_float_const_representable_p on the result.
16190         (aarch64_output_simd_mov_immediate): Remove mode argument.
16191         Update call to aarch64_simd_valid_immediate and use of
16192         simd_immediate_info.
16193         (aarch64_output_scalar_simd_mov_immediate): Update call
16194         accordingly.
16196 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16197             Alan Hayward  <alan.hayward@arm.com>
16198             David Sherwood  <david.sherwood@arm.com>
16200         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16201         (mode_nunits): Likewise CONST_MODE_NUNITS.
16202         * machmode.def (ADJUST_NUNITS): Document.
16203         * genmodes.c (mode_data::need_nunits_adj): New field.
16204         (blank_mode): Update accordingly.
16205         (adj_nunits): New variable.
16206         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16207         parameter.
16208         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16209         listed in adj_nunits.
16210         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16211         listed in adj_nunits.  Don't emit case statements for such modes.
16212         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16213         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16214         nothing if adj_nunits is nonnull.
16215         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16216         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16217         (emit_mode_fbit): Update use of print_maybe_const_decl.
16218         (emit_move_size): Likewise.  Treat the array as non-const
16219         if adj_nunits.
16220         (emit_mode_adjustments): Handle adj_nunits.
16222 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16224         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16225         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16226         (VECTOR_MODES): Use it.
16227         (make_vector_modes): Take the prefix as an argument.
16229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16230             Alan Hayward  <alan.hayward@arm.com>
16231             David Sherwood  <david.sherwood@arm.com>
16233         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16234         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16235         for MODE_VECTOR_BOOL.
16236         * machmode.def (VECTOR_BOOL_MODE): Document.
16237         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16238         (make_vector_bool_mode): New function.
16239         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16240         MODE_VECTOR_BOOL.
16241         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16242         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16243         Likewise.
16244         * stor-layout.c (int_mode_for_mode): Likewise.
16245         * tree.c (build_vector_type_for_mode): Likewise.
16246         * varasm.c (output_constant_pool_2): Likewise.
16247         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16248         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16249         for MODE_VECTOR_BOOL.
16250         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16251         of mode class checks.
16252         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16253         instead of a list of mode class checks.
16254         (expand_vector_scalar_condition): Likewise.
16255         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16258             Alan Hayward  <alan.hayward@arm.com>
16259             David Sherwood  <david.sherwood@arm.com>
16261         * machmode.h (mode_size): Change from unsigned short to
16262         poly_uint16_pod.
16263         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16264         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16265         or if measurement_type is not polynomial.
16266         (fixed_size_mode::includes_p): Check for constant-sized modes.
16267         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16268         return a poly_uint16 rather than an unsigned short.
16269         (emit_mode_size): Change the type of mode_size from unsigned short
16270         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16271         (emit_mode_adjustments): Cope with polynomial vector sizes.
16272         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16273         for GET_MODE_SIZE.
16274         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16275         for GET_MODE_SIZE.
16276         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16277         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16278         * caller-save.c (setup_save_areas): Likewise.
16279         (replace_reg_with_saved_mem): Likewise.
16280         * calls.c (emit_library_call_value_1): Likewise.
16281         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16282         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16283         (gen_lowpart_for_combine): Likewise.
16284         * convert.c (convert_to_integer_1): Likewise.
16285         * cse.c (equiv_constant, cse_insn): Likewise.
16286         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16287         (cselib_subst_to_values): Likewise.
16288         * dce.c (word_dce_process_block): Likewise.
16289         * df-problems.c (df_word_lr_mark_ref): Likewise.
16290         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16291         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16292         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16293         (rtl_for_decl_location): Likewise.
16294         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16295         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16296         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16297         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16298         (expand_expr_real_1): Likewise.
16299         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16300         (pad_below): Likewise.
16301         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16302         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16303         * ira.c (get_subreg_tracking_sizes): Likewise.
16304         * ira-build.c (ira_create_allocno_objects): Likewise.
16305         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16306         (ira_sort_regnos_for_alter_reg): Likewise.
16307         * ira-costs.c (record_operand_costs): Likewise.
16308         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16309         (resolve_simple_move): Likewise.
16310         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16311         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16312         (lra_constraints): Likewise.
16313         (CONST_POOL_OK_P): Reject variable-sized modes.
16314         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16315         (add_pseudo_to_slot, lra_spill): Likewise.
16316         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16317         * optabs-query.c (get_best_extraction_insn): Likewise.
16318         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16319         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16320         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16321         * recog.c (offsettable_address_addr_space_p): Likewise.
16322         * regcprop.c (maybe_mode_change): Likewise.
16323         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16324         * regrename.c (build_def_use): Likewise.
16325         * regstat.c (dump_reg_info): Likewise.
16326         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16327         (find_reloads, find_reloads_subreg_address): Likewise.
16328         * reload1.c (eliminate_regs_1): Likewise.
16329         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16330         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16331         (simplify_binary_operation_1, simplify_subreg): Likewise.
16332         * targhooks.c (default_function_arg_padding): Likewise.
16333         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16334         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16335         (verify_gimple_assign_ternary): Likewise.
16336         * tree-inline.c (estimate_move_cost): Likewise.
16337         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16338         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16339         (get_address_cost_ainc): Likewise.
16340         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16341         (vect_supportable_dr_alignment): Likewise.
16342         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16343         (vectorizable_reduction): Likewise.
16344         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16345         (vectorizable_operation, vectorizable_load): Likewise.
16346         * tree.c (build_same_sized_truth_vector_type): Likewise.
16347         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16348         * var-tracking.c (emit_note_insn_var_location): Likewise.
16349         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16350         (ADDR_VEC_ALIGN): Likewise.
16352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16353             Alan Hayward  <alan.hayward@arm.com>
16354             David Sherwood  <david.sherwood@arm.com>
16356         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16357         unsigned short.
16358         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16359         or if measurement_type is polynomial.
16360         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16361         * combine.c (make_extraction): Likewise.
16362         * dse.c (find_shift_sequence): Likewise.
16363         * dwarf2out.c (mem_loc_descriptor): Likewise.
16364         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16365         (extract_bit_field, extract_low_bits): Likewise.
16366         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16367         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16368         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16369         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16370         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16371         * reload.c (find_reloads): Likewise.
16372         * reload1.c (alter_reg): Likewise.
16373         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16374         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16375         * tree-if-conv.c (predicate_mem_writes): Likewise.
16376         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16377         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16378         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16379         * valtrack.c (dead_debug_insert_temp): Likewise.
16380         * varasm.c (mergeable_constant_section): Likewise.
16381         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16384             Alan Hayward  <alan.hayward@arm.com>
16385             David Sherwood  <david.sherwood@arm.com>
16387         * expr.c (expand_assignment): Cope with polynomial mode sizes
16388         when assigning to a CONCAT.
16390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16391             Alan Hayward  <alan.hayward@arm.com>
16392             David Sherwood  <david.sherwood@arm.com>
16394         * machmode.h (mode_precision): Change from unsigned short to
16395         poly_uint16_pod.
16396         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16397         short.
16398         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16399         or if measurement_type is not polynomial.
16400         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16401         in which the mode is already known to be a scalar_int_mode.
16402         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16403         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16404         initializer.
16405         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16406         for GET_MODE_PRECISION.
16407         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16408         for GET_MODE_PRECISION.
16409         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16410         as polynomial.
16411         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16412         (expand_field_assignment, make_extraction): Likewise.
16413         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16414         (get_last_value): Likewise.
16415         * convert.c (convert_to_integer_1): Likewise.
16416         * cse.c (cse_insn): Likewise.
16417         * expr.c (expand_expr_real_1): Likewise.
16418         * lra-constraints.c (simplify_operand_subreg): Likewise.
16419         * optabs-query.c (can_atomic_load_p): Likewise.
16420         * optabs.c (expand_atomic_load): Likewise.
16421         (expand_atomic_store): Likewise.
16422         * ree.c (combine_reaching_defs): Likewise.
16423         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16424         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16425         * tree.h (type_has_mode_precision_p): Likewise.
16426         * ubsan.c (instrument_si_overflow): Likewise.
16428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16429             Alan Hayward  <alan.hayward@arm.com>
16430             David Sherwood  <david.sherwood@arm.com>
16432         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16433         polynomial numbers of units.
16434         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16435         (valid_vector_subparts_p): New function.
16436         (build_vector_type): Remove temporary shim and take the number
16437         of units as a poly_uint64 rather than an int.
16438         (build_opaque_vector_type): Take the number of units as a
16439         poly_uint64 rather than an int.
16440         * tree.c (build_vector_from_ctor): Handle polynomial
16441         TYPE_VECTOR_SUBPARTS.
16442         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16443         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16444         (build_vector_from_val): If the number of units is variable,
16445         use build_vec_duplicate_cst for constant operands and
16446         VEC_DUPLICATE_EXPR otherwise.
16447         (make_vector_type): Remove temporary is_constant ().
16448         (build_vector_type, build_opaque_vector_type): Take the number of
16449         units as a poly_uint64 rather than an int.
16450         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16451         VECTOR_CST_NELTS.
16452         * cfgexpand.c (expand_debug_expr): Likewise.
16453         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16454         (store_constructor, expand_expr_real_1): Likewise.
16455         (const_scalar_mask_from_tree): Likewise.
16456         * fold-const-call.c (fold_const_reduction): Likewise.
16457         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16458         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16459         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16460         (fold_relational_const): Likewise.
16461         (native_interpret_vector): Likewise.  Change the size from an
16462         int to an unsigned int.
16463         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16464         TYPE_VECTOR_SUBPARTS.
16465         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16466         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16467         duplicating a non-constant operand into a variable-length vector.
16468         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16469         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16470         * ipa-icf.c (sem_variable::equals): Likewise.
16471         * match.pd: Likewise.
16472         * omp-simd-clone.c (simd_clone_subparts): Likewise.
16473         * print-tree.c (print_node): Likewise.
16474         * stor-layout.c (layout_type): Likewise.
16475         * targhooks.c (default_builtin_vectorization_cost): Likewise.
16476         * tree-cfg.c (verify_gimple_comparison): Likewise.
16477         (verify_gimple_assign_binary): Likewise.
16478         (verify_gimple_assign_ternary): Likewise.
16479         (verify_gimple_assign_single): Likewise.
16480         * tree-pretty-print.c (dump_generic_node): Likewise.
16481         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16482         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16483         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16484         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16485         (vect_shift_permute_load_chain): Likewise.
16486         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16487         (expand_vector_condition, optimize_vector_constructor): Likewise.
16488         (lower_vec_perm, get_compute_type): Likewise.
16489         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16490         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16491         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16492         (vect_recog_mask_conversion_pattern): Likewise.
16493         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16494         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16495         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16496         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16497         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16498         (vectorizable_shift, vectorizable_operation, vectorizable_store)
16499         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16500         (supportable_widening_operation): Likewise.
16501         (supportable_narrowing_operation): Likewise.
16502         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16503         Likewise.
16504         * varasm.c (output_constant): Likewise.
16506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16507             Alan Hayward  <alan.hayward@arm.com>
16508             David Sherwood  <david.sherwood@arm.com>
16510         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
16511         so that both the length == 3 and length != 3 cases set up their
16512         own permute vectors.  Add comments explaining why we know the
16513         number of elements is constant.
16514         (vect_permute_load_chain): Likewise.
16516 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16517             Alan Hayward  <alan.hayward@arm.com>
16518             David Sherwood  <david.sherwood@arm.com>
16520         * machmode.h (mode_nunits): Change from unsigned char to
16521         poly_uint16_pod.
16522         (ONLY_FIXED_SIZE_MODES): New macro.
16523         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16524         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16525         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16526         New typedefs.
16527         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16528         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16529         or if measurement_type is not polynomial.
16530         * genmodes.c (ZERO_COEFFS): New macro.
16531         (emit_mode_nunits_inline): Make mode_nunits_inline return a
16532         poly_uint16.
16533         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16534         Use ZERO_COEFFS when emitting initializers.
16535         * data-streamer.h (bp_pack_poly_value): New function.
16536         (bp_unpack_poly_value): Likewise.
16537         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16538         for GET_MODE_NUNITS.
16539         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16540         for GET_MODE_NUNITS.
16541         * tree.c (make_vector_type): Remove temporary shim and make
16542         the real function take the number of units as a poly_uint64
16543         rather than an int.
16544         (build_vector_type_for_mode): Handle polynomial nunits.
16545         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16546         * emit-rtl.c (const_vec_series_p_1): Likewise.
16547         (gen_rtx_CONST_VECTOR): Likewise.
16548         * fold-const.c (test_vec_duplicate_folding): Likewise.
16549         * genrecog.c (validate_pattern): Likewise.
16550         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16551         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16552         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16553         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16554         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16555         * rtlanal.c (subreg_get_info): Likewise.
16556         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16557         (vect_grouped_load_supported): Likewise.
16558         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16559         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16560         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16561         (simplify_const_unary_operation, simplify_binary_operation_1)
16562         (simplify_const_binary_operation, simplify_ternary_operation)
16563         (test_vector_ops_duplicate, test_vector_ops): Likewise.
16564         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16565         instead of CONST_VECTOR_NUNITS.
16566         * varasm.c (output_constant_pool_2): Likewise.
16567         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16568         explicit-encoded elements in the XVEC for variable-length vectors.
16570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16572         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16574 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16575             Alan Hayward  <alan.hayward@arm.com>
16576             David Sherwood  <david.sherwood@arm.com>
16578         * coretypes.h (fixed_size_mode): Declare.
16579         (fixed_size_mode_pod): New typedef.
16580         * builtins.h (target_builtins::x_apply_args_mode)
16581         (target_builtins::x_apply_result_mode): Change type to
16582         fixed_size_mode_pod.
16583         * builtins.c (apply_args_size, apply_result_size, result_vector)
16584         (expand_builtin_apply_args_1, expand_builtin_apply)
16585         (expand_builtin_return): Update accordingly.
16587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16589         * cse.c (hash_rtx_cb): Hash only the encoded elements.
16590         * cselib.c (cselib_hash_rtx): Likewise.
16591         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16592         CONST_VECTOR encoding.
16594 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16595             Jeff Law  <law@redhat.com>
16597         PR target/83641
16598         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16599         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16600         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16601         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16603         PR target/83641
16604         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16605         explicitly probe *sp in a noreturn function if there were any callee
16606         register saves or frame pointer is needed.
16608 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16610         PR debug/83621
16611         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16612         BLKmode for ternary, binary or unary expressions.
16614         PR debug/83645
16615         * var-tracking.c (delete_vta_debug_insn): New inline function.
16616         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16617         insns from get_insns () to NULL instead of each bb separately.
16618         Use delete_vta_debug_insn.  No longer static.
16619         (vt_debug_insns_local, variable_tracking_main_1): Adjust
16620         delete_vta_debug_insns callers.
16621         * rtl.h (delete_vta_debug_insns): Declare.
16622         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16623         instead of variable_tracking_main.
16625 2018-01-03  Martin Sebor  <msebor@redhat.com>
16627         PR tree-optimization/83603
16628         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16629         arguments past the endof the argument list in functions declared
16630         without a prototype.
16631         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16632         Avoid checking when arguments are null.
16634 2018-01-03  Martin Sebor  <msebor@redhat.com>
16636         PR c/83559
16637         * doc/extend.texi (attribute const): Fix a typo.
16638         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16639         issuing -Wsuggest-attribute for void functions.
16641 2018-01-03  Martin Sebor  <msebor@redhat.com>
16643         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16644         offset_int::from instead of wide_int::to_shwi.
16645         (maybe_diag_overlap): Remove assertion.
16646         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16647         * gimple-ssa-sprintf.c (format_directive): Same.
16648         (parse_directive): Same.
16649         (sprintf_dom_walker::compute_format_length): Same.
16650         (try_substitute_return_value): Same.
16652 2018-01-03  Jeff Law  <law@redhat.com>
16654         PR middle-end/83654
16655         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16656         non-constant residual for zero at runtime and avoid probing in
16657         that case.  Reorganize code for trailing problem to mirror handling
16658         of the residual.
16660 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16662         PR tree-optimization/83501
16663         * tree-ssa-strlen.c (get_string_cst): New.
16664         (handle_char_store): Call get_string_cst.
16666 2018-01-03  Martin Liska  <mliska@suse.cz>
16668         PR tree-optimization/83593
16669         * tree-ssa-strlen.c: Include tree-cfg.h.
16670         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16671         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16672         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16673         to false.
16674         (strlen_dom_walker::before_dom_children): Call
16675         gimple_purge_dead_eh_edges. Dump tranformation with details
16676         dump flags.
16677         (strlen_dom_walker::before_dom_children): Update call by adding
16678         new argument cleanup_eh.
16679         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16681 2018-01-03  Martin Liska  <mliska@suse.cz>
16683         PR ipa/83549
16684         * cif-code.def (VARIADIC_THUNK): New enum value.
16685         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16686         thunks.
16688 2018-01-03  Jan Beulich  <jbeulich@suse.com>
16690         * sse.md (mov<mode>_internal): Tighten condition for when to use
16691         vmovdqu<ssescalarsize> for TI and OI modes.
16693 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16695         Update copyright years.
16697 2018-01-03  Martin Liska  <mliska@suse.cz>
16699         PR ipa/83594
16700         * ipa-visibility.c (function_and_variable_visibility): Skip
16701         functions with noipa attribure.
16703 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16705         * gcc.c (process_command): Update copyright notice dates.
16706         * gcov-dump.c (print_version): Ditto.
16707         * gcov.c (print_version): Ditto.
16708         * gcov-tool.c (print_version): Ditto.
16709         * gengtype.c (create_file): Ditto.
16710         * doc/cpp.texi: Bump @copying's copyright year.
16711         * doc/cppinternals.texi: Ditto.
16712         * doc/gcc.texi: Ditto.
16713         * doc/gccint.texi: Ditto.
16714         * doc/gcov.texi: Ditto.
16715         * doc/install.texi: Ditto.
16716         * doc/invoke.texi: Ditto.
16718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16720         * vector-builder.h (vector_builder::m_full_nelts): Change from
16721         unsigned int to poly_uint64.
16722         (vector_builder::full_nelts): Update prototype accordingly.
16723         (vector_builder::new_vector): Likewise.
16724         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16725         (vector_builder::operator ==): Likewise.
16726         (vector_builder::finalize): Likewise.
16727         * int-vector-builder.h (int_vector_builder::int_vector_builder):
16728         Take the number of elements as a poly_uint64 rather than an
16729         unsigned int.
16730         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16731         from unsigned int to poly_uint64.
16732         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16733         (vec_perm_indices::new_vector): Likewise.
16734         (vec_perm_indices::length): Likewise.
16735         (vec_perm_indices::nelts_per_input): Likewise.
16736         (vec_perm_indices::input_nelts): Likewise.
16737         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16738         number of elements per input as a poly_uint64 rather than an
16739         unsigned int.  Use the original encoding for variable-length
16740         vectors, rather than clamping each individual element.
16741         For the second and subsequent elements in each pattern,
16742         clamp the step and base before clamping their sum.
16743         (vec_perm_indices::series_p): Handle polynomial element counts.
16744         (vec_perm_indices::all_in_range_p): Likewise.
16745         (vec_perm_indices_to_tree): Likewise.
16746         (vec_perm_indices_to_rtx): Likewise.
16747         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16748         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16749         (tree_vector_builder::new_binary_operation): Handle polynomial
16750         element counts.  Return false if we need to know the number
16751         of elements at compile time.
16752         * fold-const.c (fold_vec_perm): Punt if the number of elements
16753         isn't known at compile time.
16755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16757         * vec-perm-indices.h (vec_perm_builder): Change element type
16758         from HOST_WIDE_INT to poly_int64.
16759         (vec_perm_indices::element_type): Update accordingly.
16760         (vec_perm_indices::clamp): Handle polynomial element_types.
16761         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16762         (vec_perm_indices::all_in_range_p): Likewise.
16763         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16764         than shwi trees.
16765         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16766         polynomial vec_perm_indices element types.
16767         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16768         * fold-const.c (fold_vec_perm): Likewise.
16769         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16770         * tree-vect-generic.c (lower_vec_perm): Likewise.
16771         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16772         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16773         element type to HOST_WIDE_INT.
16775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16776             Alan Hayward  <alan.hayward@arm.com>
16777             David Sherwood  <david.sherwood@arm.com>
16779         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16780         rather than an int.  Use plus_constant.
16781         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16782         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16785             Alan Hayward  <alan.hayward@arm.com>
16786             David Sherwood  <david.sherwood@arm.com>
16788         * calls.c (emit_call_1, expand_call): Change struct_value_size from
16789         a HOST_WIDE_INT to a poly_int64.
16791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16792             Alan Hayward  <alan.hayward@arm.com>
16793             David Sherwood  <david.sherwood@arm.com>
16795         * calls.c (load_register_parameters): Cope with polynomial
16796         mode sizes.  Require a constant size for BLKmode parameters
16797         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
16798         forces a parameter to be padded at the lsb end in order to
16799         fill a complete number of words, require the parameter size
16800         to be ordered wrt UNITS_PER_WORD.
16802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16803             Alan Hayward  <alan.hayward@arm.com>
16804             David Sherwood  <david.sherwood@arm.com>
16806         * reload1.c (spill_stack_slot_width): Change element type
16807         from unsigned int to poly_uint64_pod.
16808         (alter_reg): Treat mode sizes as polynomial.
16810 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16811             Alan Hayward  <alan.hayward@arm.com>
16812             David Sherwood  <david.sherwood@arm.com>
16814         * reload.c (complex_word_subreg_p): New function.
16815         (reload_inner_reg_of_subreg, push_reload): Use it.
16817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16818             Alan Hayward  <alan.hayward@arm.com>
16819             David Sherwood  <david.sherwood@arm.com>
16821         * lra-constraints.c (process_alt_operands): Reject matched
16822         operands whose sizes aren't ordered.
16823         (match_reload): Refer to this check here.
16825 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16826             Alan Hayward  <alan.hayward@arm.com>
16827             David Sherwood  <david.sherwood@arm.com>
16829         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16830         that the mode size is in the set {1, 2, 4, 8, 16}.
16832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16833             Alan Hayward  <alan.hayward@arm.com>
16834             David Sherwood  <david.sherwood@arm.com>
16836         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16837         Use plus_constant instead of gen_rtx_PLUS.
16839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16840             Alan Hayward  <alan.hayward@arm.com>
16841             David Sherwood  <david.sherwood@arm.com>
16843         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16844         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16845         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16846         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16847         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16848         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16849         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16850         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16851         * config/i386/i386.c (ix86_push_rounding): ...this new function.
16852         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16853         a poly_int64.
16854         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16855         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16856         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16857         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16858         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16859         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16860         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16861         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16862         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16863         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16864         function.
16865         * expr.c (emit_move_resolve_push): Treat the input and result
16866         of PUSH_ROUNDING as a poly_int64.
16867         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16868         (emit_push_insn): Likewise.
16869         * lra-eliminations.c (mark_not_eliminable): Likewise.
16870         * recog.c (push_operand): Likewise.
16871         * reload1.c (elimination_effects): Likewise.
16872         * rtlanal.c (nonzero_bits1): Likewise.
16873         * calls.c (store_one_arg): Likewise.  Require the padding to be
16874         known at compile time.
16876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16877             Alan Hayward  <alan.hayward@arm.com>
16878             David Sherwood  <david.sherwood@arm.com>
16880         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16881         Use plus_constant instead of gen_rtx_PLUS.
16883 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16884             Alan Hayward  <alan.hayward@arm.com>
16885             David Sherwood  <david.sherwood@arm.com>
16887         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16888         rather than an int.
16890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16891             Alan Hayward  <alan.hayward@arm.com>
16892             David Sherwood  <david.sherwood@arm.com>
16894         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16895         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16896         via stack temporaries.  Treat the mode size as polynomial too.
16898 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16899             Alan Hayward  <alan.hayward@arm.com>
16900             David Sherwood  <david.sherwood@arm.com>
16902         * expr.c (expand_expr_real_2): When handling conversions involving
16903         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
16904         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
16905         as a poly_uint64 too.
16907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16908             Alan Hayward  <alan.hayward@arm.com>
16909             David Sherwood  <david.sherwood@arm.com>
16911         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
16918         REGMODE_NATURAL_SIZE.
16919         * expmed.c (store_bit_field_1): Likewise.
16920         * expr.c (store_constructor): Likewise.
16921         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
16922         and polynomial REGMODE_NATURAL_SIZE.
16923         (gen_lowpart_common): Likewise.
16924         * reginfo.c (record_subregs_of_mode): Likewise.
16925         * rtlanal.c (read_modify_subreg_p): Likewise.
16927 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16928             Alan Hayward  <alan.hayward@arm.com>
16929             David Sherwood  <david.sherwood@arm.com>
16931         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
16932         numbers of elements.
16934 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16935             Alan Hayward  <alan.hayward@arm.com>
16936             David Sherwood  <david.sherwood@arm.com>
16938         * match.pd: Cope with polynomial numbers of vector 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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
16945         in a POINTER_PLUS_EXPR.
16947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16948             Alan Hayward  <alan.hayward@arm.com>
16949             David Sherwood  <david.sherwood@arm.com>
16951         * omp-simd-clone.c (simd_clone_subparts): New function.
16952         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
16953         (ipa_simd_modify_function_body): Likewise.
16955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16956             Alan Hayward  <alan.hayward@arm.com>
16957             David Sherwood  <david.sherwood@arm.com>
16959         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
16960         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
16961         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
16962         (expand_vector_condition, vector_element): Likewise.
16963         (subparts_gt): New function.
16964         (get_compute_type): Use subparts_gt.
16965         (count_type_subparts): Delete.
16966         (expand_vector_operations_1): Use subparts_gt instead of
16967         count_type_subparts.
16969 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16970             Alan Hayward  <alan.hayward@arm.com>
16971             David Sherwood  <david.sherwood@arm.com>
16973         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
16974         (vect_compile_time_alias): ...this new function.  Do the calculation
16975         on poly_ints rather than trees.
16976         (vect_prune_runtime_alias_test_list): Update call accordingly.
16978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16979             Alan Hayward  <alan.hayward@arm.com>
16980             David Sherwood  <david.sherwood@arm.com>
16982         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
16983         numbers of units.
16984         (vect_schedule_slp_instance): Likewise.
16986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16987             Alan Hayward  <alan.hayward@arm.com>
16988             David Sherwood  <david.sherwood@arm.com>
16990         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
16991         constant and extern definitions for variable-length vectors.
16992         (vect_get_constant_vectors): Note that the number of units
16993         is known to be constant.
16995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16996             Alan Hayward  <alan.hayward@arm.com>
16997             David Sherwood  <david.sherwood@arm.com>
16999         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17000         of units as polynomial.  Choose between WIDE and NARROW based
17001         on multiple_p.
17003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17004             Alan Hayward  <alan.hayward@arm.com>
17005             David Sherwood  <david.sherwood@arm.com>
17007         * tree-vect-stmts.c (simd_clone_subparts): New function.
17008         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17011             Alan Hayward  <alan.hayward@arm.com>
17012             David Sherwood  <david.sherwood@arm.com>
17014         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17015         vectors as polynomial.  Use build_index_vector for
17016         IFN_GOMP_SIMD_LANE.
17018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17019             Alan Hayward  <alan.hayward@arm.com>
17020             David Sherwood  <david.sherwood@arm.com>
17022         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17023         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17024         for variable-length vectors.
17025         (vectorizable_mask_load_store): Treat the number of units as
17026         polynomial, asserting that it is constant if the condition has
17027         already been enforced.
17028         (vectorizable_store, vectorizable_load): Likewise.
17030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17031             Alan Hayward  <alan.hayward@arm.com>
17032             David Sherwood  <david.sherwood@arm.com>
17034         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17035         of units as polynomial.  Punt if we can't tell at compile time
17036         which vector contains the final result.
17038 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17039             Alan Hayward  <alan.hayward@arm.com>
17040             David Sherwood  <david.sherwood@arm.com>
17042         * tree-vect-loop.c (vectorizable_induction): Treat the number
17043         of units as polynomial.  Punt on SLP inductions.  Use an integer
17044         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17045         cast of such a series for variable-length floating-point
17046         reductions.
17048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17049             Alan Hayward  <alan.hayward@arm.com>
17050             David Sherwood  <david.sherwood@arm.com>
17052         * tree.h (build_index_vector): Declare.
17053         * tree.c (build_index_vector): New function.
17054         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17055         of units as polynomial, forcibly converting it to a constant if
17056         vectorizable_reduction has already enforced the condition.
17057         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17058         to create a {1,2,3,...} vector.
17059         (vectorizable_reduction): Treat the number of units as polynomial.
17060         Choose vectype_in based on the largest scalar element size rather
17061         than the smallest number of units.  Enforce the restrictions
17062         relied on above.
17064 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17065             Alan Hayward  <alan.hayward@arm.com>
17066             David Sherwood  <david.sherwood@arm.com>
17068         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17069         number of units as polynomial.
17071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17072             Alan Hayward  <alan.hayward@arm.com>
17073             David Sherwood  <david.sherwood@arm.com>
17075         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17076         * target.def (autovectorize_vector_sizes): Return the vector sizes
17077         by pointer, using vector_sizes rather than a bitmask.
17078         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17079         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17080         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17081         Likewise.
17082         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17083         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17084         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17085         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17086         * omp-general.c (omp_max_vf): Likewise.
17087         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17088         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17089         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17090         * tree-vect-slp.c (vect_slp_bb): Likewise.
17091         * doc/tm.texi: Regenerate.
17092         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17093         to a poly_uint64.
17094         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17095         the vector size as a poly_uint64 rather than an unsigned int.
17096         (current_vector_size): Change from an unsigned int to a poly_uint64.
17097         (get_vectype_for_scalar_type): Update accordingly.
17098         * tree.h (build_truth_vector_type): Take the size and number of
17099         units as a poly_uint64 rather than an unsigned int.
17100         (build_vector_type): Add a temporary overload that takes
17101         the number of units as a poly_uint64 rather than an unsigned int.
17102         * tree.c (make_vector_type): Likewise.
17103         (build_truth_vector_type): Take the number of units as a poly_uint64
17104         rather than an unsigned int.
17106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17107             Alan Hayward  <alan.hayward@arm.com>
17108             David Sherwood  <david.sherwood@arm.com>
17110         * target.def (get_mask_mode): Take the number of units and length
17111         as poly_uint64s rather than unsigned ints.
17112         * targhooks.h (default_get_mask_mode): Update accordingly.
17113         * targhooks.c (default_get_mask_mode): Likewise.
17114         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17115         * doc/tm.texi: Regenerate.
17117 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17118             Alan Hayward  <alan.hayward@arm.com>
17119             David Sherwood  <david.sherwood@arm.com>
17121         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17122         * omp-general.c (omp_max_vf): Likewise.
17123         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17124         (expand_omp_simd): Handle polynomial safelen.
17125         * omp-low.c (omplow_simd_context): Add a default constructor.
17126         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17127         (lower_rec_simd_input_clauses): Update accordingly.
17128         (lower_rec_input_clauses): Likewise.
17130 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17131             Alan Hayward  <alan.hayward@arm.com>
17132             David Sherwood  <david.sherwood@arm.com>
17134         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17135         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17136         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17137         (vect_analyze_slp_cost): Likewise.
17138         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17139         (vect_model_load_cost): Likewise.
17141 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17142             Alan Hayward  <alan.hayward@arm.com>
17143             David Sherwood  <david.sherwood@arm.com>
17145         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17146         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17147         from an unsigned int * to a poly_uint64_pod *.
17148         (calculate_unrolling_factor): New function.
17149         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17151 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17152             Alan Hayward  <alan.hayward@arm.com>
17153             David Sherwood  <david.sherwood@arm.com>
17155         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17156         from an unsigned int to a poly_uint64.
17157         (_loop_vec_info::slp_unrolling_factor): Likewise.
17158         (_loop_vec_info::vectorization_factor): Change from an int
17159         to a poly_uint64.
17160         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17161         (vect_get_num_vectors): New function.
17162         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17163         (vect_get_num_copies): Use vect_get_num_vectors.
17164         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17165         to an unsigned int *.
17166         (vect_analyze_data_refs): Change min_vf from an int * to a
17167         poly_uint64 *.
17168         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17169         than an unsigned HOST_WIDE_INT.
17170         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17171         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17172         to an unsigned int *.
17173         (vect_analyze_data_ref_dependences): Likewise.
17174         (vect_compute_data_ref_alignment): Handle polynomial vf.
17175         (vect_enhance_data_refs_alignment): Likewise.
17176         (vect_prune_runtime_alias_test_list): Likewise.
17177         (vect_shift_permute_load_chain): Likewise.
17178         (vect_supportable_dr_alignment): Likewise.
17179         (dependence_distance_ge_vf): Take the vectorization factor as a
17180         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17181         (vect_analyze_data_refs): Change min_vf from an int * to a
17182         poly_uint64 *.
17183         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17184         vfm1 as a poly_uint64 rather than an int.  Make the same change
17185         for the returned bound_scalar.
17186         (vect_gen_vector_loop_niters): Handle polynomial vf.
17187         (vect_do_peeling): Likewise.  Update call to
17188         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17189         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17190         be constant.
17191         * tree-vect-loop.c (vect_determine_vectorization_factor)
17192         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17193         (vect_get_known_peeling_cost): Likewise.
17194         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17195         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17196         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17197         updating the upper bounds of the loop.
17198         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17199         rather than an int.
17200         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17201         polynomial unroll factors.
17202         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17203         (vect_make_slp_decision): Likewise.
17204         (vect_supported_load_permutation_p): Likewise, and polynomial
17205         vf too.
17206         (vect_analyze_slp_cost): Handle polynomial vf.
17207         (vect_slp_analyze_node_operations): Likewise.
17208         (vect_slp_analyze_bb_1): Likewise.
17209         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17210         than an unsigned HOST_WIDE_INT.
17211         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17212         (vectorizable_load): Handle polynomial vf.
17213         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17214         a poly_uint64.
17215         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17218             Alan Hayward  <alan.hayward@arm.com>
17219             David Sherwood  <david.sherwood@arm.com>
17221         * match.pd: Handle bit operations involving three constants
17222         and try to fold one pair.
17224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17226         * tree-vect-loop-manip.c: Include gimple-fold.h.
17227         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17228         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17229         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17230         Add a path that uses a step of VF instead of 1, but disable it
17231         for now.
17232         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17233         and niters_no_overflow parameters.  Update calls to
17234         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17235         Create a new SSA name if the latter choses to use a ste other
17236         than zero, and return it via niters_vector_mult_vf_var.
17237         * tree-vect-loop.c (vect_transform_loop): Update calls to
17238         vect_do_peeling, vect_gen_vector_loop_niters and
17239         slpeel_make_loop_iterate_ntimes.
17240         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17241         (vect_gen_vector_loop_niters): Update declarations after above changes.
17243 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17245         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17246         128-bit round to integer instructions.
17247         (ceil<mode>2): Likewise.
17248         (btrunc<mode>2): Likewise.
17249         (round<mode>2): Likewise.
17251 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17253         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17254         unaligned VSX load/store on P8/P9.
17255         (expand_block_clear): Allow the use of unaligned VSX
17256         load/store on P8/P9.
17258 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17260         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17261         New function.
17262         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17263         swap associated with both a load and a store.
17265 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17267         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17268         * config/riscv/riscv.md (clear_cache): Use it.
17270 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17272         * web.c: Remove out-of-date comment.
17274 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17276         * expr.c (fixup_args_size_notes): Check that any existing
17277         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17278         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17279         (emit_single_push_insn): ...here.
17281 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17283         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17284         (const_vector_encoded_nelts): New function.
17285         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17286         (const_vector_int_elt, const_vector_elt): Declare.
17287         * emit-rtl.c (const_vector_int_elt_1): New function.
17288         (const_vector_elt): Likewise.
17289         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17290         of CONST_VECTOR_ELT.
17292 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17294         * expr.c: Include rtx-vector-builder.h.
17295         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17296         directly on the tree encoding.
17297         (const_vector_from_tree): Likewise.
17298         * optabs.c: Include rtx-vector-builder.h.
17299         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17300         sequence of "u" values.
17301         * vec-perm-indices.c: Include rtx-vector-builder.h.
17302         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17303         directly on the vec_perm_indices encoding.
17305 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17307         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17308         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17309         * rtx-vector-builder.h: New file.
17310         * rtx-vector-builder.c: Likewise.
17311         * rtl.h (rtx_def::u2): Add a const_vector field.
17312         (CONST_VECTOR_NPATTERNS): New macro.
17313         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17314         (CONST_VECTOR_DUPLICATE_P): Likewise.
17315         (CONST_VECTOR_STEPPED_P): Likewise.
17316         (CONST_VECTOR_ENCODED_ELT): Likewise.
17317         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17318         (unwrap_const_vec_duplicate): Likewise.
17319         (const_vec_series_p): Check for a non-duplicated vector encoding.
17320         Say that the function only returns true for integer vectors.
17321         * emit-rtl.c: Include rtx-vector-builder.h.
17322         (gen_const_vec_duplicate_1): Delete.
17323         (gen_const_vector): Call gen_const_vec_duplicate instead of
17324         gen_const_vec_duplicate_1.
17325         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17326         (gen_const_vec_duplicate): Use rtx_vector_builder.
17327         (gen_const_vec_series): Likewise.
17328         (gen_rtx_CONST_VECTOR): Likewise.
17329         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17330         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17331         Build a new vector rather than modifying a CONST_VECTOR in-place.
17332         (handle_special_swappables): Update call accordingly.
17333         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17334         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17335         Build a new vector rather than modifying a CONST_VECTOR in-place.
17336         (handle_special_swappables): Update call accordingly.
17338 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17340         * simplify-rtx.c (simplify_const_binary_operation): Use
17341         CONST_VECTOR_ELT instead of XVECEXP.
17343 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17345         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17346         the selector elements to be different from the data elements
17347         if the selector is a VECTOR_CST.
17348         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17349         ssizetype for the selector.
17351 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17353         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17354         before testing each element individually.
17355         * tree-vect-generic.c (lower_vec_perm): Likewise.
17357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17359         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17360         * selftest-run-tests.c (selftest::run_tests): Call it.
17361         * vector-builder.h (vector_builder::operator ==): New function.
17362         (vector_builder::operator !=): Likewise.
17363         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17364         (vec_perm_indices::all_from_input_p): New function.
17365         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17366         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17367         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17368         instead of reading the VECTOR_CST directly.  Detect whether both
17369         vector inputs are the same before constructing the vec_perm_indices,
17370         and update the number of inputs argument accordingly.  Use the
17371         utility functions added above.  Only construct sel2 if we need to.
17373 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17375         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17376         the broadcast of the low byte.
17377         (expand_mult_highpart): Use an explicit encoding for the permutes.
17378         * optabs-query.c (can_mult_highpart_p): Likewise.
17379         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17380         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17381         (vectorizable_bswap): Likewise.
17382         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17383         explicit encoding for the power-of-2 permutes.
17384         (vect_permute_store_chain): Likewise.
17385         (vect_grouped_load_supported): Likewise.
17386         (vect_permute_load_chain): Likewise.
17388 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17390         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17391         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17392         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17393         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17394         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17395         (vect_gen_perm_mask_any): Likewise.
17397 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17399         * int-vector-builder.h: New file.
17400         * vec-perm-indices.h: Include int-vector-builder.h.
17401         (vec_perm_indices): Redefine as an int_vector_builder.
17402         (auto_vec_perm_indices): Delete.
17403         (vec_perm_builder): Redefine as a stand-alone class.
17404         (vec_perm_indices::vec_perm_indices): New function.
17405         (vec_perm_indices::clamp): Likewise.
17406         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17407         (vec_perm_indices::new_vector): New function.
17408         (vec_perm_indices::new_expanded_vector): Update for new
17409         vec_perm_indices class.
17410         (vec_perm_indices::rotate_inputs): New function.
17411         (vec_perm_indices::all_in_range_p): Operate directly on the
17412         encoded form, without computing elided elements.
17413         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17414         encoding.  Update for new vec_perm_indices class.
17415         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17416         the given vec_perm_builder.
17417         (expand_vec_perm_var): Update vec_perm_builder constructor.
17418         (expand_mult_highpart): Use vec_perm_builder instead of
17419         auto_vec_perm_indices.
17420         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17421         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17422         or double series encoding as appropriate.
17423         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17424         vec_perm_indices instead of auto_vec_perm_indices.
17425         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17426         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17427         (vect_permute_store_chain): Likewise.
17428         (vect_grouped_load_supported): Likewise.
17429         (vect_permute_load_chain): Likewise.
17430         (vect_shift_permute_load_chain): Likewise.
17431         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17432         (vect_transform_slp_perm_load): Likewise.
17433         (vect_schedule_slp_instance): Likewise.
17434         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17435         (vectorizable_mask_load_store): Likewise.
17436         (vectorizable_bswap): Likewise.
17437         (vectorizable_store): Likewise.
17438         (vectorizable_load): Likewise.
17439         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17440         vec_perm_indices instead of auto_vec_perm_indices.  Use
17441         tree_to_vec_perm_builder to read the vector from a tree.
17442         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17443         vec_perm_builder instead of a vec_perm_indices.
17444         (have_whole_vector_shift): Use vec_perm_builder and
17445         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17446         truncation to calc_vec_perm_mask_for_shift.
17447         (vect_create_epilog_for_reduction): Likewise.
17448         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17449         from auto_vec_perm_indices to vec_perm_indices.
17450         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17451         instead of changing individual elements.
17452         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17453         the vector in d.perm.
17454         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17455         from auto_vec_perm_indices to vec_perm_indices.
17456         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17457         instead of changing individual elements.
17458         (arm_vectorize_vec_perm_const): Use new_vector to install
17459         the vector in d.perm.
17460         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17461         Update vec_perm_builder constructor.
17462         (rs6000_expand_interleave): Likewise.
17463         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17464         (rs6000_expand_interleave): Likewise.
17466 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17468         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17469         to qimode could truncate the indices.
17470         * optabs.c (expand_vec_perm_var): Likewise.
17472 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17474         * Makefile.in (OBJS): Add vec-perm-indices.o.
17475         * vec-perm-indices.h: New file.
17476         * vec-perm-indices.c: Likewise.
17477         * target.h (vec_perm_indices): Replace with a forward class
17478         declaration.
17479         (auto_vec_perm_indices): Move to vec-perm-indices.h.
17480         * optabs.h: Include vec-perm-indices.h.
17481         (expand_vec_perm): Delete.
17482         (selector_fits_mode_p, expand_vec_perm_var): Declare.
17483         (expand_vec_perm_const): Declare.
17484         * target.def (vec_perm_const_ok): Replace with...
17485         (vec_perm_const): ...this new hook.
17486         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17487         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17488         * doc/tm.texi: Regenerate.
17489         * optabs.def (vec_perm_const): Delete.
17490         * doc/md.texi (vec_perm_const): Likewise.
17491         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17492         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17493         expand_vec_perm for constant permutation vectors.  Assert that
17494         the mode of variable permutation vectors is the integer equivalent
17495         of the mode that is being permuted.
17496         * optabs-query.h (selector_fits_mode_p): Declare.
17497         * optabs-query.c: Include vec-perm-indices.h.
17498         (selector_fits_mode_p): New function.
17499         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17500         is defined, instead of checking whether the vec_perm_const_optab
17501         exists.  Use targetm.vectorize.vec_perm_const instead of
17502         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
17503         fit in the vector mode before using a variable permute.
17504         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17505         vec_perm_indices instead of an rtx.
17506         (expand_vec_perm): Replace with...
17507         (expand_vec_perm_const): ...this new function.  Take the selector
17508         as a vec_perm_indices rather than an rtx.  Also take the mode of
17509         the selector.  Update call to shift_amt_for_vec_perm_mask.
17510         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
17511         Use vec_perm_indices::new_expanded_vector to expand the original
17512         selector into bytes.  Check whether the indices fit in the vector
17513         mode before using a variable permute.
17514         (expand_vec_perm_var): Make global.
17515         (expand_mult_highpart): Use expand_vec_perm_const.
17516         * fold-const.c: Includes vec-perm-indices.h.
17517         * tree-ssa-forwprop.c: Likewise.
17518         * tree-vect-data-refs.c: Likewise.
17519         * tree-vect-generic.c: Likewise.
17520         * tree-vect-loop.c: Likewise.
17521         * tree-vect-slp.c: Likewise.
17522         * tree-vect-stmts.c: Likewise.
17523         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17524         Delete.
17525         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17526         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17527         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17528         (aarch64_vectorize_vec_perm_const): ...this new function.
17529         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17530         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17531         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17532         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17533         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17534         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17535         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17536         into...
17537         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
17538         check for NEON modes.
17539         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17540         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17541         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17542         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17543         into...
17544         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
17545         the old VEC_PERM_CONST conditions.
17546         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17547         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17548         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17549         (ia64_vectorize_vec_perm_const_ok): Merge into...
17550         (ia64_vectorize_vec_perm_const): ...this new function.
17551         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17552         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17553         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17554         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17555         * config/mips/mips.c (mips_expand_vec_perm_const)
17556         (mips_vectorize_vec_perm_const_ok): Merge into...
17557         (mips_vectorize_vec_perm_const): ...this new function.
17558         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17559         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17560         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17561         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17562         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17563         (rs6000_expand_vec_perm_const): Delete.
17564         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17565         Delete.
17566         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17567         (altivec_expand_vec_perm_const_le): Take each operand individually.
17568         Operate on constant selectors rather than rtxes.
17569         (altivec_expand_vec_perm_const): Likewise.  Update call to
17570         altivec_expand_vec_perm_const_le.
17571         (rs6000_expand_vec_perm_const): Delete.
17572         (rs6000_vectorize_vec_perm_const_ok): Delete.
17573         (rs6000_vectorize_vec_perm_const): New function.
17574         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17575         an element count and rtx array.
17576         (rs6000_expand_extract_even): Update call accordingly.
17577         (rs6000_expand_interleave): Likewise.
17578         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17579         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17580         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17581         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17582         (rs6000_expand_vec_perm_const): Delete.
17583         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17584         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17585         (altivec_expand_vec_perm_const_le): Take each operand individually.
17586         Operate on constant selectors rather than rtxes.
17587         (altivec_expand_vec_perm_const): Likewise.  Update call to
17588         altivec_expand_vec_perm_const_le.
17589         (rs6000_expand_vec_perm_const): Delete.
17590         (rs6000_vectorize_vec_perm_const_ok): Delete.
17591         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
17592         reference to the SPE evmerge intructions.
17593         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17594         an element count and rtx array.
17595         (rs6000_expand_extract_even): Update call accordingly.
17596         (rs6000_expand_interleave): Likewise.
17597         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17598         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17599         new function.
17600         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17602 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17604         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17605         vector mode and that that mode matches the mode of the data
17606         being permuted.
17607         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17608         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
17609         directly using expand_vec_perm_1 when forcing selectors into
17610         registers.
17611         (expand_vec_perm_var): New function, split out from expand_vec_perm.
17613 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17615         * optabs-query.h (can_vec_perm_p): Delete.
17616         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17617         * optabs-query.c (can_vec_perm_p): Split into...
17618         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17619         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17620         particular selector is valid.
17621         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17622         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17623         (vect_grouped_load_supported): Likewise.
17624         (vect_shift_permute_load_chain): Likewise.
17625         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17626         (vect_transform_slp_perm_load): Likewise.
17627         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17628         (vectorizable_bswap): Likewise.
17629         (vect_gen_perm_mask_checked): Likewise.
17630         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
17631         implementations of variable permutation vectors into account
17632         when deciding which selector to use.
17633         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17634         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17635         with a false third argument.
17636         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17637         to test whether the constant selector is valid and can_vec_perm_var_p
17638         to test whether a variable selector is valid.
17640 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17642         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17643         * optabs-query.c (can_vec_perm_p): Likewise.
17644         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17645         instead of vec_perm_indices.
17646         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17647         (vect_gen_perm_mask_checked): Likewise,
17648         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17649         (vect_gen_perm_mask_checked): Likewise,
17651 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17653         * optabs-query.h (qimode_for_vec_perm): Declare.
17654         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17655         (qimode_for_vec_perm): ...this new function.
17656         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17658 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17660         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17661         does not have a conditional at the top.
17663 2018-01-02  Richard Biener  <rguenther@suse.de>
17665         * ipa-inline.c (big_speedup_p): Fix expression.
17667 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17669         PR target/81616
17670         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17671         for generic 4->6.
17673 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17675         PR target/81616
17676         Generic tuning.
17677         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17678         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17679         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17680         cond_taken_branch_cost 3->4.
17682 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
17684         PR tree-optimization/83581
17685         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17686         TODO_cleanup_cfg if any changes have been made.
17688         PR middle-end/83608
17689         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17690         convert_modes if target mode has the right side, but different mode
17691         class.
17693         PR middle-end/83609
17694         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17695         last argument when extracting from CONCAT.  If either from_real or
17696         from_imag is NULL, use expansion through memory.  If result is not
17697         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17698         the parts directly to inner mode, if even that fails, use expansion
17699         through memory.
17701         PR middle-end/83623
17702         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17703         check for bswap in mode rather than HImode and use that in expand_unop
17704         too.
17706 Copyright (C) 2018 Free Software Foundation, Inc.
17708 Copying and distribution of this file, with or without modification,
17709 are permitted in any medium without royalty provided the copyright
17710 notice and this notice are preserved.